paper-with-me

홈 › Papers

Universal Length Generalization with Turing Programs

2024-07-03 · Kaiying Hou, David Brandfonbrener, Sham Kakade, Samy Jelassi, Eran Malach

Length generalization refers to the ability to extrapolate from short training sequences to long test sequences and is a challenge for current large language models. While prior work has proposed some architecture or data format changes to achieve length generalization, these proposals typically apply to a limited set of tasks. Building on prior scratchpad and Chain-of-Thought (CoT) techniques, we propose Turing Programs, a novel CoT strategy that decomposes an algorithmic task into steps mimicking the computation of a Turing Machine. This framework is both universal, as it can accommodate any algorithmic task, and simple, requiring only copying text from the context with small modifications. We show that by using Turing Programs, we obtain robust length generalization on a range of algorithmic tasks: addition, multiplication and in-context SGD. We then demonstrate that transformers achieve length generalization on random Turing Programs, suggesting that length generalization is possible for any algorithmic task. Finally, we theoretically prove that transformers can implement Turing Programs, constructing a simple RASP (Weiss et al.) program that simulates an arbitrary Turing machine.

📄 PDF Abstract BibTeX arXiv:2407.03310

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically
SGD Stochastic Gradient Descent is an iterative optimization technique that uses minibatches of data to form an expectation of the gradient, rather than the full gradient using…

Similar Papers 제목 키워드 기반

The Imitation Game: Turing Machine Imitator is Length Generalizable Reasoner

2025-07-17 · Zhouqi Hua, Wenwei Zhang, Chengqi Lyu, Yuzhe Gu 외

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 predom…

Imitation Learning

Barriers to Universal Reasoning With Transformers (And How to Overcome Them)

2026-04-28 · Oliver Kraus, Yash Sarrof, Yuekun Yao, Alexander Koller 외 arxiv

Chain-of-Thought (CoT) has been shown to empirically improve Transformers' performance, and theoretically increase their expressivity to Turing completeness. However, whether Transformers can learn to generalize to CoT t…

Training Transformers as a Universal Computer

2026-04-28 · Ruize Xu, Chenxiao Yang, Yanhong Li, David McAllester arxiv

We demonstrate that a small transformer can learn to execute programs in MicroPy, a simplified yet computationally universal programming language. Given procedure definitions together with an expression to evaluate, the …

Quantum circuit design for universal distribution using a superposition of classical automata

2020-06-01 · Aritra Sarkar, Zaid Al-Ars, Koen Bertels

In this research, we present a quantum circuit design and implementation for a parallel universal linear bounded automata. This circuit is able to accelerate the inference of algorithmic structures in data for discoverin…

LLMs versus the Halting Problem: Characterizing Program Termination Reasoning

2026-01-26 · Oren Sultan, Jordi Armengol-Estape, Pascal Kesseli, Julien Vanegue 외 arxiv

Determining whether a program terminates is a central problem in computer science. Turing's Halting Problem established termination as undecidable, showing that no algorithm can universally determine termination for all …