mlsanityData to 14 Oct 2026

The Imitation Game: Turing Machine Imitator is Length Generalizable Reasoner

arXiv 2507.13332 ↗First posted 17 Jul 2025cs.CLcited by 3

On the map: LLM reasoning → Prompting and chain-of-thought reasoning

Abstract (arXiv)

Length generalization, the ability to solve problems of longer sequences than those observed during training, poses a core challenge of Transformer-based large language models (LLM). Although existing studies have predominantly focused on data-driven approaches for arithmetic operations and symbolic manipulation tasks, these approaches tend to be task-specific with limited overall performance. To pursue a more general solution, this paper focuses on a broader case of reasoning problems that are computable, i.e., problems that algorithms can solve, thus can be solved by the Turing Machine. From this perspective, this paper proposes Turing MAchine Imitation Learning (TAIL) to improve the length generalization ability of LLMs. TAIL synthesizes chain-of-thoughts (CoT) data that imitate the execution process of a Turing Machine by computer programs, which linearly expands the reasoning steps into atomic states to alleviate shortcut learning and explicit memory fetch mechanism to reduce the difficulties of dynamic and long-range data access in elementary operations. To validate the reliability and universality of TAIL, we construct a challenging synthetic dataset covering 8 classes of algorithms and 18 tasks. Without bells and whistles, TAIL significantly improves the length generalization ability as well as the performance of Qwen2.5-7B on various tasks using only synthetic data, surpassing previous methods and DeepSeek-R1. The experimental results reveal that the key concepts in the Turing Machine, instead of the thinking styles, are indispensable for TAIL for length generalization, through which the model exhibits read-and-write behaviors consistent with the properties of the Turing Machine in their attention layers. This work provides a promising direction for future research in the learning of LLM reasoning from synthetic data.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 44 of its 66 references that are in the map. First posted on arXiv 17 Jul 2025.

Builds on

44 of 66 references.

Closest ancestors · 11

Same direction, newest first

  1. 2025Understanding LLM Scientific Reasoning through Promptings and Model's Explanation on the Answers2 May
  2. 2025Towards System 2 Reasoning in LLMs: Learning How to Think With Meta Chain-of-Thought8 Jan
  3. 2024Mitigating Misleading Chain-of-Thought Reasoning with Selective Filtering28 Mar
  4. 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problems20 Feb
  5. 2024Chain-of-Thought Reasoning Without Prompting15 Feb
  6. 2023Generalizable Chain-of-Thought Prompting in Mixed-task Scenarios with Large Language Models10 Oct
  7. 2023Take a Step Back: Evoking Reasoning via Abstraction in Large Language Models9 Oct
  8. 2023The CoT Collection: Improving Zero-shot and Few-shot Learning of Language Models via Chain-of-Thought Fine-Tuning23 May
  9. 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models6 May
  10. 2023Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled Data24 Feb
  11. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Models21 May

Other references · 33

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2024Qwen2.5 Technical Reportcited by 4,942
  4. 2023Qwen Technical Reportcited by 3,344
  5. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
  6. 2024DeepSeek-V3 Technical Reportcited by 811
  7. 2024InternLM2 Technical Reportcited by 397
  8. 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 337
  9. 2022Neural Networks and the Chomsky Hierarchycited by 217
  10. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  11. 2023Teaching Arithmetic to Small Transformerscited by 123
  12. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
21 more
  1. 2024Meta-Prompting: Enhancing Language Models with Task-Agnostic Scaffoldingcited by 117
  2. 2024Looped Transformers for Length Generalizationcited by 99
  3. 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
  4. 2023Length Generalization in Arithmetic Transformerscited by 66
  5. 2023Positional Description Matters for Transformers Arithmeticcited by 56
  6. 2025Satori: Reinforcement Learning with Chain-of-Action-Thought Enhances LLM Reasoning via Autoregressive Searchcited by 53
  7. 2020The EOS Decision and Length Extrapolationcited by 46
  8. 2023Combining Generative Artificial Intelligence (AI) and the Internet: Heading towards Evolution or Degradation?cited by 41
  9. 2025Long-Short Chain-of-Thought Mixture Supervised Fine-Tuning Eliciting Efficient Reasoning in Large Language Modelscited by 39
  10. 2019Location Attention for Extrapolation to Longer Sequencescited by 33
  11. 2025Beyond Verifiable Rewards: Scaling Reinforcement Learning for Language Models to Unverifiable Datacited by 29
  12. 2024Universal Length Generalization with Turing Programscited by 25
  13. 2024On Provable Length and Compositional Generalizationcited by 22
  14. 2024Do Advanced Language Models Eliminate the Need for Prompt Engineering in Software Engineering?cited by 19
  15. 2024Transformers Struggle to Learn to Searchcited by 19
  16. 2023Functional Interpolation for Relative Positions Improves Long Context Transformerscited by 18
  17. 2025Adaptive Graph of Thoughts: Test-Time Adaptive Reasoning Unifying Chain, Tree, and Graph Structurescited by 16
  18. 2024A Survey on Compositional Learning of AI Models: Theoretical and Experimental Practicescited by 15
  19. 2023From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformerscited by 10
  20. 2022Compositional Generalization and Decomposition in Neural Program Synthesiscited by 6
  21. 2025Beyond In-Distribution Success: Scaling Curves of CoT Granularity for Language Model Generalizationcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)
  2. 2024Thought-Like-Pro: Enhancing Reasoning of Large Language Models through Self-Driven Prolog-based Chain-of-Thought
  3. 2023Auto-Regressive Next-Token Predictors are Universal Learners
  4. 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models
  5. 2025Towards Understanding Multi-Round Large Language Model Reasoning: Approximability, Learnability and Generalizability
  6. 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limits
  7. 2026The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis
  8. 2025Computational Reasoning of Large Language Models