Research
Learning to Attract and Repel: Dual Quality Margin Learning for Face Recognition (DQM-Face)
Overview Research area: Computer vision — face recognition (FR) and face image quality assessment (FIQA), with a focus on margin-based deep metric learning. Technical level: Intermediate. The paper bu
- arXiv
- 2609.02644
- Published
- 2026-09-02
- Authors
- El Ouanas Belabbaci, Bhavesh Wani, Philipp Terhörst
AI summary
Overview
Research area: Computer vision — face recognition (FR) and face image quality assessment (FIQA), with a focus on margin-based deep metric learning.
Technical level: Intermediate. The paper builds directly on well-known losses (ArcFace, CosFace, MagFace) and assumes familiarity with embedding spaces, angular margins, and attention modules, but the core ideas are explainable without deep mathematical background.
Scope: The paper introduces DQM-Face, a training objective that fuses magnitude-based and semantic quality estimates to drive an adaptive attraction margin, and pairs it with a curriculum-scheduled repulsion margin that explicitly widens the gap between identities.
What This Paper Is About
Face recognition systems struggle when images are blurry, occluded, poorly lit, or captured at extreme poses and ages. Many existing methods estimate a sample's "quality" using the length (magnitude) of its feature vector, but that proxy is fragile: blur and occlusion can actually inflate the magnitude, causing the model to trust images that carry no identity information. The goal of this paper is to build a quality signal that is identity-aware rather than purely geometric, and to use it to shape the embedding space from both sides — pulling each sample toward its own identity and pushing it away from competing identities.
Key Contributions
-
A unified quality-aware framework (DQM-Face) that integrates sample quality modeling directly into the margin-based learning objective rather than treating quality as an external post-processing filter.
-
Dual quality modeling that combines conventional magnitude-based quality with a new semantic quality branch built on a squeeze-and-excitation attention mechanism, producing identity-sensitive quality scores that resist identity-agnostic noise.
-
Dual-margin optimization, consisting of an adaptive attraction margin
m1(q)scaled by the fused quality score and an explicit, curriculum-scheduled inter-class repulsion marginm2that enlarges angular clearance between identities. -
State-of-the-art or second-best results across image and video benchmarks (LFW, CFP-FP, AgeDB-30, CPLFW, IJB-B, IJB-C), plus evidence that the quality learned for margin optimization is itself a strong face image quality estimator.
Main Findings
-
Image benchmarks improve modestly but consistently. DQM-Face (α=0.5) reaches 99.83% on LFW, 98.83% on CFP-FP, 98.35% on AgeDB-30, and 93.30% on CPLFW, for a 97.58% average — the best average among all compared methods, including ArcFace, MagFace, AdaFace, ElasticFace, and QMagFace. The authors note these benchmarks are small enough that differences are close to noise.
-
Large-scale video benchmarks show clearer gains. On IJB-B, DQM-Face (α=0.4) achieves 96.71 / 95.38 / 91.35 TAR at FAR 10⁻³ / 10⁻⁴ / 10⁻⁵, and on IJB-C 97.65 / 96.58 / 94.83 — top or near-top against MagFace, QMagFace, CoReFace, ElasticFace, and SCF-ArcFace.
-
The learned quality signal doubles as a strong FIQA method. Using DQM-Face embeddings, its quality score achieves the best pAUC on LFW (0.0061), Adience (0.0404), and CPLFW (0.0220) against nine state-of-the-art FIQA methods. A semantic-only variant (α=1) achieves the best XQLFW result (0.1346), indicating semantic quality specifically helps under severe degradation.
-
Fusing both quality cues beats either alone. An ablation over α from 0 to 1 shows peak recognition accuracy at α=0.5, with performance degrading toward both pure-magnitude and pure-semantic extremes — supporting the claim that the two cues are complementary.
-
The repulsion margin needs careful scheduling. Fixed m2=0.2 causes catastrophic collapse (CFP-FP drops to 85.96%, IJB-B at FAR 10⁻⁵ to 76.69%). The proposed three-stage curriculum (0.05 → 0.10 → 0.15 at epochs 1–10, 11–18, 19–25) outperforms no repulsion, fixed values, and linear/cosine schedules.
-
Attention maps are better localized with fusion. Grad-CAM visualizations show magnitude-only attention drifting toward background and facial boundaries, semantic-only attention focusing on eyes/nose/mouth, and the fused model producing the most stable and identity-relevant activations.
-
Cost is negligible. The squeeze-and-excitation branch adds roughly 0.099M parameters (+0.15%) and under 0.0001 GFLOPs on top of a 12.149 GFLOPs, 65.156M-parameter iResNet-100 backbone. The repulsion margin adds no inference cost, and quality is read directly from extracted features.
Methodology in Plain English
Start from the standard margin-based softmax loss used by ArcFace, where training samples are compared to identity "class centers" by angle, and a fixed margin m makes the task harder so clusters become tighter.
The authors change two things.
First, they replace the fixed target margin with a quality-scaled one. Quality comes from two sources. The first is the length of the feature vector, normalized into a 0–1 score — the same trick MagFace uses, reinforced by a regularization term that keeps magnitude monotonic with recognizability. The second is a small attention module (a squeeze-and-excitation block followed by a two-layer perceptron) that produces a semantic quality score from the embedding itself, intended to capture whether the features genuinely encode identity rather than artifacts like blur or occlusion. The two scores are linearly blended with weight α, and the blend is mapped into an angular margin between 0.35 and 0.8 radians. High-quality samples get pushed harder toward their identity center; low-quality samples are constrained more gently to avoid overfitting on ambiguous data.
Second, they subtract a repulsion margin m2 from the logits of all non-target identities, forcing samples not just closer to their own center but further from everyone else's. Because a large repulsion applied from the start destabilizes training, m2 is ramped up in three fixed stages across the 25-epoch schedule.
The total objective combines this dual-margin loss with the magnitude regularization term. Training uses the refined MS1MV2 dataset (~5.8M images, 85,742 identities), an iResNet-100 backbone producing 512-dimensional embeddings, SGD with momentum 0.9, batch size 512, and a feature scale of 64.
Why This Matters
Impact on research. The paper challenges the prevailing assumption that feature magnitude is a sufficient proxy for face image quality, demonstrating that semantic attention captures complementary information. It also shows that a quality signal learned purely as a byproduct of margin optimization can rival dedicated FIQA models — an argument for tighter integration between quality assessment and recognition rather than treating them as separate pipelines. The explicit repulsion margin adds a second lever to margin-based learning, which has historically been one-sided.
Real-world applications:
- Border control and e-gates, where travelers present faces under wildly varying lighting, pose, and image capture conditions, and systems must decide whether a capture is trustworthy.
- Mobile device unlock and banking authentication, where low-quality captures should be rejected or re-prompted rather than risking a false match.
- Surveillance and video forensics, where frames of interest are often motion-blurred, occluded, or low-resolution, and matching must remain reliable across IJB-style video protocols.
- KYC and remote identity onboarding, where service providers need to filter out unusable selfie frames before enrollment.
- Large-scale photo archive organization, where identity clustering depends on robust embedding structure under heterogeneous image quality.
Industry relevance. Biometrics vendors, cloud identity providers, phone manufacturers, and security agencies all operate under false-match rate constraints where a small TAR improvement at FAR 10⁻⁵ translates into meaningful operational risk reduction. The negligible parameter overhead (<0.2%) makes adoption practical on existing iResNet-based pipelines, and the quality score offers a rejection mechanism without deploying a separate model.
Future Directions
- Generalization of the quality score. The authors acknowledge the learned quality is inherently model-specific, tied to DQM-Face embeddings. Whether it can be distilled into a model-agnostic or cross-architecture quality predictor remains open.
- Better repulsion scheduling. The three-stage
m2schedule is a hand-tuned heuristic. Learned, adaptive, or per-identity scheduling — and the interaction between margin schedules and longer training regimes or larger backbones — is unexplored. - Scaling and architecture transfer. Experiments use a fixed iResNet-100 trained on MS1MV2 for 25 epochs. Behavior with transformer backbones, larger datasets, or much longer training is unknown.
- Fairness and demographic bias. Quality estimators are known to correlate with demographic factors, and the paper does not evaluate whether the fused quality score disadvantages specific subgroups — a critical question for deployed biometrics.
- Tighter integration with template aggregation. Since magnitude and semantic quality are per-sample signals, extending them to guide video template pooling and multi-frame fusion is a natural next step.
Target Audience
Face recognition and biometrics researchers, graduate students in computer vision working on metric learning or loss design, and engineers building production authentication or identity verification systems who need to understand where margin-based quality estimation succeeds and where it breaks down. Reviewers and practitioners evaluating FIQA methods will also find the pAUC comparisons and the argument against magnitude-only proxies directly useful.
Authors’ 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