CoReFace: Sample-guided Contrastive Regularization for Deep Face Recognition

Youzhe Song, Feng Wang

TL;DR

This paper introduces CoReFace, a novel approach to deep face recognition that bridges the gap between training and evaluation by using sample-guided contrastive learning. By focusing on image-image relationships during training, CoReFace improves the robustness and accuracy of face recognition systems, especially in open-set scenarios.

What Problem Does This Paper Address?

Deep face recognition (FR) systems are evaluated on their ability to distinguish between known and unknown identities (open-set FR). While training typically relies on labeled identities to train a classifier, the evaluation phase often discards this classifier, focusing solely on feature similarity. This creates an inconsistency: the training process optimizes for identity-specific classification, while evaluation relies on image-image similarity. This disconnect can lead to suboptimal feature representations that don't generalize well to unseen identities. Existing methods often struggle to reconcile these two phases, either by ignoring the image-image relationship or by introducing conflicts when combining contrastive learning with classification losses.

Methods

CoReFace tackles this problem by introducing a contrastive regularization approach that aligns the training objective with the evaluation goal. Key innovations include:

  • Feature Augmentation: To avoid the degradation of image quality often caused by traditional data augmentation techniques (like cropping or color jittering) in fine-grained tasks like FR, CoReFace augments features instead of images. This is achieved by passing the backbone's output through dropout layers with distinct masks, creating augmented feature representations for positive pair construction.
  • CoReFace Loss Function: This novel loss function combines two key components:
  • Adaptive Margin: Inspired by margin-based classification methods, an adaptive margin is incorporated to enlarge the similarity of positive pairs and the dissimilarity of negative pairs. This margin dynamically adjusts during training, ensuring effective supervision and steady loss values.
  • Supervised Contrastive Mask (SCM): To prevent conflicts between the contrastive loss and the classification loss, SCM uses identity labels to mask out samples from the same class in the negative pair pool. This allows the classification loss to leverage identity information while the contrastive loss focuses on identity-free image-image relationships.
  • Pair-Coupling Protocol for SRS Problem: The authors identify a "Semantically Repetitive Signal" (SRS) problem where certain negative pairs are repeatedly emphasized, leading to distorted feature distributions. To address this, they propose a "Single-way N Protocol" that reduces symmetry in pair composition, mitigating the redundant emphasis on specific negative pairs.

Datasets

  • Training: MS1MV2 (approx. 5.8M face images of 85K individuals).
  • Evaluation: LFW, AgeDB, CFP-FP, CPLFW, IJB-B, IJB-C, and MegaFace.

Key Insights and Ideas

  • Training-Evaluation Consistency is Crucial: The core insight is that aligning the training objective (identity-based) with the evaluation objective (image-image similarity) is paramount for robust open-set face recognition.
  • Feature Augmentation is Key for FR: Traditional data augmentation can harm the fine-grained details required for face recognition. Augmenting features instead of images offers a way to create diverse representations without sacrificing image quality.
  • Contrastive Learning as Regularization: CoReFace demonstrates that contrastive learning, when properly integrated, can act as a powerful regularizer to guide feature learning towards a more discriminative and generalizable representation space.
  • Avoiding Supervision Conflicts: The SCM is a clever way to allow both classification and contrastive losses to coexist and contribute effectively without interfering with each other.
  • Symmetry in Pair Sampling Matters: The SRS problem highlights that how negative pairs are constructed can significantly impact the learning process, and reducing symmetry can lead to more stable and effective training.

Key Results

  • State-of-the-Art Performance: CoReFace achieves competitive or superior performance across multiple standard benchmarks (LFW, AgeDB, CFP-FP, CPLFW, IJB-B, IJB-C, MegaFace) compared to existing state-of-the-art methods.
  • On LFW, CFP-FP, AgeDB, and CPLFW, CoReFace shows remarkable improvements over the baseline ArcFace.
  • On IJB-B and IJB-C, CoReFace achieves the highest TARs for several FARs, demonstrating robustness in challenging verification scenarios.
  • On MegaFace, CoReFace achieves competitive identification accuracy and outperforms other methods in verification.
  • Efficiency: The proposed framework adds only a negligible overhead in terms of training time (e.g., 3.3% for R100 backbone) compared to standard classification methods, making it practical for real-world applications.
  • Visualizations: Angle distribution plots show that CoReFace creates a clearer separation between positive and negative pairs compared to ArcFace, indicating improved feature distribution.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while the SCM helps avoid conflicts, some supervision conflicts might still arise due to the stochastic nature of training.
  • The SRS problem is identified in the context of limited negative samples and normal batch sizes, suggesting that very large batch sizes or specific sampling strategies might mitigate it differently.
  • Future Work: The paper suggests that the concise framework of CoReFace can be easily applied to existing FR methods, implying potential for further integration and exploration with other architectures and techniques. The authors' focus on addressing the training-evaluation gap opens avenues for research into more robust and generalizable FR systems.

Summary updated

BibTeX
@inproceedings{song2024coreface,
  author = {Youzhe Song and Feng Wang},
  title = {{CoReFace: Sample-guided Contrastive Regularization for Deep Face Recognition}},
  booktitle = {Pattern},
  year = {2024},
  doi = {10.1016/j.patcog.2024.110483},
}
Figure