Research map / Architectures and efficiency / Attention and transformers
The Impact of Depth on Compositional Generalization in Transformer Language Models
Jackson Petty, Sjoerd van Steenkiste, Ishita Dasgupta, Fei Sha, Dan Garrette, Tal Linzen
New York University · Google · Google DeepMind
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 |
|---|---|---|---|
| increase depth from 1 to 2 layers at constant parameter count (ablation) | 134M-parameter decoder-only LM · COGS | accuracy (%): 19.4 -> 65.5 | Improved |
| increase depth from 2 to 12 layers at constant parameter count (ablation) | 134M-parameter decoder-only LM · COGS | accuracy (%): 65.5 -> 73.0 | Improved |
| increase depth from 1 to 12 layers at constant parameter count (ablation) | 134M-parameter decoder-only LM · C4 validation | perplexity: 33.6 -> 18.1 | Improved |
| increase depth from 24 to 32 layers at constant parameter count (ablation) | 374M-parameter decoder-only LM · C4 validation | perplexity: 14.4 -> 14.7 | Hurt |
| increase depth from 1 to 24 layers at constant parameter count (ablation) | 374M-parameter decoder-only LM · COGS | accuracy (%): 21.5 -> 78.0 | Improved |
| increase depth (ablation) | 41M, 134M, 374M decoder-only LMs · COGS structural generalization | accuracy | No clear effect |
| increase depth from 12 to 32 layers (ablation) | 134M-parameter decoder-only LM · GeoQuery Standard | accuracy (%): 82.9 -> 78.9 | No clear effect |
| increase depth from 2 to 4 layers (ablation) | 374M-parameter decoder-only LM · English Passivization | accuracy (%): 13.6 -> 89.8, then 18.8 at 6 layers | Mixed |
| fine-tune from checkpoints of deeper models matched to the shallow reference model's validation perplexity (ablation) | 134M-parameter decoder-only LM · COGS | accuracy | Improved |
| compare models at equal in-distribution loss (0.0002) during fine-tuning (ablation) | decoder-only LMs · COGS | accuracy | Improved |
| increase depth when d_ff falls below d_model (ablation) | decoder-only LMs · C4 validation | perplexity | Hurt |
| increase depth (ablation) | 374M-parameter decoder-only LM · training latency | seconds per step | Hurt |
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
- Analyzing the Inner Workings of Transformers in Compositional Generalization (NAACL 2025 · similarity 0.93)
- Extrapolation by Association: Length Generalization Transfer In Transformers (NeurIPS 2025 · similarity 0.90)
- The Curse of Depth in Large Language Models (NeurIPS 2025 · similarity 0.90)
- Do Language Models Use Their Depth Efficiently? (NeurIPS 2025 · similarity 0.90)
- Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Tasks (ICML 2024 · similarity 0.90)
- Transformer Block Coupling and its Correlation with Generalization in LLMs (ICLR 2025 · similarity 0.89)
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.