What does batch normalisation do to the values a layer produces, and why does it help training? What are the new values if a feature takes the values 2 and 4 in a mini-batch?

Deep learning, Normalisation
Level L1 Beginner. Length Short. Nature Th+Mat Both.

What's being asked

Whether you can say in plain words that batch normalisation re-centres and re-scales each feature across a mini-batch.

Key idea

For each feature, batch normalisation subtracts the mean of the mini-batch and divides by its standard deviation. The values then have mean 0 and spread 1, which keeps the layer's inputs on a steady scale and makes training more stable.

Steps

  1. A mini-batch is a small group of training examples processed together. For one feature, take its values across that group. Say they are 2 and 4.
  2. Find the mean and the spread: the mean is (2+4)/2=3. Each value sits 1 away from the mean, so the standard deviation (the typical distance from the mean) is 1.
  3. Subtract the mean and divide by the standard deviation: (2−3)/1=−1 and (4−3)/1=1. The new values are centred on 0 with spread 1. (Real implementations add a tiny number under the division to avoid dividing by zero.)
  4. Why this helps: later layers always see inputs on a similar scale, so training can use larger learning rates and is less sensitive to starting weights. The layer also learns two small knobs, a scale and a shift, so it can undo the normalisation if that works better.

Common mistakes

How long your answer should be

3–5 sentences, about 1 minute.

Read this

Previous in Deep learning: What is dropout in a neural network, why does randomly switching off neurons during training reduce overfitting, and what happens at test time?
Next in Deep learning: What does it mean that a convolutional layer "shares" one small filter across the whole image, and why does that suit images? How many weights does one 3×3 filter need, compared with one fully connected neuron looking at a 28×28 greyscale image?