Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

原文链接 http://chenhao.space/post/b215757d.html

论文题目:Aspect Based Sentiment Analysis with Gated Convolutional Networks

来源:ACL 2018 https://www.aclweb.org/anthology/P18-1234/

作者:Wei Xue and Tao Li, School of Computing and Information SciencesFlorida International University, Miami, FL, USA.

Introduction

Aspect based sentiment analysis (ABSA) 分为两个子任务:

  1. aspect-category sentiment analysis (ACSA)

    ACSA的目标是针对给定的aspect,预测情感极性。

    如:“Average to good Thai food, but terrible delivery”,ACSA的任务会判断 “service” 这个方面的情感极性,虽然 “service” 这个词没有出现在句子中。

  2. aspect-term sentiment analysis (ATSA)

    ATSA的目标是识别出文本中出现的目标实体的情感极性,这些目标实体可以是多词短语或单个词。

    如:“Average to good Thai food, but terrible delivery”,ATSA的任务会判断实体目标 “Thai food” 的情感极性。

目前大多模型用的方法是 LSTM+attention,这样的模型最大的缺点就是复杂和(训练)耗时。

作者提出了一种更快、更高效的模型:基于CNN(可以高度并行化计算)和gating(门控)机制的方法。

Gated Convolutional Network with Aspect Embedding (GCAE)

该模型是基于卷积层和门控单元。每一个卷积核分别从每个位置的embedding vectors计算不同粒度的n-gram特征,在每个位置处的卷积层顶部的门控单元彼此独立。

模型中的两种有效的过滤机制:卷积层之上的门控单元(gating units)和max pooling,这两种机制都能准确地生成和选择与aspect相关的情感特征。

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

一对卷积神经元计算特征,然后送给这两个门控单元(tanh gate 和 ReLU gate)。

feature cic_i 的计算过程如下:
ai=relu(Xi:i+kWa+Vava+ba)si=tanh(Xi:i+kWs+bs)ci=si×ai \begin{aligned}\Large a_i &= \Large relu(X_{i:i+k}*W_a + V_a v_a + b_a) \\\Large s_i &= \Large tanh(X_{i:i+k}*W_s + b_s) \\\Large c_i &= \Large s_i \times a_i\end{aligned}
其中,vav_a 是给定的 aspect category (in ACSA) embedding vector,如果是在ATSA任务中,vav_a 则是另外一个卷积层计算出来的 aspect term embedding vector。

sis_i 相当于是是经过tanh门控的情感特征,aia_i 相当于是经过relu门控的aspect特征。

交叉熵损失函数:

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

ReLU gate 可以根据给定的aspect信息 vav_a 和aspect特征 aia_i 之间的相关性输出相似性score(这里是啥意思)。如果score=0,情感特征 sis_i 将会被阻塞。

GCAE on ATSA

在ACSA任务中,aspect信息来自于一个aspect word embedding,而在ATSA任务中,这些信息由一个小型的CNN对aspect terms: [wi,wi+1,...,wi+k][w_i,w_{i+1},...,w_{i+k}]进行卷积来提供。

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

Experiments

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

数据集:

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

实验对比结果:(GCN: gated convolutional neural)

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

Aspect Based Sentiment Analysis with Gated Convolutional Networks 阅读笔记

Gated Tanh Units (GTU)

Gated Linear Units (GLU)

Gated Tanh-ReLU Units (GTRU)