Stable Rank Normalization for Improved Generalization in Neural Networks and GANs

Amartya Sanyal, Philip H. S. Torr, Puneet K. Dokania

TL;DR

Stable Rank Normalization (SRN) is a novel weight-normalization scheme that improves how neural networks generalize by simultaneously controlling their Lipschitz constant and their "stable rank" (a continuous version of matrix rank). Unlike standard Spectral Normalization, which only constrains the largest singular value, SRN optimizes the entire singular value spectrum. This comprehensive approach leads to better classification accuracy, reduced memorization of noisy labels, and higher-quality image generation in GANs.

What Problem Does This Paper Address?

Deep neural networks are notoriously over-parameterized, yet they often generalize remarkably well to unseen data. Theoretical research suggests that this ability is linked to two properties: the Lipschitz constant (how much the output changes relative to the input) and the stable rank (a measure of how "spread out" a matrix's energy is across its singular values).

While Spectral Normalization (SN) has become a standard tool for controlling the Lipschitz constant by constraining the largest singular value ($\sigma_1$), it ignores the rest of the spectrum. A matrix could have a small $\sigma_1$ but still have a very high rank, potentially leading to high "noise sensitivity" and poor generalization. The challenge is that directly optimizing the rank of a matrix is a difficult, non-convex problem. This paper asks: Can we efficiently normalize weights to control both the Lipschitz constant and the stable rank simultaneously?

Methods: Stable Rank Normalization

The authors introduce Stable Rank Normalization (SRN). The core idea is to project the weight matrix $W$ onto a set of matrices that satisfy a target stable rank $r$.

The stable rank is defined as the ratio of the squared Frobenius norm to the squared spectral norm: $$\text{srank}(W) = \frac{\|W\|_F^2}{\|W\|_2^2} = \frac{\sum \sigma_i^2}{\sigma_1^2}$$

Key aspects of the method include:

  • Optimal Projection: The authors formulate an optimization problem to find a matrix $\widehat{W}$ that is as close as possible to the original $W$ (in Frobenius distance) while meeting the stable rank constraint.
  • Surprising Convexity: They prove that although the problem is technically non-convex, it possesses a unique optimal solution.
  • Spectrum Preservation: The algorithm allows for a "partitioning index" $k$. This means you can choose to keep the top $k$ singular values exactly as they are and only scale the "tail" of the spectrum to meet the stable rank target.
  • Efficiency: Computationally, SRN is as cheap as Spectral Normalization. It primarily requires finding the largest singular value using the power iteration method, making it easy to drop into existing training pipelines.

Key Insights and Ideas

  • The "Tail" Matters: Spectral Normalization only clips the tallest peak of the singular value spectrum. SRN manages the entire distribution. By shrinking the "tail" of the spectrum, SRN reduces the network's sensitivity to noise.
Sensitivity comparison showing SRN achieves the lowest sensitivity compared to Spectral Normalization (SN) and Vanilla networks.
  • Capacity vs. Generalization: There is a natural tension in GAN discriminators: they need enough capacity to distinguish real from fake, but too much capacity leads to memorization. SRN provides a "softer" constraint than SN, allowing the discriminator to learn complex features while remaining generalizable.
  • Resistance to Memorization: In "shattering experiments" (training on randomized labels), SRN showed a significantly lower ability to memorize noise compared to vanilla networks or SN. This suggests that SRN forces the network to learn simpler, more robust mappings.

Key Results

The authors evaluated SRN across several standard computer vision benchmarks, including CIFAR-10/100 for classification and CelebA for GANs.

  • Improved Accuracy: Across various architectures (ResNet, WideResNet, DenseNet, VGG, and AlexNet), SRN consistently outperformed both vanilla training and Spectral Normalization. For example, with ResNet-110 on CIFAR-100, SRN achieved 73.2% accuracy, compared to 72.4% for Vanilla and 71.5% for SN.
Accuracy comparison on WideResNet-28 showing Stable Rank Normalization (Stable-50) outperforming Vanilla and Spectral Normalization.
  • Better GANs: When applied to the discriminator of a GAN, SRN improved the Inception Score (IS) and Frechet Inception Distance (FID). On CIFAR-100, SRN-GAN achieved an FID of 19.55, significantly better than SN-GAN's 23.2.
  • Lower Empirical Lipschitzness: The authors measured the "local" Lipschitz constant on the data manifold. They found that SRN leads to much lower empirical Lipschitz values than SN, explaining why these models are less sensitive to small input perturbations.

Limitations and Future Work

  • Hyperparameter Tuning: SRN introduces a hyperparameter $c$ (the ratio used to determine the target stable rank). While the authors found $c=0.3$ to $0.7$ worked well, the optimal value might vary across different tasks.
  • Scope of Architectures: The study focuses heavily on convolutional neural networks for vision. The impact of SRN on Transformers or Recurrent Neural Networks (RNNs) remains an open question.
  • Theoretical Gap: While the paper links stable rank to existing generalization bounds, those bounds are still often "vacuous" (numerically larger than the number of parameters). Bridging the gap between these theoretical bounds and practical performance remains a broader challenge in the field.

Summary updated

BibTeX
@inproceedings{sanyal2020stable,
  author = {Amartya Sanyal and Philip H. S. Torr and Puneet K. Dokania},
  title = {{Stable Rank Normalization for Improved Generalization in Neural Networks and GANs}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=6xKIS41j5YS},
}
Figure