TLDR: This research paper investigates the internal mechanisms of Chain-of-Thought (CoT) prompting in large language models (LLMs) by analyzing information flow across decoding, projection, and activation phases. The study finds that CoT acts as a decoding space pruner, guiding output generation through answer templates and increasing adherence to reasoning structures, which correlates with improved performance. CoT also concentrates probability distributions, reducing predictive uncertainty. Furthermore, CoT modulates neuron engagement in a task-dependent manner, reducing activation in open-domain tasks while increasing it in closed-domain scenarios, offering novel insights into how CoT enhances LLM reasoning.
Large language models, or LLMs, have become incredibly powerful tools, excelling at a wide array of tasks from writing creative content to answering complex questions. However, they often struggle with multi-step reasoning, where a problem requires several logical steps to solve. This is where Chain-of-Thought (CoT) prompting comes in. Introduced in 2022, CoT guides LLMs through a step-by-step reasoning process, significantly boosting their performance in areas like arithmetic, commonsense, and symbolic reasoning.
Despite its proven effectiveness, the exact internal mechanisms of CoT have remained somewhat of a mystery. Previous studies have offered hypotheses, such as CoT reducing task complexity or models imitating answer templates. While these ideas are intuitively appealing, they often lacked direct experimental evidence linking the model’s internal states to the observed improvements.
Unlocking the Black Box: A Mechanistic Approach
A recent research paper, titled “How Chain-of-Thought Works? Tracing Information Flow from Decoding, Projection, and Activation”, aims to shed light on this mystery. Authored by Hao Yang, Qinghua Zhao, and Lei Li, this work adopts a “mechanistic interpretability” approach. This involves essentially “opening” the LLM’s “black box” to investigate how its internal computational units and connections process and flow information. The researchers focused on “vanilla CoT,” the original form of Chain-of-Thought prompting, as its internal workings were still largely unexplored.
To conduct their analysis, the team selected six different LLMs, ranging in size from 3 billion to 70 billion parameters, and nine datasets covering three core reasoning types: arithmetic, commonsense, and symbolic reasoning. This broad selection allowed them to cover a wide spectrum of task complexities and answer formats, including both open-domain tasks (like answering general questions) and closed-domain tasks (like multiple-choice questions).
The Three Phases of CoT’s Influence
The study meticulously traced the information flow within the LLMs across three critical phases: Decoding, Projection, and Activation.
Decoding: Guiding Output Generation
The decoding phase is where the model generates its output tokens. The researchers hypothesized that CoT prompts narrow down the possible output choices, leading to more structured and relevant responses. They investigated this by analyzing how models imitate keywords from prompts and questions, and how well they adhere to a defined reasoning structure.
They found that models tend to imitate “time” and “action” keywords more frequently from CoT prompts, suggesting that prompts effectively provide structural cues for the reasoning process. In contrast, “number” keywords were often imitated directly from the input questions, especially in arithmetic tasks. This indicates that CoT prompts provide the framework, while the model fills in the specific content from the problem statement.
Crucially, the study revealed a strong positive correlation between how closely the generated reasoning steps adhered to a defined structure and the model’s overall performance. This suggests that CoT’s effectiveness is deeply tied to its ability to guide the model to produce structurally coherent reasoning steps, even if the logical correctness of individual steps might sometimes be flawed. The adherence to the structural template appears to be a key factor.
Projection: Sharpening Decision Boundaries
The projection phase involves mapping the model’s internal states to probability distributions over its vocabulary. The researchers analyzed the probability of generated token sequences and the overall probability distribution of individual tokens.
They observed that with CoT, the probabilities of generated tokens were consistently higher and more concentrated. This means the model assigned a significant probability to a smaller, more specific set of next tokens at each step. This shift indicates that CoT’s structural guidance effectively constrains the decoding space, reducing uncertainty and increasing the model’s conviction in its predictions.
Furthermore, CoT prompts consistently led to substantially lower “entropy” values in the probability distribution. Lower entropy signifies a more concentrated distribution and reduced predictive uncertainty. This finding strongly supports the idea that CoT fundamentally alters the model’s output generation process by reducing ambiguity in token prediction, complementing the observations from the decoding phase.
Activation: Task-Dependent Neuron Engagement
The activation phase focuses on how neurons within the model’s Feed-Forward Networks (FFNs) are engaged. The researchers measured the overall number of activated neurons and also looked at layer-wise activation differences.
Across various datasets, CoT generally resulted in a lower overall number of activated neurons compared to standard prompts. This suggests that CoT facilitates a more focused processing regimen, allowing the FFNs to operate more selectively by activating a smaller, task-relevant subset of neurons at each step. This selective processing is likely linked to the reduced predictive uncertainty seen in the projection phase.
A particularly surprising and novel finding was the task-specific modulation of neuron engagement. For open-domain tasks (like general question answering), CoT led to a reduction in later-layer neuron activation. This implies that CoT acts like a “pruner,” helping the model navigate a vast solution space by focusing on relevant features. Conversely, for closed-domain tasks (with limited answer options), CoT resulted in an increase in later-layer neuron activation. Here, CoT appears to act as an “amplifier,” encouraging the model to thoroughly evaluate features associated with all plausible choices within the predefined answer space.
These distinct patterns suggest that CoT’s influence on model processing is not uniform but dynamically adapts to the demands of the task, providing new insights into its operational principles.
Also Read:
- Unveiling the Core Mechanisms of Language Model Training
- Mastering AI Interaction: How Prompt Engineering Drives Productivity
Conclusion and Future Directions
In summary, this research provides a comprehensive understanding of how Chain-of-Thought prompting works internally. It suggests that CoT constrains the decoding space, reduces predictive uncertainty, and modulates neuron engagement in a task-dependent manner. These findings offer a novel framework for interpreting and comparing different prompting techniques for LLMs.
The authors acknowledge that despite these valuable insights, the inherent “black box” nature of LLMs means that establishing definitive causal links remains challenging. Future research will continue to explore the intricate interplay between task properties and how they shape activation patterns and information flow within these complex systems.


