# Module Specialization in Transformer Factual Recall under Correlated Fact Distributions

*DongJae Lee, Junmo Kim*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148263) · [OpenReview](https://openreview.net/forum?id=zA0npfmnIS) · [Open on the map](../papers.html#p148263)

Category: [Interpretability & Model Adaptation](../pcat/15.md) › [Transformer Algorithmic Decomposition](../pgroup/692.md) · Type: empirical study · Keywords: transformer factual recall, module specialization, attention vs. MLP, fact correlation, probing and patching, causal chains

Areas: [LLM Reasoning](../areas/reasoning.md) › Efficient Reasoning › Transformer Circuits; [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Attention Geometry; [Interpretability](../areas/interpretability.md) › Mechanistic Interpretability › Geometric Mechanistic Interpretability

## Summary
The paper investigates how transformer modules specialize for factual recall when facts have correlated structures, revealing that attention and MLP modules take on different roles depending on the type of correlation and model capacity.

## Explained to a 5-year-old
Transformers are like computer brains that remember facts. Usually one part stores the fact and another part decides which part to use. When facts share a subject or an answer, the brain changes how it works. The researchers discovered that the attention part becomes very important for facts that share a subject. They also found that the way scientists test the brain can give different answers, showing that the brain’s parts work together in new ways.

## Explained to a 5-year-old, longer
Transformers are computer models that try to remember lots of facts. In a normal transformer, one group of units stores the fact and another group points to it. But real facts often share things, like many sentences about the same person or the same answer. When facts share a subject, the way the model points to them changes. When facts share an answer, the model uses a different part of its memory. The researchers looked at how these changes happen by using simple tests that look at the model’s signals. They also used a method that removes parts of the model to see which parts are really needed. They found that the attention part of the model becomes especially important for facts that share a subject. For facts that share an answer, another part of the model becomes more important. The tests that look at signals sometimes gave different answers than the tests that removed parts, showing that the two kinds of tests measure different things. The researchers also checked their findings on real data from several big language models, and the same patterns appeared. Finally, they showed that the ideas also work for more complicated facts that involve two steps.

## For a technical reader
The paper studies how different parts of a transformer model (attention and feed-forward layers) cooperate to recall facts when those facts are related. It shows that when facts share a subject or an answer, the division of labor changes: attention becomes the main route for subject-related facts, while feed-forward layers dominate for answer-related facts. The authors use probing and counterfactual patching to measure two different aspects-how linearly decodable a fact is versus how causally necessary a component is-and find they do not always agree. A simple counting argument predicts that only subject-axis collisions give attention a cheap advantage, and experiments confirm this prediction across several pretrained models. The work also demonstrates that a three-step chain (attention → first MLP → second MLP) is causally relevant.

## Problem
When transformer models recall facts, the standard view attributes storage to MLPs and routing to attention. However, when facts are correlated (e.g., share subjects or answers), the division of labor among modules may change. Understanding how module roles adapt under such correlations is the core problem.

## Method
The authors employ probing and counterfactual patching to measure linear decodability and causal contribution, perform parameter-counting analysis to predict specialization, and conduct edge-level path patching and causal-scrubbing tests across multiple pretrained LMs to map module roles under different fact correlation structures.

## Results
The approach finds that subject-axis collisions cause a sharp collapse of the layer-2 probe gap and dominate module specialization, while answer-collision strata are most localized in real CounterFact data across four pretrained models, and the three-step Attn→MLP1→MLP2 chain is causally relevant and tracks the predicted threshold.

## Contributions
The paper reveals how correlated fact distributions reshape module specialization in transformers, provides a parameter-counting argument predicting subject-axis dominance, and demonstrates that probing and patching measure different quantities, using edge-level path patching to uncover causal chains across pretrained models.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148263)
