Meta Feature Modulator for Long-tailed Recognition

Renzhen Wang, Kaiqin Hu, Yanwen Zhu, Jun Shu, Qian Zhao, Deyu MengarXiv 2020

Deep neural networks typically struggle with long-tailed datasets, heavily favoring majority classes while ignoring rare ones. This paper introduces the Meta Feature Modulator (MFM), a meta-learning framework that adaptively scales and shifts intermediate network features during training based on a small, balanced meta-dataset. MFM significantly improves long-tailed recognition, requires zero architectural changes during inference, and learns a re-balancing strategy that can be transferred across entirely different datasets.

The Challenge of Long-Tailed Distributions

In the real world, visual data naturally follows a long-tailed (skewed) distribution—a few "head" classes have abundant examples, while many "tail" classes have very few. Standard deep learning models are prone to overfitting the head classes and underfitting the tail classes because they capture this dataset bias in their internal representations.

Comparison between standard training (a) and the proposed MFM framework (b). MFM uses a balanced meta-dataset to modulate the classifier, leading to better alignment with the test distribution.

Historically, researchers have tackled this using class re-balancing techniques like re-sampling or re-weighting the loss function. While these methods improve discrimination, they often damage the network's ability to learn rich, generalizable feature representations. The authors seek a solution that balances the learning process without crippling the network's underlying representative capacity.

Proposed Method: Meta Feature Modulator (MFM)

Instead of changing loss weights or data sampling rates, MFM directly manipulates the intermediate features of the neural network during training.

How It Works

  1. Feature Modulation: MFM introduces learnable parameters ($\gamma$ for scaling and $\beta$ for shifting) that channel-wisely adjust the feature maps of a specific layer in the network.
  2. The Modulator Network: Rather than learning static parameters, the authors use a small Multi-Layer Perceptron (MLP) to generate $\gamma$ and $\beta$ dynamically. For a given training sample, the main network makes a preliminary prediction (a "soft label"). The Modulator Network takes this soft label and outputs the exact scaling and shifting parameters needed to correct the feature representation.
  3. Bilevel Meta-Learning: The system is trained using two nested loops. The main classification network is updated using the skewed training data, while the Modulator Network is updated using a tiny, perfectly balanced "meta-dataset" (e.g., 10-20 samples per class).
The MFM architecture illustrating the bilevel optimization process and the channel-wise modulation of feature maps using scaling and shifting vectors.

Crucially, the modulator is only used during training. Once the model is trained, the modulator is discarded, meaning there is zero computational overhead during inference.

Key Insights and Results

  • Deep Layer Modulation: The authors found that applying MFM to the final convolutional blocks yields the best results. Shallow layers capture generic textures, while deep layers capture semantic, class-specific patterns. Modulating deeper layers allows the network to effectively re-balance class-specific logic.
  • Universal Balancing Strategy: A surprising finding is that the Modulator Network learns a generalizable rule for correcting class imbalance. A Modulator trained on CIFAR-10 can be frozen and used to train a network on Fashion-MNIST, and it still improves performance.

Performance Benchmarks

  • CIFAR-10 (Imbalance Factor 100): MFM achieved a top-1 error rate of 19.72%, drastically outperforming the standard baseline (26.90%) and the previous state-of-the-art meta-learning approach, MW-Net (24.79%).
  • MIT-67: On this real-world indoor scene recognition dataset, MFM achieved an error rate of 24.20%, outperforming the baseline by 4.34%.
  • Cross-Dataset Transfer: When a Modulator trained on CIFAR-10 was used for Long-Tailed Fashion-MNIST, the error rate dropped from 16.12% to 13.89%, proving high transferability.

Conclusion

MFM acts as a training-time trajectory corrector, forcing the main network to learn representations that fit a balanced distribution even when the training data is highly skewed. Because MFM is architecture-agnostic, it can be plugged into any off-the-shelf CNN, offering a powerful tool for real-world applications where data imbalance is the norm rather than the exception.

Summary updated

BibTeX
@misc{wang2020meta,
  author = {Renzhen Wang and Kaiqin Hu and Yanwen Zhu and Jun Shu and Qian Zhao and Deyu Meng},
  title = {{Meta Feature Modulator for Long-tailed Recognition}},
  year = {2020},
  eprint = {2008.03428},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.03428},
}
Figure