Are Transformers Able to Reason by Connecting Separated Knowledge in Training Data?
Not on the map. Why?
Abstract (arXiv)
Humans exhibit remarkable compositional reasoning by integrating knowledge from various sources. For example, if someone learns ( B = f(A) ) from one source and ( C = g(B) ) from another, they can deduce ( C=g(B)=g(f(A)) ) even without encountering ( ABC ) together, showcasing the generalization ability of human intelligence. In this paper, we introduce a synthetic learning task, "FTCT" (Fragmented at Training, Chained at Testing), to validate the potential of Transformers in replicating this skill and interpret its inner mechanism. In the training phase, data consist of separated knowledge fragments from an overall causal graph. During testing, Transformers must infer complete causal graph traces by integrating these fragments. Our findings demonstrate that few-shot Chain-of-Thought prompting enables Transformers to perform compositional reasoning on FTCT by revealing correct combinations of fragments, even if such combinations were absent in the training data. Furthermore, the emergence of compositional reasoning ability is strongly correlated with the model complexity and training-testing data similarity. We propose, both theoretically and empirically, that Transformers learn an underlying generalizable program from training, enabling effective compositional reasoning during testing.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 58 of its 83 references that are in the map. First posted on arXiv 27 Jan 2025.
Builds on
58 of 83 references.
References · 58
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,054
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
38 more
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2023Larger language models do in-context learning differentlycited by 386
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2019Measuring Compositional Generalization: A Comprehensive Method on Realistic Datacited by 280
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2019Compositionality decomposed: how do neural networks generalise?cited by 264
- 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 260
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 256
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2024Many-Shot In-Context Learningcited by 203
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2023The Learnability of In-Context Learningcited by 126
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2023A Theory for Emergence of Complex Skills in Language Modelscited by 111
- 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Processcited by 107
- 2023Why think step by step? Reasoning emerges from the locality of experiencecited by 103
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
- 2022On the Paradox of Learning to Reason from Datacited by 93
- 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
- 2024Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queriescited by 78
- 2023Skill-Mix: a Flexible and Expandable Family of Evaluations for AI modelscited by 64
- 2024On Limitations of the Transformer Architecturecited by 63
50 most cited of 58 All 58 (JSON)
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
- 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
- 2025The Kinetics of Reasoning: How Chain-of-Thought Shapes Learning in Transformers?
- 2025How do Transformers Learn Implicit Reasoning?
- 2026Transformer See, Transformer Do: Copying as an Intermediate Step in Learning Analogical Reasoning
- 2025Transformers Can Learn Connectivity in Some Graphs but Not Others
- 2025Relational reasoning and inductive bias in transformers and large language models
- 2024Reasoning in Transformers -- Mitigating Spurious Correlations and Reasoning Shortcuts