Learning to Attract and Repel: Dual Quality Margin Learning for Face Recognition (DQM-Face)
Abstract
Face recognition in unconstrained environments remains high-ly challenging due to diverse and extreme variations encountered inreal-world scenarios. To mitigate these effects, existing margin-basedapproaches 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 rep-resentations. In this paper, we propose Dual Quality Margin Learning forFace Recognition (DQM-Face), a novel framework that enables refinedattraction and repulsion dynamics during representation learning. Ourapproach unifies conventional magnitude-based quality estimation witha newly introduced semantic quality learning mechanism, realized viasqueeze-and-excitation semantic attention. By jointly leveraging magni-tude and semantic cues, we construct enhanced quality-aware marginsthat adaptively strengthen intra-class compactness through improvedattraction during learning. To further enhance inter-class discrimina-tion, we introduce a repulsion margin formulation that explicitly en-larges inter-class separation. The unified integration of semantic qualitymodeling with dual attraction–repulsion margin optimization results ina more structured and discriminative feature geometry. Extensive ex-periments 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 ishighly effective for face image quality assessment within the proposedframework, demonstrating that the learned quality signal is intrinsicallyaligned with the recognition objective. The code is publicly available:https://github.com/RAIB-group/DQM-Face