Introduction
Facial Expression Recognition (FER) remains a significant challenge in computer vision due to the dominance of "identity bias." In many feature spaces, the visual differences between two individuals making the same expression can be greater than the differences between the same individual making two different expressions. Deep metric learning, particularly triplet loss, is frequently employed to mitigate this by ensuring that an "anchor" image is closer to a "positive" (same expression) than a "negative" (different expression) by a margin $\tau$.
However, standard triplet loss suffers from two primary limitations: the difficulty of selecting an optimal global margin $\tau$ and the potential for "incomplete judgments," where training stabilizes even when negative examples remain too close to positive clusters.
Proposed Method: Mul-DML
To address these issues, this paper introduces a Multi-threshold Deep Metric Learning (Mul-DML) framework. The architecture utilizes a ResNet-18 backbone followed by a specialized Metric Learning Block (MLB).
1. Multi-threshold Embedding Slices
Rather than optimizing for a single, elusive "Goldilocks" threshold, the authors partition the final embedding layer into $N$ non-overlapping slices. Each slice is trained using a distinct threshold $\tau$ sampled from a range (e.g., 0.15 to 0.75). This approach allows the model to capture inter-class variations at multiple granularities simultaneously, creating a more robust and discriminative feature representation.
2. Dual Triplet Loss
To resolve the "incomplete judgment" problem—where a negative example might satisfy the anchor-based constraint while remaining dangerously close to the positive example—the authors propose a Dual Triplet Loss. This modified objective function includes an additional term that explicitly considers the distance between the positive and negative examples, breaking the cycle of training instabilities and leading to faster convergence.
Experimental Results
The Mul-DML approach was evaluated on both lab-controlled and real-world datasets, achieving state-of-the-art (SOTA) performance across the board:
- CK+ & MMI: Achieved 98.49% and 81.57% accuracy, respectively, setting new benchmarks for lab-controlled environments.
- RAF-DB: On this large-scale real-world dataset, the model reached 87.58% accuracy.
- SFEW 2.0: In highly variable "in-the-wild" movie scenes, the model achieved a competitive 60.09% accuracy.
Conclusion
By moving away from the search for a single optimal threshold and instead leveraging a multi-threshold slicing strategy, the proposed Mul-DML framework significantly improves the discriminative power of facial expression embeddings. The addition of Dual Triplet Loss further stabilizes training, making this a robust solution for both controlled and real-world FER tasks. Future work will explore integrating these techniques with label-uncertainty learning to further improve performance on noisy, real-world data.
Summary updated