论文笔记 – Double Graph Based Reasoning for Document-level Relation Extraction

Shuang Zeng, et al., “Double Graph Based Reasoning for Document-level Relation Extraction”, EMNLP 2020

1 简介

这篇文章使用两张图,explicitly 进行关系推断。第一张图包含 mention 和 document,使用 GCN 得到信息传播后的 mention 和 document 表示,第二张图通过 mention 构建 entity 结点,对边进行显式地推断,得到具体 path 的表示,最后将上述三种表示进行组合,双线性变换分类。

最后超过 LSR、HIN 和一堆 baseline,取得 DocRED 的 sota。

2 方法

模型整体如图所示:

分成四个模块,其中 encoder 可以是 Bi-LSTM 或 BERT,下面详细描述后面三个模块。

2.1 heterogeneous mention graph

hmg 中包含所有 mention 各自对应的 mention node(token embedding 取平均(不是说取平均不好吗?怎么自己写文章还取平均 🙃)),和一个 document node([CLS]?Bi-LSTM 就不知道是啥了)。

hmg 中有三种边:

  1. intra entity edge:指向同一个 entity 的 mention 之间连边
  2. inter entity edge:同一句话中的 mention 连边
  3. document edge:所有 mention node 都连上 document node,这样 mention 之间距离最大为 2

使用 GCN 进行信息传递,最后将 GCN 每一层的表示拼在一起,作为 mention 的表示。

2.2 entity graph

EG 里面只有 entity node,entity node 由它指向的 mention 取平均得到。得到节点之后,开始计算边,有向边 i 到 j 的表示是两个顶点 i,j 的表示拼一起,过一层 linear 得到 $e_{ij}$。

然后开始推断:作者只考虑 2-hop 的情况,h-t 的第 i 条路径 h-o-t 的表示为:$$p_{h,t}^i = [e_{ho};e_{ot};e_{to};e_{oh}]$$

就是中间的步骤都拼到一起。这里我不太清楚,如果没有边(比如四个里面缺了一两个),该怎么表示呢?

最后,h-t 的综合路径由上面的所有路径加权平均得到,attn acore 通过 $[e_h;e_t]$ 作为 query 对 $p_{h,t}^i$ attn 得到。

作者说,With this module, an entity can be represented by fusing information from its mentions, which usually spread in multiple sentences. Moreover, potential reasoning clues are modeled by different paths between entities. Then they can be integrated with the attention mechanism so that we will take into account latent logical reasoning chains to predict relations.

2.3 classification

想把上面得到的 mention、edge、path 的表示进行充分的交互:$$I_{h,t} = [e_h;e_t;|e_h – e_t|;e_h\cdot e_t;m_{doc};p_{h,t}]$$

然后再经过两层 linear 来分类(为什么是两层?),交叉熵损失。

3 实验

整体:sota

ablation:

  1. hmg 不要(entity 直接用 mention 平均得到,然后在 EG 上用 GCN):drop 2%,hmg 可以捕捉 mention 之间的信息和 document-aware features;对 inter 影响更大
  2. inference 不要(整体拼接时不用 path):drop 2%,inference 对 2-hop 有帮助(但是帮助这么小,我也是没想到的,看来原来不考虑推理的关系抽取,其实也能抽出大部分需要推理的关系?)
  3. hmg 里面不要 document node:drop 2%,document 可以作为 pivot,缩短距离

4 思考

  1. 这篇文章的推断只考虑到 2-hop 的情况。之前组会上 hqz 好像讲过,2-hop 就可以几乎覆盖大部分的关系,3-hop 几乎可以覆盖的所有关系。所以其实在这个数据集上,没有必要考虑多跳的情况?因此 GCN 不能有太多层(假如用 GCN 做推断的话),在文档级关系抽取的问题上,其实不算是特别重要的缺点(或者说,值得改进的点)?当然,对于 GCN 本身,这是最大的缺点。
  2. 对于 document node,我感觉很有意思。作者说,在 mention 图上,有了和所有 mention 都相连的 document node,这样 mention 之间最大距离就是 2 了。然后在他的试验里,GCN 就取了 2 层 —— 既然所有点之间最大距离就是 2,那信息传播两次,这不就将整张图都平均了吗?这还怎么 localize?

另外,根据作者这个 motivation,我感觉把 document node 放在 entity graph 上面才能表示他的这个想法?这样在推断的时候,两个实体之间最多 2-hop 就能产生联系了?唉,我看的还是太少,很疑惑。

5 TODO

  1. intro 里面的相关 Doc RE 文章
  2. Guoshun Nan, Zhijiang Guo, Ivan Sekulic, and Wei Lu. Reasoning with latent structure refinement for document-level relation extraction, ACL 2020
  3. Deming Ye, Yankai Lin, Jiaju Du, Zhenghao Liu, Maosong Sun, and Zhiyuan Liu. 2020. Coreferential reasoning learning for language representation. arXiv preprint arXiv:2004.06870, abs/2004.06870.

发表评论