Batch normalization provably avoids ranks collapse for randomly initialised deep networks

Hadi Daneshmand, Jonas Moritz Kohler, Francis R. Bach, Thomas Hofmann, Aurélien LucchiNeurIPS 2020

Introduction

This paper identifies "rank collapse"—a phenomenon where hidden representations become redundant and lose information—as a primary reason deep neural networks are notoriously difficult to train. The authors provide the first theoretical proof that Batch Normalization (BN) prevents this collapse, maintaining a diverse data representation that allows gradients to stay meaningful even in infinitely deep networks.

The Structural Flaw: Rank Collapse

For years, the difficulty of training deep networks without architectural tricks like Batch Normalization or Residual Connections was attributed primarily to the "vanishing gradient" problem. However, the authors argue there is a more fundamental structural issue at play: Rank Collapse.

As data passes through a randomly initialized deep network, the hidden representations tend to become increasingly correlated. In a standard, unnormalized network, the rank of these representations quickly drops to one. This means that regardless of the input's diversity, the network maps everything onto a single line in high-dimensional space.

Rank collapse correlates directly with a catastrophic drop in training accuracy as network depth increases.

When rank collapse occurs, the network suffers from "directional gradient vanishing." Even if the gradient's overall magnitude remains stable, its direction becomes independent of the input. Essentially, the network "forgets" the distinguishing features of the data, making learning impossible.

Methods and Theoretical Validation

The researchers tackle this problem using a combination of Markov chain theory and random matrix theory.

  1. Theoretical Proof (Linear Case): By focusing on deep linear networks, the authors provide rigorous mathematical proofs. They demonstrate that while vanilla networks (even those equipped with residual connections) inevitably collapse to rank one as depth increases, networks utilizing Batch Normalization maintain a stable rank.
  2. Soft Rank Measures: To circumvent the numerical instability of calculating exact algebraic rank, the study employs "soft rank" and "stable rank" metrics. These provide a differentiable way to measure how "spread out" the data is across the hidden layers.
  3. Empirical Validation: The theoretical findings were rigorously tested on non-linear ReLU networks to ensure the linear proofs hold up in practical scenarios.
Batch Normalization prevents rank collapse in both Linear and ReLU networks, even at extreme depths.

Key Insights

  • BN as a "Cheap" Whitening: Full statistical "whitening" (making all features uncorrelated with unit variance) is computationally prohibitive. The authors show that BN acts as a computationally cheap approximation that is "just enough" to prevent rank collapse.
  • The Scaling Law: They prove that in a BN-normalized network of width $d$, the rank is guaranteed to scale with at least $\Omega(\sqrt{d})$ regardless of depth.
  • Residual Connections Are Not Enough: A surprising insight is that skip connections (as seen in ResNets) do not prevent rank collapse on their own in the limit of infinite depth; they merely slow it down. BN is the component actually providing the "stationarity" needed for extreme depth.
  • Initialization is Key: BN’s rank-preserving property heavily depends on standard i.i.d. zero-mean initialization. If weights are initialized asymmetrically (e.g., all positive values), BN fails to preserve rank, and the network fails to train.
  • Rank is Persistent: SGD updates tend to preserve the rank the network had at initialization. If a network starts with a collapsed rank, it usually stays stuck there.

Empirical Results

The researchers evaluated their findings across several datasets, including synthetic Gaussian data, Fashion-MNIST, and CIFAR-10.

  • Vanilla Collapse: In standard Multi-Layer Perceptrons (MLPs) trained on Fashion-MNIST, the rank collapses to 1 by layer 10. Consequently, training accuracy drops to near-random levels as soon as the network exceeds 10-15 layers.
  • BN Stability: Networks equipped with BN maintained high rank and high training accuracy even at 32 layers deep.
  • Rank-Increasing Pre-training: To prove that rank is the deciding factor, the authors developed a novel, unsupervised pre-training method that uses gradient ascent to maximize the rank of each layer's activations. This pre-training allowed vanilla networks (without BN) to become trainable at great depths, and in some MLP scenarios, even outperform BN-networks.
  • Modern Architectures: On CIFAR-10, they demonstrated that sophisticated models like VGG19 fail to learn if the initialization is tweaked to break BN's rank-preserving property, confirming the theory's relevance to modern deep learning.

Limitations and Future Work

The primary limitation of this work is that the core mathematical proof is restricted to linear networks. While the empirical results on ReLU networks are highly convincing, a formal proof for the non-linear case remains an open challenge. Additionally, the proof assumes a "sufficiently small" weight on the residual branch, whereas many practical networks use larger weights. Future work could explore generalizing these proofs to other normalization techniques, such as Layer Normalization or Weight Normalization, and rigorously proving why SGD tends to preserve the initial rank throughout the training process.

Summary updated

BibTeX
@inproceedings{daneshmand2020batch,
  author = {Hadi Daneshmand and Jonas Moritz Kohler and Francis R. Bach and Thomas Hofmann and Aurélien Lucchi},
  title = {{Batch normalization provably avoids ranks collapse for randomly initialised deep networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=y5-4u0w2O0S},
}
Figure