Manuscript Offprint

arXiv:2609.02644

Learning to Attract and Repel: Dual Quality Margin Learning for Face Recognition (DQM-Face)

El Ouanas Belabbaci, Bhavesh Wani, Philipp Terhörst

El Ouanas Belabbaci¹, Bhavesh Wani², and Philipp Terhörst²

¹ Laboratoire d'Ingénierie des Systèmes Intelligents et Communicants (LISIC), Faculty of Electrical Engineering, University of Sciences and Technology Houari Boumediene (USTHB), Algiers, Algeria

² Johannes Gutenberg University Mainz, Germany

Abstract. Face recognition in unconstrained environments remains highly challenging due to diverse and extreme variations encountered in real-world scenarios. To mitigate these effects, existing margin-based approaches model sample quality through feature magnitude. However, magnitude-based modeling alone is susceptible to identity-agnostic noise, which can degrade the reliability and discriminative power of learned representations. In this paper, we propose Dual Quality Margin Learning for Face Recognition (DQM-Face), a novel framework that enables refined attraction and repulsion dynamics during representation learning. Our approach unifies conventional magnitude-based quality estimation with a newly introduced semantic quality learning mechanism, realized via squeeze-and-excitation semantic attention. By jointly leveraging magnitude and semantic cues, we construct enhanced quality-aware margins that adaptively strengthen intra-class compactness through improved attraction during learning. To further enhance inter-class discrimination, we introduce a repulsion margin formulation that explicitly enlarges inter-class separation. The unified integration of semantic quality modeling with dual attraction-repulsion margin optimization results in a more structured and discriminative feature geometry. Extensive experiments on multiple challenging benchmarks demonstrate that DQM-Face consistently outperforms state-of-the-art face recognition methods. Moreover, we show that the quality learned for margin optimization is highly effective for face image quality assessment within the proposed framework, demonstrating that the learned quality signal is intrinsically aligned with the recognition objective. The code is publicly available: https://github.com/RAIB-group/DQM-Face

Keywords: Face Recognition, Face Image Quality Assessment, Quality-Aware Face Recognition

1 Introduction

Face recognition (FR) remains one of the most widely deployed biometric technologies due to the collectability, universality, and high discriminative potential

Belabbaci et al.

of the facial trait [1]. With the proliferation of applications in security, surveillance, and authentication, these systems are increasingly used in unconstrained real-world scenarios [44]. In such environments, recognition robustness is frequently challenged by extreme variations, such as in pose, illumination, occlusion, expression, or age, often resulting in degraded representations and a higher likelihood of false matches.

To analyze and mitigate the effects of these variations, face image quality assessment (FIQA) has emerged as a key research direction. FIQA methods aim to estimate the utility of a face image for recognition, enabling systems to quantify image reliability and improve matching performance by rejecting low-quality samples. Parallel research in representation learning has focused on developing margin-based loss functions [8,29,43], which improve feature discriminability by enforcing intra-class compactness and inter-class separation. More recently, approaches that integrate quality information directly into training objectives [22,31,39] have shown promising advances, allowing networks to adapt decision making and learning behavior based on sample difficulty. However, current quality-aware margin formulations predominantly rely on feature magnitude as a proxy for image quality. While effective to some extent, magnitude-based estimation remains identity-agnostic: factors such as blur, occlusion, or illumination can artificially inflate embedding norms, leading to inaccurate quality predictions. Furthermore, existing methods primarily focus on intra-class compactness without explicitly enforcing inter-class repulsion, leaving a residual risk of feature overlap across identities in challenging conditions [28,38].

To address these limitations, we propose Dual Quality Margin Learning for Face Recognition (DQM-Face), a unified framework that incorporates dual quality modeling and dual margin optimization. Our method combines conventional magnitude-based quality estimation with a novel semantic quality branch implemented via squeeze-and-excitation attention. This dual formulation enables identity-aware, context-dependent quality assessment that better reflects the true recognizability of each sample. Based on these quality cues, DQM-Face introduces a dual-margin optimization mechanism that adaptively scales the target (attractive) margin according to sample quality while simultaneously applying an explicit inter-class repulsion margin. This synergy ensures compact clustering of high-quality samples while maintaining sufficient angular separation between different identities.

Extensive experiments on both image-based and video-based benchmarks demonstrate that DQM-Face consistently achieves state-of-the-art performance. The proposed approach delivers robust recognition under severe variations in pose, illumination, and image quality, ranking first or second across all major protocols, including LFW, CFP-FP, AgeDB-30, CPLFW, IJB-B, and IJB-C.

In summary, the main contributions of this work are as follows: (1) We propose a unified Dual Quality Margin Learning (DQM-Face) framework that integrates sample quality modeling and margin-based optimization for more robust face representation learning. (2) We introduce a dual quality modeling mechanism that fuses magnitude-based and semantic attention-based quality cues, produc-ing more reliable and identity-sensitive quality estimates. These prove to be highly effective for face image quality assessment within the proposed framework and face recognition in general. (3) We design a dual-margin optimization strategy combining an adaptive attraction margin and a curriculum-based repulsion margin to enhance both intra-class compactness and inter-class separability. (4) We achieve consistent state-of-the-art results across multiple challenging benchmarks, validating the effectiveness and generalization ability of the proposed approach.

References (44)