Lossless Attention in Convolutional Networks for Facial Expression Recognition in the Wild

Chuang Wang, Ruimin Hu, Min Hu, Jiang Liu, Ting Ren, Shan He, Ming Jiang, Jing MiaoarXiv 2020 · OpenReview

TL;DR

This paper introduces a novel "Lossless Attention Module" (LLAM) for Convolutional Neural Networks (CNNs) to improve facial expression recognition (FER) in unconstrained "in-the-wild" conditions. LLAM addresses information loss in traditional attention mechanisms by leveraging features from previous layers and avoiding dimensionality reduction, leading to more accurate and robust expression detection.

What Problem Does This Paper Address?

Recognizing facial expressions in real-world scenarios, often referred to as "in-the-wild" conditions, is significantly more challenging than in controlled laboratory settings. This is due to a multitude of interfering factors such as varying illumination, different head poses, and partial occlusions (e.g., by hands or objects). Existing methods often struggle with these complexities, leading to reduced accuracy. Specifically, when faces are occluded or viewed from unusual angles, it becomes difficult for standard CNNs to focus on the crucial facial regions that convey expression. Attention mechanisms offer a promising solution by allowing models to selectively focus on relevant parts of an image, but previous approaches have often suffered from information loss during the attention map generation process, hindering their effectiveness.

Methods

The core contribution of this paper is the Lossless Attention Module (LLAM). Unlike prior attention mechanisms that might discard valuable information by reducing dimensionality or only considering the current layer's features, LLAM is designed to preserve as much information as possible.

Here's how it works:

  • Leveraging Previous Layers: LLAM takes feature maps from both the previous and current convolutional layers. This allows it to capture richer contextual information and dependencies across layers.
  • Concatenation: These feature maps are concatenated to form a combined representation.
  • Attention Map Generation: A standard convolution operation is applied to this concatenated feature map to generate an attention map. Crucially, the dimensionality of the attention map is kept consistent with the original feature maps, avoiding information loss.
  • Adaptive Refinement: The generated attention map is then element-wise multiplied with the current feature map. This adaptively refines the feature responses, highlighting important expression-related regions and suppressing irrelevant ones.
  • Integration into CNNs: The LLAM is integrated into the intermediate layers of a standard CNN architecture (in this case, ResNet-18). The overall framework is named LLA-Net.

The paper also highlights that their approach directly computes a 3D attention map that combines spatial and channel attentions, unlike some methods that handle them separately.

Datasets

The primary dataset used for training and evaluation is Aff-Wild2. This is a large-scale, in-the-wild database that provides annotations for valence-arousal estimation, seven basic expression classification, and facial action unit detection. The authors specifically participated in the seven basic expression classification sub-challenge.

They also mention using data from AffectNet and RAF-DB to address class imbalance issues in the training set.

Key Insights and Ideas

  • Information Loss is Detrimental: The paper strongly emphasizes that dimensionality reduction during attention map generation can lead to significant information loss, negatively impacting recognition accuracy. This is a key motivation for their "lossless" approach.
  • Cross-Layer Context is Crucial: Reusing features from previous layers is not just about preserving information but also about enriching the context for attention map generation. This allows the model to understand how features evolve and interact across different levels of abstraction.
  • Class Imbalance is a Major Hurdle: The Aff-Wild2 dataset exhibits significant class imbalance, which can heavily bias models towards majority classes. The authors' efforts in class balancing and data augmentation are critical for achieving good performance.
  • Neutral Expression Confusion: The analysis of the confusion matrix reveals a common misclassification of weak expressions as "Neutral." This is attributed to the gradual nature of expression changes and the model learning only weak features for neutral expressions, making them indistinguishable from weak expressions of other categories.

Key Results

The proposed LLA-Net, when evaluated on the Aff-Wild2 validation set for the seven basic expression classification task, achieved:

  • Total Accuracy: 0.49
  • Unweighted Mean F1-Score: 0.38
  • Final Result (weighted combination): 0.42 (0.67 F1-Score + 0.33 Accuracy)

This result was 0.07 higher than the baseline result of 0.36. The paper also provides per-expression class accuracies in Table III, showing varying performance across different emotions.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that the confusion matrix shows a tendency for weak expressions to be misclassified as "Neutral." This is a persistent challenge in FER.
  • While the LLAM is designed to be lossless, the inherent limitations of CNNs in capturing extremely subtle nuances might still exist.
  • Future Work:
    • The authors plan to apply their attention module to other CNN architectures.
  • They intend to conduct experiments on additional datasets to further validate the generalizability of their approach.
  • Continuous optimization of the LLAM is also a stated goal.

Summary updated

Abstract

Unlike the constraint frontal face condition, faces in the wild have various unconstrained interference factors, such as complex illumination, changing perspective and various occlusions. Facial expressions recognition (FER) in the wild is a challenging task and existing methods can't perform well. However, for occluded faces (containing occlusion caused by other objects and self-occlusion caused by head posture changes), the attention mechanism has the ability to focus on the non-occluded regions automatically. In this paper, we propose a Lossless Attention Model (LLAM) for convolutional neural networks (CNN) to extract attention-aware features from faces. Our module avoids decay information in the process of generating attention maps by using the information of the previous layer and not reducing the dimensionality. Sequentially, we adaptively refine the feature responses by fusing the attention map with the feature map. We participate in the seven basic expression classification sub-challenges of FG-2020 Affective Behavior Analysis in-the-wild Challenge. And we validate our method on the Aff-Wild2 datasets released by the Challenge. The total accuracy (Accuracy) and the unweighted mean (F1) of our method on the validation set are 0.49 and 0.38 respectively, and the final result is 0.42 (0.67 F1-Score + 0.33 Accuracy).
BibTeX
@misc{wang2020lossless,
  author = {Chuang Wang and Ruimin Hu and Min Hu and Jiang Liu and Ting Ren and Shan He and Ming Jiang and Jing Miao},
  title = {{Lossless Attention in Convolutional Networks for Facial Expression Recognition in the Wild}},
  year = {2020},
  eprint = {2001.11869},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.11869},
}
Figure