Lesson 5.2 · 7 min read · about 50 min to master at a very slow pace
Building Functions from Bumps
The intuition behind universal approximation in one dimension: two steep sigmoids make a bump, many bumps make a staircase, and narrower steps track any continuous curve.
Two sigmoids make a bump
A very steep sigmoid with large is almost a step that switches on at . Subtract a second step that switches on at :
This is about 1 between and and about 0 elsewhere. It needs just two hidden units.
Many bumps make any curve
Split the domain into small intervals. Give each one a bump scaled to the target's height there, and add them all up in the output unit. The result is a staircase that follows the target. Narrower intervals mean smaller steps and less error, at the cost of more units ( hidden units for bumps).
This is not how a trained network actually works, but it shows why a single hidden layer has, in principle, enough expressive power.
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.
Going deeperHow does this extend to more than one input?
In two or more dimensions you can build localised "towers" by combining several steep units in different directions, and then sum towers the same way. The number of units needed grows very quickly with the input dimension, which is one reason the theorem's networks can be impractically large.
Cheatsheet
Bump intuition
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.