atlas

Research map / Optimization / Implicit bias and generalization

CausalLM is not optimal for in-context learning

ICLR 2024 · Optimization › Implicit bias and generalization · approach: In-context learning as gradient descent · 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.

Theoretically analyzes multi-layer linear self-attention transformers for in-context linear regression, showing prefixLM converges to the least-squares solution while causalLM follows non-decaying online gradient descent and may not become optimal, supported by synthetic and T5-based experiments.

Problem

Empirical evidence shows prefixLM outperforms causalLM for in-context learning, but there is no theoretical explanation for this gap in transformer ICL.

Approach

Models multi-layer linear self-attention (LSA) under a fixed construction that implements gradient descent per layer, then shows that full (prefix) attention yields a single GD trajectory converging to the least-squares solution, whereas causal attention yields position-wise weights that follow online GD with constant step size and need not reach the optimum.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
replace causalLM attention with prefixLM attention in a shared-layer transformersoftmax transformer ICL · Linear regression (LR)test query MSE: 1.9e-1 -> 8.6e-3Helped
replace causalLM attention with prefixLM attention in a shared-layer transformersoftmax transformer ICL · Non-linear regression (N-LR)test query MSE: 2.7e-3 -> 1.5e-4Helped
replace causalLM attention with prefixLM attention in a shared-layer transformersoftmax transformer ICL · Multiclass classification (MC)classification error: 27.0 -> 24.1Helped
replace causalLM attention with prefixLM attention in an unshared-layer transformersoftmax transformer ICL · Linear regression (LR)test query MSE: 1.6e-2 -> 2.5e-3Helped
replace causalLM attention with prefixLM attention in an unshared-layer transformersoftmax transformer ICL · Non-linear regression (N-LR)test query MSE: 2.9e-3 -> 9.0e-5Helped
replace causalLM attention with prefixLM attention in an unshared-layer transformersoftmax transformer ICL · Multiclass classification (MC)classification error: 32.1 -> 27.6Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly Base · 5-shot MMLU (57 tasks), Baseaccuracy: 28.0 -> 28.8Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly Large · 5-shot MMLU (57 tasks), Largeaccuracy: 26.9 -> 32.0Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly XL · 5-shot MMLU (57 tasks), XLaccuracy: 30.5 -> 39.5Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly Base · 3-shot BBH (23 tasks), Baseaccuracy: 24.8 -> 27.4Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly Large · 3-shot BBH (23 tasks), Largeaccuracy: 29.8 -> 32.2Helped
replace causalLM attention with prefixLM attentionT5 DecoderOnly XL · 3-shot BBH (23 tasks), XLaccuracy: 32.0 -> 35.8Helped

Surprising findings

Limitations

Experimental setup

Datasets: C4 FLAN synthetic linear regression, nonlinear regression, and multiclass classification sequences

Benchmarks: MMLU BBH

Metrics: mean squared error classification error accuracy

Baselines: causalLM prefixLM PaLM2 PaLI-X

Builds on: Von Oswald et al. linear self-attention gradient descent construction Ahn et al. gradient flow LSA prefixLM (UL2/T5 style) FLAN

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