atlas

Research map / Architectures and efficiency / Attention and transformers

Does learning the right latent variables necessarily improve in-context learning?

ICML 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.

Tests whether forcing a Transformer to infer task latents through a bottleneck (explicit model) improves ICL, finding it does not improve ID or OOD performance even though latents are recovered, because the downstream predictor fails to use them.

Problem

Whether Transformers performing in-context learning infer underlying task latents or rely on non-parametric shortcuts, and whether explicitly inferring the right latents improves ID and OOD generalization.

Approach

Minimally modifies the Transformer with a fixed-size bottleneck that separates context aggregation (infers task latents from the context) from query prediction, so the query cannot directly attend to demonstrations; compares this explicit model against a standard implicit Transformer across synthetic regression/classification and compositional reasoning tasks, with oracle variants that use the tru

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add a context bottleneck to explicitly infer task latentsTransformer ICL · In-distribution taskstask performanceNo clear effect
Add a context bottleneck to explicitly infer task latentsTransformer ICL · Synthetic regression OODtask performanceHurt
Add a context bottleneck to explicitly infer task latentsTransformer ICL · Classification and compositional tasks OODtask performanceNo clear effect
Use the implicit model instead of the explicit modelReusable modular MoE · Compositional generalizationtask performanceHelped
Train queries near context points, encouraging nearest-neighbor shortcuts (ablation)Implicit model · Sinusoid regression OOD with queries far from contexttask performanceHurt
Train queries near context points, encouraging nearest-neighbor shortcuts (ablation)Explicit model · Sinusoid regression OOD with queries far from contexttask performanceHelped
Add an auxiliary loss to predict the ground-truth task latent up to a linear transformation (ablation)Explicit model · ICL taskstask performanceNo clear effect
Apply the auxiliary ground-truth latent loss directly to the bottleneck instead of a linear decoding (ablation)Explicit model · Linear regression OODtask performanceNo clear effect
Use the ground-truth prediction function instead of learning the predictor (ablation)Explicit model · OOD tasks except nonlinear regression with MLP latentstask performanceHelped
Use the ground-truth prediction function instead of learning the predictor (ablation)Explicit model · Nonlinear regression with MLP latentstask performanceHurt
Increase input dimensionality, context length, or model size (ablation)Implicit and explicit models · Linear regression OODtask performanceNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: Alchemy Raven's Progressive Matrices (symbolic version) Perturb-seq gene targeting dataset synthetic regression and classification tasks (linear, MLP, sinusoid, GP, Hodgkin-Huxley ODE) reusable modular mixture of experts (synthetic)

Benchmarks: Alchemy Raven's Progressive Matrices Perturb-seq gene targeting synthetic linear/nonlinear/sinusoid regression synthetic linear/nonlinear classification reusable modular MoE

Metrics: mean squared error accuracy relative accuracy interchange intervention accuracy latent decoding accuracy

Baselines: implicit Transformer explicit model with MLP prediction oracle with known prediction function oracle with auxiliary latent loss

Builds on: Conditional Neural Processes Distributed Alignment Search Transformer

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