Universal Approximation Under Constraints is Possible with Transformers
Anastasis Kratsios, Behnoosh Zamanlooy, Tianlin Liu, Ivan Dokmanic
Abstract
Many practical problems need the output of a machine learning model to satisfy a set of constraints, . Nevertheless, there is no known guarantee that classical neural network architectures can exactly encode constraints while simultaneously achieving universality. We provide a quantitative constrained universal approximation theorem which guarantees that for any non-convex compact set and any continuous function , there is a probabilistic transformer whose randomized outputs all lie in and whose expected output uniformly approximates . Our second main result is a"deep neural version"of Berge's Maximum Theorem (1963). The result guarantees that given an objective function , a constraint set , and a family of soft constraint sets, there is a probabilistic transformer that approximately minimizes and whose outputs belong to ; moreover, approximately satisfies the soft constraints. Our results imply the first universal approximation theorem for classical transformers with exact convex constraint satisfaction. They also yield that a chart-free universal approximation theorem for Riemannian manifold-valued functions subject to suitable geodesically convex constraints.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
15 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators? cites Are Transformers universal approximators of sequence-to-sequence functions?
- Approximation Rate of the Transformer Architecture for Sequence Modeling cites Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?
- Approximation Rate of the Transformer Architecture for Sequence Modeling cites Are Transformers universal approximators of sequence-to-sequence functions?
- Pretrained Language Models as Visual Planners for Human Assistance cites Are Transformers universal approximators of sequence-to-sequence functions?
Cited by top-tier papers15
- Pretrained Language Models as Visual Planners for Human AssistanceDhruvesh Patel, Hamid Eghbalzadeh, Nitin Kamra, Michael Louis Iuzzolino et al.ICCV 2023 · 41 citations
- Approximation Rate of the Transformer Architecture for Sequence ModelingHaotian Jiang, Qianxiao LiNeurIPS 2024 · 32 citations
- Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?Tokio Kajitsuka, Issei SatoICLR 2024 · 31 citations
- Pinet: Optimizing hard-constrained neural networks with orthogonal projection layersPanagiotis D. Grontas, Antonio Terpin, Efe C. Balta, Raffaello D'Andrea et al.ICLR 2026 · 22 citations
- Low Complexity Homeomorphic Projection to Ensure Neural-Network Solution Feasibility for Optimization over (Non-)Convex SetEnming Liang, Minghua Chen, Steven H. LowICML 2023 · 18 citations
Builds on11
- Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi et al.ICLR 2020 · 481 citations
- What is Local Optimality in Nonconvex-Nonconcave Minimax Optimization?Chi Jin, Praneeth Netrapalli, Michael I. JordanICML 2020 · 381 citations
- Model-Based Domain GeneralizationAlexander Robey, George J. Pappas, Hamed HassaniNeurIPS 2021 · 167 citations
- The phase diagram of approximation rates for deep neural networksDmitry Yarotsky, Anton ZhevnerchukNeurIPS 2020 · 156 citations
- Minimum Width for Universal ApproximationSejun Park, Chulhee Yun, Jaeho Lee, Jinwoo ShinICLR 2021 · 148 citations
Related papers
- Non-Euclidean Universal ApproximationAnastasis Kratsios, Ievgen BilokopytovNeurIPS 2020 · 64 citations
- Deep Ridgelet Transform and Unified Universality Theorem for Deep and Shallow Joint-Group-Equivariant MachinesSho Sonoda, Yuka Hashimoto, Isao Ishikawa, Masahiro IkedaICML 2025
- A closer look at the approximation capabilities of neural networksKai Fong Ernest ChongICLR 2020 · 18 citations
- On Solution Functions of Optimization: Universal Approximation and Covering Number BoundsMing Jin, Vanshaj Khattar, Harshal Kaushik, Bilgehan Sel et al.AAAI 2023 · 15 citations
- CAffNet: Hard Constraint-Affine Neural NetworksYang Zhao, Jungeun Lee, Jeong hwan Jeon, Sze Zheng YongICML 2026 · 1 citation
