Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neurons

Yifei Wang, Yuheng Chen, Wanting Wen, Yu Sheng, Linjing Li, Daniel Zeng

Introduction

Large Language Models (LLMs) often exhibit impressive reasoning, yet the internal mechanisms governing their factual recall remain opaque. A critical question persists: do LLMs actively retrieve stored factual knowledge during reasoning, or do they rely on surface-level pattern prediction? In multi-hop reasoning tasks—such as identifying the chairperson of a car manufacturer—a model must successfully recall a "bridge entity" (e.g., the manufacturer) to reach the final answer. Failure to activate these internal factual associations often leads to hallucinations or reasoning collapse.

Conceptual framework of multi-hop reasoning and Knowledge Neuron (KN) activation.

This research identifies specific "Knowledge Neurons" (KNs) within the Feed-Forward Networks (FFNs) of Transformer blocks that serve as internal repositories for facts. The study demonstrates that while LLMs may "know" a fact, they frequently fail to consult these neurons during complex tasks, opting instead for unreliable shortcuts.

Methodology

The researchers employed a mechanistic interpretability framework to investigate internal recall dynamics:

  1. Knowledge Neuron Identification: Using the Integrated Gradients method, the study pinpointed neurons that contribute most significantly to predicting factual targets.
  2. KN Scoring and Intervention: A "KN Score" was developed to measure activation levels. The researchers performed causal interventions—manually amplifying or suppressing KN activations—to verify their role in the reasoning process.
  3. Prompting Analysis: Internal recall was compared across three settings: standard prompting (No CoT), Zero-shot CoT ("Let's think step by step"), and Few-shot CoT.
  4. TFRKN Benchmark: To evaluate these behaviors, the authors introduced the Two-hop Factual Reasoning for Knowledge Neurons (TFRKN) dataset, containing 4,550 instances across 213 relational combinations derived from high-popularity Wikidata entities.

Key Insights: The Shortcut Trap and CoT

The investigation revealed that LLMs are often "lazy" reasoners. In many instances, models bypass systematic factual retrieval of bridge entities, jumping directly to answers based on simple word associations. For example, Mistral-7B was found to use such "shortcuts" in over 44% of cases.

Chain-of-Thought (CoT) prompting acts as a vital catalyst for factual recall. By requiring the model to articulate intermediate steps, CoT physically intensifies the activation of Knowledge Neurons, effectively "reminding" the model to access its internal parameters. Furthermore, the study observed a "Hydra Effect," where CoT-enabled models attempted to find alternative computational pathways to the correct answer even when specific KNs were suppressed.

Key Results

The experimental results highlight the significant impact of prompting on factual accuracy and neuron activation:

  • Recall Failure: Over one-third of reasoning errors were linked to a failure to retrieve known factual associations.
  • Intervention Efficacy: Suppressing KNs for both facts in a 2-hop chain resulted in an average accuracy drop of over 77%, confirming their critical role.
  • Prompting Impact: Few-shot CoT was found to reduce the "shortcut" reasoning ratio to near zero across all tested models, including Mistral-7B, LLaMA2-7B, and LLaMA3-8B.
Reasoning accuracy across different LLMs and relations under various prompting conditions.

As shown in the performance metrics, LLaMA3-8B demonstrated the most robust factual recall, while Mistral-7B showed the highest sensitivity to prompting improvements.

Conclusion and Future Work

While this study provides a foundational understanding of factual recall in 7B-8B parameter models, several avenues for future research remain. The "shortcut" behaviors of larger models (e.g., 70B+ parameters) and the dynamics of longer reasoning chains (beyond 2-hop) require further exploration. Additionally, while manual neuron intervention is effective for research, developing computationally efficient methods to "nudge" these neurons in real-time applications is a key challenge for the field.

Summary updated

BibTeX
@inproceedings{wang2024unveiling,
  author = {Yifei Wang and Yuheng Chen and Wanting Wen and Yu Sheng and Linjing Li and Daniel Zeng},
  title = {{Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neurons}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.420},
}
Figure