Finite-Time Analysis of Gradient Descent for Shallow Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Arda, Enes, Cayci, Semih, Eryilmaz, Atilla
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918424737742848
author Arda, Enes
Cayci, Semih
Eryilmaz, Atilla
author_facet Arda, Enes
Cayci, Semih
Eryilmaz, Atilla
contents Understanding why Transformers perform so well remains challenging due to their non-convex optimization landscape. In this work, we analyze a shallow Transformer with $m$ independent heads trained by projected gradient descent in the kernel regime. Our analysis reveals two main findings: (i) the width required for nonasymptotic guarantees scales only logarithmically with the sample size $n$, and (ii) the optimization error is independent of the sequence length $T$. This contrasts sharply with recurrent architectures, where the optimization error can grow exponentially with $T$. The trade-off is memory: to keep the full context, the Transformer's memory requirement grows with the sequence length. We validate our theoretical results numerically in a teacher-student setting and compare Transformers with recurrent architectures on an autoregressive task.
format Preprint
id arxiv_https___arxiv_org_abs_2601_16514
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Finite-Time Analysis of Gradient Descent for Shallow Transformers
Arda, Enes
Cayci, Semih
Eryilmaz, Atilla
Machine Learning
Artificial Intelligence
Optimization and Control
Understanding why Transformers perform so well remains challenging due to their non-convex optimization landscape. In this work, we analyze a shallow Transformer with $m$ independent heads trained by projected gradient descent in the kernel regime. Our analysis reveals two main findings: (i) the width required for nonasymptotic guarantees scales only logarithmically with the sample size $n$, and (ii) the optimization error is independent of the sequence length $T$. This contrasts sharply with recurrent architectures, where the optimization error can grow exponentially with $T$. The trade-off is memory: to keep the full context, the Transformer's memory requirement grows with the sequence length. We validate our theoretical results numerically in a teacher-student setting and compare Transformers with recurrent architectures on an autoregressive task.
title Finite-Time Analysis of Gradient Descent for Shallow Transformers
topic Machine Learning
Artificial Intelligence
Optimization and Control
url https://arxiv.org/abs/2601.16514