atlas

Research map / Architectures and efficiency / Attention and transformers

Toward Understanding In-context vs. In-weight Learning

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 0 citations (OpenAlex)

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.

Gives a theoretical model (gated in-weight vs in-context predictors with regret and generalization analysis) explaining why in-context learning emerges and can become transient, validated on synthetic transformers, Omniglot, and fine-tuning Gemini Nano 1.

Problem

Explain when in-context learning (ICL) emerges in transformers under distributional properties of training data and why it can diminish (become transient) with further training, as opposed to in-weight learning (IWL).

Approach

A bi-level gating model selects between a tabular in-weight predictor and a softmax-attention-style in-context predictor per input, choosing whichever has lower expected test error; generalization bounds show IW error decays with sample count while IC error has a floor set by irrelevant context labels, so ICL is transient when IWL becomes more accurate. A no-regret bi-level update learns this sele

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase training-set sizeTransformer on synthetic classification · Synthetic classification, low-frequency classes0-1 validation errorMixed
Increase input noise (ablation)Transformer on synthetic classification · Synthetic classification0-1 validation errorHelped
Increase the number of low-frequency classes (ablation)Transformer on synthetic classification · Synthetic classification, low-frequency classes0-1 validation errorMixed
Use a balanced class distribution (ablation)Transformer on synthetic classification · Synthetic classification0-1 validation errorMixed
Increase label noise (ablation)Transformer on synthetic classification · Synthetic classification0-1 validation errorHelped
Increase the probability of relevant contexts (ablation)Transformer on synthetic classification · Synthetic classification0-1 validation errorMixed
Reduce the number of relevant contexts (ablation)Transformer on synthetic classification · Synthetic classification, context length 40-1 validation errorHurt
Increase context length (ablation)IC predictor on synthetic classification · Synthetic classification0-1 validation errorHurt
Fine-tune to memorize name–city pairsGemini Nano 1 · Natural-language prompts with a conflicting in-context cityselection of the in-context answerHurt
Fine-tune to memorize name–city pairsGemini Nano 1 · Natural-language prompts with a conflicting in-context cityprobability of selecting the memorized answerHurt
Train on Omniglot with many low-frequency classesTransformer on Omniglot · Omniglot, low-frequency classes0-1 validation errorMixed

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian-prototype classification data Omniglot custom person-city finetuning questions

Benchmarks: synthetic classification (IBD/OOBD 0-1 error) Omniglot (IBD/OOBD 0-1 error)

Metrics: 0-1 error cross-entropy regret

Baselines: IC predictor IW predictor stylized ICL model GRU

Builds on: induction heads Chan et al. 2022 data distributional properties of ICL Krichevsky-Trofimov estimator online-to-batch conversion

Closest papers by meaning

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.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy