Research map / Architectures and efficiency / Attention and transformers
Grokking of Hierarchical Structure in Vanilla Transformers
Shikhar Murty, Pratyusha Sharma, Jacob Andreas, Christopher D. Manning
Stanford University · Massachusetts Institute of Technology
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Train for much longer, past in-domain saturation | vanilla transformer LM · Question-Formation and Tense-Inflection generalization | accuracy: <40%, <50% -> <90%, <80% (QF, TI) | Improved |
| Train for longer instead of early stopping | vanilla transformer · datasets where prior work reports <20% | mean accuracy across seeds: <20% -> 80% | Improved |
| Use intermediate depth rather than 2 or 10 layers (ablation) | transformer LM · Question-Formation and Tense-Inflection | fraction of seeds crossing 80% accuracy | Improved |
| Increase model depth beyond the optimum (ablation) | transformer LM · Question-Formation and Tense-Inflection | hierarchical generalization | Hurt |
| Use shallower models with smaller weight norms/attention sparsity (ablation) | transformer LM · Question-Formation and Tense-Inflection | hierarchical generalization | No clear effect |
| Model depth at the optimum has the highest tree-structuredness (ablation) | transformer LM · Question-Formation and Tense-Inflection | tree-structuredness | Improved |
| Continue training after training loss flattens | transformer LM · Question-Formation | generalization | Improved |
Open problems in attention head mechanisms
Do the attention-head mechanisms and length-generalization results hold in full-scale, real-world models?
- Mechanisms are shown only at small scale, with larger models untested. · 19 papers state it
- Theory covers only one-layer or attention-only transformers. · 14 papers state it
- Findings come from synthetic or toy tasks that may not match natural language. · 12 papers state it
Closest papers by meaning
- How Transformers Learn Structured Data: Insights From Hierarchical Filtering (ICML 2025 · similarity 0.88)
- Extrapolation by Association: Length Generalization Transfer In Transformers (NeurIPS 2025 · similarity 0.87)
- The Curse of Depth in Large Language Models (NeurIPS 2025 · similarity 0.87)
- Transformer Block Coupling and its Correlation with Generalization in LLMs (ICLR 2025 · similarity 0.87)
- Understanding Scaling Laws with Statistical and Approximation Theory for Transformer Neural Networks on Intrinsically Low-dimensional Data (NeurIPS 2024 · similarity 0.86)
- Beyond Attention: Breaking the Limits of Transformer Context Length with Recurrent Memory (AAAI 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.