【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment

Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment Classification

目录

  • introduction
  • method
  • experiments
  • conclusion and future work

introduction

方面级情绪分类旨在区分句子中一个或多个方面术语上的情绪极性。本文是第一个在一句话中考虑方面之间的情感依赖的方面级情感分类任务。本文设计了带有位置编码的双向注意机制来捕获特定方面的表示。使用GCN来有效地捕获句子中不同方面之间的情感依赖关系。
例如:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
从连词“But”中,我们很容易看出第二个方面“food”与“service”的情感极性相反。

method

本项工作的总体结构图:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
它由Input embedding layer、Bidirectional Long Short-Term Memory (Bi-LSTM)、Position encoding、Bidirectional attention mechanism、Graph convolutional network和Output layer组成。

Input embedding layer:
通过Glove和Bert进行嵌入,得到每个单词的向量表示,并组合成表示矩阵。
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Bidirectional Long Short-Term Memory (Bi-LSTM):
在这一层,使用两个LSTM得到forward和backward的隐藏表示,随后将两个表示进行拼接得到新的上下文和方面的隐藏向量。可以同时关注前面、后面的证据。

【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Position encoding:
该层将位置信息加入到表示当中,使得与靠近target’的上下文词的权重更高,避免target附近的其他情感词影响对target情感的判断。
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Bidirectional attention mechanism:
Context to aspect attention
上下文到方面注意学习根据查询向量为方面词分配注意权值,其中查询向量hc,是通过对上下文隐藏输出hc进行平均池化操作得到的。
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Aspect to context attention
方面对上下文的注意学习捕获方面的具体表示,这与方面注意的上下文相似。通过新的方面表示形式和位置感知表示形式pai来计算注意力得分,其过程可以表述为:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment

【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Graph convolutional network:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
(a)邻接关系图:每个方面只与和自己相邻的方面有连边。
(b)全局关系图:每个方面与其他方面均有连边。
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
X为前面得到的方面表示,x1、x2…作为每一个方面节点的表示构成关系图,然后通过多层GCN得到最后可以用于分类的表示。公式如下:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
Output layer:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
这一层先对GCN得到的表示做一个线性变化,最后通过softmax尽可以进行情感分类了。

experiments

dataset:
two datasets from SemEval 2014 Task (the reviews in laptop and restaurant)
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
损失函数:【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment
实验设置:
评价指标Accuracy、 Macro-F1
单词向量的维数Glove为300维,BERT为768维
LSTM隐藏单元数设置为300
GCN层的输出维数设置为600
最后一层完全连接层的权值矩阵由正态分布N(0,1)随机初始化。
除最后一个完全连接层外,所有权值矩阵都由均匀分布U(−0.01,0.01)随机初始化。
dropout设置为0.5
batch size设置为32
学习率为0.001
实验结果:
【论文阅读笔记】Modeling Sentiment Dependencies with Graph Convolutional Networks for Aspect-level Sentiment

conclusion and future work

conclusion:
本文设计了一种新的基于GCN的方面级情绪分类模型。该模型的核心思想是利用GCN对一句话中不同方面之间的情感依赖进行建模。具体来说,SDGCN首先采用带有位置编码的双向注意机制来获取特定方面的表示,然后通过方面之间的消息传递来获取情感依赖。案例研究表明,SDGCN不仅可以关注对预测各方面情绪极性重要的词汇,还可以关注有助于判断各方面情绪依赖关系的词汇。
future work:
在未来的工作中,我们将探索如何在各方面之间建立更精确的情感图结构。本文中的两种无向情感图是粗糙的。作者推测利用文本信息来定义图形可以创建更好的图形结构。

论文原文链接:添加链接描述