On Feature Normalization and Data Augmentation

Boyi Li, Felix Wu, Ser-Nam Lim, Serge J. Belongie, Kilian Q. Weinberger · DOI

TL;DR

This paper introduces "Moment Exchange" (MoEx), a novel data augmentation technique that leverages the often-discarded mean and standard deviation (moments) of intermediate network features. By swapping these moments between different training images and interpolating their labels, MoEx forces recognition models to learn from this "hidden" structural information, leading to improved generalization and robustness across various tasks and architectures.

What Problem Does This Paper Address?

In image recognition, techniques like Batch Normalization often remove feature moments (mean and standard deviation) because they're seen as noise that can hinder training stability and speed. However, in image generation, these same moments are crucial for capturing style and shape. This creates a dichotomy: recognition models discard valuable information that generation models exploit. The paper addresses this by proposing a method to make recognition models use these moments, bridging the gap and improving their ability to generalize to unseen data.

Methods

The core innovation is Moment Exchange (MoEx). Here's how it works:

  1. Feature Extraction: For a given layer in a neural network, the method extracts not only the normalized features but also their mean ($\mu$) and standard deviation ($\sigma$). This is done using intra-instance normalization techniques like Positional Normalization (PONO).
  2. Moment Swapping: The moments ($\mu_B, \sigma_B$) from one training image (image B) are then injected into the normalized features of another training image (image A). This effectively creates a new feature representation for image A that contains information from both its original features and image B's moments.
  3. Label Interpolation: To guide the model, the target labels for the mixed features are interpolated. For example, if image A was a cat and image B was a plane, the model is trained to predict a blend of "cat" and "plane" labels from the modified features.

This process is performed entirely in feature space, making it computationally efficient and compatible with existing data augmentation methods.

Datasets

The paper evaluates MoEx on a wide range of datasets and tasks:

  • Image Classification: CIFAR-10, CIFAR-100, ImageNet, ModelNet10, ModelNet40.
  • Object Detection: Pascal VOC 2007.
  • Speech Classification: Speech Command dataset.

Key Insights and Ideas

  • Moments are not just noise: The paper strongly argues that feature moments, particularly from intra-instance normalization, contain significant, label-relevant structural information that is often ignored in recognition tasks.
  • Bridging the generation-recognition gap: MoEx effectively transfers a concept from image generation (using moments for style/shape) to image recognition, showing that what's useful for one can benefit the other.
  • Implicit data augmentation: MoEx acts as a form of data augmentation by creating new training samples with mixed signals, improving robustness without needing complex pre-processing or external models.
  • Complementary to existing methods: MoEx doesn't replace other augmentations; it complements them, often leading to state-of-the-art results when combined.
  • Cross-domain applicability: The technique shows promise not just in computer vision but also in speech and potentially natural language processing, suggesting a fundamental insight into deep network learning.

Key Results

  • Consistent improvements: MoEx consistently improved the generalization performance of various baseline networks across multiple benchmark datasets, including CIFAR-10, CIFAR-100, and ImageNet.
  • State-of-the-art combinations: When combined with methods like CutMix and ShakeDrop, MoEx achieved new state-of-the-art results on CIFAR-100.
  • ImageNet performance: MoEx reduced Top-1 error on ImageNet from 23.1% to 21.9% for a ResNet-50 baseline, and even further to 20.9% when combined with CutMix.
  • Object Detection: Pre-trained models with MoEx showed competitive or improved performance on Pascal VOC object detection tasks.
  • 3D Classification: MoEx reduced classification errors on ModelNet10 and ModelNet40.
  • Speech Classification: MoEx improved accuracy on the Speech Command dataset for various models.

Limitations and Future Work

  • Normalization choice matters: While MoEx works with various normalization methods, PONO showed a slight edge for image classification, suggesting that the specific way moments are computed can influence performance. The optimal layer for applying MoEx also varies by normalization type and network architecture.
  • Hyperparameter tuning: The effectiveness of MoEx depends on hyperparameters like the exchange probability ($p$) and label interpolation weight ($\lambda$), which require tuning.
  • Future Directions: The authors suggest exploring other statistics beyond mean and variance (e.g., principal components) and investigating MoEx's applicability in architectures like Transformers. They also note that while MoEx works well with intra-instance normalization, its interaction with inter-instance methods like BatchNorm is beneficial and doesn't interfere.

Summary updated

BibTeX
@inproceedings{li2021feature,
  author = {Boyi Li and Felix Wu and Ser-Nam Lim and Serge J. Belongie and Kilian Q. Weinberger},
  title = {{On Feature Normalization and Data Augmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01220},
}
Figure