atlas

Research map / Architectures and efficiency / Attention and transformers

How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representations

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 2 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.

Constructs synthetic in-context regression tasks where labels are a fixed MLP representation composed with a per-instance linear function, proves transformers can implement representation-then-linear-ICL, and probes trained transformers to find matching lower/upper-module mechanisms.

Problem

Existing theory and mechanistic work on in-context learning (ICL) mostly covers simple function classes like raw linear functions; it is unclear how transformers perform ICL when a fixed nonlinear representation must be learned alongside in-context linear adaptation.

Approach

ICL tasks where labels = linear function of a fixed MLP representation, with the optimal algorithm being representation transform followed by ridge regression. The paper gives decoder-only transformer constructions that predict at every token, and uses linear probes and a pasting experiment to show trained transformers split into a lower representation-computing module and an upper linear-ICL modu

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train a transformer to learn representations and perform linear ICLGPT-2-family transformer · Synthetic supervised ICL with representationstest riskHelped
Train a transformer to learn representations and perform linear ICLGPT-2-family transformer · Synthetic dynamical systems with representationsICL riskHelped
Use a mixture of multiple possible representation functionsTrained transformer · Mixture of multiple representationsICL riskHurt
Use a one-layer transformer embedding before the upper module (ablation)Trained transformer's upper module · Linear ICL pasting, D-dimensional, noise 0.1test riskHelped
Use a linear-copy embedding rather than a linear embedding (ablation)Trained transformer's upper module · Linear ICL pasting, D-dimensional, noise 0.1test riskHelped
Use a linear embedding before the upper module (ablation)Trained transformer's upper module · Linear ICL pasting, D-dimensional, noise 0.1test riskHelped
Use a freshly trained single-layer transformer with separate input and label tokens (ablation)Single-layer transformer · Linear ICL with separate input and label tokenstest risk: 1.01Hurt
Increase representation noise or hidden dimension rather than representation depth (ablation)Trained transformer · Synthetic supervised ICL with representationstest riskMixed

Surprising findings

Limitations

Experimental setup

Datasets: synthetic ICL regression tasks with MLP representations

Benchmarks: synthetic ICL regression with representations synthetic dynamical system ICL

Metrics: ICL test risk linear probing error pasting risk

Baselines: Bayes-optimal ridge predictor

Builds on: Garg et al. in-context learning of function classes Akyürek et al. ridge regression in-context von Oswald et al. in-context gradient descent Bai et al. algorithm selection

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