Researchers localize the attention heads behind few-shot logical reasoning in LLMs
An arXiv study identifies a small set of attention heads that causally drive three key decisions in each step of symbolic-aided reasoning, while fact-reading heads act more diffusely.
In plain words
When large language models follow step-by-step logical reasoning from a few examples, it has been unclear how they do it internally. The study pinpoints specific attention heads — components that pass information between tokens — that cause the model to pick premises, decide when to stop, and choose rules. Only about 3% of all heads handle these decisions.
What was announced
The authors, publishing on arXiv, studied large language models prompted with symbolic representations of step-by-step reasoning and graph traversal. They found the model is least confident at tokens that steer the reasoning, and these tokens correspond to three decisions per inference step: which premise to select, whether to stop selecting premises, and which rule to apply. Using activation patching, they report that a small set of attention heads at the decision position — roughly 3% of all heads — restores most of the model's clean behavior when patched into a corrupted run, and largely removes it when corrupted in a clean run.
The picture differs for heads that read relevant facts and rules from the context: these sit in earlier layers and contribute in a more distributed way. The team also found heads sensitive to the order of reasoning steps in the demonstrations, which they link to the model's global strategy such as a graph traversal algorithm, though they note this effect is weaker and less consistent across models and prompt templates. The paper's code is available on GitHub.
What it does not show
- The source is an abstract, so the full paper's methods, models and results could not be checked.
- The order-sensitivity finding is described by the authors as weaker and less consistent across models and prompt templates.
- The patching results come from the authors' own experiments and have not been independently confirmed.
For security and IT teams
- Scope
- The findings apply to few-shot logical reasoning with symbolic-aided prompts, not to general model behavior; the authors also note variability across models and prompt templates for the order-sensitivity result.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.