Towards an Understanding of Stepwise Inference in Transformers: A Synthetic Graph Navigation Model
On the map: LLM reasoning → Prompting and chain-of-thought reasoning
Abstract (arXiv)
Stepwise inference protocols, such as scratchpads and chain-of-thought, help language models solve complex problems by decomposing them into a sequence of simpler subproblems. Despite the significant gain in performance achieved via these protocols, the underlying mechanisms of stepwise inference have remained elusive. To address this, we propose to study autoregressive Transformer models on a synthetic task that embodies the multi-step nature of problems where stepwise inference is generally most useful. Specifically, we define a graph navigation problem wherein a model is tasked with traversing a path from a start to a goal node on the graph. Despite is simplicity, we find we can empirically reproduce and analyze several phenomena observed at scale: (i) the stepwise inference reasoning gap, the cause of which we find in the structure of the training data; (ii) a diversity-accuracy tradeoff in model generations as sampling temperature varies; (iii) a simplicity bias in the model's output; and (iv) compositional generalization and a primacy bias with in-context exemplars. Overall, our work introduces a grounded, synthetic framework for studying stepwise inference and offers mechanistic hypotheses that can lay the foundation for a deeper understanding of this phenomenon.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 37 of its 49 references that are in the map. First posted on arXiv 12 Feb 2024.
Builds on
37 of 49 references.
Closest ancestors · 12
Same direction, newest first
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Models18 Aug
- 2023Invalid Logic, Equivalent Gains: The Bizarreness of Reasoning in Language Model Prompting20 Jul
- 2023Dissecting Chain-of-Thought: Compositionality through In-Context Filtering and Learning30 May
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May
- 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting7 May
- 2023Why think step by step? Reasoning emerges from the locality of experience7 Apr
- 2022Towards Understanding Chain-of-Thought Prompting: An Empirical Study of What Matters20 Dec
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks22 Nov
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them17 Oct
- 2022Large Language Models are Zero-Shot Reasoners24 May
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Models21 Mar
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Models28 Jan
Other references · 25
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2016Gaussian Error Linear Units (GELUs)cited by 3,431
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,054
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
13 more
- 2022Towards Reasoning in Large Language Models: A Surveycited by 593
- 2022MedMCQA : A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answeringcited by 525
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2020The Pitfalls of Simplicity Bias in Neural Networkscited by 349
- 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 334
- 2022Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoningcited by 331
- 2016Using the Output Embedding to Improve Language Modelscited by 266
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
- 2022Faithful Reasoning Using Large Language Modelscited by 130
- 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
- 2022Mechanistic Mode Connectivitycited by 50
- 2023Two Failures of Self-Consistency in the Multi-Step Reasoning of LLMscited by 36
Built on by
Citing papers per year: 2024: 4; 2025: 1; 2026: 4.
9 papers.
- 2024ICLR: In-Context Learning of Representationscited by 49
- 2025Roll the dice & look before you leap: Going beyond the creative limits of next-token predictioncited by 28
- 2024Masked Thought: Simply Masking Partial Reasoning Steps Can Improve Mathematical Reasoning Learning of Language Modelscited by 20
- 2024Representation Shattering in Transformers: A Synthetic Study with Knowledge Editingcited by 18
- 2026On the origin of neural scaling laws: from random graphs to natural languagecited by 12
- 2024Swing-by Dynamics in Concept Learning and Compositional Generalizationcited by 5
- 2026When Do Hallucinations Arise? A Graph Perspective on the Evolution of Path Reuse and Path Compressioncited by 0
- 2026Shortcut Solutions Learned by Transformers Impair Continual Compositional Reasoningcited by 0
- 2026Provable Benefits of RLVR over SFT for Reasoning Models: Learning to Backtrack Efficientlycited by 0
- 2026Provable Benefits of RLVR over SFT for Reasoning Models: Learning to Backtrack Efficiently22 Jun 2026
- 2026Shortcut Solutions Learned by Transformers Impair Continual Compositional Reasoning6 May 2026
- 2026When Do Hallucinations Arise? A Graph Perspective on the Evolution of Path Reuse and Path Compression4 Apr 2026
- 2026On the origin of neural scaling laws: from random graphs to natural language15 Jan 2026
- 2025Roll the dice & look before you leap: Going beyond the creative limits of next-token prediction21 Apr 2025
- 2024ICLR: In-Context Learning of Representations29 Dec 2024
- 2024Representation Shattering in Transformers: A Synthetic Study with Knowledge Editing22 Oct 2024
- 2024Swing-by Dynamics in Concept Learning and Compositional Generalization10 Oct 2024
- 2024Masked Thought: Simply Masking Partial Reasoning Steps Can Improve Mathematical Reasoning Learning of Language Models4 Mar 2024
Similar, not cited
Close in wording, no citation either way
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data
- 2026Protoreasoning in Tiny Transformers
- 2025Transformers Can Learn Connectivity in Some Graphs but Not Others
- 2026Quantifying the Stability of Multi-Step Reasoning via Error Amplification
- 2025From Sequence to Structure: Uncovering Substructure Reasoning in Transformers
- 2026Graph Property Inference in Small Language Models: Effects of Representation and Reasoning Strategy
- 2025TinyGraphEstimator: Adapting Lightweight Language Models for Graph Structure Inference
- 2025Mechanistic Unveiling of Transformer Circuits: Self-Influence as a Key to Model Reasoning