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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Attention-Head Reuse and the Limits of Compositional Generalization

Ngoc Kim Bui
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
preprint

Attention-Head Reuse and the Limits of Compositional Generalization

Ngoc Kim Bui
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
VNU University of Science (VN)
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon