Caterpillar of Thoughts: The Optimal Test-Time Algorithm for Large Language Models
On the map: LLM reasoning → Test-time compute and efficient thinking
Abstract (arXiv)
Large language models (LLMs) can often produce substantially better outputs when allowed to use additional test-time computation, such as sampling, chain of thought, backtracking, or revising partial solutions. Despite the growing empirical success of such techniques, there is limited theoretical understanding of how inference time computation should be structured, or what constitutes an optimal use of a fixed computation budget. We model test-time computation as an algorithm interacting with a Markov chain: at any point, the algorithm may resume generation from any previously observed state. That is, unlike standard Markov chains where the states are drawn passively, we allow the algorithm to backtrack to any previously observed state of the Markov chain at any time. Many of the existing test-time algorithms, such as Chain-of-Thought (CoT) (Wei et al., 2023), Tree-of-Thoughts (ToT) (Yao et al., 2023), or Best-of-k (Brown et al., 2024) could be seen as specific algorithms in this model. We prove that while backtracking can reduce the number of generations exponentially, a very limited form of backtracking is theoretically sufficient. Namely, we show that the optimal algorithm always generates a caterpillar tree. That is, if we remove the leaves of the state tree generated by the optimal algorithm, we obtain a path. Motivated by our characterization of the optimal algorithm, we present Caterpillar of Thoughts (CaT), a new test-time computation algorithm, reducing the number of token/state generations. Our empirical evaluation shows that CaT, compared to ToT, achieves a better success rate while also reducing the number of token generations.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Test-time compute and efficient thinking, one of 17 directions in LLM reasoning. Builds on 14 of its 18 references that are in the map. First posted on arXiv 24 Mar 2026.
Builds on
14 of 18 references.
Closest ancestors · 7
Same direction, newest first
- 2025Taming Imperfect Process Verifiers: A Sampling Perspective on Backtracking3 Oct
- 2025Recursive Self-Aggregation Unlocks Deep Thinking in Large Language Models30 Sep
- 2025Value-Guided Search for Efficient Chain-of-Thought Reasoning23 May
- 2025On the Query Complexity of Verifier-Assisted Language Generation17 Feb
- 2025Step Back to Leap Forward: Self-Backtracking for Boosting Reasoning of Language Models6 Feb
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters6 Aug
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Models17 May
Other references · 7
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2023Let's Verify Step by Stepcited by 3,598
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
- 2025Generalized Interpolating Discrete Diffusioncited by 68
- 2024Ensembling Large Language Models with Process Reward-Guided Tree Search for Better Complex Reasoningcited by 38
- 2026Markov Chains with Rewindingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Atom of Thoughts for Markov LLM Test-Time Scaling
- 2025On the Limits of Test-Time Compute: Sequential Reward Filtering for Better Inference
- 2025The Art of Scaling Test-Time Compute for Large Language Models
- 2026Markovian Generation Chains in Large Language Models
- 2026Towards Better Exploration in Sequential Test-Time Scaling
- 2025Test-time Scaling of LLMs: A Survey from A Subproblem Structure Perspective
- 2024Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for Problem-Solving with Language Models
- 2026Beyond the Frontier: Stochastic Backtracking for Efficient Test-Time Scaling