DL0002 All Ones Init

What are the potential consequences of initializing all weights to one in a deep learning model?

Answer

Initializing all weights to one (or any constant non-zero value) creates a symmetry problem: every neuron in the same layer receives identical gradients, so they learn the same features and cannot develop diverse representations. This limits the network to a single effective feature per layer, severely reducing its representational capacity. Training becomes slow or fails to converge because the optimizer cannot differentiate between neurons. Additionally, constant positive weights can push activations into saturated regions of sigmoid or tanh, worsening vanishing gradients.

(1) Symmetry Problem: All neurons in a layer receive the same input and the same gradient, so they evolve identically throughout training.
(2) Limited Representational Capacity: The network behaves as if each layer has only one neuron, making it impossible to capture complex, varied patterns in the data.
(3) Slow or Failed Convergence: Because neurons cannot differentiate, the loss landscape lacks the diversity needed for gradient descent to find useful minima.
(4) Activation Saturation: Uniform positive weights shift pre-activation values into the flat tails of sigmoid and tanh, producing vanishing gradients that stall learning.

Symmetry problem visualization comparing all-ones initialization where neurons collapse versus random initialization with diverse features.

Figure 1: The symmetry problem: with all-ones weights every neuron computes the same function and receives the same gradient, while random initialization lets each neuron learn a distinct feature.

Mathematical Formulation:
\frac{\partial \mathcal{L}}{\partial w_{ij}^{(l)}} = \delta_i^{(l)} \cdot a_j^{(l-1)}
w_{ij}^{(l)} = 1 \quad \forall\, i,j \implies \delta_i^{(l)} = \delta_j^{(l)} \quad \forall\, i,j

Where:

  • w_{ij}^{(l)} is the weight from neuron j in layer l-1 to neuron i in layer l.
  • \delta_i^{(l)} is the error signal (delta) for neuron i in layer l.
  • a_j^{(l-1)} is the activation of neuron j in the previous layer.
  • \mathcal{L} is the loss function; when all weights are equal, all delta signals are identical, so every weight updates by the same amount.
Training loss comparison between ones initialization and random initialization showing slow convergence for constant weights.

Figure 2: Training loss comparison: ones initialization converges slowly and plateaus at a high loss, while random initialization descends rapidly to a low minimum.


Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *