atlas

Research map / Optimization / Implicit bias and generalization

Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?

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

Shows that the global minimizer of the population loss for a linear looped Transformer implements multi-step preconditioned gradient descent with a near-inverse-covariance preconditioner, and proves gradient flow converges despite non-convexity via a novel gradient dominance condition.

Problem

Whether training Transformers (specifically looped Transformers with weight sharing) can converge to algorithmic solutions, i.e., multi-step gradient descent, for in-context linear regression.

Approach

Analyzes a linear looped Transformer (one shared linear attention layer applied L times) for in-context linear regression with Gaussian data; characterizes the global minimizer as near (Sigma*)^-1 preconditioned GD and proves a gradient dominance condition with power (2L-1)/L giving gradient flow convergence.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase the number of training loopsLooped linear-attention Transformer · In-context linear regression (identity covariance)lossHelped
Use one attention layer looped L times instead of an L-layer non-looped modelLinear-attention Transformer · In-context linear regressionlossNo clear effect
Evaluate with more loops than used during trainingLooped model trained with 2 or 5 loops · In-context linear regression, in-distributionlossHelped
Evaluate with more loops than used during trainingLooped model trained with 2 or 5 loops · In-context linear regression, out-of-distribution covariancelossHelped
Evaluate on a different covariance rather than identity covarianceLooped model trained with identity covariance · In-context linear regression, out-of-distributionlossHurt
Train with different numbers of in-context samples, including n closer to or smaller than dLooped model · In-context linear regressionlossNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian in-context linear regression data

Benchmarks: synthetic in-context linear regression

Metrics: in-context regression loss distance of preconditioner to identity

Baselines: multi-layer linear Transformer

Builds on: linear self-attention gradient descent expressivity (von Oswald et al.) Ahn et al. one-layer linear attention preconditioned GD looped transformers

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