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.

Not startedJump to quiz

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).

00.5100.20.40.60.81x
target h(x)4 bumps (8 hidden units)
Four bumps: a coarse staircase.
00.5100.20.40.60.81x
target h(x)16 bumps (32 hidden units)
Sixteen bumps: already close everywhere.

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

≈ 1 on . Sum scaled bumps → staircase approximation; more bumps, smaller error, more units.

See every cheatsheet by category →

Check your understanding

Score 75% or more to master this lesson and earn XP. Answer first, then check.

Q1conceptWhat does look like for large and ?
Q2calculateApproximating a curve with 16 bumps, each built from two sigmoid units, needs how many hidden units?
Q3interpretGoing from 4 bumps to 16 bumps on the same interval mainly changes what?
Q4conceptIn the bump construction, where is the height of each bump set?
Q5applyWhy is the bump construction not how a trained network actually works?