Aspect-Level Sentiment Analysis Via Convolution over Dependency Tree
Abstract
本文提出将依赖树于神经网络相结合解决方面级情感分析问题(Aspect-Level Sentiment Analysis,ALSA)。本文提出了 convolution over a dependency tree (CDT) 模型,它利用 BiLSTM 学习句子的特征表示,然后使用 GCN 来增强从 BiLSTM 中学到的 embedding。其中, GCN 直接对句子的依赖树进行操作。
一、Introduction
ABSA主要有两个任务:
- 识别句子的各个方面(aspect);
- 确定在特定方面(aspect)表达的情感极性(例如,正面、负面、中性)。
本文主要关注第二个任务。
CDT模型的总体思路:
- 使用 BiLSTM 学习word embeddings,然后让其作为依赖树的原始 node embeddings;
- 使用 GCN 增强从 BiLSTM 学习到的 word embeddings。GCN 操作依赖树(语法信息)来对句子的语法信息进行建模。
二、CDT 模型
CDT模型主要包含两个部分,BiLSTM model 和 GCN。其中,BiLSTM 用来学习句子的上下文信息,并将 BiLSTM 的结果作为依赖树的原始 node embeddings;然后使用 GCN 来增强从 BiLSTM 学到的 embeddings。最后,通过一个聚合器(平均池化)来聚合 aspect vectors 用来进行分类任务。
问题定义
- aspect-sentence pair (a, s)
- sentence:
- sentence s 对应的 word embeddings x:
- sub-sequence of the sentence a
1. BiLSTM model
- 正向 LSTM 学习 x 上文特征:
- 逆向 LSTM 学习 x 下文特征:
- 拼接正向和逆向LSTM的hidden state representations以获得上下文特征.
2、Graph Convolutional Network
- 依赖树用图结构来表示: G = (V, E) 其中,V 表示顶点的集合,其代表句子中的各个 word,用 Bi-LSTM 的输出作为 V 的初始化表示。E 表示边的集合,表示句子中各 word 之间的语法关系。
- 依赖树 G 用 n * n 的邻接矩阵 A 表示。其中,A_ij = 1代表 node i 和 node j 之间有关联;反之,A_ij = 1。
- 单层 GCN 只捕捉了 node i 的一跳邻居节点的信息,使用 k 个连续的 GCN 可以捕捉到 node i 的 k 跳邻居节点信息。
- 单个节点的 node embeddings 采用如下公式更新:
其中,表示 GCN 中第 k 层的第 j 个 node 的 hidden state representation。
为由 Bi-LSTM 提供的初始化 embedding,
为 node i 在第 k 层的最终output。
是一个归一化常数( normalization constant),其计算公式如下:
其中,d_i 表示 node i 的度,
表示 Relu 函数。
3、aggregator(聚合器)
采用平均池化来聚合 GCN 最终输出(第 k 层的output)中的 aspect vectors。
只聚合 aspect vectors 的理由:
我们相信,BiLSTM 和 GCN 分别编码了 aspect vectors的上下文信息和依赖性信息。
其中,f(.)表示平均池化函数。
4、Overview of the CDT model
CDT 模型的总体架构图如下所示:
5、Model Training
使用交叉熵损失函数:
三、Experiment
1、Performance comparison
2、GCN Performance
由图4 观察 CDT 的曲线可知,GCN 只在前两层增强了模型性能。因此,减少 GCN 的层数是有必要的。
3、Implementation and parameter settings
- 300 D Glove + 30 D POS embedding + 30 D position embedding 拼接在一起作为每个 word 的 word embedding;
- 利用 Bi-LSTM 从 360 D 的 word embedding 中学的 50 D 的 Bi-LSTM embedding ;
- GCN 作用于依赖树来增强 Bi-LSTM embedding ;
- 使用 Stanford parser ;
- GCN 训练 100 epochs,batch size = 32;
- Adam 优化器,学习率 α = 0.01;
- Dropout:randomly dropout 10% of neurons per layer, and about 0.7 at the input layer。