ICL Generalization Lab
Paper companion / NeurIPS 2026

Learn the pattern.
Then shift the rules.

A transformer can excel on familiar examples and still struggle when their distribution changes. Explore the setup, fit explicit baselines, and inspect the paper’s evidence.

Interactive explainerLive kernel predictions below; published transformer results in a separate panel. No transformer checkpoint is loaded. This demo is not a reproduction verdict.

01 / Shift the distribution

A simple task: infer a line from examples.

Computed in your browser

Same examples. Two ways to fit.

True functionLinear KRRRBF KRRContext
True function and live kernel predictionsThe chart updates when experiment controls change.
Linear KRR · grid MSE—
RBF KRR · grid MSE—

One noiseless task, fixed context, 121 query points. Both baselines use λ = 0.001. This illustrative evaluation differs from the paper’s sequential protocol.

02 / What the paper reports

Table 1 · degree-1 regression · input range fixed at [−1, 1]

Published values · not a live run
TransformerKRR (RBF)KRR (Poly)
Reported MSE · lower is better

Accuracy on familiar tasks does not guarantee generalization. At σ = 10, the paper reports MSE of 27.06 for the transformer versus 0.0023 for polynomial KRR. These are reported means; Table 1 gives no error bars. Inspect the source ↗

A / THE TASK

Examples describe a function

Each task draws a new line y = ax + b. Context examples show its values. A predictor must infer the relationship from those examples.

B / THE SHIFT

Familiar inputs, larger labels

Increasing σ broadens the distribution of a and b. The coefficients change scale, while the form of the underlying task stays linear.

C / THE DISTINCTION

A fitted rule is a useful control

Kernel baselines explicitly fit the supplied examples. Comparing them with a trained transformer helps separate task difficulty from model behavior.

Methods, limitations, and sources

The live demo uses independently implemented kernel ridge regression: linear kernel k(x,z) = 1 + xz and RBF kernel exp(−(x−z)² / 2ℓ²), both with λ = 0.001. The RBF length scale is the standard deviation of the seeded reference inputs in [−1,1], plus 10⁻⁶; it stays fixed when input scale changes. Predictions are evaluated over a 121-point grid for a single task. The paper uses sequential prompting and multiple functions and evaluation seeds. Live values and reported table values therefore have different evaluation protocols.

The paper investigates final normalization and attention concentration as mechanisms behind its observed failures. This demo illustrates the experimental setup; it does not test those mechanisms or generalize its conclusions to every transformer.

No transformer weights are included. The inspected official source checkout included code, configuration, and metrics but no checkpoint. The evidence panel transcribes Table 1 in paper v4 by Omar Naim, Jérôme Bolte, and Nicholas Asher. Download reported data.

All interactive calculations run in your browser. No API key, GPU, or upload is required. Export downloads your generated task and predictions locally.