Overview
Switchable Normalization (SN) is a deep learning technique that moves away from the "one-size-fits-all" approach to normalization. By learning to compute a weighted average of statistics from three different scopes—minibatch (BN), layer (LN), and instance (IN)—SN automatically adapts to different network architectures, tasks, and batch sizes. This allows it to outperform traditional methods like Batch Normalization, particularly when training with very small batches.
What Problem Does This Paper Address?
Normalization is a cornerstone of modern deep learning, helping models converge faster and generalize better. However, different tasks often require different normalization "scopes." For example, Batch Normalization (BN) is the gold standard for image classification but fails when the batch size is small. Instance Normalization (IN) is preferred for artistic style transfer, while Layer Normalization (LN) is often used in Recurrent Neural Networks (RNNs).
The problem is that researchers usually apply one type of normalizer uniformly across an entire network. This is often suboptimal because different layers in a deep network might benefit from different normalization strategies. Manually searching for the "perfect" combination of normalizers is computationally expensive and cumbersome.
Methods
The authors propose Switchable Normalization (SN), a differentiable approach that learns the best normalization strategy for each layer during training.
- Three Scopes of Statistics: SN considers three ways to calculate the mean ($\mu$) and variance ($\sigma^2$) across the feature tensor:
- IN (Instance): Statistics calculated per channel, per sample.
- LN (Layer): Statistics calculated across all channels of a single sample.
- BN (Batch): Statistics calculated across the entire minibatch for a specific channel.
- Weighted Averaging: Instead of picking just one, SN computes a weighted average of these statistics. For a given layer, the mean is $\mu_{sn} = \sum_{k \in \{in, ln, bn\}} w_k \mu_k$, and the variance is calculated similarly.
- Differentiable Learning: The importance weights ($w_k$) are not hyperparameters; they are learned parameters optimized via backpropagation using a softmax function. This allows the network to "switch" its preference for different normalizers as it learns.
- Efficiency: To keep computation low, the authors show that LN and BN statistics can be efficiently derived from IN statistics, ensuring SN has a computational cost comparable to standard methods.
Key Insights and Ideas
- Task-Specific Preferences: The paper reveals that different tasks have distinct "signatures." As seen in the charts above, image classification heavily prefers BN, but object detection "heads" (the parts of the model that draw boxes and masks) strongly prefer LN. Artistic style transfer almost exclusively selects IN.
- Robustness to Batch Size: One of BN's biggest weaknesses is that it breaks down when the batch size is very small (e.g., 2 images per GPU). SN solves this by automatically shifting its weight toward IN and LN when batch statistics become too noisy, maintaining high accuracy where BN fails.
- Geometric Interpretation: The authors provide a geometric view using Weight Normalization (WN) as a reference. They suggest that BN acts as a regularizer that improves generalization, while LN provides more "learning ability" by allowing larger weight norms. SN finds the optimal balance between these two.
- No Hyperparameter Tuning: Unlike Group Normalization (GN), which requires researchers to manually choose the number of groups, SN learns its own configuration.
Key Results
The authors evaluated SN across a wide range of challenging benchmarks, including ImageNet, COCO, Cityscapes, ADE20K, and Kinetics:
- ImageNet Classification: On ResNet50, SN achieved 76.9% top-1 accuracy, surpassing both BN and GN.
- Small Batch Performance: At a batch size of 2 images per GPU, BN's accuracy plummeted to 65.3%, while SN maintained a high 75.6%, proving its robustness.
- COCO Detection: In Faster R-CNN, replacing frozen BN with SN improved the Average Precision (AP) from 36.7 to 39.3.
- Video Recognition: On the Kinetics dataset, SN outperformed BN by 1.2% in top-1 accuracy when using small batch sizes.
Limitations and Future Work
- Moving Average vs. Batch Average: During inference, the authors found that using a "batch average" (averaging statistics over many random minibatches) performed slightly better and converged faster than the traditional "moving average" used in BN.
- Sparse SN: The authors briefly mention "Sparse SN," where a layer might eventually learn to use only one normalizer (using an argmax instead of a weighted average), which could further optimize inference speed.
- Group SN: Another proposed variant involves dividing channels into groups and letting each group learn its own normalization weights, which preliminary results suggest could be even more powerful.
Summary updated