Sanity Checks for Attention Surgery: Null Models and Matched Interventions for Representation-Motivated Design
Abstract
Transformer architectural modifications frequently measure a statistic on internal representations, observe that it is large, remove it architecturally, and report an improvement. Interpreting that sequence requires evaluating whether the statistic exceeds its noise floor, whether it survives a geometric null, and whether the training gain requires the specific direction removed. We formulate these requirements as three reusable checks and apply them to self-attention removal, which deletes the component of an attention head's output aligned with its own value vector. Across nine multi-head pretrained models (5,408 heads, 124M to 6.9B parameters), an earlier-position causal null accounts for 48% to 63% of the head-value cosine alignment, with no monotone scale trend. Under grouped-query attention, this alignment is specific to each head's own key-value group and reverses across groups (+0.24 to +0.27 within-group, -0.11 to -0.19 across-group). Split-half reliability demonstrates that the per-head intervention effect is resolvable in GPT-2 () but attenuated in Pythia-160M (0.42) and Pythia-410M (0.53), whereas structural self-cosine reliability is near-perfect in all three (); which statistic predicts its own intervention is model-dependent. In a pre-registered 3-arm by 8-seed paired factorial at tokens per run (399,900,672 tokens), a fixed arbitrary rank-one direction does not differ from baseline (+0.0011 nats, ), while self-directed removal lowers validation loss (-0.0029 nats, Holm-corrected ) and outperforms the fixed arbitrary control directly (-0.0040 nats, ). At 50.9M scale the training benefit requires the own-value direction rather than a fixed arbitrary one, but a large cosine alignment alone does not establish redundancy in frozen models.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
- Comments
- 13 pages, 7 figures, 4 tables. Code: https://github.com/Basavarajearlybird/SANITY-CHECKS-FOR-ATTENTION-SURGERY_Original (archived at https://doi.org/10.5281/zenodo.24096410)
Related papers
Eliciting sandbagged LLM capability via structural interventions on attention-head functional networks
Shared title terminologycs.LGManzi Fabrice Niyigaba, Ishan Verma Prasad, Sansheng Cao et al.
Byte Patches versus BPE at Matched Data: A Matched-Twin Comparison at 350M Parameters
Shared title terminologycs.LGAsadullah Maliyawala, Andrej Lisal
Boundary Representation-Driven Graph Transformer Modeling for Machining Operation Sequencing
Shared title terminologycs.LGFatemeh Elhambakhsh, Gaurav Ameta, Aditi Roy et al.
CHORD: Learning Latent Spaces for Constrained Stellarator Design
Shared title terminologycs.LGSantiago A. Cadena, Andrea Merlo
Matching Under Metric Privacy
Shared title terminologycs.LGHongyi B. Hu, Dung Nguyen, M. Amin Rahimian
Attention Latent Feedback
Shared title terminologycs.LGXuyuan Xiong, Siyu Chen, Mengzhao Chen et al.