- 引入语法依赖树是有用的:语法对于关系抽取有意
- 依赖树–>直接用于构建模型结构
- 或者,多任务学习(词对的依赖关系和语义关系RE两个任务)
- 获得词法信息
- 缺点:
- 缺乏句法结构之外的泛化:泛化性能差
- 对RE重要的词没有被捕获
- 本文的方案
- 将词法信息引入模型
- 利用依赖树
- —>给对RE重要的词高分数(重要性分数)—给每一个词打分
- 做法
- ON-LSTM:获得每个词在RE中的重要性
- 语法的分数
- 让上面两个分数一致
- 将词法信息引入模型
1.Introductiony
1.1 神经网络的关系抽取
- 神经网络的关系抽取
- Verga et al., 2018
Patrick Verga, Emma Strubell, and Andrew McCallum.2018. Simultaneously self-attending to all mentions for full-abstract biological relation extraction. In EMNLP.
1.2使用依赖树的关系抽取
-
依赖树(使用依赖树的关系抽取)
- (Xu et al., 2015; Guo et al., 2019; Tran et al., 2019)
Yan Xu, Lili Mou, Ge Li, Yunchuan Chen, Hao Peng,and Zhi Jin. 2015. Classifying relations via long short term memory networks along shortest dependency paths. In EMNLP.
Zhijiang Guo, Yan Zhang, and Wei Lu. 2019. Attention guided graph convolutional networks for relation extraction. In ACL.
Van-Hien Tran, Van-Thuy Phi, Hiroyuki Shindo, and Yuji Matsumoto. 2019. Relation classification using segment-level attention-based cnn and dependencybased rnn. In NAACL-HLT.-
使用依赖树来构建神经网络
- GCN(依据语法树构建): (Zhang et al., 2018)
Yuhao Zhang, Peng Qi, and Christopher D Manning.2018. Graph convolution over pruned dependency trees improves relation extraction. In EMNLP.
-
缺陷
- 泛化性能差
- 测试数据和训练数据的语法结构不同
- 过拟合了
- 尤其是:跨领域关系抽取(语法结构差异更大
- 泛化性能差
-
解决想法
- 获得更一般的语法结构表示(依赖树)
1.2.2 依赖树的一般树
- RE的一般语法树表示
-
依赖树划分为边的集合:Veyseh et al., 2019
Amir Pouran Ben Veyseh, Thien Huu Nguyen, and Dejing Dou. 2019. Improving cross-domain performance for relation extraction via dependency prediction and information flow control. In IJCAI.
- 单词之间的依赖关系集合
- 随后用于多任务学习
- 优点:
- 对整个树的依赖变为对边的依赖–特定于边的泛化性好一点
- 只抓住了词对之间的依赖关系
- 限制
- 忽略了全局的重要性(对RE任务的重要性)
- 词在句子中能获得更多信息
- 依赖树在句子中可以帮助识别重要的单词,并为其分配更高的分数
- 忽略了全局的重要性(对RE任务的重要性)
-
1.3 本文做法
- 目标
- 一般树+词的重要性
- 做法
-
ON-LSTM(Shen et al., 2019):获得句子中单词的重要得分(对RE)
- LSTM+两个门(master遗忘门和master输入门)
- 高阶神经元被保持的更久(?)
- 重要性得分:依据激活神经元个数而定
- ON-LSTM第一次用于RE
- 改进:
- 问题:原始ON-LSTM只看这个单词及其左边的隐层单元(此前的)
- 右边的信息也很重要(要有一个整体的理解
- 使用句子的整体表示+master gates–>重要性
- LSTM+两个门(master遗忘门和master输入门)
-
注入基于语法的重要性得分
-
确保一致性:语法得分==RE得分(KL散度实现)
- 动机:提高重要性得分作为传递语法信息的桥梁的能力,丰富RE的向量表示
-
引入一种新的inductive bias
- 使得有最短依赖路径上的实体对之间的表示和整个句子的表示的相似性提升
- 关系可从这两者推断
- 所以期望依赖路径与整个句子的表示相似—都捕获了语义关系
- 相似,可获得更有利于RE的表示
-
2. 相关工作
2.1核方法
(Zelenko et al., 2003; Zhou et al., 2005; Bunescu and Mooney, 2005; Sun et al., 2011; Chan and Roth, 2010; Nguyen and Grishman, 2014; Nguyen et al., 2015c)
- 问题
- 对extensive feature 或者 kernel engineering effort的需求
- 阻碍了其泛化性和适用性
2.2 深度学习方法
2.2.1 CNN
(Zeng et al., 2014; Nguyen and Grishman, 2015a; dos Santos et al., 2015; Wang et al., 2016)
2.2.2 RNN
(Nguyen and Grishman, 2016; Zhou et al., 2016; Zhang et al., 2017; Nguyen et al., 2019a)
2.2.3 transformer
(Verga et al., 2018)
2.2.4 依赖树
(Tai et al., 2015; Xu et al., 2015; Liu et al., 2015; Miwa and Bansal, 2016; Peng et al., 2017; Zhang et al., 2018; Guo et al., 2019; Tran et al., 2019; Song et al., 2019; Veyseh et al., 2019)
- 问题
- 泛化性差
- 不同领域
- 无词法重要性(依赖树的边获得)
- (Veyseh et al., 2019)
- 泛化性差
3.模型
- 形式化:多分类问题
- W = w 1 , w 2 , . . . , w N : w t 为 第 t 个 词 s , o 为 头 实 体 、 尾 实 体 的 m e n t i o n 的 索 引 w s , w o 为 相 应 的 提 及 W=w_1,w_2,...,w_N:w_t为第t个词\\ s,o为头实体、尾实体的mention的索引\\ w_s,w_o为相应的提及 W=w1,w2,...,wN:wt为第t个词s,o为头实体、尾实体的mention的索引ws,wo为相应的提及
- 输入
- word embedding
- position embedding(实体1和实体2的)
- entity type embedding(BIO)
- 将 W = w 1 , w 2 , . . . , w N − − > X = x 1 , x 2 , . . . , x N W=w_1,w_2,...,w_N-->X=x_1,x_2,...,x_N W=w1,w2,...,wN−−>X=x1,x2,...,xN表示为向量
- 三个组件
- CEON-LSTM:centext-enriched ON-LSTM)计算基于模型的单词重要性
- syntax-model consistency component:基于语法的和基于模型的重要性分数一致
- the similarity component:使整个句子和最短依赖路径的向量表示相似
3.1CEON-LSTM
- 目的:计算每个词在句中上下文下,预测关系时的重要性(基于模型的分数)
- 组件
- ON-LSTM:得到基于模型的分数
- CEON-LSTM:将整个句子的表示整合到ON-LSTM的cells中
3.1.1 LSTM
- LSTM
- 输入: X = x 1 , x 2 , . . . , x N X=x_1,x_2,...,x_N X=x1,x2,...,xN
- 递归函数—LSTM的公式
- f t = σ ( W f x t + U f h t − 1 + b f ) i t = σ ( W i x t + U i h t − 1 + b i ) o t = σ ( W o x t + U o h t − 1 + b o ) c t ^ = t a n h ( W c x t + U c h t − 1 + b o ) c t = f t ∘ c t − 1 + i t ∘ c t ^ h t = o t ∘ t a n h ( c t ) f_t=\sigma(W_fx_t+U_fh_{t-1}+b_f)\\ i_t=\sigma(W_ix_t+U_ih_{t-1}+b_i)\\ o_t=\sigma(W_ox_t+U_oh_{t-1}+b_o)\\ \hat{c_t}=tanh(W_cx_t+U_ch_{t-1}+b_o)\\ c_t=f_t\circ c_{t-1}+i_t\circ \hat{c_t}\\ h_t=o_t\circ tanh(c_t) ft=σ(Wfxt+Ufht−1+bf)it=σ(Wixt+Uiht−1+bi)ot=σ(Woxt+Uoht−1+bo)ct^=tanh(Wcxt+Ucht−1+bo)ct=ft∘ct−1+it∘ct^ht=ot∘tanh(ct)
- 这里应该就是LSTM而不是GRU
3.1.2ON-LSTM
- ON-LSTM
- 多引入了两个门
- 为了计算重要性
- the master forget gate
- the master input gate
- 多引入了两个门
3.1.2.1 公式
- 公式
- f t = σ ( W f x t + U f h t − 1 + b f ) i t = σ ( W i x t + U i h t − 1 + b i ) o t = σ ( W o x t + U o h t − 1 + b o ) f t ^ = c u m m a x ( W f ^ x t + U f ^ h t − 1 + b f ^ ) i t ^ = 1 − c u m m a x ( W i ^ x t + U i ^ h t − 1 + b i ^ ) f t ˉ = f t ^ ∘ ( f t i t ^ + 1 − i t ^ ) i t ˉ = i t ^ ∘ ( i t f t ^ + 1 − f t ^ ) c t = f t ˉ ∘ c t − 1 + i t ˉ ∘ c t ^ h t = o t ∘ t a n h ( c t ) f_t=\sigma(W_fx_t+U_fh_{t-1}+b_f)\\ i_t=\sigma(W_ix_t+U_ih_{t-1}+b_i)\\ o_t=\sigma(W_ox_t+U_oh_{t-1}+b_o)\\ \hat{f_t}=cummax(W_{\hat{f}}x_t+U_{\hat{f}}h_{t-1}+b_{\hat{f}})\\ \hat{i_t}=1-cummax(W_{\hat{i}}x_t+U_{\hat{i}}h_{t-1}+b_{\hat{i}})\\ \bar{f_t}=\hat{f_t}\circ (f_t\hat{i_t}+1-\hat{i_t})\\ \bar{i_t}=\hat{i_t}\circ(i_t\hat{f_t}+1-\hat{f_t})\\ c_t=\bar{f_t}\circ c_{t-1}+\bar{i_t}\circ \hat{c_t}\\ h_t=o_t\circ tanh(c_t) ft=σ(Wfxt+Ufht−1+bf