EMNLP2019 | Knowledge-Aware Graph Networks

论文标题:KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning

KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning​arxiv.org

 

Authors: Bill Yuchen Lin, Xinyue Chen, Jamin Chen, Xiang Ren
Org.: University of Southern California, Shanghai Jiao Tong University
Codehttps://github.com/INK-USC/KagNet

1.Motivation

本文针对的数据集是:CommonsenseQA

目标:

  • 使机器具备进行常识推理的能力,减小人机之间的差距
    • 关于推理的定义:
      • reasoning is the process of combining facts and beliefs to make new decisions[1].
      • reasoning is the ability to manipulate knowledge to draw inferences [2].
    • 关于常识推理的定义:
      • commonsense reasoning utilizes the basic knowledge that reflects our natural understanding of the world and human behaviors, which is common to all humans.
      • 从物理的角度:Humans' natural understanding of the physical world.
      • 从大众心理的角度:Humans' innate ability to reason about people's behavior and intentions.
  • machines 缺乏可解释性:
    • how the machines manage to answer commonsense questions and make their inferences.
  • 为什么要引入 常识知识库 以及其带来的挑战:
    • knowledge-aware models can explicitly incorporate external knowledge as relational inductive biases.
      • enhance reasoning capacity;
      • increase the transparency of model behaviors for more interpretable results;
    • 挑战
      • noisy: How can we find the most relevant paths in KG?
      • incomplete: What if the best path is not existent in the KG?

1.1This work

提出了一个Knowledge-aware reasoning 框架,主要有以下两个步骤:

  • schema graph grounding (见下图)
  • graph modeling for inference

 

提出了一个Knowledge-aware graph network 模块: KAGNET

  • 核心是 GCN-LSTM-HPA 结构:
    • 由GCN, LSTM, 和 hierarchical path-based attentionmechanism组成
    • 用于 path-based relational graph representation

KAGNET 模块总体的工作流:

  • 首先,分别识别出 [公式] 和 [公式] 中提及的 concept ,根据这些 concept ,找到他们之间的路径,构建出 (ground) schema graph;
  • 使用 LM encoder 编码 QA 对,产生 statement vector [公式] ,作为 GCN-LSTM-HPA 的输入,来计算 graph vector [公式] ;
  • 最后使用 graph vector 计算最终的QA对的打分

2.Model

问题 [公式] 和一个包含 [公式] 选项的候选答案集 [公式]

schema graph [公式]

2.1 Schema Graph Grounding

2.1.1 Concept Recognition

  • n-gram 匹配:句子中的 token 和 ConceptNet 的顶点集合进行 n-gram 匹配
  • Note:从有噪声的知识源中有效地提取上下文相关的知识仍是一个开放问题

2.1.2 Schema Graph Construction

sub-graph matching via path finding

  • 采取一种直接有效的方法:直接在Q和A中提及的Concept ( [公式] ) 之间查找路径
  • 对于问题中的一个 Concept [公式] 和候选项中的一个 Concept [公式] ,查找他们之间路径长度小于 [公式] 的path,添加到图中
    • 本文中,设置 [公式] ,即3-hop paths

2.1.3 Path Pruning via KG Embedding

为了从潜在噪声的schema graph中删除无关的path

  • 使用KGE方法(如TransE等)预训练Concept Embedding和Relation Type Embedding(同时可用于KAGNET的初始化)
  • 评价路径的质量
  • 将路径分解为三元组集合,一条路径的打分为每一组三元组的乘积,通过设置一个阈值进行过滤。
  • 三元组的打分通过KGE中的打分函数进行计算(例如,the confidence of triple classification)

2.2 Knowledge-Aware Graph Network

整体的模型结构:

  1. 使用GCN对图进行编码
  2. 使用LSTM对 [公式] 和 [公式] 之间的路径进行编码,捕捉 multi-hop relational Information
  3. 使用 hierarchical path-based attention 计算 relational schema graph 和 QA对 之间路径的关系

2.2.1 Graph Convolution Networks

使用GCN的目的:

1、contextually refine the concept vector

    • 这里的 context 指节点在图中的上下文,即邻接关系
    • 使用邻居来对预训练的Concept Embedding进行消歧

2、capture structural patterns of schema graphs for generalization

3、schema graph 的模式为推理提供了潜在的有价值的信息

    • QA对Concept之间的 更短、更稠密的连接 可能意味着更大的可能性,在特定的上下中。
    • 评价 候选答案 的可能性

GCN在schema graph上的计算:

  • 使用预训练得到的 concept embedding 作为 GCN 计算图节点的初始化表示,即 [公式]
  • [公式]

2.2.2 Relational Path Encoding

定义问题中的第 [公式] 个 concept [公式] 和候选答案中的第 [公式] 个 concept [公式] 之间的第 [公式] 条路径为 [公式] :

  • 路径是三元组序列:[公式]
    • relation vector 由 KGE 预训练得到;
    • concept vector 是 上一环节 GCN 的顶层输出;
  • 每个三元组表示为: 头实体、尾实体、关系三个向量的串联,得到 triple vector;
  • 使用LSTM编码三元组向量序列,得到 path vector:
    • [公式]

[公式] 可以视为问题中的 concept 和 候选项中的 concept 之间的潜在的关系。

聚集所有路径的表示,得到最终的 graph vector [公式] ;

1、这里使用了 Relation Network 的方法:

    • [公式]
    • statement vector [公式] 为 LM encoder [CLS] 的表示
    • 关于 RN 的介绍可以参考这篇文章:

徐阿衡:论文笔记 - A simple neural network module for relational reasoning(2017)​zhuanlan.zhihu.com图标

2、通过mean-pooling计算graph vector:这种计算方式称为 GCN-LSTM-mean

    • [公式]

通过这种简单的方式将分别从 symbolic space 和 semantic space 中计算的relational representation 进行融合。

3、最终候选项的 plausibility 打分:[公式]

 

2.2.3 Hierarchical Attention Mechanism

考虑到不同的路径对推理的重要程度不同,采用 mean-pooling 不是一种比较可取的方式。

基于此,本文提出了 hierarchical path-based attention 机制,有选择地聚集重要的path vector 以及更重要的QA concept 对。

分别从 path-level 和 concept-pair-level attention 来学习 根据上下文建模图表示:

1、path-level:

  • [公式]
  • [公式]
  • [公式]

2、concept-pair level:

  • [公式]
  • [公式]

3、最终的graph vector: [公式]

Experiments

Transferability

Case Study on Interpretibility

Error Analysis

negative reasoning

  • graph grounding 对否定词不敏感

comparative reasoning strategy

  • 没有进行答案之间的比较

subjective reasoning

  • 有些答案是根据带有主观性的推理得到的

Analysis & Summary

  • KAGNET 可以看做是 knowledge-augmented Relation Network (RN) module

参考

  1. ^Philip N Johnson-Laird. 1980. Mental models in cognitive science. Cognitive science, 4(1):71–115.
  2. ^Drew A. Hudson and Christopher D. Manning. 2018. Compositional attention networks for machine reasoning. In Proc. of ICLR.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章