ContentsThe library

Backpropagation in Full

The Matrix Everybody Writes Down and Nobody Builds

Last timeOne Rule per Operation

The backward step is usually written as a vector meeting a matrix of partial derivatives. That matrix is never built, because only its product with a vector is ever needed.

Write out a backward step in full generality and a matrix appears: every output

of an operation differentiated against every one of its inputs. It is the right

object mathematically and it is never built, and the gap between those two facts

is worth a lesson.

The size of the thing

Take a linear layer of the width used in a mid-sized model.

FIG 1The matrix for one layer, at three widths
widthentries in the matrixsize relative to the sma
a small layer5122621441
a mid-sized layer40961677721664
a large layer163842684354561024
The middle row is for one layer and one example. A batch of thirty-two would need that many entries thirty-two times over, before any of the other layers are considered, and the numbers in it would be used exactly once.

The entries are not merely numerous; they are almost all zero for many

operations, and every one of them is consumed a single time. Building the matrix

would be the most expensive way possible to compute something that is then

thrown away.

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. 01There Are No Layers, Only Operations
  2. 02Multiply Along, Add Acrossopening only
  3. 03Two Ways to Accumulate, and Only One Is Affordableopening only
  4. 04Four Rules That Cover Most of a Networkopening only
  5. 05The Matrix Everybody Writes Down and Nobody Buildsyou are here
  6. 06Why the Last Two Steps Are One Stepopening only
  7. 07What the Forward Pass Has to Leave Behindopening only
  8. 08A Product of Many Small Numbersopening only

Read alongside