Learning Theory of Transformers: Local-to-Global Approximation via Softmax Partition of Unity
Zhongjie Shi, Wenjing Liao
TL;DR. We propose a Softmax Partition of Unity approximation framework, proving that shallow, dense Transformers with sinusoidal encodings achieve near minimax-optimal rates for H\"older functions on Euclidean domains and Riemannian manifolds
Abstract. This paper investigates the learning theory of Transformer networks for regression tasks on the compact Euclidean domain and -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 -approximation error for -H"older continuous functions with using total parameters. Building upon this approximation guarantee, we establish a near minimax-optimal generalization error bound of order for the empirical risk minimizer, where is the training data size. The Transformer architecture studied in this paper uses native softmax attention and sinusoidal positional encodings, with a fixed depth of two encoder blocks. Finally, numerical experiments reveal spatially localized, Gaussian-like attention weights that emerge during training, resembling our Softmax POU weights.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:45 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The following is my initial meta-review, subject to change after rebuttals.
All the reviewers agreed that this paper is technically solid in proving new results for approximating Hölder-smooth functions with transformer architectures, using the partition-of-unity tool via the softmax operator. All the reviewers tend to accept the paper, but the authors should still address the detailed questions raised by the three reviewers.
Final justification
My initial decision will stand based on the initial review and rebuttal.
- Final justification
- My initial decision will stand based on the initial review and rebuttal.
Read meta-review
Meta-review
The following is my initial meta-review, subject to change after rebuttals.
All the reviewers agreed that this paper is technically solid in proving new results for approximating Hölder-smooth functions with transformer architectures, using the partition-of-unity tool via the softmax operator. All the reviewers tend to accept the paper, but the authors should still address the detailed questions raised by the three reviewers.
1 comment
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 4/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper proves new results for approximating Hölder-smooth functions with transformer architectures. The key tool is a partition-of-unity representation via the softmax operator, which is native to the transformer architecture. Additional results for manifold support and a generalization analysis for statistical estimation are provided as well.
Strengths and weaknesses
I don't have much to criticize about this paper, only a few minor niggles (see Questions below). Most aspects are strong:
- The question of which types of functions realistic transformer architectures can represent efficiently is important and timely.
- The main mathematical results are sharp (matching minimax bounds up to log factors), efficient (only two layers required), and - opposed to some prior results - use transformer architectures, close to those used in practice (sinusoidal encoding, softmax).
- The theoretical ideas and proofs are presented well. I read through a large part of the arguments and didn spot any errors.
- The partition-of-unity approach is neat and likely to be reused in future works on the topic.
Questions
- Section 3.2: The risk functional is defined, buzt never used. On the other hand, the -norm is never defined. I assume it is the natural -norm?
- Section 3.2: It may be worth mentioning that can be implemented by a simple ReLU-layer.
- Section 5: There is recent work on ReLU-approximations with manifold support that does not require depth of order : https://arxiv.org/abs/2602.03539
Limitations
yes
Final justification
The submitted paper was already in very good shape, and the authors addressed all my concerns and those of the other reviewers in the rebuttal. This is a clear accept.
Formatting concerns
None.
2 comments
We sincerely thank the reviewer for the positive assessment, careful reading, and helpful presentation and literature suggestions.
Questions:
Section 3.2: The risk functional is defined, buzt never used. On the other hand, the -norm is never defined. I assume it is the natural -norm?
Response: We thank the reviewer for the careful reading. The norm is already specified in Section 3.2 by the sentence “We denote by the marginal distribution of on , and by the Hilbert space of square-integrable functions with respect to .” Thus, denotes the standard norm. To remove any ambiguity, we will additionally write the explicit formula and state , which clarifies the role of the risk functional.
Section 3.2: It may be worth mentioning that can be implemented by a simple ReLU-layer.
Response: We thank the reviewer for this helpful suggestion. We will add the exact one-layer representation .
Section 5: There is recent work on ReLU-approximations with manifold support that does not require depth of order : https://arxiv.org/abs/2602.03539 (https://arxiv.org/abs/2602.03539)
Response: We sincerely thank the reviewer for bringing this recent result to our attention. Nagler and Langer (2026) show that avoiding a separate approximation-depth overhead is not unique to our method; we mention this point only once in the manuscript and will remove it as a claimed advantage. Their complementary construction is not a POU method, but instead uses regular-grid routing, local Taylor approximation, and median smoothing. Our main contributions are: (i) identifying the exact correspondence between a mesh-free normalized POU and native softmax global attention; (ii) using this correspondence to establish approximation and ERM generalization guarantees for a two-block dense Transformer with standard softmax attention and sinusoidal PE; and (iii) extending the theory to manifolds with rates governed by intrinsic dimension. More broadly, we view Softmax POU as a promising foundational framework that can guide future approximation and statistical-learning analyses of Transformers across complex domains. We will cite Nagler and Langer (2026) and revise the manuscript accordingly.
Thanks! I'll keep my score (5: Accept).
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper proposes a Softmax POU scheme to approximate Hölder-smooth continuous functions on compact Euclidean domains and Riemannian manifolds, proving 'near minimax-optimal' generalization rates using shallow (L=2), wide, dense Transformers. The algebraic observation as to why softmax attention can implement spatial localization without explicit grid construction is interesting.
Strengths and weaknesses
Strengths
- The paper is well-written with ample discussion on related works. The proofs are rigorous and elaborately stated.
- As stated in Table 1, the use of standard sinusoidal positional encodings and native softmax attention in a 2-block Transformer is a notable improvement over prior theoretical analyses, which routinely require hardmax attention, non-standard positional encodings, or -depth architectures.
Weaknesses
-
The headline claim (a 2-block Transformer) obscures a critical architectural parameter: the sequence length , which scales as . As such, the number of heads itself scales similarly (the number of attention heads in the first block is ). This, in turn, drives the total parameter count to be exponential in . In my opinion, this cannot be called a shallow architecture in any operationally meaningful sense. Depth has been traded for width/sequence-length in a way that entirely circumvents the practical constraint that real Transformers have fixed (small numbers of heads). The paper should be more careful in claiming this as a validation of "practical" architectures, particularly given the language in the abstract, such as "closely reflecting practical implementations." In contrast, the depth dependence is more explicit in [1], and the architectural constraints are stated more honestly, whereas [2] uses the Kolmogorov-Arnold structure to avoid direct exponential width scaling in certain cases.
-
The claimed "near minimax-optimal" rate (the minimax-optimal rate for -Hölder functions in dimensions under squared loss is ) incurs an extra factor. For context, classical kernel regression, local polynomial estimators, and standard deep ReLU network estimators achieve the exact minimax rate for this function class. As it seems, the factor arises from the covering number bound in Lemma 9 (which has a 26th-power dependence on , itself scaling as . This produces a covering number bound with extremely large constants. Subsequently, the compounding of polynomial factors in the Lipschitz constant (Lemma 9 yields ) results in extremely loose intermediate bounds (compared to classical nonparametric rates). Perhaps a comparison with those achievable by competing methods would be beneficial.
-
The paper absorbs a factor of inside the logarithm of the covering number into the constant (in the proof of Theorem 2), which is combinatorially enormous and grows rapidly with dimension. The "constant" in the final bound is therefore not actually dimension-free. A rigorous comparison with existing results should track these constants explicitly.
[1] Shokichi Takakura and Taiji Suzuki. Approximation and estimation ability of transformers for sequence-to-sequence functions with infinite-dimensional input. In International Conference on Machine Learning, pages 33416–33447. PMLR, 2023.
[2] Yuling Jiao, Yanming Lai, Yang Wang, and Bokai Yan. Transformers can overcome the curse of dimensionality: A theoretical study from an approximation perspective. Journal of Machine Learning Research, 27(50):1–34, 2026.
Questions
-
Given the amplified sequence length (though in the absence of a lower bound), does the theory find itself positioned to allude to token explosion?
-
To the best of my understanding, the core technical novelty is not the approximation scheme itself but rather the observation that its algebraic form maps exactly onto the dot-product attention mechanism. While this structural alignment is worth formalizing, the approximation error bound in Lemma 1 (establishing that Shepard-type interpolation achieves -error for Hölder-smooth functions) is not new. The paper should more carefully delineate what is new in the approximation theory versus what is a known result being reused in the case of Transformers.
-
The term in the proof of Lemma 3 is controlled by exponential decay in ambient distance. Does this directly guarantee that the function (which is Hölder in the geodesic metric) has controlled variation at pairs that are close in ambient distance but far in geodesic distance (which can happen on highly curved manifolds with reach close to the covering radius)?.
Limitations
The paper does not have a dedicated section/discussion outlining limitations. Kindly refer to my questions and stated 'Weaknesses' for the same.
Final justification
Based on the author's responses to my questions and taking into consideration other discussions, the merit of the paper outweighs the concerns raised.
Formatting concerns
There are no immediate formatting concerns.
2 comments
We sincerely thank the reviewer for the careful and technically detailed assessment. The comments help us distinguish more clearly between the architectural specifications of our explicit construction and the approximation and generalization properties proved for the Transformer class.
Weaknesses
The headline claim (a 2-block Transformer) obscures a critical architectural parameter...
Response: We thank the reviewer for emphasizing precise terminology. Theorem 1 specifies the complete architecture: block depth ; embedding dimension ; sequence length ; head counts ; key/value dimensions and ; FFN widths ; parameter magnitude ; and total dense parameters . We use “shallow” only to mean two encoder blocks and will state the accompanying sequence/head scalings clearly. We agree that this theoretical architecture may differ from practice and will remove “closely reflecting practical implementations” and other overbroad claims, retaining only that it uses standard softmax attention and sinusoidal PE.
The claimed "near minimax-optimal" rate...
Response: We thank the reviewer for requesting this comparison. Kernel and local-polynomial estimators attain the exact minimax benchmark, whereas the relevant architectural comparison is with neural-network ERM, whose bounds have method-dependent logarithmic factors. For the ordinary -dimensional Hölder class, Corollary 1 of Schmidt-Hieber (2020) gives , versus our . In a different mixed/anisotropic setting, Theorem 5.4 of Takakura–Suzuki (2023) gives , so this is contextual rather than direct. In Lemma 9, enters only through . After substitution, its powers contribute additively: the leading term is , with the remaining dimension dependence for fixed . Both papers are already cited; we will make these comparisons explicit.
The paper absorbs a factor of...
Response: We thank the reviewer for emphasizing this point. Appendix C makes the final constant explicit, with the same qualitative dimension dependence as deep ReLU results. For fixed , (C4) gives . Theorem 5 of Schmidt-Hieber (2020), with , uses at most parameters and has approximation term , giving prefactor up to polynomial/logarithmic factors. Corollary 1 absorbs it into an unspecified . Thus both have qualitative growth , while ours is explicit.
Questions:
Given the amplified sequence length...
Response: We thank the reviewer for this question. The sequence allocation is a technical device in our construction, not a lower bound or a claim of intrinsic “token explosion.” It establishes approximation and generalization guarantees for one architecture, without asserting necessity or practical optimality. We acknowledge this theory–practice gap.
To the best of my understanding...
Response: We thank the reviewer and fully agree that Shepard interpolation is classical. Immediately before Lemma 1, we acknowledge this lineage through Shepard interpolation and normalized RBF networks. Our contributions are: (i) the exact correspondence between mesh-free POU and native dot-product softmax attention; (ii) approximation and ERM guarantees for a two-block dense Transformer using standard softmax and sinusoidal PE; and (iii) manifold theory with intrinsic-dimension rates. Because Softmax POU relies on intrinsic covering complexity and local regularity rather than prescribed grids or charts, it also offers a promising foundation for future Transformer approximation and statistical-learning theory on complex domains. We will sharpen this boundary around Lemma 1.
The term in the proof of Lemma 3...
Response: We thank the reviewer for this careful question. In the local regime, Lemma 2 ensures that ambient closeness implies geodesic closeness. Near centers satisfy , and Lemma 2 gives ; hence geodesic Hölder continuity controls their variation. Term II concerns the remaining centers and uses only boundedness of the target and exponential softmax decay, without comparing the two distances. We will clarify this use of Lemma 2.
I thank the authors for their careful response. Based on the rebuttal, discussion from the other reviews, and my initial evaluation, I stand by my score.
- Rating
- 4/6
- Confidence
- 2/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes using the Softmax Partition of Unity to explain the local-to-global approximation capability of the Transformer. The authors demonstrate that a two-layer, dense Transformer using standard softmax attention and sinusoidal PE can approximate the Hölder function and achieve a near-minimax generalization error rate. This framework can also be extended to low-dimensional Riemannian manifolds, where the rate depends on the intrinsic dimension rather than the context dimension.
Strengths and weaknesses
Strengths:
-
Architecture resembles a real Transformer: It uses softmax attention, sinusoidal PE, and dense parameters. The theoretical chain is complete.
-
Compared to some existing works, this work avoids hard max and manual PE.
Weaknesses: 1: The proof states that "such a Transformer exists," but it doesn't explain whether training can learn it.
2: It requires a large sequence length and attention heads.
Questions
1: What is the essential difference between Softmax POU and previous methods?
2: Is Sinusoidal PE a core necessary condition or a technical tool in the proof?
Limitations
The paper emphasizes that its construction requires only a constant depth, but this appears to be achieved at the cost of a larger sequence length and a greater number of attention heads. It is unclear what substantial advantages this shallow-wide trade-off offers compared to existing depth-dependent constructions.
Final justification
The rebuttal addressed my main questions and clarified the scope of the theoretical claims. The shallow-wide construction still has practical limitations, but I view the paper as technically solid overall and maintain my score of 4.
Formatting concerns
No Paper Formatting Concerns
2 comments
We thank the reviewer for the valuable comments and for recognizing the use of native softmax attention, sinusoidal positional encodings, and a complete approximation-to-generalization analysis.
Weaknesses: 1: The proof states that "such a Transformer exists," but it doesn't explain whether training can learn it.
Response: We thank the reviewer for raising this important distinction. Our theorem concerns the generalization performance of the ERM algorithm over the entire Transformer hypothesis class; it does not require training to recover the parameters in our constructive proof. The constructive network is used only to establish the approximation error, which is a technical ingredient in the generalization proof. The guarantee applies to any ERM over this hypothesis class, regardless of whether its parameters coincide with or resemble those of the constructed network. Whether a computationally efficient training algorithm, such as SGD, can provably find an ERM for a general nonconvex Transformer class remains an important open problem. We will clarify this distinction in the revised manuscript.
2: It requires a large sequence length and attention heads.
Response: We thank the reviewer for this valuable observation. The sequence length and head count arise from our explicit realization of Softmax POU with native attention, while the approximation-complexity guarantee is measured by the total parameter count. The construction uses and while retaining dense parameters. Different approximation schemes naturally lead to different architectural requirements. We nevertheless agree that our theoretical construction may not match architectures used in practice, reflecting a remaining gap between theory and practice.
Questions:
1: What is the essential difference between Softmax POU and previous methods?
Response: We thank the reviewer for this question. Although POU and Shepard approximation are classical, our key finding is that softmax naturally realizes a normalized POU, making this approximation principle intrinsically compatible with the Transformer architecture. This previously unexplored connection provides a direct route from approximation to ERM generalization guarantees for Transformers. Moreover, the construction is mesh-free and relies on intrinsic covering complexity and local regularity rather than a prescribed grid or chart structure, making it readily adaptable to complex domains such as the manifolds studied here and potentially to broader low-intrinsic-dimensional settings. We therefore view Softmax POU not as a problem-specific construction, but as a promising foundational framework that can guide future approximation and statistical-learning analyses of Transformers across a broad range of domains.
2: Is Sinusoidal PE a core necessary condition or a technical tool in the proof?
Response: We thank the reviewer for this question. Sinusoidal PE is a technical routing tool in our proof, not a necessary condition for the approximation result. Its phase geometry identifies relative token positions and preserves token identity through the first attention block. Importantly, this is the same positional encoding used in the original vanilla Transformer, so our construction relies on a standard practical component rather than an auxiliary encoding introduced solely for the analysis.
Limitations:
The paper emphasizes that its construction requires only a constant depth, but this appears to be achieved at the cost of a larger sequence length and a greater number of attention heads. It is unclear what substantial advantages this shallow-wide trade-off offers compared to existing depth-dependent constructions.
Response: We thank the reviewer for this comparison. The central contribution is not that a two-block construction is computationally superior to depth-dependent alternatives, but that Softmax POU provides a Transformer-native approximation mechanism: softmax itself performs normalized global aggregation over local experts. Technically, our two-block realization uses a larger sequence length and head count, while the approximation rate is governed by the total parameter count, which remains . More importantly, the construction gives the softmax attention operator a direct approximation-theoretic interpretation as the normalized aggregation of local approximants. Because this mechanism is mesh-free and relies on intrinsic covering complexity and local regularity, it naturally adapts to complex geometries and can support future approximation and statistical-learning theory for Transformers beyond the manifold setting studied here. We therefore view the shallow construction as one realization of a broader foundational framework, rather than as a problem-specific depth–width trade-off.
Thank you for the detailed response. The rebuttal has addressed my main questions and clarified the scope and limitations of the theoretical results. I will maintain my current score.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
We sincerely thank the Area Chair for the encouraging assessment and the reviewers for their valuable comments. Below, we address each question and concern raised by the three reviewers in detail.