atlas

Research map / Architectures and efficiency / Attention and transformers

Trained Transformer Classifiers Generalize and Exhibit Benign Overfitting In-Context

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 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.

Analyzes linear transformers trained by gradient descent (max-margin limit) on random Gaussian-mixture linear classification tasks, giving in-context generalization guarantees and showing benign overfitting in-context under label-flipping noise.

Problem

How many pre-training tasks and in-context examples are needed for a transformer trained on random linear classification tasks to generalize in-context, and can such transformers memorize noisy in-context labels while still generalizing?

Approach

Uses a convex linear-transformer parameterization whose trained predictor is the max-margin solution over pre-training tasks (via implicit bias of GD); shows the resulting in-context predictor behaves like a nearly uniform average of in-context examples, enabling generalization bounds and benign overfitting analysis for classification.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use fewer pre-training tasks BTrained linear transformer · In-context classificationtest accuracyHurt
Increase test-time cluster separation R̃Trained linear transformer · In-context classificationtest accuracyHelped
Increase test-time cluster separation R̃Trained linear transformer · In-context classification with label-flipping noisein-context memorizationHurt
Use high feature dimension with R̃ in the intermediate regimeTrained linear transformer · Noisy in-context classificationtest errorHelped
Use high feature dimension with R̃ in the intermediate regimeTrained linear transformer · Noisy in-context classificationin-context memorizationHelped
Increase the number of pre-training tasks BTrained linear transformer · In-context classificationtest accuracyHelped
Use test-time examples with lower SNR than pre-training examplesTrained linear transformer · In-context classificationtest errorNo clear effect
Add label-flipping noise at test timeTrained linear transformer · In-context classificationtest errorNo clear effect
Increase the number of test-time in-context examples M when label-flipping noise is presentTrained linear transformer · Noisy in-context classificationtest errorHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic random class-conditional Gaussian mixture tasks

Benchmarks: synthetic Gaussian mixture in-context classification

Metrics: in-context test accuracy misclassification probability memorization of in-context examples

Builds on: Transformers learn in-context by gradient descent / linear regression ICL analys Soudry et al. implicit bias of GD toward max-margin benign overfitting in 2-layer networks (Frei et al.)

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