Basis Lab

The Simplest Model That Learns

The Same Four Parts, Much Bigger

Last timeWhen It Learns the Noise

A neural network is a prediction, a score, a gradient and a step, which are the four parts of this course, and the three things that are genuinely new are worth naming exactly.

The promise, made good

The first lesson claimed that a straight line contains every part a neural

network has. This lesson shows where each part is.

A layer of a network is several copies of the model from this course, side by

side. Each one takes all the inputs, has its own knobs, and produces one

number. Ten copies produce ten numbers. Those ten numbers are then squashed,

exactly as in the sixth lesson, and handed to the next layer as its inputs.

FIG 1One layer, written out
the output of unit m in this layer, which becomes an input to the next
unit m knob for input j, so a layer of M units over k inputs has M times k of them
a squashing function, the same role as in the sixth lesson
unit m offset
Inside the brackets is precisely the prediction from the fifth lesson. Outside is precisely the squash from the sixth. A layer is M of those, and a network is layers of them fed into each other.

The squashing is not decoration. A straight line of a straight line is a

straight line, so a network without squashing between its layers, however

deep, collapses into one straight line with one layer's worth of expressive

power. The squash is the only thing that makes depth mean anything, which is

why it had to be introduced before this lesson rather than inside it.

FIG 2Where each part of this course appears in a network
present in a networkchanged from this coursewhich lesson it came fro
a prediction with knobs 111
a score saying how wrong102
a slope for each knob113
a step against the slope103
a penalty on the knobs107
held back data107
Six rows, two of them changed. The prediction is now stacked, and the slopes are computed differently. The score, the step, the penalty and the discipline of held back data arrive in a network exactly as this course left them.

What is new: slopes computed backwards

A network has a great many knobs, and every one of them needs a slope. The

chain from a knob in an early layer to the final score runs through everything

after it, so the slope is a product of many factors.

Computing each knob's slope separately would recompute the same shared factors

over and over. Computing them from the output end backwards computes each

shared factor once and reuses it for every knob that depends on it. That is

the entire idea, and it is the same idea as the sixth lesson of a course on

recursion: notice the overlap, and keep each answer instead of recomputing it.

The lesson stops here

4 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01A Guess With Knobs On It
  2. 02Measuring How Wrong It Isopening only
  3. 03Which Way to Turn the Knobsopening only
  4. 04The Answer Without Any Stepsopening only
  5. 05More Than One Inputopening only
  6. 06Predicting Yes or Noopening only
  7. 07When It Learns the Noiseopening only
  8. 08The Same Four Parts, Much Biggeryou are here

Read alongside