Weight Initialization
August 2026 – Vladislav KruglikovWeight initialization sets the starting values of the trainable parameters. Those values affect activation scale, gradient scale, and whether different neurons learn different features.
Why initialization matters
Initialization decides the model's starting signal scale. If weights are too small, activations and gradients shrink as they move through layers. If weights are too large, they can grow, destabilize updates, or push activations into saturated regions.
Zero initialization
For a linear layer , the backpropagation formulas are and , where .
In a stack of linear layers without bias, if every is initialized to zero, every hidden activation becomes zero. The output gradient can be nonzero, but is still zero, so all weight matrices receive zero gradient.
If biases exist, only the last bias can receive a nonzero gradient at first. Its gradient comes directly from the output gradient . But after backpropagation multiplies by a zero weight matrix, becomes zero, so biases in earlier layers also receive zero gradient. The activation between two linear layers does not change this. Once its upstream gradient is zero, multiplying by the activation derivative still gives zero, so the layers before it remain blocked.
If only the last layer has zero weights while earlier layers are nonzero, the last layer can still learn. Its input can be nonzero, so can update its weights, and can update its bias. But the gradient sent to earlier layers is , so all layers before it receive zero gradient for both weights and biases.
Constant nonzero initialization
Creates a symmetry problem. Every neuron in a layer receives identical inputs and computes the exact same output, causing all neurons to update identically during backpropagation and rendering multiple neurons redundant.
Uniform random initialization
Uniform random initialization samples each weight independently from some interval . This breaks symmetry, so neurons in the same layer no longer receive identical updates.
A general interval can have nonzero mean, which shifts activations in one direction before training starts. For initialization, it is usually cleaner to use a symmetric interval , whose mean is zero.
Randomness alone is not enough. If is too small, activations and gradients can shrink across layers. If is too large, they can grow or push nonlinearities into saturated regions. The useful question is therefore not only whether weights are random, but what scale the random distribution should have.
For a non-symmetric uniform distribution , the variance is
For the symmetric case , we substitute and
So for a symmetric uniform initialization, choose the variance first, then convert it into the bound .
The usual formulas come from trying to keep variance stable across layers. Let be the number of inputs to one neuron. For that neuron, is one input value, is the weight attached to that input, and is the value before the activation function:
So the neuron adds terms. The first term is , the second is , and so on. If these terms are not strongly correlated, the variance of the sum is roughly the sum of their variances:
For centered inputs and weights, each term has variance . Since there are such terms,
To keep the activation scale from growing or shrinking, we want . That gives .
The backward pass gives a similar constraint in the other direction. Let be the number of outputs from the layer. From , the gradient for one input is also a sum:
Using the same variance approximation, this gives
To keep gradient scale from growing or shrinking as it moves backward, we want . That gives .
Xavier initialization balances the forward constraint and the backward constraint by using their average scale.
Xavier uniform assumes the activation does not strongly change the variance after the linear layer. It chooses
so the symmetric uniform bound is
For ReLU-like activations, if pre-activations are roughly centered around zero at the start of training, about half of them are negative and get set to zero. That reduces the signal variance, so He initialization uses roughly twice the Xavier forward variance.
He uniform usually uses the forward-preserving choice
so the symmetric uniform bound is
A backward-preserving variant uses
and therefore
Normal random initialization
Normal initialization uses the same variance targets, but samples from a normal distribution instead of a uniform interval:
Here is the variance. For Xavier normal, use . For He normal in the usual forward-preserving mode, use .
Normal and uniform initialization mostly differ in how they sample weights with the same target variance. Uniform initialization is bounded, so it cannot produce rare extreme weights. Normal initialization puts more weights close to zero, but has tails unless it is truncated. In many basic Xavier and He settings, the target variance matters more than whether the samples come from a uniform or normal distribution.
Truncated normal initialization keeps the normal shape near zero, but resamples values that are too far into the tails. This avoids rare large initial weights while still putting most weights near zero.
Bias initialization
Biases are often initialized to zero. This is usually fine because random weights already break symmetry between neurons. Zero bias does not make all neurons compute the same function by itself.