TL;DR
TG-DFER is a novel text-guided weakly supervised framework that tackles the "many-to-one" labeling challenge in dynamic facial expression recognition (where an entire video clip shares a single emotion label). By combining a multi-grained temporal network with a dynamic visual prompt mechanism, it leverages fine-grained text descriptions to pinpoint emotionally salient frames while filtering out irrelevant or ambiguous ones. The framework sets a new state-of-the-art on major in-the-wild benchmarks while providing clear, frame-level interpretability.
What Problem Does This Paper Address?
Recognizing emotions from video clips—known as Dynamic Facial Expression Recognition (DFER)—is crucial for applications like human-computer interaction, healthcare assessments, and driver assistance systems. Unlike static images, video allows models to capture subtle, shifting facial movements over time.
However, training these models is bottlenecked by a many-to-one labeling problem. Annotating videos frame-by-frame is prohibitively expensive, so datasets typically provide only a single, coarse label (e.g., "Happy") for an entire video clip. While Multiple Instance Learning (MIL) is often used to treat videos as a "bag" of frame "instances," standard MIL approaches struggle with the immense visual diversity of human expressions and complex temporal dynamics. Ambiguous frames or sudden head movements easily pollute the feature space, leading to fragmented emotional modeling and lower accuracy.
Methods
The authors propose TG-DFER (Text-Guided DFER), a weakly supervised framework that injects semantic text priors into a vision-language model architecture to guide frame-level emotion localization.
The architecture consists of three core components:
- Multi-Grained Temporal Network: To preserve temporal coherence, this network processes video features at two scales simultaneously. A fine-grained module uses a transformer encoder operating over short, overlapping temporal windows to capture rapid, local muscle movements. Concurrently, a coarse-grained module models long-range emotional flow across the entire video sequence.
- Learnable Text Prompts: Instead of relying on simple categorical labels, the framework uses detailed, motion-based descriptions generated by Large Language Models (e.g., "a smiling mouth, widened eyes" for happiness) combined with learnable context tokens to maximize the discriminative power of a frozen CLIP text encoder.
- Visual Prompt Module: Rather than treating text guidance as a static target, this module introduces a bi-directional feedback loop. It measures the similarity between frame-level visual features and fine-grained text features to compute an alignment score. It then generates a "visual prompt" (a weighted sum of the most relevant frames) and fuses it back into the textual features, dynamically tailoring the semantic guidance to the specific visual context of the video.
Datasets
The framework was evaluated on two prominent, large-scale "in-the-wild" DFER datasets:
- DFEW: Contains over 16,000 video clips extracted from global movies, featuring real-world challenges like extreme illumination, occlusions, and varied head poses. It is annotated with seven basic emotions and evaluated using 5-fold cross-validation.
- FERV39k: The largest dataset of its kind, containing 38,935 video clips across 4 broad scenarios and 22 detailed contexts (e.g., daily life, speech, war), making it highly challenging due to its complex backgrounds and cross-domain nature.
Key Insights and Ideas
- Dynamic, Bi-Directional Alignment: Previous vision-language approaches used text descriptions as static targets. TG-DFER's breakthrough is updating the text embeddings dynamically using the video's actual visual content. This accounts for the massive visual diversity within a single emotion category.
- Shallow Networks Excel for Sparse Cues: Surprisingly, ablation studies revealed that deeper temporal networks degraded performance. Because key emotional cues are often concentrated in short, decisive moments, deep networks overfit to sparse data and overemphasize global context at the expense of critical local nuances. A shallow network (depth of 1 or 2 layers) proved optimal.
- Disentangling Ambiguity: The model demonstrated exceptional robustness on the "Neutral" expression. Neutral frames often share visual traits with subtle active emotions, but TG-DFER successfully learned features that cleanly disentangled neutral states from active expressions.
Key Results
TG-DFER achieved state-of-the-art results on both benchmarks, evaluated using Unweighted Average Recall (UAR) and Weighted Average Recall (WAR):
- DFEW Benchmark: Achieved a UAR of 60.17% and a WAR of 71.62%, outperforming the previous best text-prompting method (DFER-CLIP) and significantly surpassing standard MIL baselines like M3DFEL by 4.07% in UAR.
- FERV39k Benchmark: Reached a UAR of 41.50% and a WAR of 51.67%, establishing a new performance ceiling on this highly complex dataset.
Qualitative attention maps confirmed that the model successfully assigns high weights to frames where the target expression peaks, while effectively suppressing noisy or irrelevant frames (such as when an actor turns away from the camera).
Limitations and Future Work
Despite its strong performance, the authors note a few remaining hurdles:
- Severe Data Imbalance: The framework still struggles with heavily underrepresented emotions in the datasets, such as Disgust (which makes up just 1.22% of DFEW) and Fear.
- Context Overfitting: There is a risk of the model overfitting to specific dataset environments or individual facial variations.
- Environmental Occlusions: Extreme lighting variations and physical occlusions in real-world settings continue to degrade feature extraction quality.
Future work will explore data augmentation strategies, synthetic data generation to balance emotion classes, and the integration of additional modalities (like audio) to further stabilize recognition.
Summary updated