NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Towards Training Without Depth Limits: Batch Normalization Without Gradient Explosion

Alexandru Meterez, Amir Joudaki, Francesco Orabona, Alexander Immer, Gunnar Ratsch, Hadi Daneshmand

TL;DR

Deep neural networks often struggle with "rank collapse," a problem that Batch Normalization (BN) fixes, but historically at the cost of causing gradients to explode as networks get deeper. This paper proves that initializing a BN-equipped network with orthogonal weights prevents both rank collapse and gradient explosion, theoretically allowing for infinite depth. Inspired by their mathematical proofs, the authors also introduce an "activation shaping" technique that successfully trains 1000-layer non-linear networks in practice.

The Problem: The Catch-22 of Batch Normalization

Training very deep neural networks is notoriously difficult. As networks grow in depth, they typically suffer from rank collapse—a phenomenon where the network's outputs become collinear (essentially identical) for different inputs, destroying the network's ability to learn.

Batch Normalization (BN) is a standard architectural trick used to prevent rank collapse by forcing representations to be more orthogonal. However, previous theoretical studies (specifically mean-field theory) concluded that BN comes with a fatal flaw: it causes gradients to explode exponentially as the network gets deeper. This creates a Catch-22: you need BN to prevent rank collapse, but BN prevents you from scaling to extreme depths due to numerical instability.

The authors ask a fundamental question: Is it possible to design a network with Batch Normalization that avoids rank collapse without suffering from exploding gradients?

Methods: Orthogonal Initialization and Activation Shaping

To solve this, the authors step away from standard Gaussian weight initialization and instead initialize the network's weights using random orthogonal matrices.

  • Theoretical Framework: They construct a Multi-Layer Perceptron (MLP) using linear activations and a slightly simplified BN layer. Using a mathematical tool called Weingarten calculus, they derive rigorous, non-asymptotic bounds. This means their math holds true for practical, finite-width networks, unlike previous infinite-width theories.
  • Practical Extension (Activation Shaping): Because a purely linear network isn't very useful for complex tasks, the authors propose a heuristic called "activation shaping" to make their theory work for non-linear networks. By adding a tunable pre-activation gain (scaling down the input before it hits a tanh or sin activation), they force the non-linearities to behave just linearly enough to prevent gradient explosion, while retaining enough non-linearity to learn complex features.

Key Insights

  • Orthogonal Initialization is Magic for BN: While orthogonal weights are known to help standard networks, combining them with BN causes the network's internal representations to become perfectly orthogonal as depth increases. The "isometry gap" (a measure of how far a matrix is from being orthogonal) drops to zero exponentially.
  • Depth-Independent Gradients: Because the representations become perfectly orthogonal, the gradients remain strictly bounded. The expected log-norm of the gradient depends only on the network's width, completely independent of its depth.
  • The "Non-Degenerate" Catch: This stability comes with one hard requirement: the input batch must be linearly independent (non-degenerate). If you feed the network a batch with repeated or highly collinear samples, the gradients will explode. Fortunately, standard random batches from real-world datasets (like CIFAR or MNIST) are almost always full-rank.
  • SGD's Implicit Orthogonality Bias: Surprisingly, when training these ultra-deep networks, Stochastic Gradient Descent (SGD) naturally keeps the middle layers' weight matrices nearly orthogonal, even after hundreds of epochs of training. The network "wants" to stay stable.

Key Results

Theoretical Guarantees and Empirical Stability The authors mathematically prove that for their constructed MLP, the expected isometry gap decays at a rate of $\mathcal{O}(e^{-\text{depth}/C})$, and the expected log-norm of the gradient is bounded by $\mathcal{O}(\text{width}^5)$, completely removing depth from the gradient bound equation.

Gradient norm vs. Depth for Orthogonal and Normal initializations

As shown above, they demonstrate that while Gaussian-initialized BN networks show exponentially exploding gradients (as predicted by prior work), their orthogonal-initialized networks maintain flat, stable gradient norms across 1000 layers.

Training Ultra-Deep Networks Using their activation shaping technique, they successfully trained 1000-layer MLPs with tanh and sin activations on CIFAR-10.

Training accuracy for 100, 500, and 1000-layer networks with different activations

The optimization process exhibited an almost depth-independent convergence rate, meaning the 1000-layer network trained just as smoothly as a 100-layer one, validating the practical utility of their theoretical findings.

Limitations and Future Work

  • Limitations: The rigorous mathematical proofs only apply to networks with linear activations and a slightly modified BN formulation (which omits mean reduction). While the authors show empirically that standard BN and shaped non-linearities behave the same way, the strict theoretical guarantee doesn't cover them. Additionally, the theory breaks down if the input data is degenerate (e.g., batches with repeated samples).
  • Future Work: The authors highlight the "implicit orthogonality bias" of SGD as a major open question. Understanding exactly why gradient descent naturally optimizes over the space of orthogonal matrices in this architecture is a promising direction for future research.

Summary updated

BibTeX
@inproceedings{meterez2024towards,
  author = {Alexandru Meterez and Amir Joudaki and Francesco Orabona and Alexander Immer and Gunnar Ratsch and Hadi Daneshmand},
  title = {{Towards Training Without Depth Limits: Batch Normalization Without Gradient Explosion}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=xhCZD9hiiA},
}
Figure