Representation Power of a Network of Sigmoid Neurons
On this page 7 headings
Make a bump with two sigmoid steps
Subtract a steep sigmoid centred at 3 from one centred at 1. Use a steepness of 100.
Define the bump.
Between the two centres, the first sigmoid is near 1 and the second is near 0.
Before both centres, both sigmoid outputs are near 0.
What changed? Two smooth steps create an approximate rectangular bump. Adding many such bumps can approximate a curve. Values are approximate, not exact hard steps.
Quick check: What is the bump approximately at x = 4?
0: both sigmoid outputs are near 1, so they nearly cancel.
Swipe long formulas, tables or code sideways to see the rest.
Start here In Week 1, a network of perceptrons could represent any Boolean function exactly. Now the big claim: a network of sigmoid neurons with just one hidden layer can approximate any continuous function as closely as we like. The idea is like building a curve out of Lego bricks — and each brick is made from two sigmoids.
| Network of perceptrons | Network of sigmoid neurons |
|---|---|
| One hidden layer can represent any Boolean function precisely (no errors) | One hidden layer can approximate any continuous function to any desired precision |
In other words: for any function , we can always find a neural network (1 hidden layer with enough neurons) whose output g(x) satisfies
for any small ε we choose.
This is from Cybenko (1989) and Hornik (1991). The lecture gives an illustrative proof, based on the online book Neural Networks and Deep Learning (Michael Nielsen, chapter 4).
Take any wiggly function. Cover it with many thin rectangular towers (like a bar chart).
- Each tower is shifted to its position and scaled to the function’s height there.
- Adding them up gives an approximation of the function.
- More towers (thinner) → better approximation.
So imagine a black box of “tower makers”: each one takes x and produces one tower. A simple network then adds the towers. Our job: find out what is inside a tower maker.
Step 1 — a very steep sigmoid is a step. , if w is very large (say 50), the S-curve becomes almost vertical: a step. The step happens where .e. at . So b controls where the step is.
Step 2 — subtract two steps.
- steps up at
- steps up at
- → 0 before 1, 1 between 1 and 3, 0 after 3. A tower!
As a network: input x → two sigmoid hidden neurons ( with with ) → one output neuron with weights +1 and −1.
What activation should ? It just needs to , so a linear (identity) output works.
Check at a few points :
| x | |||
|---|---|---|---|
| 0 | 0 | ||
| 2 | 1 | ||
| 4 | 0 |
Lecture example — finding oil Decide whether there is oil at a location on the ocean bed (yes/no), using two factors: salinity and pressure . The data shows that y ∈ {oil, no oil} is a complex function of and . We want a network to approximate it — so we need towers in 2-D.
The neuron is now .
- Vary (with ): the S-curve rises along the direction; large step “wall” along .
- Vary (with ): same along .
- Vary b (with ): the wall slides to a different position.
Building the 2-D tower:
- Two steep sigmoids in the direction (different b), subtracted → a wall open on two sides (a long ridge, not a tower).
- Two more in the direction, subtracted → another ridge, crossing the first.
- Add the two ridges → height 2 where they cross (the centre), height 1 on the arms, 0 elsewhere.
- Pass this sum through one more steep sigmoid with a threshold between 1 and 2 (the lecture uses .e. fires when the sum is about ) → only the centre survives: a closed tower.
Lecture example — the 2-D tower network Four sigmoid hidden units. and weight (200) on and a small weight (6) on and the big weight (±200) on and 6 on . A linear unit computes (the ridge), another computes (the ridge). These two are added with weights +1, +1. The final sigmoid has , so it outputs only where the sum is about 2 or more — the centre where both ridges overlap.
| Input dimension | Neurons to make one tower |
|---|---|
| 1 | 2 (one pair of steps) |
| 2 | 4 (two pairs) + the closing sigmoid |
| n | 2n (n pairs), plus the closing unit |
(The lecture leaves “n dimensions” as a “think” question; following the same pattern — one pair of opposite steps for each input direction — gives 2n sigmoid neurons per tower, plus the final thresholding unit.)
The catch: to approximate a complex function well you need many towers, so the hidden layer can become very large. The theorem says such a network exists — not that it is small, or easy to learn.
In one line: Steep sigmoids make steps, two steps make a tower, and enough towers added together approximate any continuous function — so one hidden layer of sigmoid neurons is a universal approximator.
Exam words: representation power, universal approximation theorem, Cybenko 1989, Hornik , tower function, step function from large , linear output neuron, 2-D tower.
