Critical Thinking: Which Kinds of Complexity Govern Optimal Reasoning Length?

Celine Lee, Alexander M. Rush, Keyon VafaarXiv 2025

Abstract

Large language models (LLMs) often benefit from verbalized reasoning at inference time, but it remains unclear which aspects of task difficulty these extra reasoning tokens address. To investigate this question, we formalize a framework using deterministic finite automata (DFAs). DFAs offer a formalism through which we can characterize task complexity through measurable properties such as run length (number of reasoning steps required) and state-space size (decision complexity). We first show that across different tasks and models of different sizes and training paradigms, there exists an optimal amount of reasoning tokens such that the probability of producing a correct solution is maximized. We then investigate which properties of complexity govern this critical length: we find that task instances with longer corresponding underlying DFA runs (i.e. demand greater latent state-tracking requirements) correlate with longer reasoning lengths, but, surprisingly, that DFA size (i.e. state-space complexity) does not. We then demonstrate an implication of these findings: being able to predict the optimal number of reasoning tokens for new problems and filtering out non-optimal length answers results in consistent accuracy improvements.

Introduction

Large language models (LLMs) have demonstrated remarkable capabilities in solving complex problems through verbalized reasoning, often referred to as Chain-of-Thought (CoT). However, the relationship between the length of these reasoning traces and task difficulty remains poorly understood. While models like DeepSeek-R1 and OpenAI’s o3 generate extensive internal tokens, it is unclear whether this "thinking" time is necessitated by the structural complexity of the problem or the number of sequential steps required to reach a solution. This paper formalizes task complexity using automata theory to identify the specific properties that govern optimal reasoning length.

Methodology: A DFA Framework for Reasoning

To isolate dimensions of task difficulty, the authors represent reasoning tasks as Deterministic Finite Automata (DFAs). This formalism allows for the precise measurement of two complexity metrics:

  1. Run Length ($N$): The minimum number of sequential transitions required to reach a solution.
  2. State-Space Size ($k$): The total number of possible states within the decision structure.

The study evaluates a wide range of models—including the Llama 3.1/3.3 series, Qwen 2.5, DeepSeek-V3/R1, and GPT-4o—across ten deterministic tasks such as grid navigation, boolean expression evaluation, and state tracking. The researchers identify a Critical Length ($L^*$) for each task-model pair, defined as the reasoning length that maximizes the probability of a correct answer.

The "Goldilocks Zone" and the Overthinking Penalty

A consistent phenomenon observed across all tasks and models is the existence of an optimal reasoning length. Accuracy typically increases as the model generates more tokens until it reaches $L^*$, after which performance begins to degrade.

Accuracy peaks at a critical length ($L^*$) across various tasks, illustrating that more reasoning tokens are not always beneficial.

This "overthinking penalty" suggests that excessive reasoning leads to "noisy backtracking," where the model loses track of its latent state, resulting in redundant steps or accumulated generation errors. Standard instruction-tuned models tend to have shorter $L^*$ values, while models trained with Reinforcement Learning (COT-RL) like DeepSeek-R1 naturally produce longer sequences.

What Governs Reasoning Length?

The core finding of the research is that optimal reasoning length is primarily driven by sequential requirements rather than structural complexity.

Correlation analysis shows that critical length ($L^*$) is strongly tied to DFA run length ($N$) but has a weak relationship with state-space size ($k$).

As shown in the data, $L^*$ correlates strongly with run length ($N$) at an average of 0.80, while the correlation with state-space size ($k$) is only 0.23. This implies that reasoning tokens serve as a mechanism for latent state-tracking—the model needs tokens to "walk" through the steps of a problem, but a larger "map" of possible states does not inherently require more tokens if the path remains short.

Practical Implications: Length-based Rejection Sampling

The predictability of $L^*$ ($R^2 = 0.65$ using DFA features) allows for practical performance gains. By predicting the optimal length for a given problem and filtering out responses that deviate significantly from this length, the researchers achieved consistent accuracy boosts:

  • R1-Llama-8B: +3.8% improvement.
  • Llama-3.3-70B: +3.4% improvement.
  • DeepSeek-R1: +2.7% improvement.

Conclusion

This work demonstrates that LLM reasoning is governed by the sequential depth of a task rather than its breadth of possibilities. Understanding the "Goldilocks Zone" of reasoning length not only provides theoretical insights into how LLMs process information but also offers a path toward more efficient inference by optimizing the "compute budget" for specific tasks. Future work may extend this framework to non-deterministic natural language tasks and investigate the mechanistic causes of the performance drop beyond the critical length.

Summary updated

BibTeX
@misc{lee2025critical,
  author = {Celine Lee and Alexander M. Rush and Keyon Vafa},
  title = {{Critical Thinking: Which Kinds of Complexity Govern Optimal Reasoning Length?}},
  year = {2025},
  eprint = {2504.01935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.01935},
}
Figure