# Weight Initialization Strategies

Weight initialization strategies assign initial values to neural network parameters before training, aiming to prevent vanishing or exploding gradients and improve convergence. Methods include zero, random, Xavier, and He initialization.

Weight initialization, also called parameter initialization, is the pre-training step of assigning initial values to the trainable parameters of a neural network. In deep learning, a neural network contains weights and biases that are modified during training; the choice of initial values affects the speed of convergence, the scale of activations, the scale of gradient signals during backpropagation, and the quality of the final model. Proper initialization is necessary to avoid issues such as vanishing and exploding gradients and activation function saturation. Although the article is titled "weight initialization," both weights and biases are trainable parameters, and the same principles apply to convolutional kernels and biases in convolutional neural networks (CNNs).

## Constant Initialization

The simplest form of initialization is zero initialization, where all weights and biases are set to zero. This is commonly used for biases but not for weights, because it leads to symmetry: all neurons in a layer receive identical gradients and thus learn the same features, severely limiting the network's capacity. In most cases, biases are initialized to zero, but some situations call for nonzero values. For example, in multiplicative units such as the forget gate of an LSTM, the bias can be initialized to 1 to allow good gradient signal through the gate. For neurons with ReLU activation, initializing the bias to a small positive value like 0.1 can help avoid the dying ReLU problem, where neurons become inactive and stop learning.

For recurrent neural networks (RNNs), activation functions with bounded range (e.g., sigmoid or tanh) are typically used, since unbounded activations may cause exploding values. Le, Jaitly, and Hinton (2015) suggested initializing the weights in the recurrent parts of the network to the identity matrix and the biases to zero, similar to the idea of residual connections and LSTMs with no forget gate.

## Random Initialization

Random initialization involves sampling weights from a normal or uniform distribution, usually independently for each weight. This breaks symmetry and allows different neurons to learn different features. The scale of the distribution is critical: too large values can cause exploding activations or gradients, while too small values can cause vanishing signals. Several methods have been developed to choose appropriate scales.

## LeCun Initialization

LeCun initialization, popularized by Yann LeCun and colleagues in 1998, is designed to preserve the variance of activations during the forward pass. It samples each weight independently from a distribution with mean 0 and variance 1/n_in, where n_in is the number of inputs to the layer (fan-in). For a uniform distribution, this corresponds to sampling from U(±√(3/n_in)). This method works well with activation functions that are approximately linear near zero, such as tanh, but can be suboptimal for ReLU.

## Glorot Initialization

Glorot initialization, also known as Xavier initialization, was proposed by Xavier Glorot and Yoshua Bengio in 2010. It was designed as a compromise between two goals: preserving activation variance during the forward pass and preserving gradient variance during the backward pass. For uniform initialization, each weight is sampled from U(±√(6/(n_in + n_out))), where n_in is the fan-in and n_out is the fan-out (number of neurons in the next layer). This method is widely used for networks with sigmoid or tanh activations, but it can be less effective for ReLU due to the rectification nonlinearity.

## He Initialization

He initialization, proposed by Kaiming He and colleagues in 2015, is specifically designed for ReLU activations. It samples weights from a distribution with mean 0 and variance 2/n_in, where n_in is the fan-in. For a normal distribution, this is N(0, 2/n_in); for a uniform distribution, it is U(±√(6/n_in)). The factor of 2 accounts for the fact that ReLU zeroes out half of the activations, effectively halving the variance. He initialization has become the default choice for many deep networks, including residual networks and CNNs.

## Orthogonal Initialization

Orthogonal initialization sets the weight matrix to a random orthogonal matrix, meaning that the rows and columns are orthonormal. This preserves the norm of activations and gradients during the forward and backward passes, which is beneficial for recurrent neural networks and deep networks. It is often used in RNNs and LSTMs to mitigate vanishing gradients. The method is typically applied to the recurrent weight matrix, while other weights may use random initialization.

## Data-Dependent Initialization

In some cases, initialization can be derived from the training data itself. For example, in unsupervised pre-training, autoencoders may be initialized using layer-wise greedy training. More recently, data-dependent methods such as layer-wise sequential initialization have been explored. However, these are less common than fixed random methods due to computational cost and complexity.

## Impact on Training Dynamics

The choice of initialization affects several aspects of training. Proper initialization can accelerate convergence, reduce the risk of vanishing or exploding gradients, and improve the final model quality. Conversely, poor initialization can lead to slow training, saturated activations, or failure to converge. In deep networks, the interaction between initialization and activation functions is crucial; for instance, ReLU networks require larger initial weights than tanh networks to maintain signal propagation.

## Practical Considerations

In modern deep learning frameworks, initialization methods are built-in and can be selected via a parameter. For example, PyTorch and TensorFlow provide functions for Xavier and He initialization. When training large models such as transformers, careful initialization is essential; for instance, the residual branches in transformers are often initialized to zero to ensure stable training at the start. This is a form of zero initialization for specific parts of the network.

## Related Techniques

Weight initialization is closely related to other techniques that address gradient issues, such as [batch-normalization](https://www.wikiprompt.org/wiki/batch-normalization), [layer-normalization](https://www.wikiprompt.org/wiki/layer-normalization), and [gradient-clipping](https://www.wikiprompt.org/wiki/gradient-clipping). These methods can mitigate the effects of poor initialization but do not replace the need for a reasonable starting point. In practice, a combination of good initialization and normalization is often used to train very deep networks.

## See Also

- [neural-network](https://www.wikiprompt.org/wiki/neural-network)
- [deep-learning](https://www.wikiprompt.org/wiki/deep-learning)
- vanishing-gradient
- exploding-gradient
- activation-function

---
Source: https://www.wikiprompt.org/wiki/weight-initialization-strategies
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-13T03:59:42.584139+00:00
