atlas

Research map / Architectures and efficiency / Attention and transformers

Competition Dynamics Shape Algorithmic Phases of In-Context 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.

Proposes a finite mixture of Markov chains sequence task for studying ICL, reproduces known ICL phenomena, and decomposes trained 2-layer Transformers into four competing algorithms (unigram/bigram x retrieval/inference) via linear interpolation.

Problem

ICL studies rely on disparate synthetic setups (linear regression, classification, probabilistic automata), making it unclear which ICL phenomena are general; a unified, sequence-modeling testbed and mechanistic account of ICL are lacking.

Approach

Train small Transformers autoregressively on sequences from a finite mixture of Markov chains, vary data diversity (number of chains), training steps and context size, and explain behavior as a mixture of four algorithms (unigram/bigram retrieval and inference) whose competition yields algorithmic phases and transient ICL.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase data diversity past the reported thresholdTransformer on finite Markov mixtures · OOD chainsKL divergenceHelped
Increase data diversityTransformer on finite Markov mixtures · ID chainsKL divergenceHurt
Continue training after the emergence of the bigram inference solution, allowing bigram retrieval to take overTransformer on finite Markov mixtures · OOD chains, N=2^6KL divergenceHurt
Increase model embedding dimension to 256 (ablation)Transformer on finite Markov mixtures · Algorithmic phase boundary for biinfData-diversity threshold: 16$\times$Hurt
Reduce the state space to k=2 (ablation)Transformer on finite Markov mixtures · Algorithmic competitionEmergence of biinfHurt
Encode the last state and transition in each token (ablation)Transformer on finite Markov mixtures · Algorithmic phasesUnigram retrieval phase presenceHurt
Use learned positional embeddings instead of the baseline positional setup (ablation)Transformer on finite Markov mixtures · N=2^7, algorithmic phasesTime until biinf and biret emergeHurt
Use RoPE positional embeddings (ablation)Transformer on finite Markov mixtures · Algorithmic phasesEmergence of biinfHurt
Shuffle the context while retaining its stationary distribution (ablation)Bigram-dependent model solutions · Finite Markov mixturesKL divergenceHurt
Increase context length when using a retrieval approachRetrieval algorithms · OOD chainsKL divergenceHurt
Fit LIA weights on ID sequences and use them to predict OOD performanceLinear Interpolation of Algorithms (LIA) · OOD chainsPrediction of OOD performance dynamicsHelped
Increase training steps at high data diversity until induction heads emergeTransformer on finite Markov mixtures · ID and OOD chains, N=2^7KL divergenceHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic finite Markov mixture sequences (k=10 states, length 512)

Benchmarks: ID and OOD KL divergence on synthetic Markov chains

Metrics: KL divergence bigram utilization retrieval proximity LIA fit weights

Baselines: Retrieval algorithms (unigram/bigram) Inference algorithms (unigram/bigram)

Builds on: induction heads Bayesian averaging account of ICL transient ICL nanoGPT RoPE

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