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

Switchable Normalization for Learning-to-Normalize Deep Representation

Ping Luo, Ruimao Zhang, Jiamin Ren, Zhanglin Peng, Jingyu Li · DOI

TL;DR

This paper introduces Switchable Normalization (SN), a novel normalization technique that allows each layer in a deep neural network to dynamically select the best normalization strategy (Batch, Instance, or Layer Normalization) based on the task and data. SN achieves state-of-the-art results across various benchmarks, demonstrating robustness to small batch sizes and adaptability to different network architectures.

What Problem Does This Paper Address?

Deep neural networks rely heavily on normalization techniques like Batch Normalization (BN), Instance Normalization (IN), and Layer Normalization (LN) to stabilize training and improve performance. However, current practices often apply a single normalization method uniformly across all layers of a network, which can be suboptimal. Furthermore, different tasks and datasets have historically favored different normalization methods, leading to a cumbersome and often heuristic-driven model design process. The authors aim to address this by creating a flexible normalization layer that can learn to adapt its strategy on a per-layer basis, thereby optimizing performance across diverse scenarios without requiring manual tuning.

Methods

The core innovation is Switchable Normalization (SN). SN combines three existing normalization methods:

  • Batch Normalization (BN): Computes statistics across the batch dimension.
  • Instance Normalization (IN): Computes statistics across spatial dimensions (height and width) for each channel and sample.
  • Layer Normalization (LN): Computes statistics across channel and spatial dimensions for each sample.

Instead of picking one, SN learns importance weights for each of these three normalization types (BN, IN, LN) for both the mean and variance calculations. These weights are learned end-to-end via backpropagation. This allows each normalization layer to dynamically blend the outputs of BN, IN, and LN based on learned importance ratios. The authors also propose an efficient way to compute the statistics for SN by reusing computations from IN to derive LN and BN statistics, keeping the computational complexity comparable to existing methods.

Datasets

The paper evaluates SN on a wide range of datasets across various tasks:

  • ImageNet: For image classification.
  • COCO: For object detection and instance segmentation.
  • CityScapes: For semantic image segmentation.
  • ADE20K: For semantic image segmentation.
  • MegaFace: For face recognition.
  • Kinetics: For video recognition.
  • CIFAR-10: Used in the context of neural architecture search.

Key Insights and Ideas

  • Per-layer adaptability is crucial: The paper strongly suggests that a single normalization strategy is rarely optimal for all layers within a deep network. SN's ability to learn layer-specific normalization choices is key to its success.
  • SN is robust to batch size: Unlike BN, which suffers significantly with small batch sizes, SN maintains high performance even with very few samples per GPU (e.g., 2 images/GPU). This is attributed to its ability to dynamically switch to IN or LN when BN's batch statistics become too noisy.
  • Geometric interpretation of normalization: The authors provide a compelling geometric view of different normalization techniques, relating them to weight normalization and illustrating how they affect filter directions and lengths. This helps explain why certain normalizers are better suited for specific tasks (e.g., BN for generalization, LN for learning capacity).
  • Task and dataset-specific preferences: SN demonstrates that different tasks and datasets indeed prefer different normalization strategies. For instance, image classification and object detection favor a mix of BN, IN, and LN, while artistic style transfer leans towards IN.
  • No sensitive hyperparameters: SN avoids the need to manually tune hyperparameters like the number of groups in Group Normalization, making it easier to use.

Key Results

  • ImageNet Classification: SN consistently outperforms BN and GN across various batch size settings, achieving top-1 accuracies up to 76.9% with ResNet50.
  • Object Detection (COCO): SN achieves state-of-the-art results, outperforming BN and GN, especially in scenarios with small batch sizes (e.g., 2 images/GPU), which are common in detection tasks. For Faster R-CNN, SN achieved an AP of 33.0, surpassing BN and GN.
  • Semantic Segmentation (ADE20K, Cityscapes): SN shows significant improvements over BN and GN, with SyncSN (synchronized BN within SN) achieving the best results. For ADE20K, SN achieved mIoU of 40.4 (multi-scale).
  • Face Recognition (MegaFace): SN and SyncSN consistently improve verification accuracy over BN and SyncBN, with SyncSN achieving the best results.
  • Video Recognition (Kinetics): SN outperforms BN and GN, showing improved top-1 accuracy by 1.2% over BN with a batch size of 4.
  • Artistic Image Stylization: SN achieves comparable results to IN, which is known to be effective for this task.

Limitations and Future Work

  • Computational Cost: While SN's statistics computation is efficient, the paper notes that it still involves combining multiple normalizers. Future work could explore making this more sparse or efficient.
  • Meta-Learning Analogy: The authors draw parallels to meta-learning, suggesting that the learned ratios could be seen as learned "control parameters." However, SN's end-to-end training is simpler than traditional meta-learning approaches.
  • Theoretical Framework: The paper calls for a more formal theoretical framework to fully understand SN's convergence and generalization properties.
  • Extensions: The authors suggest exploring sparse SN (where each layer selects only one normalizer) and group SN (where channels are divided into groups for normalization) as future research directions. They also propose designing algorithms to learn arbitrary normalization operations for different convolutional layers.
  • Pretraining and Finetuning Batch Size Mismatch: The paper highlights that finetuning models pretrained with different batch sizes can lead to performance degradation, suggesting that matching batch sizes during pretraining and finetuning is important.

Summary updated

BibTeX
@article{luo2021switchable,
  author = {Ping Luo and Ruimao Zhang and Jiamin Ren and Zhanglin Peng and Jingyu Li},
  title = {{Switchable Normalization for Learning-to-Normalize Deep Representation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2021},
  url = {https://openreview.net/forum?id=fs8IWX7hwrX},
}
Figure