Matryoshka attribution: Learning to attribute language model outputs to representations and weights
Aryaman Arora, Kirill Acharya, Nathan Hu, Yanzhe Zhang, Noah Goodman, Dan Jurafsky, Christopher Potts
Abstract
Attributing language model outputs to their internal computations is an open problem in interpretability. Existing methods, which use causal interventions, gradients, or learnable masks, either are infeasibly expensive or struggle to identify actual causally-important internal computations. We propose framing attribution as the problem of identifying nested subsets of internal components which minimise a downstream loss. To learn this task, we introduce Matryoshka Attribution (MAttr), a mask learning method that parametrises the mask with a simple differentiable sigmoid top- operator. We supervise training over all sparsities simultaneously by randomising over training, resulting in a learned ordering of components by attribution score. MAttr achieves number 1 on the official leaderboard of the Mechanistic Interpretability Benchmark (Mueller et al., 2025); our method identifies sparse and task-transferrable circuits across varying circuit bases. As a practical application, we show that MAttr can be trained with reinforcement learning to identify weight changes responsible for downstream behaviours in LLM finetuning. We train MAttr on refusal judge scores and find that restoring of Llama 3.1 8B Instruct's weights to their base model state is sufficient to remove refusals while maintaining capabilities. We view MAttr as a successful formulation of interpretability into a learnable objective that we can tackle with gradient descent, and encourage future work along these lines.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
- Comments
- 10 pages main text, 58 pages total; preprint
Related papers
Contextual language representations link narrative processing to language and literacy in children
Shared title terminologycs.CLDongyi He, Tian Jiang, Nizhuan Wang et al.
What If Chinese Were Latinized? A Counterfactual Study of Input Representation, Tokenization, and Language Modeling
Shared title terminologycs.CLZijie Zheng, Ej Zhou
Multi-Task Learning by using Contextualized Word Representations for Syntactic Parsing of a Morphologically Rich Language
Shared title terminologycs.CLToqeer Ehsan, Miriam Butt, Sarmad Hussain et al.
Is Sara Omar the true author of Dødevaskeren (The Dead Washer)? Authorship attribution in Danish literature
Shared title terminologycs.CLJacques Savoy
Disciplined Anthropomorphism: How to Extend Cognitive Language to Artificial Intelligence
Shared title terminologycs.CLMatthieu Queloz
Evaluating Ukrainian Grammatical Competence in Language Models: Probability Versus Prompting
Shared title terminologycs.CLDmytro Babarytskyi, Oleksandr Babarytskyi, Vadym Savanevych