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.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章