Concept · Chapter 4: Neural Networks
Weight Initialization
Initialization sets the random starting weights at a scale that keeps signals and gradients roughly the same size from layer to layer, so deep networks can start learning at all.
The problem
Weights that start too small make signals shrink layer after layer; too large and they explode or saturate the activations.
The solution
Draw initial weights with variance scaled to the layer's width: about 1/n (Xavier/Glorot, for tanh-like units) or 2/n (He/Kaiming, for ReLU).
The consequence
A one-line change that made much deeper networks trainable; frameworks now apply sensible defaults automatically.
You should understand first
- Derivatives and Gradients
- The Chain Rule
- Vectors
- Dot Product
- The Turing Test
- Symbolic AI
- Logic and Rules
- Expert Systems
- Knowledge Representation
- The Knowledge-Acquisition Bottleneck
- From Rules to Learning
- Supervised, Unsupervised and Self-Supervised Learning
- Features, Labels and Tasks
- Loss Functions
- Gradient Descent
- Linear Regression
- Probability and Distributions
- Entropy
- Softmax
- Cross-Entropy Loss
- Logistic Regression
- The Perceptron
- Activation Functions
- The Artificial Neuron
- Matrix Multiplication
- Multilayer Perceptron (MLP)
- The Forward Pass
- Computational Graphs and Autodiff
- Backpropagation
- Vanishing and Exploding Gradients
- Weight Initialization
Why a random start, and why the scale matters
If every weight started equal, every neuron in a layer would compute the same thing and receive the same gradient — they'd never differentiate. So weights start random. But a sum of random terms has variance proportional to : with weights of variance , a layer's outputs have variance about times its inputs'. Choosing keeps it steady; ReLU zeroes half its inputs, so it needs .
Compare the three initialization settings in the vanishing gradient lab with ReLU selected.
What to remember
- Random init breaks symmetry (identical weights would learn identical features).
- Scale matters: keep activation and gradient variance constant across layers.
- Xavier/Glorot: Var(w) ≈ 1/n. He/Kaiming (ReLU): Var(w) ≈ 2/n.
Key papers
Understanding the difficulty of training deep feedforward neural networks
Xavier Glorot, Yoshua Bengio · 2010 · AISTATS 2010
Explained why deep networks with sigmoid units and naive initialization trained poorly, and introduced 'Xavier' initialization.
Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification
Kaiming He, Xiangyu Zhang et al. · 2015 · ICCV 2015
Introduced the initialization ('He' or 'Kaiming' initialization) suited to ReLU networks, plus the PReLU activation.