Lesson 5.3 · 6 min read · about 45 min to master at a very slow pace
What the Theorem Does Not Promise
The universal approximation theorem is an existence result. It says nothing about how many neurons, how to find the weights, or whether the network will generalise. Plus: how it applies to classifiers with discrete outputs.
Existence is not attainability
The theorem guarantees that a suitable network exists. It does not say:
- How many neurons you need: the number can be astronomically large.
- How to find the weights: it gives no training algorithm.
- That gradient descent will find them: training can get stuck even when a solution exists.
- Anything about generalisation: fitting a function on the training data is not the same as predicting new data well.
- How much data you need.
From the lab
A 2–2–1 sigmoid network can represent XOR, yet in a lab experiment it failed to train in about 20% of random starts: the two hidden units ended up computing the same function, or one saturated. With 3 or more hidden units, every run succeeded. Sufficient capacity is not the same as easy training.
Is one hidden layer enough for every task?
In theory yes, in practice usually not. Deep networks can represent many functions far more efficiently, with fewer units, by building hierarchical features, and they often train and generalise better for structured data such as images. Section 11 compares depth and width.
Classifiers have discrete outputs
The theorem is about continuous functions, but a class label is discrete. The way round it: a classifier doesn't output the label directly. It outputs probabilities (through a sigmoid or softmax), which are continuous functions of the input, and the network can approximate those. A decision rule, such as picking the most probable class, then turns them into a label.
Exam-ready wording
"The universal approximation theorem is an existence result about approximation. It does not guarantee a practical network size, an efficient training procedure, good generalisation or modest data requirements."
Stuck? Common doubts
Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.
First passDoes the theorem mean overfitting is impossible?
The opposite, if anything. A network powerful enough to approximate any function is also powerful enough to memorise noise in the training data. The theorem is about what can be represented, not about what will be learned from a finite sample.
Cheatsheet
UAT limits
UAT and classifiers
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.