Abstract
Large Language Models (LLMs) often struggle with knowledge-intensive tasks that require specific factual or commonsense reasoning. While Knowledge Graphs (KGs) provide a structured solution, existing integration methods suffer from relational and modality gaps. This paper introduces the Graph Reasoning Transformer (GRT), which treats KG triplets as atomic units of information. By combining a triplet-level graph encoder with cross-modal alignment pretraining and an attention-biased fusion module, GRT effectively bridges the gap between natural language and structured data. GRT achieves state-of-the-art results on major benchmarks, including CommonsenseQA and MedQA-USMLE.
Introduction
Knowledge-aware question answering (QA) requires models to leverage external structured knowledge to answer complex queries. Despite the success of LLMs, they often fail when the required information is absent from their training data or requires precise relational reasoning. Augmenting these models with Knowledge Graphs (KGs) is a common strategy, yet it faces two primary challenges: the relational gap and the modality gap.
The relational gap arises because traditional Graph Neural Networks (GNNs) focus on node-level message passing, which can dilute the critical semantic information contained within the relationships (edges) between entities. The modality gap refers to the fundamental difference between unstructured natural language and structured graph data, making effective fusion difficult.
The Graph Reasoning Transformer (GRT)
To address these challenges, the Graph Reasoning Transformer (GRT) introduces a paradigm shift by treating knowledge triplets $(head, relation, tail)$ as the fundamental units of knowledge rather than individual nodes.
Triplet-level Graph Encoder
Unlike node-centric approaches, GRT utilizes a triplet-level encoder. It employs TransE embeddings to provide spatial position information, ensuring that the structural connectivity of the KG is preserved even when triplets are processed as a set. This approach ensures that the specific relationship between entities remains the primary carrier of information during the reasoning process.
Representation Alignment Pretraining (RAP)
To bridge the modality gap, GRT undergoes a specialized pretraining phase called Representation Alignment Pretraining (RAP). This phase includes two main tasks:
- Text-Triplet Matching (TTM): The model is trained to predict whether a specific KG triplet aligns with an entity mentioned in the text.
- Masked Language Modeling (MLM): An enhanced MLM task where the model uses external KG context to recover masked tokens, helping it learn the correspondence between structured facts and linguistic patterns.
Cross-Modal Fusion with Attention Bias
During the reasoning stage, GRT employs a novel fusion mechanism. It calculates a similarity matrix between text tokens and KG entities, which is then used as an Attention Bias (Ω). This bias guides the transformer's self-attention mechanism to prioritize triplets that are directly relevant to the words in the question, facilitating a more focused and accurate reasoning process.
Experimental Evaluation
The performance of GRT was evaluated on three diverse and challenging benchmarks:
- CommonsenseQA (CSQA): A dataset of over 12,000 questions requiring general world knowledge.
- OpenbookQA (OBQA): Nearly 6,000 elementary science questions.
- MedQA-USMLE: Over 12,000 medical-domain questions designed to test domain-specific reasoning.
GRT achieved state-of-the-art (SOTA) performance across all benchmarks. On CommonsenseQA, it reached 76.1% accuracy, outperforming previous models like FIT and GreaseLM. In the medical domain, it achieved 39.5% accuracy on MedQA-USMLE, demonstrating its ability to generalize to specialized fields without architectural modifications.
Key Insights
A significant finding of this work is that triplet-level features are more efficient and robust than node-level features. The authors observed that node-level message passing can lead to "over-parameterization" in the context of QA. Furthermore, GRT showed a marked improvement in handling questions involving negation (e.g., "Which of these is not..."). By aligning text with specific KG facts, the model can more accurately verify or falsify statements based on structured evidence.
The ablation studies confirmed that the Representation Alignment Pretraining (RAP) is a critical component, providing a consistent performance boost by "teaching" the model how to link linguistic concepts to graph entities.
Conclusion and Future Work
The Graph Reasoning Transformer represents a significant step forward in knowledge-aware QA by prioritizing relational semantics and explicit cross-modal alignment. While the model currently relies on an initial entity linking step and is constrained by the availability of paired text-graph corpora, its success on diverse benchmarks highlights the potential of triplet-level reasoning. Future research may explore scaling GRT to handle larger, multi-hop subgraphs and developing more sophisticated reasoning paths to further enhance its capabilities.
Summary updated