Multi-Task Transformer with uncertainty modelling for Face Based Affective Computing

Gauthier Tallec, Jules Bonnard, Arnaud Dapogny, Kévin BaillyarXiv 2022 · DOI

Introduction

Affective computing aims to enable machines to recognize and interpret human emotions. Traditionally, this field has relied on three distinct frameworks: Valence/Arousal (VA), which measures emotional intensity and positivity on a continuous scale; Basic Emotions (FER), which uses discrete categories like "Happy" or "Sad"; and Facial Action Units (AU), which describe specific muscle movements.

While these representations are intrinsically linked, training a single model to predict all three simultaneously presents a significant challenge: subjectivity. While AU annotations are relatively objective, VA ratings are highly subjective and noisy. This paper introduces a multi-task transformer architecture designed to bridge these representations while explicitly modeling the inherent noise and stochasticity of each task.

Methodology

The proposed architecture combines the spatial feature extraction capabilities of Convolutional Neural Networks (CNNs) with the relational modeling of Transformers.

Architectural Backbone

The model utilizes a ResNet50 backbone, pretrained on the VGGFACE2 dataset, to extract spatial features from facial images. These features are projected into a 768-dimensional space to serve as patch representations for the transformer modules.

Task-Specific Tokens and Attention

Rather than employing a standard classification head, the model introduces three learned task tokens—one for each representation (VA, AU, and FER). The processing pipeline involves two key attention stages:

  1. Self-Attention: Tokens interact with one another, allowing the model to exploit synergies (e.g., recognizing that certain muscle movements are strong indicators of specific emotions).
  2. Cross-Attention: Each task token selectively attends to the spatial image features most relevant to its specific objective.

Uncertainty-Weighted Loss

To address the varying levels of subjectivity across tasks, the researchers implemented an uncertainty-weighted loss function based on Maximum Likelihood. By introducing learnable "temperature" and variance parameters, the model automatically down-weights noisier or more subjective tasks during training. This prevents high-variance tasks (like VA) from overwhelming the learning process for more objective tasks (like AU).

Multi-Task MixUp

The authors adapted the MixUp augmentation technique for a multi-task setting. By feeding the model convex combinations of images and their corresponding labels across all three tasks, they aimed to improve the model's robustness and generalization.

Experimental Results

The model was evaluated using the Aff-Wild2 database as part of the ABAW4 (Affective Behavior Analysis In-the-Wild) challenge. This dataset is unique for providing concurrent annotations for VA, AU, and FER across approximately 170 million frames.

Table 1: Performance comparison showing the impact of Multi-Task MixUp on various affective computing metrics.

The results, summarized in the table above, indicate that Multi-Task MixUp provided a significant boost to the Action Unit F1 score, increasing it from 0.25 to 0.27. While the effect on Emotion F1 and VA CCC was slightly neutral-to-negative, the overall performance remained competitive, securing an 8th-place finish in the ABAW4 Multi-Task Challenge.

Discussion and Future Work

While the model successfully navigates multi-task learning through uncertainty modeling, several avenues for improvement remain. The current approach is primarily frame-based; although a 30-frame temporal smoothing window was applied as post-processing, the researchers noted that end-to-end temporal modeling (e.g., via LSTMs) was hindered by missing frames in the dataset. Furthermore, the exclusion of audio data—a common feature in top-performing multi-modal systems—suggests that integrating acoustic features could further enhance predictive accuracy. Finally, future iterations could explore predicting uncertainty on a per-image basis rather than using global task-wise parameters.

Summary updated

BibTeX
@misc{tallec2022multi,
  author = {Gauthier Tallec and Jules Bonnard and Arnaud Dapogny and Kévin Bailly},
  title = {{Multi-Task Transformer with uncertainty modelling for Face Based Affective Computing}},
  year = {2022},
  eprint = {2208.03506},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.03506},
}
Figure