Differentiable Dynamic Normalization for Learning Deep Representation

Luo Ping, Zhanglin Peng, Wenqi Shao, Ruimao Zhang, Jiamin Ren, Lingyun WuICML 2019

Introduction

Dynamic Normalization (DN) moves beyond "one-size-fits-all" normalization by learning the optimal normalization strategy for every individual layer in a deep network. By using a clever, parameter-efficient matrix decomposition, DN can automatically represent and transition between Batch, Layer, Instance, and Group Normalization—or even discover entirely new variants—during standard end-to-end training.

The Problem with Standard Normalization

Normalization layers (like Batch Normalization) are the "secret sauce" that makes deep learning work, stabilizing training and improving generalization. However, current approaches have two major flaws:

  1. Manual Design: Methods like Batch Norm (BN), Layer Norm (LN), and Group Norm (GN) were designed by hand for specific architectures or tasks.
  2. Uniform Application: Most researchers pick one method and apply it to every layer in a network, even though different layers (e.g., early edge detectors vs. late semantic features) might benefit from different statistical scopes.
Standard Normalization Methods

While "Switchable Normalization" (SN) previously tried to address this by choosing from a small menu of existing methods, it was limited to those specific hand-crafted options. This paper asks: Can we learn the very form of the normalization operation itself directly from the data?

Dynamic Normalization (DN)

The authors introduce Dynamic Normalization (DN), which formulates normalization as a learnable matrix operation.

  • The Matrix Formulation: DN represents the mean and variance estimation using two learnable binary matrices: $V$ (which controls how channels are grouped) and $U$ (which controls how batch samples are grouped). By adjusting these matrices, the system can mathematically replicate BN, LN, IN, or GN.
  • Binary Kronecker Decomposition: Learning a full $C \times C$ matrix for every layer would be computationally ruinous. To solve this, the authors decompose the matrices into a series of Kronecker products of tiny $2 \times 2$ matrices. This reduces the number of parameters from $O(C^2)$ to just $O(\log C)$. For a layer with 1024 channels, DN only needs 10 extra parameters.
  • Differentiable Gating: To make the discrete choice (to group or not to group) searchable via Gradient Descent, they use a gating mechanism: $f(V_i) = g_i \mathbf{1} + (1 - g_i)I$. Here, $\mathbf{1}$ is a matrix of ones (averaging) and $I$ is the identity matrix (keeping separate). The gate $g_i$ is learned alongside the network weights.
Dynamic Normalization Flow

Key Insights and Performance

DN proves that the "standard" normalizers are just specific points in a much larger space of possible operations. The most striking finding is that DN actually uses its flexibility. In a trained ResNet, lower layers (closer to the input) tend to prefer smaller groups of channels, while higher layers often prefer statistics that are more specific to individual instances. Furthermore, DN improves the "Lipschitzness" of the loss function, meaning the loss landscape is smoother and the network is less sensitive to the choice of learning rate and initialization.

Key Results: * ImageNet Superiority: On ResNet101, DN achieved 79.2% top-1 accuracy, outperforming standard Batch Norm (77.8%) and the previous state-of-the-art Switchable Norm (78.4%). * Robustness to Batch Size: Unlike Batch Norm, which breaks down when the batch size is very small, DN remains robust because it can "pivot" to strategies like Group Norm or Layer Norm when batch statistics become unreliable. * State-of-the-Art on CIFAR10: DN consistently outperformed BN, GN, and SN across multiple ResNet depths, often by 0.5% to 1.0%—a significant margin for normalization research.

Limitations and Future Work

While DN is much more flexible than previous methods, it still assumes a block-diagonal structure for its grouping. It doesn't explore non-linear or non-group-based normalization strategies. Additionally, implementing Kronecker-based differentiable gates is more complex than simply dropping in a standard nn.BatchNorm2d layer. Future directions could see DN combined with whitening (which decorrelates features) or applied to other domains like Natural Language Processing, where Layer Norm is currently the unchallenged standard.

Summary updated

BibTeX
@inproceedings{ping2019differentiable,
  author = {Luo Ping and Zhanglin Peng and Wenqi Shao and Ruimao Zhang and Jiamin Ren and Lingyun Wu},
  title = {{Differentiable Dynamic Normalization for Learning Deep Representation}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=BkZ8gnWO-B},
}
Figure