NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SQUIRE: A Sequence-to-sequence Framework for Multi-hop Knowledge Graph Reasoning

Yushi Bai, Xin Lv, Juanzi Li, Lei Hou, Yincen Qu, Zelin Dai, Feiyu Xiong

Introduction

Knowledge Graphs (KGs), such as Freebase and Wikidata, serve as critical backbones for numerous downstream applications, including question answering and recommendation systems. Despite their utility, KGs are inherently incomplete. Multi-hop reasoning aims to address this by identifying "evidential paths"—chains of relations that logically connect a head entity to a target tail entity. For instance, to determine Albert Einstein's native language, a model might traverse the path: Einstein → born in → Germany → language → German.

Historically, multi-hop reasoning has been framed as a Reinforcement Learning (RL) problem, where an agent "walks" through the graph. However, RL-based methods suffer from two primary drawbacks: extreme training inefficiency due to delayed rewards and the "missing path problem," where the absence of a single edge in the graph prevents the agent from completing a reasoning chain.

The SQUIRE Framework

To overcome these limitations, we introduce SQUIRE (Sequence-to-sequence Framework for Multi-hop Reasoning). SQUIRE reimagines graph reasoning not as a navigational task, but as a translation task.

Architecture and Methodology

SQUIRE utilizes a Transformer encoder-decoder architecture to "translate" a query—consisting of a head entity $h$ and a relation $r$—directly into a sequence of tokens representing the reasoning path $(r_1, t_1, r_2, t_2, \dots, t)$.

The SQUIRE framework architecture, treating multi-hop reasoning as a sequence-to-sequence translation task using a Transformer encoder-decoder.

Unlike RL agents that are strictly bound to existing graph pointers, SQUIRE's decoder generates tokens from a learned vocabulary. This allows the model to perform "implicit completion": it can predict missing edges that should exist to form a logical chain, effectively "hallucinating" the necessary links to reach the correct target.

To ensure the generated paths are logically sound, SQUIRE incorporates Rule-Enhanced Learning. By leveraging AnyBURL to mine logical rules from the KG, the model is trained on high-quality, rule-based paths rather than noisy random walks. Furthermore, an iterative training strategy is employed to mitigate exposure bias, allowing the model to learn from and correct its own previous predictions.

Experimental Evaluation

SQUIRE was evaluated across six diverse benchmarks, including standard KGs (FB15K237, NELL995), sparse KGs (FB15K237-20%, NELL23K), and large-scale KGs (KACC-M, FB100K).

Performance and Efficiency

The results demonstrate that SQUIRE achieves state-of-the-art accuracy across all tested datasets. Its performance is particularly noteworthy on sparse graphs, where it significantly outperforms both traditional RL baselines and specialized models designed for incomplete data.

Beyond accuracy, SQUIRE offers a massive leap in efficiency. By framing reasoning as supervised sequence learning, the model achieves more stable and faster convergence compared to the trial-and-error nature of RL.

Training time comparison across different graph sizes, showing SQUIRE's significant efficiency advantage over RL-based methods.

As shown in the efficiency analysis, SQUIRE converges 4x to 7x faster than RL-based agents. On large-scale graphs where traditional methods require over 24 hours of training, SQUIRE completes the task in 3 to 8 hours.

Discussion and Future Work

SQUIRE represents a paradigm shift in multi-hop reasoning, proving that Seq2Seq models can effectively capture graph structures and logical dependencies. Human evaluations also indicate that SQUIRE produces more interpretable and "reasonable" paths than its RL counterparts.

However, challenges remain. The absolute "reasonability" scores of generated paths are still relatively low, highlighting a need for higher-quality reasoning datasets. Future research will focus on integrating more explicit logical constraints into the Transformer's generation process and developing datasets with denser logical chains to further refine the model's reasoning capabilities.

Summary updated

BibTeX
@inproceedings{bai2022squire,
  author = {Yushi Bai and Xin Lv and Juanzi Li and Lei Hou and Yincen Qu and Zelin Dai and Feiyu Xiong},
  title = {{SQUIRE: A Sequence-to-sequence Framework for Multi-hop Knowledge Graph Reasoning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.107},
}
Figure