He initialization, also called Kaiming initialization, is a weight initialization scheme for neural networks that draws each weight from a zero-mean distribution with variance equal to 2 divided by the number of inputs to the layer. It was designed for layers followed by ReLU-family activations, where it keeps the scale of activations and gradients roughly constant from layer to layer.
The method was introduced in 2015 by Kaiming He and colleagues in work on very deep rectifier networks. In artificial intelligence practice it became the default starting point for convolutional networks and many multilayer perceptrons, because it allows networks with dozens of layers to begin training without vanishing or exploding signals.
The variance argument behind He initialization
He initialization follows from requiring that the variance of pre-activations stays constant across layers. For a layer with n inputs, independent zero-mean weights and inputs, the variance of each pre-activation equals n multiplied by the weight variance and by the mean square of the incoming activations.
ReLU sets every negative input to zero, so for symmetric pre-activations it passes on only half of the second moment. To compensate, the weight variance must be twice as large as the value used for linear or symmetric activations, which gives Var(W) = 2 / fan_in. The same reasoning applied to the backward pass yields 2 / fan_out, which preserves gradient magnitudes instead.
The table lists the formulas used in practice, where fan_in is the number of input connections per unit and, for convolutions, equals input channels multiplied by kernel height and width.
| Variant | Distribution | Parameter value |
|---|---|---|
| He normal | Normal with mean 0 | Standard deviation sqrt(2 / fan_in) |
| He uniform | Uniform on [-limit, limit] | limit = sqrt(6 / fan_in) |
| Fan-out mode | Normal or uniform | fan_out replaces fan_in |
| Leaky ReLU or PReLU | Normal with mean 0 | Variance 2 / ((1 + a squared) times fan_in) |
| Truncated normal | Normal clipped at two standard deviations | Scale corrected for truncation |
Biases are normally set to zero, because the variance argument concerns only the weights. With a negative slope a in leaky ReLU, the gain shrinks toward 1 as a approaches 1, recovering the linear-activation case.
Why deep ReLU networks need it
In a deep network, any per-layer scaling error compounds multiplicatively. If each layer shrinks the signal variance by a factor of 0.5, a 30-layer network reduces it by about nine orders of magnitude, so the output and the gradients effectively vanish.
Before He initialization, practitioners often used small fixed standard deviations such as 0.01, or Xavier initialization tuned for tanh. On ReLU networks deeper than roughly 20 layers, these choices could stall training completely. The original work showed that a 30-layer rectifier network converged with He initialization while the Xavier-initialized version did not.
The table shows how initialization choices affect signal propagation in a plain ReLU stack without normalization.
| Weight variance | Per-layer variance factor | Behavior with depth |
|---|---|---|
| 1 / fan_in | About 0.5 | Signals shrink, gradients vanish |
| 2 / fan_in | About 1.0 | Signals stay stable |
| 4 / fan_in | About 2.0 | Signals grow, gradients explode |
| Fixed 0.01 standard deviation | Depends on width | Unstable for wide or deep layers |
He initialization compared with other schemes
He initialization belongs to a family of variance-scaling initializers that differ mainly in the activation they assume. Choosing the scheme that matches the activation function is the most important rule.
| Alternative scheme | Scale relative to He | When it is preferable to He |
|---|---|---|
| Xavier (Glorot) | About half for square layers | Activations symmetric around zero, such as tanh |
| LeCun normal | Exactly half | Self-normalizing SELU networks |
| Orthogonal with gain sqrt(2) | Same norm, decorrelated rows | Recurrent or very deep linear paths |
| Fixup or zero-initialized branches | Final branch layer scaled down or zeroed | Residual stacks trained without normalization |
For smooth activations such as GELU and Swish, He initialization is still widely used because these functions behave similarly to ReLU for large positive inputs. Their exact gain differs slightly, and large transformer models often use smaller fixed standard deviations with scaled residual projections instead.
Using He initialization in practice
Most deep learning frameworks provide He initialization directly, for example kaiming_normal_ and kaiming_uniform_ in PyTorch or he_normal in Keras. Practitioners choose fan_in mode to preserve forward activations and fan_out mode to preserve backward gradients; in convolutional networks both usually work well.
- Match the nonlinearity argument to the actual activation, including the negative slope for leaky ReLU.
- Check default framework behavior, since some layer types use a scaled Kaiming uniform variant that is not the textbook form.
- Combine with batch normalization or residual connections for very deep models rather than relying on initialization alone.
- Inspect activation statistics per layer in a forward pass on random data to confirm that variances stay near 1.
Limitations of the derivation
The derivation assumes independent weights and inputs and symmetric pre-activations, which hold only approximately at the start of training. It preserves variance on average but does not guarantee that individual units remain active; some ReLU units can still become dead.
Initialization also matters less once normalization layers are present, because batch normalization or layer normalization rescales activations at every step. In residual networks, adding many branches can still increase variance with depth, which is why schemes such as Fixup or zero-initialized final branch layers complement He initialization.
A further subtlety concerns finite width. The variance argument describes averages over many units, so very narrow layers show larger random deviations from the target scale. Mean-field and signal propagation analyses also show that preserving variance is necessary but not sufficient: correlations between inputs can still collapse with depth, so good initialization reduces but does not remove the need for careful architecture design and learning rate tuning.
In everyday language
A neural network starts with random numbers that it later adjusts. If these numbers are too small, the signal fades as it passes through many layers. If they are too large, the signal grows out of control.
He initialization picks the right size for the starting numbers. It is like setting the volume on a chain of amplifiers so that the music stays at the same loudness from start to finish. ReLU layers silence about half of their input. So the starting numbers are made a little larger to make up for it.
Seen in the real world
A medical imaging team builds a 34-layer convolutional network to classify chest X-ray images into normal and abnormal. Their first prototype has no normalization layers and uses a fixed standard deviation of 0.01 for all weights.
During training, the loss stays flat for several epochs, and a diagnostic pass shows that activation variance in the last layers is below one millionth of the input variance. The gradients reaching the early layers are effectively zero.
The team switches to He normal initialization in fan_in mode, matching the ReLU activations. Measured activation variance then remains between about 0.7 and 1.4 in every layer. Training loss drops visibly within a few hundred iterations, and the classifier meets its sensitivity goal on held-out scans with no other change to the architecture or the learning rate.