Zhenyu Zhang, et al., “Document-level Relation Extraction with Dual-tier Heterogeneous Graph”, COLING 2020
1 简介
- 姓名:DHG
- 任务:基于图的文档级关系抽取
- 动机:无法同时捕捉 document 的 sequential 和 structural 信息
- 方法:使用两个图,一个是用 word 和 sentence 为节点的图,来捕捉文本的结构信息(4.1),另一张图是 mention 和 entity 的图,做关系推理。图模型使用 weighted RGCN(WRGCN),不同类别的边有不同的权重;正是因为权重的引入,连边也可以更 dense
- sota @ CDR, GDA
- 短评:两个创新点我都严重质疑,感觉理论上没什么用(不过 ablation 做的好好)
2 方法
还是分成四个部分,encoder,structure graph,relation reasoning graph,classification。encoder 是 [word embedding; type embedding; coreference embedding] 过 Bi-LSTM 或 BERT,下面详细讲后三个部分。不过在讲两个图之前,先讲一下他的 WRGCN,在两个图中,作者都使用了两层的 WRGAN。
2.1 WRGCN
原始 RGCN 每个 layer 信息传递可以用下面这个式子表达:$$h_i^{l+1} = \sigma(\sum_{t\in\mathcal{T}}\sum_{j\in\mathcal{N_i^t}}\frac{1}{|\mathcal{N}_i^t|}W_t^lh_j^l + W_s^lh_i^l)$$
这个式子相当于把图中的所有边分类,前面的 $\sum\sum$ 是对于每一类边有不同的 $W^l_t$,后面的 $W_s^l$ 指自环。作者在这里又给每个不同类的边加了一个权重:$$h_i^{l+1} = \sigma(\sum_{t\in\mathcal{T}}\sum_{j\in\mathcal{N_i^t}}\frac{\alpha_t^l}{|\mathcal{N}_i^t|}W_t^lh_j^l + W_s^lh_i^l) = \sigma(u_i^l)$$
这里我有点疑问(4.2)。
除了加 weight,作者还加入了每层的残差链接,由一个 gate 控制:$$g_i^l = \text{sigmoid}(\mathcal{F_g}([u_i^l;j_i^l]))$$ $$h^{l+1}_i = g_i^l\odot\sigma(u_i^l) + (1-g_i^l)\odot h_i^l$$
其中 $\mathcal{F_g}$ 是一个 reshape 的 linear transformation,gate 感觉就是在算这一层输入输出每一维的相似度(?)
2.2 structure modeling graph
word 和 sentence 作为 node,包含五类边:
- 相邻的 word
- 句法树上的 word 之间的边
- 属于 sentence 的 word 都连接到 sentence 节点上
- 相邻 sentence 连边
- 不满足 4 的,所有 sentence 节点全相连
由于设计了 weighted RGCN,所以 5 的权值肯定比 4 低得多,感觉这也是设计 weighted 机制的目的。这个图过两层 WRGXN,每层再多加一个纯粹的 shortcut(输入输入拼起来 reshape),得到 word 表示。
2.3 relation reasoning graph
这张图由 mention(word 平均) 和 entity(mention 平均) 构成,包含四类边:
- 同一句中的 mention 全连接
- 同一个 entity 的 mention 全连接
- 属于 entity 的 mention 都连接到 entity 节点上
- 所有 entity 全连接
也是过两层 WRGCN,得到 entity 表示 $\bar{e}$
2.4 classification
对于一个 entity pair,先将各自的 embedding 拼上相对位置 embedding,然后再过双线性来分类。这里相对位置的 embedding 是两个 entity 各自第一个出现的 mention 的距离。这个感觉还有点粗糙,不够“完全模拟真实情况”,可以有改进空间。
3 实验
- sota @ CDR, GDA,作者认为是 ① 将学习 structure 信息和 reasoning 解耦(?别人也没在一张图上干这两件事啊)② weighted 机制对异质图的信息传播有用(4.2 严重质疑)
- DHG 在 inter 和 intra 都是完全领先,inter 领先更多,看来是 doc structure 有用
- ablation:所有机制、所有图的所有边全有用(4.4)
4 思考
- 传统上认为,结构信息在 Bi-LSTM 或者 BERT 里面似乎就可以捕捉到了。但是本文的 structure graph 去掉后,降了 4%,这说明 encoder 学 context 表示还是不够,尤其是远距离的 context。所以从 context 入手改进,还是有意义的。但会有这么大影响,我是没想到
- 我直接把 $W/\alpha$ 看做 $W$,这两个式子又有什么区别呢?反正 $\alpha$ 也是 trainable 啊?甚至初始化的时候也没什么区别吧?这没有对神经网络的表达能力产生什么好处吧?这里我严重质疑。但是如果这里没有好处,那他连接 complement 边,又怎么会使性能增强呢?真的好奇怪
- DocRE 的 entity relative position 大家都怎么表示?
- 作者说 operation of shortcut connection in SML is crucial since the F1 drops markedly by 1.6% if it is removed, which can be interpreted that the shortcut provides an effective way to combine sequential with structural information and tackles the vanishing gradient problem in deep neural networks —— 可是你只有两层啊!
5 TODO
RGCN,异质图的一些基础知识