atlas

Research map / Learning theory and algorithms / Sample complexity

Transformers are almost optimal metalearners for linear classification

NeurIPS 2025 · Learning theory and algorithms › Sample complexity · approach: Learning halfspaces under noise · 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 that a linear transformer trained by gradient descent (max-margin implicit bias) on random Gaussian-mixture classification tasks with a shared k-dimensional subspace learns to classify new tasks with O~(k/R~^4) in-context examples, nearly matching an oracle that knows the subspace and beating the d/R~^4 bound for single-task learners.

Problem

Whether transformers can act as metalearners for linear classification: adapt to new Gaussian-mixture tasks whose means lie in an unknown shared low-dimensional subspace using few in-context examples, without further training.

Approach

Analyze a convex linear-attention parameterization trained by GD on logistic/exponential loss; its max-margin limit is shown to behave like a projection onto the shared subspace followed by MLE averaging of in-context examples, giving sample complexity depending on k rather than d and with training size independent of d.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
pretrain a linear transformer on related tasks with a shared low-dimensional subspaceLinear transformer · Gaussian mixture linear classificationin-context samples for small constant error: \Omega(d/\widetilde{R}^4) -> \widetilde{O}(k/\widetilde{R}^4)Helped
pretrain a linear transformer on related tasks with a shared low-dimensional subspaceLinear transformer · Gaussian mixture linear classificationin-context samples for small constant error: \widetilde{O}(k/\widetilde{R}^4) vs. \Omega(k/\widetilde{R}^4)No clear effect
use the trained linear transformer instead of full MLE or SVMLinear transformer · Gaussian mixture linear classificationtest accuracyHelped
use the trained linear transformer instead of projected MLELinear transformer · Gaussian mixture linear classificationtest accuracyNo clear effect
increase the signal strength R = tilde RLinear attention models · Gaussian mixture linear classificationtest accuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian mixture metatasks with shared k-dimensional subspace

Benchmarks: synthetic Gaussian mixture metalearning tasks

Metrics: test classification error in-context sample complexity

Baselines: Support vector machine maximum likelihood estimator (full) projected maximum likelihood estimator with true subspace

Builds on: implicit bias of gradient descent (max-margin) linear transformer in-context learning analyses Gaussian mixture minimax lower bounds

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