The Heuristic Core: Understanding Subnetwork Generalization in Pretrained Language Models
Not on the map. Why?
Abstract (arXiv)
Prior work has found that pretrained language models (LMs) fine-tuned with different random seeds can achieve similar in-domain performance but generalize differently on tests of syntactic generalization. In this work, we show that, even within a single model, we can find multiple subnetworks that perform similarly in-domain, but generalize vastly differently. To better understand these phenomena, we investigate if they can be understood in terms of "competing subnetworks": the model initially represents a variety of distinct algorithms, corresponding to different subnetworks, and generalization occurs when it ultimately converges to one. This explanation has been used to account for generalization in simple algorithmic tasks ("grokking"). Instead of finding competing subnetworks, we find that all subnetworks -- whether they generalize or not -- share a set of attention heads, which we refer to as the heuristic core. Further analysis suggests that these attention heads emerge early in training and compute shallow, non-generalizing features. The model learns to generalize by incorporating additional attention heads, which depend on the outputs of the "heuristic" heads to compute higher-level features. Overall, our results offer a more detailed picture of the mechanisms for syntactic generalization in pretrained LMs.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 36 of its 47 references that are in the map. First posted on arXiv 6 Mar 2024.
Builds on
36 of 47 references.
References · 36
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
- 2019Attention is not Explanationcited by 929
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2017Learning Sparse Neural Networks through L0 Regularizationcited by 583
24 more
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 415
- 2019PAWS: Paraphrase Adversaries from Word Scramblingcited by 402
- 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 359
- 2019Compositionality decomposed: how do neural networks generalise?cited by 265
- 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modificationscited by 231
- 2019Structured Pruning of Large Language Modelscited by 203
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 187
- 2021Block Pruning For Faster Transformerscited by 177
- 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 149
- 2020An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Modelscited by 134
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 115
- 2023Task-Specific Skill Localization in Fine-tuned Language Modelscited by 105
- 2020Accelerating Training of Transformer-Based Language Models with Progressive Layer Droppingcited by 93
- 2019BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performancecited by 89
- 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 83
- 2021Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristicscited by 67
- 2020How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Maskingcited by 63
- 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
- 2023Break It Down: Evidence for Structural Compositionality in Neural Networkscited by 44
- 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
- 2023Circuit Breaking: Removing Model Behaviors with Targeted Ablationcited by 27
- 2023Interpretability Illusions in the Generalization of Simplified Modelscited by 25
- 2023Examining Modularity in Multilingual LMs via Language-Specialized Subnetworkscited by 13
- 2023NeuroSurgeon: A Toolkit for Subnetwork Analysiscited by 9
Built on by
Citing papers per year: 2024: 5; 2025: 3; 2026: 2.
10 papers.
- 2024Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformerscited by 24
- 2024Intrinsic Self-correction for Enhanced Morality: An Analysis of Internal Mechanisms and the Superficial Hypothesiscited by 15
- 2025Hidden Breakthroughs in Language Model Trainingcited by 15
- 2024Does learning the right latent variables necessarily improve in-context learning?cited by 13
- 2025Emergent Symbol-like Number Variables in Artificial Neural Networkscited by 6
- 2025Is In-Context Learning Learning?cited by 2
- 2026Shared Lexical Task Representations Explain Behavioral Variability In LLMscited by 2
- 2026Breaking Validity-Induced Boundaries to Expand Algorithm Search Space: A Two-Stage AST-Based Operator for LLM-Driven Automated Heuristic Evolutioncited by 1
- 2024Identifying Sub-networks in Neural Networks via Functionally Similar Representationscited by 0
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connectionscited by 0
- 2026Shared Lexical Task Representations Explain Behavioral Variability In LLMs23 Apr 2026
- 2026Breaking Validity-Induced Boundaries to Expand Algorithm Search Space: A Two-Stage AST-Based Operator for LLM-Driven Automated Heuristic Evolution3 Apr 2026
- 2025Is In-Context Learning Learning?12 Sep 2025
- 2025Hidden Breakthroughs in Language Model Training18 Jun 2025
- 2025Emergent Symbol-like Number Variables in Artificial Neural Networks10 Jan 2025
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connections14 Nov 2024
- 2024Identifying Sub-networks in Neural Networks via Functionally Similar Representations21 Oct 2024
- 2024Intrinsic Self-correction for Enhanced Morality: An Analysis of Internal Mechanisms and the Superficial Hypothesis21 Jul 2024
- 2024Does learning the right latent variables necessarily improve in-context learning?29 May 2024
- 2024Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers25 Apr 2024