Deep Learning Basics

An MLP is a stack of small calculations

2 min read

An MLP sounds like a large object. In the forward pass, it is a sequence of matrix multiplications with activations between them. The useful part is not the acronym. It is that each layer gives the next layer a changed representation.

This example starts with two input vectors. The same weights process both rows:

input batch
  -> first matrix
  -> activation
  -> next matrix
  -> activation
  -> final readout

That shared weight is worth noticing. Change one value in the first matrix and both examples can respond, although not necessarily in the same way. The layer is a reusable transformation, not a custom rule written for each row.

Depth gives the network several chances to reshape the data. An early layer can separate useful combinations. A later layer can combine those combinations. By the output layer, the original input has passed through several representation changes.

The activation is what keeps the stack from collapsing into one linear operation. With ReLU, positive values continue and negative values become zero. A zero is not decoration: for these inputs, that path is quiet, so the next layer cannot use its signal.

The matrices have different jobs even though they all look like weights. Earlier matrices shape the representation, middle matrices refine it, and later matrices decide how to read it. A small experiment makes this visible:

  • change a value in the last matrix and watch the output move
  • change a value before an activation and see whether the effect survives
  • change a value in the first matrix and trace its downstream impact

The question is not whether each layer represents a neat human concept. In a small example, it may simply be learning a basis that makes the next multiplication easier.

An MLP is a stack of modest calculations. Track the matrix, the activation, and the values that survive each step, and the stack stops looking mysterious.

Jeremy London

About Jeremy London

Engineering leader and builder in Denver. I write about AI platforms, agents, security, reliability, homelab infrastructure, and the parts of engineering work that have to survive production.