Skip to content

Universal approximation theorem

What neural-network universality guarantees: continuous targets on compact domains, arbitrary width and uniform error, with a three-ReLU construction and practical limits.

The universal approximation theorem says that, under specified activation and architecture conditions, sufficiently wide feedforward neural networks can approximate every continuous function on a compact input domain as closely as desired. For a quant building a surrogate for a continuous pricing or risk calculation over a bounded set of states, it establishes expressive capacity. It does not establish that training will find the approximation or that a market forecast will work.

Read the quantifiers

One useful version fixes a continuous activation σ:R→R\sigma:\mathbb{R}\to\mathbb{R} that is not a polynomial on the whole real line. Let K⊂RdK\subset\mathbb{R}^d be compact and let f:K→Rf:K\to\mathbb{R} be continuous. For every ε>0\varepsilon>0, there are a finite width mm, input weights wjw_j, biases bjb_j and output weights aja_j such that
g(x)=∑j=1majσ(wj⊤x+bj),sup⁡x∈K∣f(x)−g(x)∣<ε.g(x)=\sum_{j=1}^{m}a_j\sigma(w_j^\top x+b_j), \qquad \sup_{x\in K}\lvert f(x)-g(x)\rvert<\varepsilon.
This is a single hidden layer with a linear output. The parameters are freely chosen, and width may grow with the target and requested accuracy. The supremum is the uniform error: the bound holds everywhere in the selected domain, rather than only at observed inputs. Biases are part of the architecture; dropping them changes the function family. This continuous-activation version follows from Leshno, Lin, Pinkus and Schocken's result.
ReLU, σ(z)=max⁡(0,z)\sigma(z)=\max(0,z), is continuous and globally nonpolynomial, even though each of its two pieces is linear. It meets these assumptions. Cybenko's earlier theorem uses a continuous sigmoidal activation on the unit cube; ReLU is not sigmoidal, so its inclusion needs the broader result.

Three ramps, one tent

A concrete construction makes the role of width and signed output weights visible. Write R(z)=max⁡(0,z)R(z)=\max(0,z) and take the dimensionless synthetic response

f(x)=R(x)−2R(x−1)+R(x−2),x∈[−1,3].f(x)=R(x)-2R(x-1)+R(x-2),\qquad x\in[-1,3].

There are three hidden units in parallel, each with input weight 11. Their biases are 0,−1,−20,-1,-2, and the output weights are 1,−2,11,-2,1. At each successive kink, the slope changes: first from zero to one, then to minus one, then back to zero. Thus

f(x)={0,x≤0,x,0<x≤1,2−x,1<x<2,0,x≥2.f(x)=\begin{cases} 0,&x\leq0,\\ x,&0<x\leq1,\\ 2-x,&1<x<2,\\ 0,&x\geq2. \end{cases}
Input xx−100.511.523
Output f(x)f(x)000.510.500
Three hidden ReLU ramps with kinks at 0, 1 and 2 are combined with output weights 1, minus 2 and 1. Their dimensionless tent output is zero at minus 1, 0, 2 and 3, one half at 0.5 and 1.5, and one at 1.
Three hidden ReLU ramps with kinks at 0, 1 and 2 are combined with output weights 1, minus 2 and 1. Their dimensionless tent output is zero at minus 1, 0, 2 and 3, one half at 0.5 and 1.5, and one at 1.
Original synthetic construction with fixed parameters. The hidden ramps grow individually; their signed sum rises to one at x = 1 and returns to zero at x = 2. No parameters were learned.

Here the representation is exact because the target was chosen to be a simple piecewise linear function. This is an illustration of how units combine, not a proof that arbitrary continuous functions in any dimension can be approximated.

What “universal” leaves unresolved

The order is target and tolerance first, suitable network second. It does not promise that one fixed small network achieves every accuracy. Nor does the existence statement provide a useful width bound, sample requirement or training algorithm. A multilayer perceptron may have adequate capacity while an optimiser fails to find useful parameters; a low training loss may still reflect overfitting.

The domain and error criterion matter in finance. Continuity of the target must be justified: a digital payoff has a jump, so this continuous-target uniform theorem does not cover it across that jump. Approximation in an average-error norm is a different claim. A value-error bound also gives no derivative-error bound, so an accurate pricing surrogate need not produce accurate Greeks. Finally, control on KK supplies no guarantee outside KK, including market states absent from the chosen approximation domain.

For the network architecture behind the statement, Neural Networks: Architecture and Non-Linear Models develops hidden layers, affine collapse and activation functions. The preview is public; the full lesson requires membership.

Sources

Last updated
  • neural networks
  • approximation theory
  • relu
  • model capacity
← Back to the glossaryBack to top ↑