Multi-Label Class Balancing Algorithm for Action Unit Detection

Jaspar Pahl, Ines Rieger, Dominik SeussarXiv 2020

Abstract

Facial Action Unit (AU) detection is a critical task in affective computing, yet it is frequently hampered by significant data scarcity and class imbalance. This paper presents a novel multi-label class balancing algorithm that treats data augmentation as an optimization problem. By targeting unique label combinations rather than individual labels, the proposed method effectively increases the representation of rare facial movements. Experimental results using a parameter-reduced ResNet18 architecture demonstrate significant performance gains on the Aff-Wild2 dataset, nearly doubling the baseline performance in the Affective Behavior Analysis in-the-wild (ABAW) challenge.

Introduction

Facial Action Units (AUs) represent the atomic components of facial expressions, such as brow lowering or lip corner pulling. Automated AU detection is essential for objective emotion analysis, but researchers face two primary challenges: the high cost of expert FACS coding and the inherent class imbalance in naturalistic data. Common expressions like smiles are over-represented, while movements associated with fear or pain are rare.

In multi-label settings, traditional oversampling is problematic. Because a single image often contains multiple AUs, augmenting an image to boost a rare class may inadvertently increase the frequency of a common class, failing to resolve the underlying imbalance. This paper addresses these issues through a structured optimization-based augmentation strategy.

Methods

The core of the proposed pipeline is a multi-label class balancing algorithm designed to handle complex label dependencies.

Optimization-Based Augmentation

Rather than random sampling, the authors formulate balancing as an optimization problem. The algorithm identifies the optimal number of augmentations for each unique combination of AUs present in the dataset. The objective is to minimize the divergence from a balanced distribution while capping augmentations at 10x per image to prevent overfitting.

Model Architecture and Loss

A parameter-reduced ResNet18 serves as the backbone. The final layer uses a sigmoid activation function to support multi-label classification. To address the imbalance directly during training, a specialized F1 loss function is employed, prioritizing the harmonic mean of precision and recall over standard cross-entropy.

Distribution of Action Units across training datasets before and after augmentation.

Datasets

The training set was constructed by aggregating four major databases: Aff-Wild2 (in-the-wild YouTube frames), Emotionet (web-scraped images), Actor Study (high-speed actor sequences), and Extended Cohn-Kanade (posed lab expressions). As shown in Figure 2, the balancing algorithm expanded the initial 322,551 frames to a total of 378,041 frames, specifically targeting under-represented AUs to create a more equitable distribution for training.

Results and Discussion

The model was evaluated on the Aff-Wild2 validation set. The proposed approach achieved a combined metric (average of F1 and Accuracy) of 0.59, a substantial improvement over the ABAW challenge baseline of 0.31.

Comparison of F1 scores across Action Units for baseline and proposed models.

Key findings include:

  • Effectiveness of Balancing: As detailed in Figure 1, the F1 Macro score improved from 0.21 (non-augmented) to 0.24 (augmented).
  • Detection of Rare AUs: The algorithm enabled the detection of previously "invisible" classes. For example, AU15 (Lip Corner Depressor) improved from a 0.00 F1 score to 0.10, and AU01 (Inner Brow Raiser) rose from 0.64 to 0.71.
  • Unique Label Combinations: Treating unique sets of labels as the unit of balancing prevented the collateral over-representation of common labels that typically occurs with naive oversampling.

Conclusion

The multi-label class balancing algorithm provides a robust framework for handling imbalanced facial expression data. While some AUs (like AU02 and AU25) remain challenging due to extreme scarcity, the optimization-based augmentation significantly improves the detection of rare facial movements. Future work will explore generative models for synthetic data generation and further refinement of the optimization parameters to capture the most elusive Action Units.

Summary updated

BibTeX
@misc{pahl2020multi,
  author = {Jaspar Pahl and Ines Rieger and Dominik Seuss},
  title = {{Multi-Label Class Balancing Algorithm for Action Unit Detection}},
  year = {2020},
  eprint = {2002.03238},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.03238},
}
Figure