An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs

Daking Rai, Ziyu Yao · DOI

Introduction

Chain-of-Thought (CoT) prompting—the technique of asking a model to "think step-by-step"—has become a cornerstone for eliciting complex reasoning from Large Language Models (LLMs). However, the internal mechanisms that translate these prompts into higher accuracy have remained largely mysterious. Traditional research has relied on "ablation studies," which remove parts of a prompt to observe performance changes. While useful, this approach only reveals what is important, not how the model's internal "engine" processes the information. This paper addresses this gap by investigating the activation patterns of individual neurons in the feed-forward (FF) layers, proposing that neuron activation serves as a unified lens to explain CoT-driven arithmetic reasoning.

Methodology

The researchers focused their investigation on the feed-forward layers of Llama2-7B, utilizing a three-stage approach to bridge the gap between prompt structure and internal mechanics:

  1. Automated Neuron Discovery: To avoid manual inspection of thousands of units, the authors developed a pipeline to identify "candidate neurons" that show high activation during successful reasoning tasks. They then used GPT-4 to categorize these neurons by projecting their weights into the model's vocabulary space. This allowed them to identify neurons that specifically respond to concepts like "Addition," "Subtraction," or "Logical Connectors."
  2. Random Noise Ablation: To establish a causal link between these neurons and reasoning performance, the authors "corrupted" the identified neurons by adding Gaussian noise to their activations during inference.
  3. Activation Pattern Analysis: The researchers compared how different prompt variants (e.g., prompts without equations or prompts with incorrect labels) changed the frequency and strength of activation in these identified reasoning neurons.

Identifying the "Reasoning Neuron"

The study successfully identified 113 specialized neurons in Llama2-7B, categorized into seven functional groups: logical connectors, addition, subtraction, multiplication, division, equals, and calculation.

The necessity of these neurons was confirmed through corruption experiments. When these 113 neurons were ablated with noise, the model's accuracy on the GSM8k benchmark plummeted from 16.83% to 4.54%. In contrast, corrupting a random set of 113 neurons only reduced accuracy to 11.37%, highlighting the specialized role of the identified reasoning units in the model's ability to solve math problems.

Mechanistic Insights into Prompting

The "neuron activation lens" provides clarity on several previously observed prompting phenomena:

Internal Activation vs. Surface Text

A key finding is that a model's success correlates strongly with the strength of internal neuron activation, but not necessarily with the number of "reasoning words" (e.g., "therefore," "plus") the model actually outputs. This suggests that internal processing is a far better predictor of success than surface-level fluency.

The Role of Equations

Removing equations from a prompt does more than just make the prompt harder to read; it significantly reduces the activation of arithmetic-specific neurons. Interestingly, even without explicit equations, the model still activates these neurons slightly, explaining why it can still solve a small percentage of problems (12.58% accuracy) without being shown math symbols.

Robustness to Incorrect Labels

Prior work found that providing examples with the wrong answers doesn't always hurt LLM performance. This paper explains why: the internal reasoning path—the sequence of neurons activated—remains largely the same even when the labels are wrong, provided the overall structure of the prompt remains familiar.

The Danger of Narrow Prompts

Prompts that only show one type of example (e.g., only addition problems) were found to bias the model internally. This causes the model to over-activate addition neurons even when a different operation, like multiplication, is required, leading to a drop in overall accuracy.

Limitations and Future Work

While this research provides a significant step toward mechanistic interpretability, the authors acknowledge several limitations:

  • Scope of Concepts: The study only looked at seven reasoning concepts, whereas arithmetic reasoning likely involves many more nuanced sub-tasks.
  • Layer Focus: The investigation focused exclusively on feed-forward layers, ignoring the role of attention heads, which are known to handle information routing.
  • Model Sensitivity: While the discovery method worked on Llama3-8B, that model proved much more sensitive to noise, suggesting that newer, more "dense" models might require different interpretability techniques.

Conclusion

By shifting the focus from prompt-level behavior to neuron-level activation, this research offers a mechanistic explanation for why CoT works. It demonstrates that the effectiveness of a prompt is directly tied to how well it triggers specific internal reasoning units, providing a foundation for more principled prompt engineering and a deeper understanding of LLM cognition.

Summary updated

BibTeX
@inproceedings{rai2024investigation,
  author = {Daking Rai and Ziyu Yao},
  title = {{An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.387},
}
Figure