Exact Sequence Interpolation with Transformers
Not on the map. Why?
Abstract (arXiv)
We prove that transformers can exactly interpolate datasets of finite input sequences in ℝd, d≥ 2, with corresponding output sequences of smaller or equal length. Specifically, given N sequences of arbitrary but finite lengths in ℝd and output sequences of lengths m1, dots, mN ∈ mathbbN, we construct a transformer with O(sumj=1N mj) blocks and smashO(d sumj=1N mj) parameters that exactly interpolates the dataset. Our construction provides complexity estimates that are independent of the input sequence length, by alternating feed-forward and self-attention layers and by capitalizing on the clustering effect inherent to the latter. Our novel constructive method also uses low-rank parameter matrices in the self-attention mechanism, a common feature of practical transformer implementations. These results are first established in the hardmax self-attention setting, where the geometric structure permits an explicit and quantitative analysis, and are then extended to the softmax setting. Finally, we demonstrate the applicability of our exact interpolation construction to learning problems, in particular by providing convergence guarantees to a global minimizer under regularized training strategies. Our analysis contributes to the theoretical understanding of transformer models, offering an explanation for their excellent performance in exact sequence-to-sequence interpolation tasks.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 31 of its 46 references that are in the map. First posted on arXiv 4 Feb 2025.
Builds on
31 of 46 references.
References · 31
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023GPT-4 Technical Reportcited by 18,396
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,403
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2021BEiT: BERT Pre-Training of Image Transformerscited by 2,375
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2019Are Sixteen Heads Really Better than One?cited by 816
- 2016Error bounds for approximations with deep ReLU networkscited by 574
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
19 more
- 2023A mathematical perspective on Transformerscited by 164
- 2023The emergence of clusters in self-attention dynamicscited by 140
- 2018Small ReLU networks are powerful memorizers: a tight analysis of memorization capacitycited by 78
- 2019Deep Learning via Dynamical Systems: An Approximation Perspectivecited by 78
- 2021Neural ODE control for classification, approximation and transportcited by 57
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 47
- 2024Transformers are Universal In-context Learnerscited by 43
- 2021On the Optimal Memorization Power of ReLU Neural Networkscited by 40
- 2023Memorization Capacity of Multi-Head Attention in Transformerscited by 40
- 2020Provable Memorization via Deep Neural Networks using Sub-linear Parameterscited by 34
- 2024Clustering in Causal Attention Maskingcited by 32
- 2023Sumformer: Universal Approximation for Efficient Transformerscited by 30
- 2024Measure-to-measure interpolation using Transformerscited by 29
- 2024Clustering in pure-attention hardmax transformers and its role in sentiment analysiscited by 15
- 2024Next-token prediction capacity: general upper bounds and a lower bound for transformerscited by 11
- 2024Interplay between depth and width for interpolation in neural ODEscited by 9
- 2024Generic controllability of equivariant systems and applications to particle systems and neural networkscited by 9
- 2023Cluster-based classification with neural ODEs via controlcited by 4
- 2024Constructive Universal Approximation and Finite Sample Memorization by Narrow Deep ReLU Networkscited by 2
Built on by
Citing papers per year: 2026: 2.
2 papers.