Adaptive Thinking: Large Language Models Know When to Think in Latent Space

Pingzhi Li, Bairu Hou, Yun Zhu, Yihao Feng, Ke Ye, Tao Lei, Zhifeng Chen, Tianlong Chen, Xianzhi DuICLR 2026

Recent breakthroughs in "test-time compute"—most notably seen in models capable of generating long internal "chains of thought" (CoT) before providing a final answer—have significantly boosted performance on complex math and logic problems. However, this "thinking" comes at a high computational cost. Currently, every query, regardless of its simplicity, often receives the same massive thinking budget.

The challenge lies in achieving compute-optimal inference. If you ask a model a simple arithmetic question, it shouldn't spend thousands of tokens "thinking" about number theory. Conversely, a complex geometry proof requires deep reflection. Existing methods to manage this either rely on superficial statistics like token entropy, which often fails to capture true reasoning difficulty, or require the model to "self-judge" its own difficulty, which is inconsistent and adds computational overhead.

To address this, researchers introduce Sonata (Self-Consistency-Guided Adapter for Thinking Allocation), a lightweight adapter that allows Large Language Models (LLMs) to "know" when they need to think before they speak. By analyzing internal hidden states during the initial query processing, Sonata adaptively allocates reasoning budgets, reducing token usage by up to 60% while maintaining or even improving accuracy.

The Sonata Approach

The Sonata framework is built on two key technical pillars:

  1. Self-Consistency as a Proxy: The researchers identified that "self-consistency"—the agreement between multiple independent reasoning paths—is an excellent indicator of whether a model needs to think. If a model consistently arrives at the same answer without deep thought, the query is likely easy. If its answers vary wildly, it requires a higher thinking budget.
  2. Latent Space Prediction: Instead of actually running multiple samples to measure consistency (which is expensive), Sonata uses a tiny, two-layer MLP adapter. This adapter is trained to look at the hidden representations (the latent space) of the LLM's final layer during the prefilling stage.
Overview of the Sonata framework showing offline training and adaptive inference.

As illustrated above, Sonata operates in three phases:

  • Calibration: The model generates multiple answers for a set of training queries to establish ground-truth self-consistency scores.
  • Training: A lightweight adapter learns to map the model's internal hidden states to these scores.
  • Inference: For a new query, the adapter predicts the self-consistency score on the fly. If the score is high (indicating low difficulty), the model skips the extended thinking phase and answers directly. If the score is low, it engages its full reasoning capabilities.

Key Insights: The Latent Space "Knows"

One of the most striking findings of this research is that LLMs exhibit clear internal signals of difficulty before they even start generating tokens.

PCA visualization showing how self-consistency signals become more distinguishable in deeper transformer layers.

As shown in the PCA visualization above, hidden states for high-consistency (easy) and low-consistency (hard) queries naturally cluster into distinct groups. This separation becomes increasingly pronounced in the deeper layers of the network, proving that the model "knows" the difficulty of a query during the initial prefilling stage.

Furthermore, the adapter demonstrates remarkable zero-shot transfer. Even though the Sonata adapter was trained exclusively on a calibration set of 1,000 math problems, it generalized effectively to coding and scientific reasoning. This suggests that "reasoning difficulty" is a fundamental property reflected in the latent space, regardless of the specific subject matter.

Evaluation and Results

The authors evaluated Sonata across a diverse range of benchmarks, including Mathematics (AIME25, GSM8K, MATH500), Science (GPQA), and Coding (LiveCodeBench). The models tested spanned various sizes, including the Qwen3 family (8B to 235B) and GPT-OSS-120B.

Sonata consistently outperformed both fixed-budget baselines and "self-judging" models:

  • Token Efficiency: It achieved a 20% to 60% reduction in thinking tokens while maintaining the same accuracy as the vanilla model.
  • Accuracy Boost: By preventing "overthinking" on simple queries—which can sometimes introduce hallucinations or errors—Sonata improved accuracy by up to 2% using the same token budget.
  • Negligible Overhead: The Sonata adapter adds less than 0.1% (1‰) to the total computational cost of inference. On the massive Qwen3-235B model, Sonata saved an average of 29.5 seconds per query by eliminating unnecessary reasoning steps.

Limitations and Future Work

While Sonata is highly effective at deciding whether to think, it currently uses a relatively coarse-grained approach to budget allocation. A promising future direction is dynamic reasoning adjustment: instead of just a trigger at the start, the model could use latent signals to decide exactly when to stop thinking during the generation of a long reasoning chain.

Additionally, while the current threshold for thinking is manually set, future iterations could potentially learn an optimal threshold automatically based on specific user requirements for speed versus precision. Ultimately, Sonata represents a significant step toward compute-optimal inference, ensuring LLMs only spend their computational budget when it truly matters.

Summary updated

BibTeX
@inproceedings{li2026adaptive,
  author = {Pingzhi Li and Bairu Hou and Yun Zhu and Yihao Feng and Ke Ye and Tao Lei and Zhifeng Chen and Tianlong Chen and Xianzhi Du},
  title = {{Adaptive Thinking: Large Language Models Know When to Think in Latent Space}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=2i6Rp0gCq6},
}
Figure