Before a network has learned anything at all, its very first forward pass depends on nothing but its starting weights. Can a network be broken before training even begins?
This is a genuine 6-layer network — 8 inputs, 8 outputs per layer, fixed random weights — with every weight multiplied by one shared scale. Drag it small: the signal shrinks by roughly the same fraction every layer, and six layers of shrinking compounds into almost nothing left.
Each layer's output is a sum of random-weighted terms. Averaged over random weights, that sum's typical size scales like times the input's size. For the signal to stay roughly the same size layer after layer — neither shrinking nor growing — that factor needs to sit near :
- scale — the multiplier applied to every randomly-drawn initial weight.
- fan-in — the number of inputs feeding into a neuron or layer.
- Xavier/Glorot: scale by the layer's own size
Pick the initial weight scale from the layer's own size, not a fixed constant, so six layers or sixty behave the same way at the start.
The dashed lines mark a healthy band. Push the scale toward 1 and the curve rockets upward, doubling or more with every layer — the "exploding" failure mode. This chapter's dataset has fan-in 8, so is the scale that keeps the curve inside the band the whole way across.
With fan-in :
- Too small — scale 0.05
About seven times smaller than ideal ( vs. ). Each layer's signal scales by roughly — a shrink, not a hold. Compounding that six times: , taking the RMS (short for Root Mean Square) activation from about at the input to under by layer 6 — a network that's already numerically dead before a single gradient step.
- Too large — scale 1.0
Roughly three times too large ( vs. ). Each layer's signal now scales by — a growth factor well above . Compounding that six times: , pushing the same six layers up past .
- Just right — the ideal scale ≈ 0.354
Every one of the six layers stays within about to of the input's own size — no compounding in either direction.
Find a scale that keeps layer 6’s activation between 0.3 and 3 — neither dead nor blown up.
A network that starts too small can't produce a signal worth learning from; one that starts too large saturates its activations and produces gradients too extreme to use. Good initialization doesn't teach the network anything — it just makes sure the forward pass survives long enough for training to start. The next chapter asks the same question about gradients flowing backward through depth, where an almost identical failure mode has its own name.