Approximation Bounds for Transformer Networks with Application to Regression

Yuling Jiao, Yanming Lai, Defeng Sun, Yang Wang, Bokai Yan

The rapid adoption of Transformer architectures has outpaced our theoretical understanding of their expressive capacity and generalization capabilities. While empirical scaling laws are well-documented, rigorous mathematical proofs detailing exactly how well Transformers can approximate complex functions have historically lagged behind. This paper bridges the gap between empirical success and mathematical foundation, establishing the first explicit uniform ($L^\infty$) approximation bounds for standard softmax Transformers and providing statistical guarantees for regression on sequential data.

The Dual Challenge: Expressivity and Generalization

Deep learning theory relies on understanding two core pillars: expressivity (can the model architecture represent the target function?) and generalization (can it learn effectively from finite data?).

For standard Feed-forward Neural Networks (FNNs), these properties are well-established. Transformers, however, introduce a global, non-linear self-attention mechanism. Previous theoretical work often bypassed the mathematical complexities of standard softmax attention by substituting it with simplified "hardmax" operations or by restricting analysis to $L^p$ norms where $p < \infty$.

Furthermore, statistical learning theory traditionally assumes independent and identically distributed (i.i.d.) data. Transformers are inherently designed for sequential data—such as text or time-series—which exhibits strong temporal dependence, rendering standard i.i.d. assumptions invalid.

Methodological Innovations

To tame the mathematical complexity of the Transformer, the authors introduce several clever theoretical techniques:

  • Attention as Averaging: By demonstrating that self-attention layers can be reduced to column-wise averaging operators, the authors decouple the core approximation task from the intricate, non-linear properties of the softmax function.
  • Horizontal Shift Technique: Achieving uniform ($L^\infty$) approximation bounds requires precise handling of the input space boundaries. The authors utilize a "horizontal shift" method to overcome this hurdle.
  • Kolmogorov-Arnold-Inspired Decomposition: They employ a strategy inspired by the Kolmogorov-Arnold representation theorem to effectively decompose high-dimensional target functions.
  • Sliding-Window ERM: For statistical analysis on dependent data, they evaluate an Empirical Risk Minimization (ERM) procedure using a sliding window. This specifically targets $\beta$-mixing sequences, where the dependence between two data points predictably weakens as the time gap between them grows.

Key Findings and Theoretical Guarantees

Rather than relying on empirical datasets like ImageNet, the paper evaluates Transformers against rigorous mathematical function classes—specifically $\gamma$-Hölder (smooth) and Sobolev classes—defined on a unit cube $[0, 1]^{d_x \times n}$, representing a sequence of $n$ tokens of dimension $d_x$.

Closing the $L^\infty$ Gap

The authors successfully establish explicit upper bounds for $L^p$ approximation for all $p \in [1, \infty]$, finally solving the elusive $L^\infty$ case under standard softmax attention.

Efficiency Parity with FNNs

To achieve an error margin of $\varepsilon$, a Transformer requires $\mathcal{O}(\varepsilon^{-d_x n/\gamma})$ parameters for Hölder targets and $\mathcal{O}(\varepsilon^{-d_x n})$ for Sobolev targets. This matches the best-known scaling for FNNs, proving Transformers are equally efficient at approximating high-dimensional functions despite their complex sequence-to-sequence structure. Notably, for Hölder targets, these bounds can be achieved with a constant-depth Transformer ($L=2$) simply by adjusting its width.

Robustness to Sequential Dependence

The statistical analysis reveals that for geometrically $\beta$-mixing data (where dependence decays rapidly), the excess risk rate is $m^{-\gamma/(\gamma+d_x n)}$, where $m$ is the sample size. This effectively matches the theoretical benchmark expected if the data were perfectly independent, proving Transformers can robustly handle sequential dependence.

Limitations and Future Directions

While a significant leap forward, the theoretical framework has boundaries that invite future research:

  • VC-Dimension Gap: The statistical rates are technically suboptimal due to current limitations in bounding the complexity (VC-dimension) of networks containing exponential functions like softmax. Existing mathematical tools yield a quadratic $\mathcal{O}(N^2)$ bound rather than a linear $\mathcal{O}(N)$ bound.
  • Smoothness Saturation: Because the proof relies on piecewise-constant approximations, the theory does not yet capture the benefits of higher-order smoothness. If a function is extremely smooth (e.g., $C^2$ or $C^3$), the current bounds do not tighten accordingly.
  • The Curse of Dimensionality: The parameter scaling still suffers from the ambient dimension $d_x n$. Future research must explore how Transformers might bypass this limitation by exploiting low-dimensional manifolds or hierarchical structures inherent in real-world data.

Summary updated

BibTeX
@inproceedings{jiao2026approximation,
  author = {Yuling Jiao and Yanming Lai and Defeng Sun and Yang Wang and Bokai Yan},
  title = {{Approximation Bounds for Transformer Networks with Application to Regression}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=u7qkL3ryE4},
}
Figure