# Universal approximation theorem

(Redirected from Universal approximator)

In the mathematical theory of artificial neural networks, the universal approximation theorem states that a feed-forward network with a single hidden layer containing a finite number of neurons can approximate continuous functions on compact subsets of Rn, under mild assumptions on the activation function. The theorem thus states that simple neural networks can represent a wide variety of interesting functions when given appropriate parameters; however, it does not touch upon the algorithmic learnability of those parameters.

One of the first versions of the theorem was proved by George Cybenko in 1989 for sigmoid activation functions.

Kurt Hornik showed in 1991 that it is not the specific choice of the activation function, but rather the multilayer feedforward architecture itself which gives neural networks the potential of being universal approximators. The output units are always assumed to be linear. For notational convenience, only the single output case will be shown. The general case can easily be deduced from the single output case.

Although feed-forward networks with a single hidden layer are universal approximators, the width of such networks has to be exponentially large. In 2017 Lu et al.  proved universal approximation theorem for width-bounded deep neural networks. In particular, they showed that width-n+4 networks with ReLU activation functions can approximate any Lebesgue integrable function on n-dimensional input space with respect to $L^{1}$ distance if the depth of the network is allowed to grow. They also showed the limited expressive power if the width is less than or equal to n. All Lebesgue integrable functions except for a zero measure set cannot be approximated by width-n ReLU networks.

Later Hanin  improved the result of , showing that ReLU networks with width n+1 is sufficient to approximate any continuous convex function of n-dimensional input variables.

## Formal statement

The universal approximation theorem in mathematical terms:

Let $\varphi :\mathbb {R} \to \mathbb {R}$ be a nonconstant, bounded, and continuous function. Let $I_{m}$ denote the m-dimensional unit hypercube $[0,1]^{m}$ . The space of real-valued continuous functions on $I_{m}$ is denoted by $C(I_{m})$ . Then, given any $\varepsilon >0$ and any function $f\in C(I_{m})$ , there exist an integer $N$ , real constants $v_{i},b_{i}\in \mathbb {R}$ and real vectors $w_{i}\in \mathbb {R} ^{m}$ for $i=1,\ldots ,N$ , such that we may define:

$F(x)=\sum _{i=1}^{N}v_{i}\varphi \left(w_{i}^{T}x+b_{i}\right)$ as an approximate realization of the function $f$ ; that is,

$|F(x)-f(x)|<\varepsilon$ for all $x\in I_{m}$ . In other words, functions of the form $F(x)$ are dense in $C(I_{m})$ .

This still holds when replacing $I_{m}$ with any compact subset of $\mathbb {R} ^{m}$ .

The universal approximation theorem for width-bounded networks  in mathematical terms:

For any Lebesgue-integrable function $f:\mathbb {R} ^{n}\rightarrow \mathbb {R}$ and any $\epsilon >0$ , there exists a fully-connected ReLU network ${\mathcal {A}}$ with width $d_{m}\leq {n+4}$ , such that the function $F_{\mathcal {A}}$ represented by this network satisfies

$\int _{\mathbb {R} ^{n}}\left|f(x)-F_{\mathcal {A}}(x)\right|\mathrm {d} x<\epsilon$ The theorem of limited expressive power for width-$n$ networks  in mathematical terms:

For any Lebesgue-integrable function $f:\mathbb {R} ^{n}\rightarrow \mathbb {R}$ satisfying that $\{x:f(x)\neq 0\}$ is a positive measure set in Lebesgue measure, and any function $F_{\mathcal {A}}$ represented by a fully-connected ReLU network ${\mathcal {A}}$ with width $d_{m}\leq n$ , the following equation holds:

$\int _{\mathbb {R} ^{n}}\left|f(x)-F_{\mathcal {A}}(x)\right|\mathrm {d} x=+\infty \,or\int _{\mathbb {R} ^{n}}|f(x)|\mathrm {d} x$ 