In the field of machine learning, the universal approximation theorems (UATs) state that neural networks with a certain structure can, in principle, approximate any continuous function to any desired degree of accuracy. These theorems provide a mathematical justification for using neural networks, assuring researchers that a sufficiently large or deep network can model the complex, non-linear relationships often found in real-world data. The best-known version of the theorem applies to feedforward networks with a single hidden layer. It states that if the layer's activation function is non-polynomial (which is true for common choices like the sigmoid function or ReLU), then the network can act as a "universal approximator." Universality is achieved by increasing the number of neurons in the hidden layer, making the network "wider." Other versions of the theorem show that universality can also be achieved by keeping the network's width fixed but increasing its number of layers, making it "deeper." These are existence theorems. They guarantee that a network with the right structure exists, but they do not provide a method for finding the network's parameters (training it), nor do they specify exactly how large the network must be for a given function. Finding a suitable network remains a practical challenge that is typically addressed with optimization algorithms like backpropagation.
Setup Artificial neural networks are combinations of multiple simple mathematical functions that implement more complicated functions from (typically) real-valued vectors to real-valued vectors. The spaces of multivariate functions that can be implemented by a network are determined by the structure of the network, the set of simple functions, and its multiplicative parameters. A great deal of theoretical work has gone into characterizing these function spaces. Most universal approximation theorems are in one of two classes. The first quantifies the approximation capabilities of neural networks with an arbitrary number of artificial neurons ("arbitrary width" case) and the second focuses on the case with an arbitrary number of hidden layers, each containing a limited number of artificial neurons ("arbitrary depth" case). In addition to these two classes, there are also universal approximation theorems for neural networks with bounded number of hidden layers and a limited number of neurons in each layer ("bounded depth and bounded width" case).
History
Arbitrary width The first results concerned the arbitrary width case. In March 1988, George Cybenko gave a rigorous mathematical proof of the approximation properties of sigmoidal networks. Later that year in May 1988, Ken-ichi Funahashi published the ATR Technical Report On the Approximate Realization of Continuous Mappings by Neural Networks . In this report, he reinterpreted the Kolmogorov–Arnold–Sprecher theorem from the perspective of neural networks and showed that the four-layer neural network proposed by Rumelhart, Hinton, and Williams , with sigmoid activation functions in its hidden layers, can approximate arbitrary continuous mappings to any desired degree of accuracy. He further introduced the concept of sigmoid-like functions, a generalization of sigmoid activation functions, and proved that the same approximation property holds for this broader class. The result was also extended to multi-output mappings. The report additionally cited the speech-recognition work of Waibel et al. as a contemporary application of neural networks. In May 1989, starting from the integral representation formula proposed by Irie and Miyake , Funahashi proved that a three-layer feedforward neural network (i.e., a network with a single hidden layer), using sigmoid activation functions in the hidden layer and linear activation functions in the input and output layers, can approximate arbitrary continuous mappings with arbitrary accuracy in the topology of uniform convergence . He further proved by mathematical induction that the same approximation property holds for arbitrary (k)-layer feedforward neural networks k ≥ 3 {\displaystyle k\geq 3} . He also noted that, although a single hidden layer is theoretically sufficient for universal approximation, deeper networks may realize the same mappings with fewer hidden units, identifying this as an important topic for future investigation. In July 1989, Kurt Hornik, Maxwell Stinchcombe, and Halbert White
generalized the class of activation functions considered by Funahashi to include unbounded, non-monotonic, discontinuous, and measurable activation functions, and presented an alternative proof based on the Stone–Weierstrass theorem. In December 1989, George Cybenko referred to the works of Funahashi and Hornik and presented a general proof based on the Hahn–Banach theorem and the Riesz representation theorem. He also introduced the concept of a discriminatory function, providing a broader theoretical framework for sigmoid-type activation functions.
Collectively, these results established the universal approximation capability of feedforward neural networks. Hornik also showed in 1991 that it is not the specific choice of the activation function but rather the multilayer feed-forward architecture itself that gives neural networks the potential of being universal approximators. Moshe Leshno et al in 1993 and later Allan Pinkus in 1999 showed that the universal approximation property is equivalent to having a nonpolynomial activation function.
Arbitrary depth The arbitrary depth case was also studied by a number of authors such as Gustaf Gripenberg in 2003, Dmitry Yarotsky, Zhou Lu et al in 2017, Boris Hanin and Mark Sellke in 2018 who focused on neural networks with ReLU activation function. In 2020, Patrick Kidger and Terry Lyons extended those results to neural networks with general activation functions such, e.g. tanh or GeLU. One special case of arbitrary depth is that each composition component comes from a finite set of mappings. In 2024, Cai constructed a finite set of mappings, named a vocabulary, such that any continuous function can be approximated by compositing a sequence from the vocabulary. This is similar to the concept of compositionality in linguistics, which is the idea that a finite vocabulary of basic elements can be combined via grammar to express an infinite range of meanings.
Bounded depth and bounded width The bounded depth and bounded width case was first studied by Maiorov and Pinkus in 1999. They showed that there exists an analytic sigmoidal activation function such that two hidden layer neural networks with bounded number of units in hidden layers are universal approximators. In 2018, Guliyev and Ismailov constructed a smooth sigmoidal activation function providing universal approximation property for two hidden layer feedforward neural networks with fewer units in hidden layers. In 2018, they also constructed single hidden layer networks with bounded width that are still universal approximators for univariate functions. However, this does not apply for multivariable functions. In 2022, Shen et al. obtained precise quantitative information on the depth and width required to approximate a target function by deep and wide ReLU neural networks.
Quantitative bounds The question of minimal possible width for universality was first studied in 2021, Park et al obtained the minimum width required for the universal approximation of Lp functions using feed-forward neural networks with ReLU as activation functions. Similar results that can be directly applied to residual neural networks were also obtained in the same year by Paulo Tabuada and Bahman Gharesifard using control-theoretic arguments. In 2023, Cai obtained the optimal minimum width bound for the universal approximation. For the arbitrary depth case, Leonie Papon and Anastasis Kratsios derived explicit depth estimates depending on the regularity of the target function and of the activation function.
Kolmogorov network The Kolmogorov–Arnold representation theorem is similar in spirit. Indeed, certain neural network families can directly apply the Kolmogorov–Arnold theorem to yield a universal approximation theorem. Robert Hecht-Nielsen showed that a three-layer neural network can approximate any continuous multivariate function. This was extended to the discontinuous case by Vugar Ismailov. In 2024, Ziming Liu and co-authors showed a practical application.
Reservoir computing and quantum reservoir computing In reservoir computing a sparse recurrent neural network with fixed weights equipped of fading memory and echo state property is followed by a trainable output layer. Its universality has been demonstrated separately for what concerns networks of rate neurons and spiking neurons, respectively. In 2024, the framework has been generalized and extended to quantum reservoirs where the reservoir is based on qubits defined over Hilbert spaces.
Variants Variants include discontinuous activation functions, noncompact domains, certifiable networks, random neural networks, and alternative network architectures and topologies. The universal approximation property of width-bounded networks has been studied as a dual of classical universal approximation results on depth-bounded networks. For input dimension d x {\displaystyle d_{x}} and output dimension d y {\displaystyle d_{y}} the minimum width required for the universal approximation of the Lp functions is exactly m a x { d x + 1 , d y } {\displaystyle max\{d_{x}+1,d_{y}\}} (for a ReLU network). More generally this also holds if both ReLU and a threshold activation function are used. Universal function approximation on graphs (or rather on graph isomorphism classes) by popular graph convolutional neural networks (GCNs or GNNs) can be made as discriminative as the Weisfeiler–Leman graph isomorphism test. In 2020, a universal approximation theorem result was established by Brüel-Gabrielsson, showing that graph representation with certain injective properties is sufficient for universal function approximation on bounded graphs and restricted universal function approximation on unbounded graphs, with an accompanying O ( | V | ⋅ | E | ) {\displaystyle {\mathcal {O}}(\left|V\right|\cdot \left|E\right|)} -runtime method that performed at state of the art on a collection of benchmarks (where V {\displaystyle V} and E {\displaystyle E} are the sets of nodes and edges of the graph respectively). There are also a variety of results between non-Euclidean spaces and other commonly used architectures and, more generally, algorithmically generated sets of functions, such as the convolutional neural network (CNN) architecture, radial basis functions, or neural networks with specific properties.
Arbitrary-width case A universal approximation theorem formally states that a family of neural network functions is a dense set within a larger space of functions they are intended to approximate. In more direct terms, for any function f {\displaystyle f} from a given function space, there exists a sequence of neural networks ϕ 1 , ϕ 2 , … {\displaystyle \phi _{1},\phi _{2},\dots } from the family, such that ϕ n → f {\displaystyle \phi _{n}\to f} according to some criterion.
A spate of papers in the 1980s—1990s, from George Cybenko and Kurt Hornik etc, established several universal approximation theorems for arbitrary width and bounded depth. See for reviews. The following is the most often quoted: Also, certain non-continuous activation functions such as the step function can be approximated by continuous activation functions, which then allows the approximation result to apply to those functions. In particular, this shows that a perceptron network with a single infinitely wide hidden layer can approximate arbitrary functions. Such an f {\displaystyle f} can also be approximated by a network of greater depth by using the same construction for the first layer and approximating the identity function with later layers.
The above proof has not specified how one might use a ramp function to approximate arbitrary functions in C 0 ( R n , R ) {\displaystyle C_{0}(\mathbb {R} ^{n},\mathbb {R} )} . A sketch of the proof is that one can first construct flat bump functions, intersect them to obtain spherical bump functions that approximate the Dirac delta function, then use those to approximate arbitrary functions in C 0 ( R n , R ) {\displaystyle C_{0}(\mathbb {R} ^{n},\mathbb {R} )} . The original proofs, such as the one by Cybenko, use methods from functional analysis, including the Hahn-Banach and Riesz–Markov–Kakutani representation theorems. Cybenko first published the theorem in a technical report in 1988, then as a paper in 1989. Notice also that the neural network is only required to approximate within a compact set K {\displaystyle K} . The proof does not describe how the function would be extrapolated outside of the region. The problem with polynomials may be removed by allowing the outputs of the hidden layers to be multiplied together (the "pi-sigma networks"), yielding the generalization:
Arbitrary-depth case The "dual" versions of the theorem consider networks of bounded width and arbitrary depth. A variant of the universal approximation theorem was proved for the arbitrary depth case by Zhou Lu et al. in 2017. They showed that networks of width n + 4 with ReLU activation functions can approximate any Lebesgue-integrable function on n-dimensional input space with respect to L 1 {\displaystyle L^{1}} distance if network depth is allowed to grow. It was also shown that if the width was less than or equal to n, this general expressive power to approximate any Lebesgue integrable function was lost. In the same paper it was shown that ReLU networks with width n + 1 were sufficient to approximate any continuous function of n-dimensional input variables. The following refinement, specifies the optimal minimum width for which such an approximation is possible and is due to.
Together, the central result of yields the following universal approximation theorem for networks with bounded width (see also for the first result of this kind).
Certain necessary conditions for the bounded width, arbitrary depth case have been established, but there is still a gap between the known sufficient and necessary conditions.
Bounded depth and bounded width case The first result on approximation capabilities of neural networks with bounded number of layers, each containing a limited number of artificial neurons was obtained by Maiorov and Pinkus. Their remarkable result revealed that such networks can be universal approximators and for achieving this property two hidden layers are enough.
This is an existence result. It says that activation functions providing universal approximation property for bounded depth bounded width networks exist. Using certain algorithmic and computer programming techniques, Guliyev and Ismailov efficiently constructed such activation functions depending on a numerical parameter. The developed algorithm allows one to compute the activation functions at any point of the real axis instantly. For the algorithm and the corresponding computer code see. The theoretical result can be formulated as follows.
Here " σ : R → R {\displaystyle \sigma \colon \mathbb {R} \to \mathbb {R} } is λ {\displaystyle \lambda } -strictly increasing on some set X {\displaystyle X} " means that there exists a strictly increasing function u : X → R {\displaystyle u\colon X\to \mathbb {R} } such that | σ ( x ) − u ( x ) | ≤ λ {\displaystyle |\sigma (x)-u(x)|\leq \lambda } for all x ∈ X {\displaystyle x\in X} . Clearly, a λ {\displaystyle \lambda } -increasing function behaves like a usual increasing function as λ {\displaystyle \lambda } gets small. In the "depth-width" terminology, the above theorem says that for certain activation functions depth- 2 {\displaystyle 2} width- 2 {\displaystyle 2} networks are universal approximators for univariate functions and depth- 3 {\displaystyle 3} width- ( 2 d + 2 ) {\displaystyle (2d+2)} networks are universal approximators for d {\displaystyle d} -variable functions ( d > 1 {\displaystyle d>1} ).
See also Kolmogorov–Arnold representation theorem Representer theorem No free lunch theorem Stone–Weierstrass theorem Fourier series
References