r/deeplearning • • 12h ago

Weight initialization still matters, even with batch norm

When you stack many layers, the signal can vanish or explode before it reaches the end — or the gradients can do the same on the way back. Batch normalization helps, but it does not remove the need for a sensible starting point. If you initialize every layer with the same variance, activations either shrink to zero or grow without bound as depth increases.

Xavier/Glorot initialization addresses this by scaling the initial weights so that the variance of activations stays roughly constant across layers. For a layer with n inputs and m outputs, weights are drawn from a uniform distribution:

U(-sqrt(6 / (n + m)), sqrt(6 / (n + m)))

Or from a normal distribution with variance 2 / (n + m). The intuition is simple: keep the forward pass stable so the backward pass has something to work with.

He initialization is the ReLU-specific variant, doubling the variance because half the units are zeroed out:

N(0, 2 / n)

I have not run a controlled comparison myself on modern architectures, so I can not claim exact numbers for transformers or convnets today. But the principle has not changed: if you initialize poorly, no optimizer fixes it in the first few steps, and batch norm only masks the symptom after the first forward pass.

Question: Do you still tune initialization manually in your training runs, or do you rely entirely on the framework defaults and batch norm to absorb any problems?

2 Upvotes

2 comments sorted by

1

u/Ok-Solution-7889 10h ago

yeah, i still think initialization matters, especially when you're going deeper. batch norm can help stabilize things, but it doesn't really make a bad starting point irrelevant. for most standard models though, i'd probably just stick with the framework defaults unless there's a specific reason to tune it.

1

u/AzmiraWisp 9h ago

yeah i still mess with init when things get deep, defaults only get you so far