Deep Learning Basics

Batch processing stops the lesson from lying

5 min read

Batch processing is where the lesson stops pretending one example tells you enough.

A single input is still a good teaching step. You can draw the neuron, multiply a few weights, add the bias, run ReLU, and see one answer. That is manageable. The problem is that one example can hide almost everything interesting.

One input can make a bad weight look harmless. One input can hide that a hidden unit only matters for part of the batch. One input can make a bias look decorative instead of structural.

Three inputs are still small, but they already force the model to show its work.

what changes when the inputs stack up

The arithmetic does not become new. The shape does.

With one example, the calculation looks like this:

z = W x + b

With a batch, x becomes a matrix. Each column can be one example. The same weights and the same bias are applied across several inputs at once.

Z = W X + b

That capital X is the important part. It says the model is not changing its weights for each example. It is reusing one set of parameters across several cases.

The right mental model is simple: a batch is not three tiny networks. It is one network answering three questions at the same time.

the batch shows which behaviors are conditional

Single-example intuition is easy to overtrust.

Suppose one hidden neuron fires for the first input. It is tempting to call that neuron useful and move on. Then the second and third inputs run through the same weights and the neuron drops to zero after ReLU. The story changes.

The neuron did not become useless. It became conditional.

That is what batching makes visible. A weight is not good or bad by itself. It changes how a feature behaves across a set of inputs. A bias is not a tweak for one row of data. It shifts the threshold for all of them.

If you change one value in the interactive grid, watch the other columns too. The column you expected to move is only half the result.

relu looks more honest in columns

ReLU can feel too simple when you only run it once.

Negative becomes zero. Positive stays positive. Fine.

In a batch, that rule becomes a pattern. A hidden row might look like this:

[-3, 2, 5]

After ReLU:

[0, 2, 5]

That row tells you something useful. For the first input, the unit contributes nothing downstream. For the second and third, it contributes. Same neuron, different effect.

That is where hidden layers stop feeling like a pile of abstract neurons and start feeling like a set of intermediate tests. Each hidden unit asks a weighted question. ReLU decides whether the answer is allowed to keep moving.

bias is not a little extra term

Bias gets under-taught because it looks small.

In a single-example walkthrough, it can feel like an extra number that got added because the formula needed one. In a batch, the bias becomes easier to understand because the same value is added to every example for that neuron.

If a hidden unit is almost active for two inputs and clearly off for the third, changing the bias may flip the first two without touching the third. That is more useful than watching one number move in isolation.

The bias belongs to the neuron’s decision boundary. It is not attached to one example. It is attached to the rule.

That is why the interactive version is worth using slowly. Move the bias by one. Predict which columns cross zero. Then run it. A wrong guess is still useful because it tells you where your mental model was too loose.

reuse is the real point

Batching matters because the same parameters have to work again and again.

W1, b1, W2, and b2 do not change from one column to the next. That is what makes the network a model instead of a lookup table. It has to reuse the same weights across examples that are not identical.

That reuse is also why batching connects naturally to training. During training, the model gets a signal about how shared weights behaved across a set of examples. The update is not supposed to make one input happy and wreck the others. The batch is the first place where that pressure shows up.

You do not need backpropagation yet to feel it. Just watch one weight change affect several columns at once.

try the grid like a lab

Use the interactive grid to make predictions before you run it.

Pick one input column. Guess which hidden values will be positive before ReLU. Change one weight in W1 and see whether only the column you expected moved. Then change a bias and watch whether the activation boundary shifts across several inputs.

Good questions here are boring ones:

  • which hidden units turn off for which inputs?
  • does one weight change affect every column?
  • which output changes after a hidden value crosses zero?
  • where did my prediction break?

That last question is the useful one. A batch does not exist to make the math harder. It exists to keep one example from standing in for the whole system.

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.