Study guide · Neural networks · 1986

Learning representations by back-propagating errors

David Rumelhart, Geoffrey Hinton, Ronald Williams · Nature

A four-page letter in Nature shows that a network with hidden layers can learn its own internal features, by sending the output error backwards to work out how much each connection was to blame. This is how essentially every neural network is trained today.

The paper in four sentences

A perceptron can only adjust its final layer, so it is stuck with whatever features it is given. Networks with "hidden" layers in the middle could do much more, if only we knew how to train the middle.

The fix: run an example forward, measure how wrong the answer is, then pass that error backwards through the network, layer by layer, so every connection learns how much it contributed.

Nudge every connection a little in the direction that reduces the error, and repeat over many examples.

The hidden units end up inventing useful features nobody programmed, such as "which generation is this person in?" in a family-tree task.

Idea · p. 533

The problem: who trains the middle?

A neural network is layers of simple units passing numbers along weighted connections. The input layer receives the data and the output layer gives the answer. In between are hidden units: nobody tells them what they should be doing.

For the output layer, learning is easy: you know the right answer, so you know which way to push. For hidden units there is no "right answer" to compare against. The perceptron dodged this by keeping its middle layer fixed and random, and Minsky and Papert showed how much that limits it. The real prize was a way to train the middle.

Everyday pictureA restaurant sends out a bad dish. The head chef knows the dish was wrong, but which of the five cooks in the kitchen should change what they do, and by how much? Backpropagation is a fair way to divide up the blame.

TakeawayHidden layers make networks powerful, but they need a way to learn without being told what each hidden unit should do.

Idea · p. 534

Pass the blame backwards

Each training example takes two trips. On the forward pass, the input flows through the network and produces an answer. Compare it with the correct answer and you get an error.

On the backward pass, the error flows the other way. Each output unit knows how wrong it was. Each hidden unit then collects blame from the units it feeds, in proportion to how strongly it is connected to them. Every connection learns how much a small change in it would change the error, and moves a small step the helpful way.

Below, a tiny network learns XOR ("one or the other, but not both"), the very kind of problem a single-layer perceptron cannot solve. The coloured background shows what it currently answers at each point.

Left: the network's answer for every point in the square (amber = 1, blue = 0) with the four training points. Centre: the network, line thickness = weight size, amber positive, blue negative. Right: total error after each sweep through the four examples.

TakeawayRun forward to get the error, run backward to share out the blame, nudge every weight. Repeat.

Check yourself
What travels backwards in backpropagation?
The error signal: for each unit, how much the total error would change if that unit's input changed.
Why can this network solve XOR when a perceptron can't?
Its hidden units learn intermediate features (roughly "at least one is on" and "both are on") that make the final decision a simple straight-line cut.

Idea · p. 535

Walking downhill, with momentum

Think of the error as a landscape: every possible setting of the weights is a location, and the height is how wrong the network is. Training means walking downhill. The backward pass tells you which way is down; the learning rate decides how big a step to take.

The paper also adds momentum: each step keeps part of the previous step's direction, like a ball rolling downhill that doesn't stop dead in every small dip. Try the sliders: too large a step overshoots, and momentum can carry the ball through a shallow dip to a deeper valley.

One weight, one error curve. The ball starts on the left. Without momentum it settles in the first shallow dip. With momentum 0.8 it rolls into the middle valley, and at 0.9 on to the deepest one. Real error landscapes have millions of dimensions, but the trade-off is the same.

TakeawayLearning is downhill walking on an error landscape. Step size and momentum decide whether you get stuck, overshoot, or arrive.

Idea · pp. 534–535 · Figs. 1–4

Hidden units invent their own features

The paper's title says "learning representations", and this is the real headline. In one test, a network had to say whether a row of six on/off lights was a mirror image of itself. It had only two hidden units. Training found an elegant trick nobody told it: each light's weight is matched by an equal and opposite weight on its mirror partner, and the three sizes are in the ratio 1 : 2 : 4. A mirror-symmetric input cancels out exactly, while any asymmetry leaves a non-zero total, and the 1 : 2 : 4 sizes make sure different asymmetries can never cancel each other by accident.

In another test, a network learned two family trees, one English and one Italian, from statements like "Colin's mother is Victoria". Its hidden units came to stand for things like nationality, generation, and which branch of the family a person was in. Nobody named those features; they emerged because they made the task easier.

TakeawayBackprop doesn't just fit answers; the hidden layers discover meaningful features of the data on their own.

Check yourself
In the symmetry task, why do mirror partners get equal and opposite weights?
So that a symmetric input contributes zero total to each hidden unit, while any asymmetry pushes the total away from zero.

Idea · Context

Not the first, but the one that convinced people

The mathematics was older. Seppo Linnainmaa described the general backward method for computing derivatives in 1970, and Paul Werbos proposed using it to train neural networks in 1974. What this paper added was clear evidence of what it learns: interesting internal representations, in a short paper in a widely read journal, plus a book chapter with many more experiments.

The authors also flagged the weak spots: the downhill walk can get stuck in a poor valley (they found this rare in practice), and they said plainly that this is not a realistic model of how brains learn.

Later refinementToday's networks use the same backward pass, now done automatically by software ("automatic differentiation"). What changed is around it: ReLU units instead of sigmoids, better optimisers like Adam, normalisation layers, and vastly more data and computing power.

TakeawayBackprop's idea predates 1986; this paper showed it could make hidden layers learn meaningful features, which is what restarted the field.

Follow the idea

Built on: Perceptron (1958), Perceptrons (book) (1969)

Led to: LSTM (1997), LeNet (1998)