mlsanityData to 14 Oct 2026

Chain-of-Thought Tokens are Computer Program Variables

arXiv 2505.04955 ↗First posted 8 May 2025cs.CL cs.AIcited by 6

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

Abstract (arXiv)

Chain-of-thoughts (CoT) requires large language models (LLMs) to generate intermediate steps before reaching the final answer, and has been proven effective to help LLMs solve complex reasoning tasks. However, the inner mechanism of CoT still remains largely unclear. In this paper, we empirically study the role of CoT tokens in LLMs on two compositional tasks: multi-digit multiplication and dynamic programming. While CoT is essential for solving these problems, we find that preserving only tokens that store intermediate results would achieve comparable performance. Furthermore, we observe that storing intermediate results in an alternative latent form will not affect model performance. We also randomly intervene some values in CoT, and notice that subsequent CoT tokens and the final answer would change correspondingly. These findings suggest that CoT tokens may function like variables in computer programs but with potential drawbacks like unintended shortcuts and computational complexity limits between tokens. The code and data are available at https://github.com/solitaryzero/CoTs_are_Variables.

Key facts. Cited by 6 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 10 of its 30 references that are in the map. First posted on arXiv 8 May 2025.

Builds on

10 of 30 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Chain of Draft: Thinking Faster by Writing Less25 Feb
  2. 2024Training Large Language Models to Reason in a Continuous Latent Space9 Dec
  3. 2024From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step23 May
  4. 2022Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango16 Sep

Other references · 6

  1. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2024Qwen2.5 Technical Reportcited by 4,942
  4. 2025rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinkingcited by 313
  5. 2024LLaMA-Berry: Pairwise Optimization for O1-like Olympiad-Level Mathematical Reasoningcited by 91
  6. 2024Theoretical limitations of multi-layer Transformercited by 45

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoning
  2. 2024LLMs Faithfully and Iteratively Compute Answers During CoT: A Systematic Analysis With Multi-step Arithmetics
  3. 2025Token Signature: Predicting Chain-of-Thought Gains with Token Decoding Feature in Large Language Models
  4. 2024Understanding Chain-of-Thought in LLMs through Information Theory
  5. 2026Structural Anchors and Reasoning Fragility:Understanding CoT Robustness in LLM4Code
  6. 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective
  7. 2023Measuring Faithfulness in Chain-of-Thought Reasoning
  8. 2026Fragile Thoughts: How Large Language Models Handle Chain-of-Thought Perturbations