2025-07-18 · 专家 · 机器学习 · 自然语言处理

The Imitation Game: Turing Machine Imitator is Length Generalizable Reasoner

本文提出了一种名为“图灵机模仿学习”(TAIL)的框架,旨在提高大型语言模型在处理长序列问题时的泛化能力。

更新于 2025-07-21。作者:Zhouqi Hua、Wenwei Zhang、Chengqi Lyu、Yuzhe Gu、Songyang Gao、Kuikun Liu、Kai Chen。

中文摘要

长度泛化,即解决比训练过程中观察到的更长的序列问题的能力,是基于Transformer的大型语言模型(LLM)的核心挑战。尽管现有研究主要关注数据驱动的算术运算和符号操作任务的方法,但这些方法往往针对特定任务,整体性能有限。为了追求更通用的解决方案,本文聚焦于更广泛的可计算推理问题,即算法可以解决的问题,因此可以通过图灵机来解决。从这个角度来看,本文提出了图灵机模仿学习(TAIL)来提高LLM的长度泛化能力。TAIL通过计算机程序合成思维链(CoT)数据,模仿图灵机的执行过程,将推理步骤线性扩展到原子状态,以缓解捷径学习和显式内存检索机制,以减少在基本操作中动态和长距离数据访问的难度。为了验证TAIL的可靠性和普适性,我们构建了一个包含8类算法和18个任务的具有挑战性的合成数据集。在不添加花哨功能的情况下,TAIL显著提高了长度泛化能力以及Qwen2.5-7B在各种任务上的性能,仅使用合成数据就超越了先前的方法和DeepSeek-R1。实验结果表明,图灵机的关键概念,而不是思维方式,对于TAIL进行长度泛化是不可或缺的,通过这种方式,模型在注意力层表现出与图灵机属性一致的读写行为。这项工作为从合成数据中学习LLM推理的未来研究提供了有希望的途径。

英文摘要

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.

解读

一句话总结

本文提出了一种名为“图灵机模仿学习”(TAIL)的框架,旨在提高大型语言模型在处理长序列问题时的泛化能力。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt