Abstract
Chain-of-Thought (CoT) prompting significantly enhances the reasoning capabilities of Large Language Models (LLMs), yet it incurs substantial computational costs. This paper investigates whether LLMs internally anticipate the success of their reasoning trajectories before generating a response. By applying linear and non-linear probes to the hidden states of Llama-3.1-8B and Mistral-7B, we demonstrate that internal representations encode predictive signals regarding answer correctness as early as the prompt's final token ($T=0$). Our findings reveal that these internal states achieve up to 76.4% accuracy in predicting success, outperforming text-based baselines and suggesting that the core logic of a solution is often established in the latent space before the first token is emitted.
Introduction
Chain-of-Thought (CoT) prompting has become the standard for solving complex mathematical and logical tasks. By encouraging models to "think step-by-step," researchers have unlocked higher performance across diverse benchmarks. However, this performance comes at a price: generating hundreds of intermediate tokens for every query consumes significant time and hardware resources.
This study addresses a fundamental question regarding the nature of LLM reasoning: Does the model already "know" if it will arrive at the correct answer before it finishes—or even starts—speaking? If predictive signals exist early in the generation process, it opens the door to more efficient inference strategies, such as truncating unsuccessful reasoning paths or stopping early when a solution is already "solved" in the latent space.
Methodology: Probing the Internal Monologue
To investigate these internal signals, the researchers utilized a technique known as Probing. Rather than looking at the generated text (the "surface" output), they extracted the internal hidden activations of frozen LLMs (Llama-3.1-8B and Mistral-7B) at various stages of the reasoning process:
- Pre-Generation ($T=0$): Activations from the very last token of the input prompt.
- During Generation: Activations extracted at 10% intervals throughout the reasoning chain.
These activations were fed into a lightweight, three-layer Multi-Layer Perceptron (MLP) classifier. The classifier was trained to predict a binary outcome: whether the model's eventual full CoT response would result in a "Success" or "Failure." To establish a rigorous baseline, the authors compared the probe's performance against a BERT baseline, which only had access to the raw text of the prompt and generated tokens, representing a "black-box" understanding of the model's output.
Datasets
The study focused on three challenging mathematical datasets to provide a rigorous test of reasoning:
- AQuA (Algebra Question Answering): Algebraic word problems with multiple-choice options.
- World Olympiads (Olympiad): High-level competitive math problems.
- Chinese K-12 Exam (cn-k12): Large-scale math exercises translated into English.
Key Findings
1. The "Zero-Shot" Prediction
The most significant discovery was that the probe performed substantially better than chance before a single token of the reasoning chain was generated. At $T=0$, the probe achieved accuracies ranging from 60% to 76.4% across different datasets. This suggests that the model’s initial pass over the prompt sets a "trajectory" for success or failure before the explicit reasoning even begins.
2. Latent vs. Surface Reasoning
The internal probe consistently outperformed the text-based BERT baseline. For instance, on the Llama-3.1-8B model using the AQuA dataset, the internal probe reached 60% accuracy, while BERT struggled at 53.5%. This discrepancy implies that the LLM's hidden states encode deep reasoning dynamics and confidence levels that are not fully captured by the linguistic patterns of the generated text.
3. Informative Layers and Early Saturation
Not all layers contribute equally to this predictive power. The researchers found that middle layers (specifically layers 14 and 16) were the most "knowledgeable" regarding the eventual success of the CoT process.
Furthermore, the study observed a phenomenon of early saturation. In many instances, providing the classifier with more reasoning steps (e.g., 50% vs. 90% of the chain) did not significantly improve its prediction accuracy. Using Singular Vector Canonical Correlation Analysis (SVCCA), the authors found that early-step representations are remarkably similar to final-step representations, suggesting the model may "solve" the core logic very early in the latent space.
Discussion and Implications
Efficiency and Early Stopping
The existence of early success signals suggests that we can optimize LLM inference. If a probe detects a high probability of failure at $T=0$, the system could potentially re-prompt the model or adjust its temperature. Conversely, if the probe detects that the answer is already "known" in the latent space halfway through a CoT, the model could be forced to provide a final answer immediately, saving significant compute.
Limitations
Despite the promising results, several limitations remain:
- White-Box Access: This method requires access to internal activations, making it currently inapplicable to closed-source models like GPT-4 or Claude.
- Domain Specificity: The findings are currently limited to mathematical reasoning. It is unclear if creative or subjective tasks exhibit similar latent success signals.
- Prompting Styles: The study focused on zero-shot CoT; the impact of few-shot examples on these internal trajectories remains a subject for future research.
Conclusion
This research demonstrates that LLMs possess an internal awareness of their reasoning trajectory far earlier than previously thought. By shifting the focus from surface-level text to latent representations, we can gain a deeper understanding of how these models solve problems and develop more efficient, "self-aware" AI systems that know when to keep thinking and when they have already found the answer.
Summary updated