Summing Up the Facts: Additive Mechanisms Behind Factual Recall in LLMs
Bilal Chughtai, Alan Cooney, Neel Nanda
TL;DR
This study investigates how LLMs perform factual recall and reveals that recall results from an additive motif: four independent mechanisms (Subject Heads, Relation Heads, Mixed Heads, and MLPs) each contributing positively to the correct attribute. Using Direct Logit Attribution decomposed by source tokens, the authors show constructive interference among these mechanisms, with the correct answer emerging from their combined effects rather than any single component. The work leverages a CounterFact-inspired dataset and analyzes Pythia-2.8b to characterize head types and their source-token contributions, highlighting propagation between subject and relation and the role of MLPs in boosting relation attributes. The findings have implications for mechanistic interpretability, suggesting that robust recall relies on multiple, parallel circuits and that understanding these additive pathways can inform editing, prompting, and safety considerations in language models.
Abstract
How do transformer-based large language models (LLMs) store and retrieve knowledge? We focus on the most basic form of this task -- factual recall, where the model is tasked with explicitly surfacing stored facts in prompts of form `Fact: The Colosseum is in the country of'. We find that the mechanistic story behind factual recall is more complex than previously thought. It comprises several distinct, independent, and qualitatively different mechanisms that additively combine, constructively interfering on the correct attribute. We term this generic phenomena the additive motif: models compute through summing up multiple independent contributions. Each mechanism's contribution may be insufficient alone, but summing results in constructive interfere on the correct answer. In addition, we extend the method of direct logit attribution to attribute an attention head's output to individual source tokens. We use this technique to unpack what we call `mixed heads' -- which are themselves a pair of two separate additive updates from different source tokens.
