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

Daking Rai, Ziyu Yao

Introduction

Chain-of-Thought (CoT) prompting has emerged as a transformative technique for enhancing the multi-step reasoning capabilities of Large Language Models (LLMs), particularly in arithmetic domains. By instructing a model to "think step-by-step," researchers have observed significant performance gains. However, the internal mechanisms driving these improvements have remained largely opaque. Traditional ablation studies have identified which prompt components (e.g., equations or textual explanations) are necessary but have failed to explain how the model's internal architecture processes these inputs. This paper employs mechanistic interpretability to investigate neuron activation as a unified lens for understanding CoT-elicited reasoning.

Methodology

The research focuses on the feed-forward (FF) layers of the Llama2-7B model, utilizing a three-stage analytical framework:

  1. Automated Neuron Discovery: To navigate the vast parameter space of LLMs, the authors developed a GPT-4-assisted pipeline. This process identifies "candidate neurons" with high activation during successful reasoning and categorizes them into seven semantic concepts: Logical Connectors, Addition, Subtraction, Multiplication, Division, Equals to, and Calculation.
  2. Causal Intervention: To validate the functional necessity of these neurons, the researchers performed "random noise ablation," introducing Gaussian noise to the identified reasoning neurons to observe the resulting impact on arithmetic accuracy.
  3. Activation Pattern Analysis: The study compares internal activation states across various prompt permutations, such as those omitting equations or containing incorrect labels, to determine how external prompt engineering influences internal circuitry.

Results

Identification and Taxonomy of Reasoning Neurons

The study successfully identified 113 specific "reasoning neurons" within Llama2-7B. These neurons are distributed across distinct mathematical and logical categories, acting as specialized circuits for different stages of the reasoning process.

Taxonomy of identified reasoning neurons categorized by mathematical and logical concepts.

Causal Impact and Necessity

Causal interventions confirmed that these neurons are essential for mathematical performance. When the 113 reasoning neurons were corrupted, Llama2’s accuracy on the GSM8k benchmark plummeted from 16.83% to 4.54%. In contrast, corrupting an equivalent number of random neurons resulted in a much smaller decline to 11.37%, demonstrating that the identified neurons are specifically tuned for reasoning tasks.

Activation as a Predictor of Performance

A key finding of this research is that internal neuron activation strength serves as a more reliable predictor of model accuracy than surface-level output statistics. While the frequency of "math-related" words in a model's response does not correlate strongly with accuracy, the average activation coefficient of reasoning neurons shows a clear positive correlation with performance.

Correlation between average reasoning neuron activation and model accuracy compared to surface-level word counts.

The Role of Prompt Components

The analysis reveals why specific prompt elements are vital. For instance, equations serve as a primary "trigger" for the model's arithmetic machinery; prompts without equations activated significantly fewer reasoning neurons (842) compared to standard CoT prompts (1119). Furthermore, the study explains the "Incorrect Label" phenomenon: models can often reason correctly despite wrong examples because the internal activation patterns remain 63% identical to those of correct prompts, indicating that the underlying reasoning path is preserved even when the final output is misled by out-of-distribution tokens.

Discussion and Limitations

While this study provides a novel lens into LLM reasoning, several limitations remain. The analysis was restricted to seven predefined concepts and focused exclusively on feed-forward layers, potentially overlooking complex interactions involving attention heads. Additionally, the extreme sensitivity of Llama3-8B to noise ablation suggests that newer, more optimized models may possess different internal stability profiles. Finally, the authors caution that high neuron activation indicates the presence of a concept but does not guarantee the absence of "faked" reasoning, where a model might produce concept-related tokens without performing the requisite logical operations. Future work should aim to map more comprehensive circuits across both attention and feed-forward components.

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