Leave No Stone Unturned: Mine Extra Knowledge for Imbalanced Facial Expression Recognition

Yuhang Zhang, Yaqi Li, lixiong Qin, Xuannan Liu, Weihong Deng

Introduction

Facial Expression Recognition (FER) has seen significant advancements with the rise of deep learning, yet its application in real-world scenarios remains hindered by the "long-tail" distribution of emotional data. In standard datasets, common expressions like "happy" or "neutral" appear thousands of times, while rarer emotions such as "fear" or "disgust" are represented by only a fraction of that volume. This imbalance leads to models that are highly accurate on average but functionally blind to nuanced or rare emotional states.

In the paper "Leave No Stone Unturned: Mine Extra Knowledge for Imbalanced Facial Expression Recognition," the authors propose a novel framework designed to extract latent knowledge about minority classes from every image in a dataset—regardless of its primary label. By shifting the focus from simple resampling to sophisticated feature mining, the framework achieves state-of-the-art performance across major benchmarks.

The Problem: The Bias of Majority Classes

Standard FER models are typically trained to minimize global error. In an imbalanced dataset, a model can achieve high overall accuracy simply by mastering the majority classes while failing completely on the minority ones. This results in a significant gap between overall accuracy and mean accuracy (the average performance across all individual categories).

Traditional solutions like over-sampling (duplicating rare images) or under-sampling (removing common images) often lead to overfitting or the loss of valuable data. The authors argue that even a "happy" face contains structural information—such as eye shape or mouth tension—that can help a model understand "fear." The challenge lies in "mining" this extra knowledge without being overwhelmed by the dominant labels.

Proposed Methodology

The researchers introduced two primary modules to address the imbalance: Re-balanced Attention Consistency (RAC) and Re-balanced Smooth Labels (RSL).

1. Re-balanced Attention Consistency (RAC)

RAC is the core innovation of the framework. Typically, a model only generates an attention map for the ground-truth label of an image. RAC, however, forces the model to generate attention maps for all possible expressions for every single image.

To ensure these maps are meaningful, the authors apply a "consistency loss." This ensures that the model’s internal representation of an emotion remains stable even if the image undergoes spatial transformations like flipping or scaling. Crucially, these maps are weighted by the "effective number of samples" in each class. This weighting forces the model to search for "fear-like" or "disgust-like" features even in images labeled as "surprise," effectively treating every image as a source of information for the entire emotional spectrum.

2. Re-balanced Smooth Labels (RSL)

Standard label smoothing distributes a small amount of probability mass across all incorrect classes to prevent overconfidence. However, standard smoothing is uniform and ignores class distribution. RSL makes this process "imbalance-aware" by utilizing the training data's distribution to guide the model. It encourages the model to pay more attention to minority classes during the decision-making process, preventing the majority classes from dominating the feature space.

Together, these modules transition FER from a simple classification task into a label distribution learning task, acknowledging that human faces often display a blend of emotional cues.

Experimental Results

The framework was evaluated on three major "in-the-wild" datasets: RAF-DB, FERPlus, and AffectNet. The results demonstrated that the method is backbone-agnostic, showing improvements across ResNet-50, MobileNet, and Swin Transformers.

  • State-of-the-Art Performance: On RAF-DB, the model achieved an overall accuracy of 89.77% and a mean accuracy of 82.44%. When paired with a Swin Transformer, overall accuracy reached a peak of 92.31%.
  • Minority Class Gains: The most significant impact was seen in the "hard" classes. On RAF-DB, accuracy for "Disgust" and "Fear" jumped from approximately 59% to 66%, proving that the model successfully learned to identify rare expressions by mining shared features from more common samples.
  • Transformation Sensitivity: The authors noted that spatial transformations (scaling, flipping) were more effective for RAC than intensity transformations (brightness, contrast). This suggests that FER relies heavily on the geometric arrangement of facial features.

Conclusion

By "leaving no stone unturned," this research demonstrates that the solution to data imbalance is not necessarily more data, but a more sophisticated way of looking at the data we already possess. By mining cross-class features and implementing imbalance-aware regularization, the proposed framework sets a new standard for robust facial expression recognition in the wild. Future research may extend this "mining" philosophy to other long-tailed domains, such as medical imaging or fine-grained object detection.

Summary updated

BibTeX
@inproceedings{zhang2023leave,
  author = {Yuhang Zhang and Yaqi Li and lixiong Qin and Xuannan Liu and Weihong Deng},
  title = {{Leave No Stone Unturned: Mine Extra Knowledge for Imbalanced Facial Expression Recognition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=nrQif5tH7O},
}
Figure