TL;DR
CLIPER is a new framework that brings the power of vision-language pre-training (like CLIP) to the world of facial expression recognition (FER). By moving away from simple "one-hot" labels and instead learning multiple, fine-grained text descriptors for every emotion, CLIPER achieves state-of-the-art performance on both static images and video sequences.
What Problem Does This Paper Address?
Recognizing facial expressions "in the wild"—outside of controlled lab settings—is notoriously difficult due to varying lighting, head poses, and occlusions. Traditionally, researchers have treated this as a simple classification problem: an image is labeled as "Happy," "Sad," or "Angry."
However, human emotions are compound and variable. "Happiness" can look like a subtle smile or a boisterous laugh. Traditional "one-hot" labels (where a category is just a 1 or 0) lack the semantic richness to describe these variations. While models like CLIP have revolutionized computer vision by using text descriptions as supervision, they struggle with FER because emotions are abstract. A standard prompt like "a photo of a {happy} face" is often too generic to capture the nuanced textures of a specific facial expression.
Methods
The authors introduce CLIPER, which stands for CLIP-based facial Expression Recognition. The core innovation is a module called Multiple Expression Text Descriptors (METD).
Instead of using a single hand-crafted prompt for each emotion, CLIPER learns $K$ different "learnable" text descriptors for every category. This allows the model to capture different "sub-classes" of an emotion (e.g., different intensities of a smile) without requiring a human to manually write them.
The training follows a two-stage paradigm:
- Stage 1: Learning Descriptors. The image and text encoders are frozen. The model learns the METD tokens by maximizing the similarity between images and their closest corresponding text descriptors in the CLIP embedding space. They use a custom "fine-grained cross-entropy loss" and a "margin loss" to ensure different emotion categories stay distinct.
- Stage 2: Fine-tuning the Image Encoder. With the text descriptors now fixed, the authors fine-tune the image encoder. This forces the vision model to move beyond general "face" features and focus on the specific textures and muscle movements related to expressions.
For videos (Dynamic FER), the model uses a simple temporal average pooling of frame features, proving that the performance gains come from the semantic alignment rather than complex temporal architectures.
Datasets
The authors evaluated CLIPER on five major "in-the-wild" benchmarks:
- Static (SFER): RAF-DB (nearly 30k images) and AffectNet (the largest SFER dataset with over 400k annotated images).
- Dynamic (DFER): DFEW (16k+ movie clips), AFEW, and FERV39K (the largest DFER dataset with 38k+ sequences across 22 scenarios).
Key Insights and Ideas
- Emotions as Compound Concepts: The paper highlights that CLIP already "knows" a lot about emotions. For example, CLIP associates "angry" with concepts like "evil" or "serious." METD taps into this latent knowledge.
- Text as a Better Teacher: The results show that guiding the image encoder with rich text descriptors is significantly more effective than just adding a standard linear classification layer (a "linear probe") to the end of a vision model.
- Interpretability: By looking at the "nearest neighbors" in the vocabulary for the learned tokens, the authors found the model actually learns relevant words. For "Happy," it learned tokens close to "kindness" and "hopeful"; for "Surprise," it associated tokens with "possibly" and even "zombies" (likely due to the exaggerated facial expressions in such content).
- Sub-class Discovery: Visualizations show that METD naturally clusters expressions by intensity or age, effectively discovering fine-grained categories of emotion on its own.
Key Results
CLIPER achieved State-of-the-Art (SOTA) results across the board:
- RAF-DB: Reached 91.61% accuracy, outperforming previous heavyweights like TransFER.
- AffectNet: Achieved 66.29% (7-class), a new benchmark for the dataset.
- FERV39K: On the largest video dataset, it hit 51.34% (WAR), a significant jump over the previous best of 48.54%.
- Zero-shot vs. Fine-tuned: While standard zero-shot CLIP performs poorly on FER (around 40% on RAF-DB), the CLIPER framework's two-stage tuning nearly doubles that performance.
Limitations and Future Work
The authors acknowledge that for the dynamic (video) task, they used the "most naive" method of temporal aggregation: simple mean pooling. While this was intentional to show the strength of their vision-language alignment, it means the model isn't explicitly modeling the evolution of an expression over time (e.g., the onset and offset of a smile).
Future work could involve integrating more sophisticated temporal modules (like Transformers or LSTMs) into the CLIPER framework to better capture the "flow" of human emotion in video.
Summary updated