cs.CCOct 19, 2026

Internalizing Chain-of-thought into Looped Transformers

Authors: Kehang Zhou, Pinyan Lu

Organizations: Institute for Theoretical Computer Science Shanghai University of Finance and Economics

Abstract

Chain-of-thought (CoT) enables constant-bit-size transformers to perform general-purpose computation through generated tokens (Li and Wang, 2025a), whereas looped transformers carry out the same computation by recurrence in hidden states (latent thought). We construct a family of constant-bit-size looped transformers that interpolates between CoT and latent thought. For a prescribed loop count L=L(n)L=L(n) and a fixed integer k≥1k\ge1 satisfying s(n)1/k=Ω(L)s(n)^{1/k}=Ω(L), our transformer simulates a time-t(n)t(n), space-s(n)s(n) Turing machine using a context window of O(s(n)/L)O(s(n)/L) and O(t(n)s(n)1/k/L)O(t(n)s(n)^{1/k}/L) generated tokens, reducing both resources by a factor of LL relative to the corresponding unlooped queue-machine simulation. The construction also holds with softmax attention at constant bit-size, under the finite-precision kernel specified in this paper.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Chain-of-Thought and Compressed Looped Transformers: A Memory-Budget Separation

    May 29, 2026Haozhou ZhangCoT ReasoningPersistent Memory for Language Models

  2. Efficiently Representing Algorithms With Chain-of-Thought Transformers

    Jun 18, 2026Yanhong Li, Anej Svete, Ashish Sabharwal +1TransformerCoT Reasoning

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

    Apr 28, 2026Oliver Kraus, Yash Sarrof, Yuekun Yao +2Transformer ExpressivityCoT Reasoning