Abstract
Large Language Models (LLMs) often struggle with structured reasoning over knowledge graphs (KGs). Traditional approaches that combine LLMs with Graph Neural Networks (GNNs) frequently suffer from shallow fusion and a node-centric bias that overlooks the rich information in relations. We present the Question Answering Transformer (QAT), a unified architecture that treats multi-hop KG relations as first-class "Meta-Path" tokens. By employing Relation-Aware Self-Attention (RASA) and a novel Cross-Modal Relative Position Bias (RPB), QAT enables deep fusion between text and graph modalities. QAT achieves state-of-the-art performance on CommonsenseQA, OpenBookQA, and MedQA-USMLE benchmarks.
Introduction
Structured reasoning—the ability to follow logical chains across entities—is a core challenge in natural language processing. While KGs provide the necessary structure, integrating them with LLMs effectively remains difficult. Existing research typically employs a "bolt-on" approach, where a GNN processes the graph and its output is concatenated with LLM text embeddings. This "shallow fusion" limits the interaction between modalities. Furthermore, standard GNNs focus on updating node features, often relegating the relations (edges) to auxiliary data, despite relations being critical for multi-hop reasoning.
Methods
QAT addresses these issues by unifying text and graph reasoning within a single Transformer block, eliminating the need for a separate GNN encoder.
Meta-Path Token Embeddings
Instead of individual nodes, QAT extracts "Meta-Paths"—sequences of entities and their specific relations (e.g., Jeans $\xrightarrow{RelatedTo}$ Merchants $\xrightarrow{AtLocation}$ Shopping Mall). These paths are embedded as Meta-Path Tokens, shifting the model's focus from entity identification to relational connectivity.
Relation-Aware Self-Attention (RASA)
Meta-Path tokens are concatenated with standard language tokens and processed by a shared Transformer. This Relation-Aware Self-Attention (RASA) allows for "deep fusion," where text and graph data interact at every layer.
Cross-Modal Relative Position Bias (RPB)
To ground abstract graph structures in natural language, QAT utilizes Cross-Modal Relative Position Bias (RPB). Using pre-trained GloVe embeddings, the model calculates semantic similarity between question tokens and KG entities. When a match is found, a learnable bias is added to the attention mechanism, directing the model's focus toward relevant paths in the graph.
Regularization with Drop-MP
To improve generalization and prevent over-reliance on specific paths, the authors introduce Drop-MP, which stochastically drops Meta-Path tokens during training.
Results
QAT was evaluated on three major benchmarks, achieving new state-of-the-art (SOTA) results:
- CommonsenseQA: Reached 75.4% in-house test accuracy, outperforming models like GreaseLM and JointLK.
- OpenBookQA: Achieved 71.2% with RoBERTa-Large and 86.9% when paired with AristoRoBERTa.
- MedQA-USMLE: Reached 39.3% accuracy, a significant improvement in the specialized medical domain.
Ablation studies confirmed that encoding relations as paths provided the most substantial performance gains, validating the shift from node-centric to relation-centric modeling.
Conclusion
The Question Answering Transformer demonstrates that treating graph relations as primary tokens and enabling deep cross-modal fusion significantly enhances structured reasoning. By replacing complex GNN-LLM hybrids with a unified Transformer architecture, QAT provides a more efficient and effective framework for knowledge-augmented question answering.
Summary updated