Unique Class Group Based Multi-Label Balancing Optimizer for Action Unit Detection

Ines Rieger, Jaspar Pahl, Dominik Seuss

Introduction

Detecting facial Action Units (AUs)—the fundamental components of facial expressions—is a cornerstone of affective computing. However, training robust models for AU detection is notoriously difficult due to two primary data characteristics: extreme class imbalance and the multi-label nature of the task. In typical datasets, common movements like lip corner pulls occur frequently, while rare expressions of pain or specific distress are scarce. Traditional oversampling fails here; duplicating an image to boost a rare AU inadvertently multiplies the common AUs present in that same image, often exacerbating the original imbalance.

This paper presents a novel optimization-based balancing algorithm designed to calculate the ideal number of augmentations for unique combinations of labels. By applying this balanced data to a lightweight ResNet architecture, the authors significantly improved minority class detection and secured 3rd place in the ABAW 2020 challenge for AU detection.

Proposed Methodology

To overcome the multi-label resampling trap, the authors reframe dataset balancing as a mathematical optimization problem. The process follows a structured pipeline designed to untangle overlapping labels.

The multi-label balancing pipeline: from unique class grouping to optimized augmentation.

1. Labelset Grouping and Optimization

The data is first grouped by unique combinations of labels (e.g., an image with AU01 and AU04 is treated as a distinct "labelset" class). An optimization algorithm then calculates exactly how many times each unique labelset needs to be augmented to achieve global balance. The objective function minimizes the difference between target and actual occurrences while penalizing extreme variance to prevent overfitting (capping duplication at 10x).

2. Strategic Augmentation

Once the optimizer determines the required samples, the system generates them using the imgaug library. The authors emphasize "slight" augmentations—such as flipping, Gaussian blur, and perspective transforms—to ensure that subtle facial muscle movements are preserved and not artificially fabricated or erased by the transformation.

3. Model Architecture

The balanced data is fed into a parameter-reduced 18-layer ResNet (ResNet18-112). This architecture uses a sigmoid output layer to handle 8 multi-label AU classifications simultaneously, providing a balance between computational efficiency and feature extraction depth.

Experimental Setup

The training pool combined several diverse datasets to create a robust, albeit imbalanced, baseline:

  • Aff-Wild2: The primary dataset featuring in-the-wild YouTube videos.
  • Emotionet: A 10% manually FACS-coded subset of web-scraped images.
  • Actor Study: High-intensity AU displays from professional actors.
  • Extended Cohn-Kanade (CK+): A standard dataset of posed facial expressions.

Results and Discussion

The proposed balancing optimizer led to significant performance gains across all key metrics. Training on the augmented dataset ("aug-1") boosted the F1 macro score on the Aff-Wild2 validation set from 0.21 to 0.24, with even greater improvements seen in generalization to unseen test data (jumping from 0.16 to 0.22).

Performance comparison between the non-augmented baseline and the optimized augmented model.

As shown in the results table, the most critical achievement was the "rescue" of minority classes. In the unbalanced baseline, rare AUs like AU15 and AU20 had F1 scores of 0.00, meaning the model failed to detect them entirely. After applying the balancing optimizer, these scores improved to 0.10 and 0.04 respectively. While these values remain modest, they represent a vital step toward functional detection of rare facial movements.

Conclusion

By treating unique combinations of AUs as distinct classes and applying a mathematical optimizer for data balancing, this research provides a viable path forward for multi-label facial expression recognition. While the single-task network was outperformed by multi-task approaches in the ABAW 2020 challenge, the balancing technique itself is model-agnostic. Future work will focus on integrating this optimizer into multi-task frameworks and exploring higher augmentation rates to further refine minority class performance.

Summary updated

BibTeX
@inproceedings{rieger2020unique,
  author = {Ines Rieger and Jaspar Pahl and Dominik Seuss},
  title = {{Unique Class Group Based Multi-Label Balancing Optimizer for Action Unit Detection}},
  booktitle = {FG},
  year = {2020},
  doi = {10.1109/fg47880.2020.00101},
}
Figure