stat.MLMay 9, 2026

Learning Theory of Transformers: Local-to-Global Approximation via Softmax Partition of Unity

Authors: Zhongjie ShiWenjing Liao

Organizations: School of Mathematics, Georgia Institute of Technology, Atlanta, GA 30332, United States

Abstract

This paper investigates the learning theory of Transformer networks for regression tasks on the compact Euclidean domain [0,1]d[0,1]^d and dd-dimensional compact Riemannian manifolds. We propose a novel constructive approximation framework for Transformers that builds local approximations of the target function and aggregates them into a global approximation via softmax partition of unity. This approach leverages the attention mechanism to achieve spatial localization through affine transformations of the input. The softmax activation plays a crucial role in aggregating local approximations to a global output. From an approximation perspective, we prove that a dense Transformer equipped with only two encoder blocks and standard single-hidden-layer point-wise feed-forward networks can achieve a uniform ε\varepsilon-approximation error for αα-Hölder continuous functions with α(0,1]α\in (0,1] using O(εd/α)\mathcal{O}(\varepsilon^{-d/α}) total parameters. Building upon this approximation guarantee, we establish a near minimax-optimal generalization error bound of order O(n2α2α+dlogn)\mathcal{O}\big(n^{-\frac{2α}{2α+d}} \log n\big) for the empirical risk minimizer, where nn is the training data size. The Transformer architecture studied in this paper is dense, shallow and wide, and employs softmax activation and sinusoidal positional encodings, closely reflecting practical implementations.

Explore similar work

CardsList
  1. Transformer Approximations from ReLUs

    Apr 27, 2026Jerry Yao-Chieh Hu, Mingcheng Lu, Yi-Chen Lee +1Gumbel-Softmax RelaxationRectified Linear Unit