atlas

Research map / Architectures and efficiency / Attention and transformers

Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 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.

Analyzes gradient dynamics of a one-MLP-plus-linear-attention Transformer for in-context learning of nonlinear features, showing via mean-field and two-timescale limits that the attention loss landscape is benign and Wasserstein gradient flow avoids saddles, with convergence rates.

Problem

How in-context learning over nonlinear representations emerges in Transformers with MLP layers trained by gradient descent; prior dynamics analyses only covered single attention layers on linear tasks.

Approach

Model the Transformer as a two-layer MLP followed by a linear attention layer, factor out attention via a two-timescale limit so the MLP's distribution-level loss is analyzed in the mean-field regime; show no spurious local minima, almost-sure saddle avoidance of Wasserstein gradient flow, and rates via birth-death and perturbation modifications.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace the joint attention-and-MLP objective with directly minimizing the static objectiveToy Transformer on standard features · Synthetic ICL training promptstraining lossNo clear effect
Add birth-death and perturbation dynamicsModified Transformer · Synthetic ICL with degenerate featurestraining lossHelped
Learn the relevant nonlinear features during pretrainingToy Transformer · Test task x ↦ ||h_{μ°}(x)||test lossHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian inputs (N(0, I_d)) with random linear regression tasks over features

Benchmarks: synthetic ICFL toy experiments

Metrics: training loss test loss

Baselines: attention Transformer (joint optimization) static Transformer modified Transformer (birth-death and perturbation)

Builds on: mean-field neural network theory linear attention in-context learning center-stable manifold theorem

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