atlas

Research map / Optimization / Implicit bias and generalization

Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Context

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 theoretically and empirically that non-linear-attention Transformers can implement functional gradient descent in an RKHS induced by the attention non-linearity, reaching Bayes-optimal prediction for matching kernel Gaussian-process labels.

Problem

How non-linear Transformers (softmax, ReLU attention) learn non-linear functions in context, i.e., which learning algorithm they implement and whether training finds it.

Approach

A simple parameter construction makes a non-linear attention module with activation equal to a kernel K implement functional gradient descent in the RKHS of K; when labels come from a K-Gaussian process, the iterates converge to the Bayes-optimal predictor. Multi-head attention with different activations composes kernels, and stationary-point analysis shows training converges to this construction.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Match the attention activation to the label-generating kernelSingle-head Transformer · Linear, ReLU, and exponential-kernel GP datatest in-context lossHelped
Use softmax attention instead of exponential-kernel attentionSingle-head Transformer · Exponential-kernel GP data, 3 layers, n=6, 8, 10, 12, or 14test in-context lossHelped
Use exponential-kernel attention instead of softmax attentionSingle-head Transformer · Exponential-kernel GP data, n=6, at least 5 layerstest in-context lossHelped
Increase the number of layers with exponential-kernel attentionSingle-head Transformer · Exponential-kernel GP data, n=14test in-context lossNo clear effect
Use two heads with linear and exponential-kernel activations rather than either single-head modelMulti-head Transformer · Composite linear-plus-exponential-kernel GP datatest in-context lossHelped
Use two heads rather than one linear-activation headMulti-head Transformer · Linear-kernel GP datatest in-context lossNo clear effect
Use two heads rather than one exponential-activation headMulti-head Transformer · Exponential-kernel GP datatest in-context lossNo clear effect
Use ReLU attention on ReLU-kernel GP dataSingle-head Transformer · ReLU-kernel GP datatest in-context lossHurt

Surprising findings

Limitations

Experimental setup

Datasets: synthetic K-Gaussian process regression data (linear, ReLU, exponential kernels)

Benchmarks: synthetic K-Gaussian process in-context regression

Metrics: log test ICL loss normalized Frobenius distance to identity of B^T C

Baselines: Bayes estimator linear attention ReLU attention softmax attention exponential-kernel attention

Builds on: linear transformer in-context learning construction (gradient descent) preconditioned GD / GD++ analyses Gaussian process label model

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