Both of Glorot & Bengio's initializations draw each weight uniformly from an interval [−a, a]; they differ only in the half-width a. The standard one (common before 2010) uses a = 1/√nin; their normalized one uses a = √6 / √(nin + nout). Everything follows from one fact: a uniform on [−a, a] has variance a²/3.
The variance is the average of
w² over the interval.
Its own page shows why that average is a third of the biggest square: stack the squares and they make a pyramid, and three such pyramids fill a cube. The right-hand panels below show the same fact as Archimedes did: the area under the parabola
y =
w² is 1/3 of its bounding box, so its mean height is
a²/3.
The standard init uses 1/√n as the uniform's half-width, not its standard deviation. A uniform's standard deviation is only a/√3 ≈ 0.58a of its half-width, so the weights come out √3 too narrow and n·Var(W) = 1/3. Had 1/√n been the standard deviation (say, of a Gaussian, as LeCun et al. recommended in 1998), n·Var(W) would be 1 and the 1/3 would be gone. It is also where the √6 in the normalized init comes from: to reach a variance of 2/(nin + nout), the half-width must be √3 times that standard deviation, and √3·√2 = √6.
Each row draws one full
nout×
nin weight matrix (up to 20,000 entries for the histogram). All three panels share one horizontal scale across both rows, so you can compare box widths directly.
Histogram: flat, because every value in [−
a,
a] is equally likely.
Scatter: pairs of neighboring weights fill a square of side 2
a; the pink dashed lines mark ±σ, about 58% of the way to the edge (1/√3).
Parabola: the variance is the mean height of
w². With
nin =
nout =
n, the normalized box is √3 times wider than the standard one, giving variance 1/
n instead of 1/(3
n). That factor of 3 is the per-layer shrinkage the
variance page shows.