QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering

Michihiro Yasunaga, Hongyu Ren, Antoine Bosselut, Percy Liang, Jure Leskovec

Abstract

QA-GNN is an end-to-end reasoning framework that bridges the gap between the broad linguistic capabilities of Language Models (LMs) and the structured logic of Knowledge Graphs (KGs). By representing the question-answer context as a specialized node within a "working graph" and employing LM-based relevance scoring to prune irrelevant data, the model achieves state-of-the-art performance on commonsense and scientific reasoning tasks. Notably, QA-GNN demonstrates a significant improvement in handling complex logical structures like negation, where traditional LMs often falter.

Introduction

Large-scale Pre-trained Language Models (LMs) excel at capturing linguistic patterns but often struggle with structured reasoning and logical nuances, such as negation. Conversely, Knowledge Graphs (KGs) provide explicit, structured facts but are frequently "noisy" and difficult to navigate efficiently. Previous attempts to combine these modalities often treated them as separate silos, failing to allow the representations to interact during the reasoning process. QA-GNN addresses these challenges by creating a unified reasoning space where the LM and KG mutually inform one another.

Methodology

The core innovation of QA-GNN lies in its ability to perform joint reasoning over text and graph data through two primary mechanisms:

  1. LM-Based Relevance Scoring: To manage the noise inherent in large KGs, QA-GNN uses the LM to score every node in a retrieved subgraph based on its likelihood given the QA context. This semantic filter prioritizes relevant entities while ignoring irrelevant noise (e.g., distinguishing between a "river bank" and a "money bank").
  2. The "Working Graph" & Joint Reasoning: The model constructs a unified graph where the entire QA context (question + candidate answer) is represented as a special QA context node ($z$). This node is physically connected to topic entities in the KG subgraph, creating a "working memory" where linguistic nuance and structural facts merge.
The end-to-end architecture of QA-GNN, illustrating the integration of LM encoding, KG retrieval, and joint reasoning through the working graph.

Structural Robustness and Negation

By grounding the LM in a graph structure, the model becomes significantly more robust. In a pure LM, negation tokens like "not" are often ignored or poorly processed. In QA-GNN, the graph structure forces the model to realize that if a "round brush" is not used for "hair," it must explore connections to other entities, such as "art supplies."

An illustration of the "Working Graph" concept, showing how a QA context node connects to KG entities to resolve a negation-based question.

Evaluation and Results

The model was evaluated on CommonsenseQA and OpenBookQA, utilizing ConceptNet as the primary knowledge source. Key findings include:

  • Performance Gains: QA-GNN outperformed strong RoBERTa-large baselines by 4.7% on CommonsenseQA and 5.7% on OpenBookQA.
  • Superior Negation Handling: On questions involving negation, QA-GNN showed a 4.6% improvement over pure LMs, whereas previous hybrid models only managed a negligible 0.6% gain.
  • Efficiency: Despite its complexity, the model is relatively efficient, utilizing roughly 360M parameters—significantly smaller than massive "brute force" models like the 11B-parameter UnifiedQA, yet achieving competitive results.

Conclusion and Future Work

QA-GNN demonstrates that joint reasoning over LMs and KGs is superior to processing them in parallel. By treating the text context as a node within the graph, the model achieves a new level of structural robustness and interpretability. While the model still struggles with complex double negatives and is limited by the coverage of the underlying KG, it provides a powerful framework for future research in multi-hop reasoning and dialogue systems.

Summary updated

BibTeX
@inproceedings{yasunaga2021qa,
  author = {Michihiro Yasunaga and Hongyu Ren and Antoine Bosselut and Percy Liang and Jure Leskovec},
  title = {{QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.45},
}
Figure