Abstract
Current facial expression recognition (FER) models often struggle when applied to new, unseen datasets due to significant "domain gaps." This paper introduces CAFE (Cognition of humAn for Facial Expression), a novel pipeline designed for zero-shot generalization. By leveraging fixed, generalizable features from CLIP and learning specialized "expression masks," CAFE achieves superior performance on unseen datasets without requiring any target-domain data during training.
The Challenge: The Brittleness of Facial Expression Recognition
Facial Expression Recognition (FER) is a critical component of human-computer interaction, yet it suffers from a major "brittleness" problem. A state-of-the-art model trained on a specific dataset—for example, lab-collected images with controlled lighting—often fails when deployed on real-world, "in-the-wild" images. This discrepancy is known as a domain gap.
While traditional "Domain Adaptation" techniques can bridge this gap, they typically require access to samples from the target domain during the training phase. In many real-world scenarios, this data is unavailable. The goal is zero-shot generalization: training a model on one source and having it perform reliably on any unseen dataset immediately. The authors posit that standard models overfit to domain-specific features (like background or lighting) instead of focusing on the universal mechanics of human expressions.
The CAFE Framework: Mimicking Human Cognition
The authors propose CAFE, a framework inspired by the human cognitive process of first identifying a face and then selectively filtering for expression-related cues.
1. Fixed Feature Extraction
Instead of training a feature extractor from scratch, CAFE utilizes a fixed CLIP (ViT-B/32) model. CLIP, having been trained on millions of diverse internet images, possesses highly generalizable features. By "freezing" these weights, the model is prevented from distorting its feature space to overfit the specific quirks of the training dataset.
2. Sigmoid Mask Learning
The core of CAFE is a lightweight module (e.g., ResNet-18) trained to generate sigmoid masks. These masks act as a dynamic filter, multiplying with the fixed CLIP features to "select" only the channels relevant to facial expressions while suppressing irrelevant noise.
3. Channel Separation & Max Pooling
To further combat overfitting, CAFE avoids standard Fully Connected (FC) layers, which are often "too strong" and prone to memorizing training data patterns. Instead, the framework splits feature channels into seven distinct groups—one for each basic emotion (Happy, Sad, Angry, etc.). Max-pooling is applied to these groups to generate classification scores directly, forcing the model to learn semantically meaningful channel groupings.
4. Channel-Diverse Loss
A specific loss function ($l_{div}$) is introduced to ensure that the masks for different expressions remain distinct. This prevents the model from relying on the same set of features to describe different emotions, enhancing the discriminative power of the masks.
Experimental Evaluation
The researchers evaluated CAFE across five major FER benchmarks to test its cross-dataset robustness:
- RAF-DB: Real-world Affective Faces Database (primary training source).
- FERPlus: A refined version of FER2013 with cleaner labels.
- AffectNet: A massive, noisy dataset representing real-world challenges.
- SFEW2.0: Static Facial Expressions in the Wild.
- MMA: A large-scale dataset featuring diverse ethnic representations.
The primary experiment involved training CAFE on a single dataset (e.g., RAF-DB) and testing it on the others without any further tuning.
Key Results and Insights
CAFE consistently outperformed existing state-of-the-art methods like EAC and SCN by significant margins on unseen test sets.
- Superior Generalization: When trained on RAF-DB, CAFE achieved a mean accuracy of 63.48% across all target datasets, compared to the previous best of 54.88% (RUL).
- Significant Gains: On the FERPlus dataset, CAFE improved accuracy from approximately 58% to 73.16%.
- The "Frozen" Advantage: A key insight is that not training the backbone is essential. Keeping CLIP fixed forces the model to learn how to identify expressions within a robust, pre-existing feature space.
- Structural Constraints: Replacing FC layers with hard-coded channel separation prevents the model from finding complex, non-generalizable patterns in the training data.
Limitations and Future Outlook
While CAFE represents a significant step forward, challenges remain. Performance on AffectNet is lower than on other datasets, likely due to high label noise. Additionally, using a large model like CLIP as a fixed extractor may be computationally expensive for edge devices. Future work may focus on model distillation to bring CAFE's generalizability to more efficient architectures.
Summary updated