MAE-DFER: Efficient Masked Autoencoder for Self-supervised Dynamic Facial Expression Recognition

Licai Sun, Zheng Lian, Bin Liu, Jianhua Tao · DOI

Abstract

Dynamic Facial Expression Recognition (DFER) is a critical component of empathetic AI, yet it suffers from a chronic shortage of labeled data. High-capacity models like Transformers often overfit when trained on the small datasets typical of this field. This paper introduces MAE-DFER, a self-supervised framework that utilizes over a million unlabeled facial videos for pre-training. By employing a novel LGI-Former architecture and a joint appearance-motion reconstruction task, MAE-DFER achieves state-of-the-art accuracy while significantly reducing computational overhead.

The Challenge of Data Scarcity in DFER

Identifying emotions in video sequences requires models to understand both static facial features and subtle temporal dynamics. However, while general computer vision datasets contain millions of samples, DFER datasets are often limited to approximately 10,000 labeled clips. This "data desert" makes training standard high-capacity models difficult, leading to poor generalization.

Furthermore, existing self-supervised methods like VideoMAE are computationally expensive due to their reliance on global space-time attention. They also frequently overlook the temporal motion cues—such as the specific way a mouth curves during a smile—that are essential for accurate expression recognition.

Comparison of supervised learning, VideoMAE, and the proposed MAE-DFER framework highlighting the shift toward data-efficient, motion-aware self-supervision.

The MAE-DFER Framework

MAE-DFER adopts a Masked Autoencoder (MAE) strategy: it masks a large portion of an input video and tasks the model with reconstructing the missing content. The framework introduces two major innovations to address the limitations of previous models:

1. LGI-Former: Efficient Spatiotemporal Modeling

The Local-Global Interaction Transformer (LGI-Former) replaces standard, computationally heavy global attention with a three-stage process designed for efficiency without sacrificing context:

  • S1: Local Intra-Region Attention: The model first processes small spatiotemporal "cubes" of the video to capture local details.
  • S2: Global Inter-Region Attention: It uses a small set of "representative tokens" to summarize each local region, allowing for global information exchange at a fraction of the cost.
  • S3: Local-Global Interaction: Original local tokens interact with these global representative tokens to integrate broader context into local representations.
Detailed architecture of the LGI-Former, illustrating the three-stage attention mechanism (S1, S2, and S3) for efficient local-global interaction.

2. Joint Appearance and Motion Reconstruction

Standard MAEs typically focus on reconstructing original pixels (appearance). MAE-DFER goes further by simultaneously predicting frame differences. This dual-task approach forces the encoder to explicitly learn facial dynamics and temporal changes, which are vital for distinguishing between similar expressions.

Experimental Evaluation

The model was pre-trained on VoxCeleb2, a massive dataset of over 1 million unlabeled facial video clips. It was then fine-tuned and evaluated on six diverse datasets, including large-scale "in-the-wild" datasets (DFEW, FERV39k, MAFW) and lab-controlled environments (CREMA-D, RAVDESS, eNTERFACE05).

Key Results

  • State-of-the-Art Performance: MAE-DFER significantly outperformed previous supervised methods, achieving a +6.30% UAR (Unweighted Average Recall) improvement on the DFEW dataset and +8.34% UAR on MAFW.
  • Efficiency Gains: By utilizing the LGI-Former, the model reduced computational costs (FLOPs) by approximately 38% compared to standard VideoMAE architectures using a ViT-Base backbone.
  • Motion Sensitivity: Ablation studies confirmed that a balanced approach (roughly 50/50) between appearance and motion reconstruction yielded the highest accuracy, proving that temporal dynamics are a "first-class citizen" in facial expression recognition.
  • Domain Advantage: Pre-training on face-specific data (VoxCeleb2) proved far more effective than pre-training on general human actions (Kinetics-400), emphasizing the need for specialized representations in DFER.

Conclusion and Future Work

MAE-DFER demonstrates that self-supervised pre-training on massive unlabeled datasets can effectively solve the data scarcity problem in facial expression recognition. The LGI-Former architecture provides a blueprint for efficient video processing that maintains high accuracy. Future research will explore scaling this architecture to even larger datasets and extending the framework to granular tasks like micro-expression recognition and multimodal (audio-visual) emotion detection.

Summary updated

BibTeX
@inproceedings{sun2023mae,
  author = {Licai Sun and Zheng Lian and Bin Liu and Jianhua Tao},
  title = {{MAE-DFER: Efficient Masked Autoencoder for Self-supervised Dynamic Facial Expression Recognition}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3612365},
}
Figure