Unveiling the Mechanisms of Multi-Hop Reasoning in Transformers via Identity Bridge

Pengxiao Lin, Zheng-An Chen, Zhi-Qin John Xu

Large Language Models (LLMs) are surprisingly good at answering complex questions, but they have a well-documented Achilles' heel: multi-hop reasoning. While a model might know that "A leads to B" and "B leads to C," it often fails to conclude that "A leads to C" if it hasn't seen that specific combination before. This is known as the "curse of two-hop reasoning."

A new paper from researchers at Shanghai Jiao Tong University, published at COLM 2026, suggests that the fix might be simpler than we thought. By introducing a minimal supervision task called an Identity Bridge, they demonstrate how models can be nudged to unlock out-of-distribution (OOD) reasoning.

TL;DR

The "two-hop curse" in LLMs stems from a failure to align the output of one reasoning step with the input of the next. By adding a simple "identity" task (teaching the model that a bridge entity equals itself), researchers proved—both theoretically and empirically—that models can establish direct subject-to-answer associations, effectively bypassing the reasoning gap.

What Problem Does This Paper Address?

The core challenge is compositional generalization. In a two-hop task ($a \to b$ and $b \to c$), models often fail to infer $a \to c$ for unseen pairs, even if they have perfectly memorized the individual steps.

The authors identify a "contextual disconnect": in standard synthetic training, the model is never explicitly told that the $b$ it produces as an output is the same $b$ it needs to use as an input. Without this constraint, the model uses disjoint features for the two tasks, causing the reasoning chain to break. The researchers sought to understand the underlying mechanism of this failure and find a way to bridge the gap.

Methods

The researchers introduced the Identity Bridge, a minimal supervision task where the model is trained on "zero-hop" sequences: $(e_2) \to e_2$. This forces the model to implement an identity mapping for bridge entities.

To analyze this, they utilized:

  • Emb–MLP Model: A simplified "proxy" model consisting of a one-layer transformer with uniform attention. This allowed for rigorous mathematical proofs using KKT conditions and nuclear-norm regularization.
  • Activation Patching: A technique to see if a model's internal hidden states for a bridge token $b$ are actually interchangeable between different reasoning steps.
  • Modern Architectures: They validated their findings on standard GPT-2, LLaMA-style, Qwen-style, and Gemma-style models to ensure the phenomenon wasn't an artifact of a specific architecture.

Datasets

The study employed both synthetic and real-world datasets:

  • Synthetic Two-Hop Dataset: A controlled environment where entities ($E_1, E_2, E_3$) and relations ($R_1, R_2$) are strictly defined to test OOD generalization.
  • TWOHOPFACT: A real-world dataset used to fine-tune and analyze mainstream LLMs.
  • MuSiQue: A complex multi-hop reasoning benchmark used to verify that the "subject-to-answer" association holds in realistic settings.

Key Insights and Ideas

  • The Identity Requirement: For multi-hop reasoning to work, the model must recognize the bridge entity as a consistent anchor. The Identity Bridge ($b \to b$) provides the necessary supervision to align the input and output spaces.
  • Shortcut vs. Step-by-Step: Theoretically, the Identity Bridge induces an implicit nuclear-norm regularization. This leads the model to establish a direct "shortcut" association between the subject ($a$) and the final answer ($c$), rather than performing a genuine, step-by-step implicit inference.
  • Pretraining is a Latent Bridge: The reason pretrained LLMs can do some multi-hop reasoning without explicit identity training is that pretraining tasks (like copying or restating text) act as a latent form of identity bridging.
  • Small Initialization Matters: The authors found that using "small initialization" (scaling weights by $d_{model}^{-\gamma}$) or weight decay helps the model maintain tighter representation alignment across layers, which is crucial as the complexity of the reasoning task increases.

Key Results

  • Unlocking OOD Generalization: With the Identity Bridge, even the simple one-layer Emb–MLP model achieved high OOD two-hop accuracy, whereas it failed completely without it.
  • Activation Patching Success: In GPT-2, activation patching accuracy for OOD relations jumped from 0% to near 100% after adding the Identity Bridge, proving the model finally learned to treat the bridge token consistently.
  • Complexity Trade-off: As the number of relations (complexity $C$) increased, performance dropped across all models (GPT-2, LLaMA, Qwen, Gemma). However, small initialization significantly mitigated this decline compared to standard GPT-2 initialization.
  • Real-World Evidence: Fine-tuning mainstream LLMs showed that correct two-hop predictions were consistently tied to the establishment of a direct subject-to-answer relationship in the logits, confirming the "shortcut" mechanism exists in large-scale models.

Limitations and Future Work

  • Uniform Attention Simplification: The theoretical analysis relies on the Emb–MLP model with uniform attention, which does not capture the full, dynamic attention mechanisms of deep transformers.
  • Synthetic vs. Natural Language: While the results were extended to real LLMs, the primary theoretical grounding remains in synthetic, controlled environments.
  • Scale: The study focused on models up to 8B parameters. Whether these mechanisms change fundamentally in "frontier" models (100B+ parameters) remains an open question.
  • Beyond Two Hops: While the authors briefly touched on 3-hop reasoning, the scaling laws and potential "shortcut" failures for much longer reasoning chains (e.g., 5+ hops) require further investigation.

For more details, you can find the full paper: "Unveiling the Mechanisms of Multi-Hop Reasoning in Transformers via Identity Bridge" (COLM 2026).

Summary updated

BibTeX
@inproceedings{lin2026unveiling,
  author = {Pengxiao Lin and Zheng-An Chen and Zhi-Qin John Xu},
  title = {{Unveiling the Mechanisms of Multi-Hop Reasoning in Transformers via Identity Bridge}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=wKryuGnWxv},
}
Figure