atlas

Research map / Architectures and efficiency / Attention and transformers

Non-asymptotic Convergence of Training Transformers for Next-token Prediction

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer block and depth design · 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 training dynamics of a one-layer transformer (self-attention + feed-forward) for next-token prediction, proving non-asymptotic sublinear directional convergence of two-stage normalized gradient descent to max-margin solutions, linear loss convergence, and generalization to unseen sentences.

Problem

Non-asymptotic convergence rates of training a transformer for next-token prediction, and whether the trained transformer generalizes to unseen data in theory.

Approach

Characterizes realizable NTP datasets via a collocation (token-to-next-token map) and query-dependent partial orders, then uses a two-stage normalized gradient descent: stage 1 trains the feed-forward layer on the collocation, stage 2 trains the key-query attention matrix on the full dataset; both converge in direction to max-margin solutions, with the loss converging linearly and non-comparable t

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use two-stage normalized gradient descent: first train W_ov on collocations, then train W_kq on the full dataset with W_ov fixedOne-layer transformer for next-token prediction · Realizable NTP training datatraining lossHelped
Train W_ov on collocations in preprocessing stageOne-layer transformer for next-token prediction · Synthetic realizable NTP datasetW_ov directional convergence rate: O(log t/t)Helped
Train W_kq with W_ov fixed after preprocessingOne-layer transformer for next-token prediction · Synthetic realizable NTP datasetW_kq directional convergence rate: O(log^2 t/t)Helped
Train the attention layer using the two-stage procedureOne-layer transformer for next-token prediction · Unseen data with non-comparable tokensnext-token predictionHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic realizable NTP dataset (|V|=20)

Benchmarks: synthetic realizable dataset

Metrics: loss directional cosine similarity to max-margin solution norm growth

Builds on: implicit bias of gradient descent max-margin SVM analysis of transformers (Tarzanagh 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