Research map / Architectures and efficiency / Attention and transformers
Strategy Coopetition Explains the Emergence and Transience of In-Context Learning
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Shows that after ICL transience in a 2-layer attention-only transformer, the asymptotic strategy is context-constrained in-weights learning (CIWL), and that ICL emerges via cooperative sharing of Layer 2 circuits with CIWL, explained by a toy model of strategy coopetition.
Problem
Why in-context learning emerges during training if it is not the asymptotically preferred strategy, and what the asymptotic strategy is after ICL transience disappears.
Approach
Identifies a hybrid asymptotic strategy (CIWL) that requires the correct label in context and in-weights knowledge, and shows ICL and CIWL share Layer 2 circuits so that competition (Layer 1) and cooperation (Layer 2) jointly produce transient ICL ("strategy coopetition"); a toy tensor-product loss model reproduces these dynamics and guides a data change (exact context-query matching) that makes I
Key results
- CIWL becomes the asymptotic strategy (CIWL evaluator 98.7% accuracy at end of training, while ICL transiently emerges and fades).
- Layer 1 ablations show V-composition (drop to 59.3%) and K-composition (drop to 57.5%) into Layer 2, while Layer 2 weights are reused across ICL and CIWL.
- Matching context exemplars to the query (exact match in bursty context) makes ICL persist rather than fade in the small setup, and extends to a larger 12-layer setup.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| ablate L1 → output connections while preserving patterns (ablation) | 2-layer attention-only transformer · CIWL evaluator | accuracy: 98.7% to 98.5% | No clear effect |
| ablate L1 outputs' influence on L2 values (ablation) | 2-layer attention-only transformer · CIWL evaluator | accuracy: 98.7% to 59.3% | Hurt |
| ablate L1 outputs' influence on L2 keys (ablation) | 2-layer attention-only transformer · CIWL evaluator | accuracy: 98.7% to 57.5% | Hurt |
| ablate L1 outputs' influence on L2 queries (ablation) | 2-layer attention-only transformer · CIWL evaluator | accuracy: 98.7% to 95.4% | No clear effect |
| ablate all attention heads (ablation) | 2-layer attention-only transformer · CIWL evaluator | in-context accuracy: 98.74% to 62.46% | Hurt |
| zero the embedding → unembedding pathway (ablation) | 2-layer attention-only transformer · CIWL evaluator | accuracy: 98.74% to 96.72% | No clear effect |
| use learned absolute positional embeddings instead of sinusoidal or rotary embeddings (ablation) | 2-layer attention-only transformer · synthetic few-shot task; ICL emergence | ICL emergence | Helped |
| reduce classes and exemplars to 1600 classes and 5 exemplars (ablation) | 2-layer attention-only transformer · synthetic few-shot task; ICL evaluator | ICL emergence | Hurt |
| make the context exemplar exactly match the query exemplar (ablation) | 2-layer attention-only transformer · Flip evaluator; matched-exemplar training | accuracy | Helped |
Surprising findings
- ICL emerges more easily when it is not the only viable strategy: training on ICL-only data from scratch struggles, but reusing Layer 2 weights from a bursty-data run enables rapid ICL emergence.
- The asymptotic strategy is a hybrid (context-constrained in-weights) rather than pure in-weights learning, and pure IWL is negligible.
Limitations
- Main analysis uses a small attention-only 2-layer model on a synthetic Omniglot-based task; MLP variants showed different behavior in some settings.
- The mechanistic explanation of superposition and the divot in CIWL formation are speculative and not fully understood.
- Toy model is minimal and only qualitatively matches the transformer dynamics.
Experimental setup
Datasets: Omniglot ImageNet (ResNet18 pretraining)
Benchmarks: ICL evaluator IWL evaluator CIWL evaluator Flip evaluator (synthetic OOD sets on Omniglot)
Metrics: accuracy in-context accuracy attention delta Flip evaluator accuracy
Baselines: Chan et al. 2022 bursty setup standard training without intervention
Builds on: induction heads Omniglot bursty training (Chan et al. 2022) progress measures minimal phase change model (Saxe et al.)
Closest papers by meaning
- Investigating the Pre-Training Dynamics of In-Context Learning: Task Recognition vs. Task Learning (ICLR 2025 · similarity 0.90)
- In-Context Learning Strategies Emerge Rationally (NeurIPS 2025 · similarity 0.90)
- Competition Dynamics Shape Algorithmic Phases of In-Context Learning (ICLR 2025 · similarity 0.89)
- Differential learning kinetics govern the transition from memorization to generalization during in-context learning (ICLR 2025 · similarity 0.89)
- What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formation (ICML 2024 · similarity 0.89)
- Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence (ICML 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.
