Attention-Head Reuse and the Limits of Compositional Generalization
To answer a multi-step question, a model has to perform each lookup and pass the result on to the next. We study both abilities in Qwen2.5-1.5B and Phi-4-mini fine-tuned on passage-based relational questions. In each model we pick 16 attention heads by activation patching on direct two-step answers, and then test the same head indices in separately trained models that answer three-step questions one lookup at a time. Ablating these heads at any single stage lowers accuracy on counterfactual pairs by 69–99 percentage points, while matched head sets have much smaller effects. When the first lookup is ablated, supplying its correct answer raises final accuracy from 3–17% to over 99%, even though later steps still attend to the ablated computation. Generalization depends more on the order of the relations than on whether the chain is new. Direct-answering models solve 87–98% of unseen relation triples whose adjacent pairs appeared in training but only 20–50% of permuted triples, and in stepwise models the errors on hard permutations start at the first lookup. Benchmarks that hold out whole chains but keep their local structure familiar may therefore overstate how well a model composes.
Authors
- Ngoc Kim Bui (ORCID: https://orcid.org/0000-0002-8526-0471)
Institutions
- VNU University of Science (VN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24774514
- Primary Topic
- Topic Modeling
- Type
- preprint