atlas

Research map / Optimization / Implicit bias and generalization

In-Context Learning of a Linear Transformer Block: Benefits of the MLP Component and One-Step GD Initialization

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

Shows that a linear transformer block (linear attention plus linear MLP) achieves nearly Bayes-optimal in-context linear regression under a non-zero-mean Gaussian task prior, while linear attention alone has an irreducible approximation gap, and that LTB is equivalent to one-step GD with learnable initialization trainable by gradient flow.

Problem

In-context learning of linear regression with a Gaussian task prior having non-zero mean (shared signal); prior theory only covered zero-mean priors where linear self-attention suffices.

Approach

Introduce a linear transformer block (LSA followed by a linear MLP) and show it implements one-step GD with learnable initialization (GD-beta); LSA alone incurs an approximation gap proportional to the squared norm of the task mean, while the MLP removes it, and gradient flow on the GD-beta class converges globally despite non-convexity.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add the MLP component (ablation)GPT2-small · Linear regression, β* = (0,0,...,0)^⊤loss: 0.024 -> 0.003Helped
add the MLP component (ablation)GPT2-small · Linear regression, β* = (10,10,...,10)^⊤loss: 8.871 -> 0.013Helped
use a linear Transformer block (LTB) instead of linear self-attention (LSA)ICL of linear regression with a non-zero task mean · Linear regression with shared signalICL riskHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian linear regression ICL tasks

Benchmarks: synthetic linear regression ICL with d=20, M=40

Metrics: ICL risk (mean squared error) approximation gap loss

Baselines: linear self-attention (LSA) GD-zero models GPT2-noMLP Bayes optimal estimator

Builds on: linear self-attention ICL theory one-step GD zero initialization (GD-zero) Bayes optimal ICL for linear regression

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