Exemplar Normalization for Learning Deep Representation

Ruimao Zhang, Zhanglin Peng, Lingyun Wu, Zhen Li, Ping Luo

Abstract

Normalization techniques are important in different advanced neural networks and different tasks. This work investigates a novel dynamic learning-to-normalize (L2N) problem by proposing Exemplar Normalization (EN), which is able to learn different normalization methods for different convolutional layers and image samples of a deep network. EN significantly improves the flexibility of the recently proposed switchable normalization (SN), which solves a static L2N problem by linearly combining several normalizers in each normalization layer (the combination is the same for all samples). Instead of directly employing a multi-layer perceptron (MLP) to learn data-dependent parameters as conditional batch normalization (cBN) did, the internal architecture of EN is carefully designed to stabilize its optimization, leading to many appealing benefits. (1) EN enables different convolutional layers, image samples, categories, benchmarks, and tasks to use different normalization methods, shedding light on analyzing them in a holistic view. (2) EN is effective for various network architectures and tasks. (3) It could replace any normalization layers in a deep network and still produce stable model training. Extensive experiments demonstrate the effectiveness of EN in a wide spectrum of tasks including image recognition, noisy label learning, and semantic segmentation. For example, by replacing BN in the ordinary ResNet50, improvement produced by EN is 300% more than that of SN on both ImageNet and the noisy WebVision dataset. The codes and models will be released.

Introduction

Normalization is a cornerstone of modern deep learning, facilitating faster convergence and improved performance. However, the optimal normalization strategy often depends on the specific task and data characteristics. While Batch Normalization (BN) is standard for large-batch classification, Instance Normalization (IN) is frequently preferred for style-sensitive tasks like style transfer.

Previous attempts to address this, such as Switchable Normalization (SN), learned a weighted combination of normalizers for each layer. However, SN is static: once trained, the normalization parameters are fixed for all samples at a given layer. The authors of this work argue that this is suboptimal because different images (exemplars) have different characteristics. Exemplar Normalization (EN) addresses this limitation by introducing a dynamic "learning-to-normalize" (L2N) approach that adapts to individual image samples and layers.

Methodology: The Exemplar Normalization Module

Exemplar Normalization is designed as a dynamic "plug-and-play" module that computes a weighted sum of normalized feature maps. Unlike static methods, the importance ratios ($\lambda$) for different normalizers (e.g., BN, IN, LN) are calculated on-the-fly for each input sample $n$.

The internal architecture of the Exemplar Normalization (EN) module, featuring the ratio subnet for dynamic weight estimation.

The core of EN is a lightweight Ratio Subnet designed for stability and efficiency. It utilizes spatial downsampling via average pooling and a novel pairwise correlation mechanism to understand the relationship between different normalizers. A gating mechanism consisting of fully connected layers and a Tanh activation produces the final importance ratios via a Softmax function. This architecture is specifically designed to stabilize optimization, making it safe to integrate into various CNN architectures like ResNet or Inception without the overfitting issues common in previous conditional normalization methods.

Experiments and Results

The effectiveness of EN was evaluated across diverse benchmarks, including ImageNet, CIFAR, WebVision (noisy labels), and ADE20K (semantic segmentation).

Performance comparison of BN, SN, and EN across multiple benchmarks and architectures, showing significant gains for EN.

Image Classification and Noisy Labels

On ImageNet with a ResNet50 backbone, EN achieved 78.1% top-1 accuracy, significantly outperforming BN (76.4%) and SN (76.9%). Notably, the performance gain of EN over the baseline was three times larger than the improvement provided by SN. EN also demonstrated particular robustness on the WebVision dataset, which contains real-world noisy labels, boosting top-1 accuracy to 73.5%.

Semantic Segmentation

In semantic segmentation on the ADE20K dataset, EN reached a Mean IoU (Intersection over Union) of 38.9%, surpassing both SyncBN (37.7%) and SN (38.4%). These results highlight the versatility of EN across different computer vision tasks and its ability to handle complex data distributions more effectively than static normalization methods.

Discussion: Normalization as an Explanation Tool

Beyond performance gains, EN provides a unique lens into model behavior. By visualizing the learned ratios, the authors observed that the model naturally groups semantically similar objects. For example, different cat breeds learn very similar normalization patterns, while vastly different categories like "Castles" or "Flutes" exhibit distinct ratios. This suggests that the normalization layer itself learns to extract categorical or stylistic information to optimize feature representation.

Conclusion

Exemplar Normalization shifts the paradigm from static to dynamic normalization. By adapting to individual exemplars and layers with a stable, lightweight architecture, EN provides significant performance boosts across a wide range of computer vision tasks with marginal computational overhead. Future work will explore task-oriented constraints and the application of EN to more complex reasoning tasks.

Summary updated

BibTeX
@inproceedings{zhang2020exemplar,
  author = {Ruimao Zhang and Zhanglin Peng and Lingyun Wu and Zhen Li and Ping Luo},
  title = {{Exemplar Normalization for Learning Deep Representation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=ZFnrOH7J0Ab},
}
Figure