ArcFace: Angular Margin in Face Recognition
- ArcFace is a margin-based softmax formulation that enhances face recognition by imposing an additive angular margin on normalized embeddings.
- Its method shifts identity discrimination to an angular space, driving samples into compact intra-class clusters while ensuring a fixed geodesic margin between classes.
- Empirical benchmarks and variant extensions validate ArcFace's scalability and effectiveness across conventional, masked, and cross-modal recognition tasks.
ArcFace is a margin-based softmax formulation for deep face recognition that places normalized embeddings and class prototypes on a unit hypersphere and imposes an additive angular margin on the target logit. Its central effect is to make identity discrimination an angular, rather than magnitude-dependent, problem: features from the same identity are driven toward compact clusters, while different identities are separated by a fixed geodesic margin in angle space. In practice, this yields highly discriminative embeddings, a simple cosine-similarity inference rule, and a training objective whose geometry is unusually explicit among margin-based classifiers (Deng et al., 2018).
1. Conceptual position within margin-based recognition
ArcFace arose from the observation that ordinary softmax is optimized for closed-set classification but does not directly enforce the compact intra-class structure and large inter-class gaps required by open-set verification. Margin-based softmax losses address that deficiency by modifying the target logit so that correctly classified samples must lie closer to their class centers and farther from competing centers. ArcFace does so by adding a constant angular offset to the ground-truth angle on the hypersphere, rather than modifying cosine values or multiplying angles (Deng et al., 2018).
A persistent misconception is that ArcFace is merely a cosine-margin method with different notation. The distinction is geometric. CosFace subtracts a margin in cosine space, whereas ArcFace adds a margin in angle space; SphereFace uses a multiplicative angular margin. Because ArcFace’s penalty is defined directly in the angular domain, its margin corresponds to a constant geodesic displacement on the unit sphere.
| Method | Positive logit | Margin domain |
|---|---|---|
| SphereFace | Multiplicative angular | |
| CosFace | Additive cosine | |
| ArcFace | Additive angular |
This geometric clarity is one of ArcFace’s defining properties. In the binary case, its decision boundary is determined by , which on implies . The boundary is therefore shifted by a constant angle, not by a class- or sample-dependent distortion, which helps explain both its interpretability and its stable optimization behavior relative to earlier angular-margin formulations (Deng et al., 2018).
2. Mathematical formulation on the normalized hypersphere
Let denote the embedding of sample and the classifier weight vector for class . ArcFace normalizes both:
0
so that similarity becomes purely angular:
1
With a scale 2 and additive angular margin 3, the ArcFace loss is
4
The normalization step is not cosmetic. Once both features and class weights are unit norm, logits depend only on directions, so training directly manipulates geodesic relations on 5. The scale 6 restores useful logit magnitude after normalization, while the margin 7 increases the angular burden borne by the ground-truth class. Typical settings reported for face recognition are 8, 9, and 0 (Deng et al., 2018).
This formulation makes ArcFace especially well matched to cosine-based verification at inference time. Training and testing use the same geometry: the classifier is trained with angularly normalized logits, and deployment compares embeddings by cosine similarity. A plausible implication is that ArcFace reduces train-test metric mismatch more cleanly than objectives that learn in Euclidean or unnormalized logit space.
3. Optimization, implementation, and empirical behavior
The standard ArcFace recipe uses ResNet-50 or ResNet-100 backbones, typically with a BN–Dropout–FC–BN head that produces a 512-dimensional embedding followed by L2 normalization. Face alignment is usually performed with five landmarks and crops are resized to 1 before feature extraction. Optimization is commonly done with SGD and momentum, with large batches and fixed 2 and 3 throughout training (Deng et al., 2018).
One practical reason for ArcFace’s influence is that it adds negligible inference overhead relative to the embedding backbone. The margin operates only in the training head; deployment usually retains only the embedding network and computes cosine similarity between normalized templates. The original line of work also emphasized scalability to millions of identities through center-parallel strategies, making ArcFace applicable to web-scale identity classification (Deng et al., 2018).
Representative results reported for ResNet-100 ArcFace include approximately 4 on LFW, 5–6 on CFP-FP, 7–8 on AgeDB, MegaFace Rank-1 of approximately 9, and IJB-C verification of approximately 0 TPR at 1 (Deng et al., 2018). These figures are best read as benchmarks of the normalized angular-margin paradigm rather than as immutable ArcFace constants, because performance depends strongly on backbone depth, data curation, alignment, and label quality.
ArcFace is not uniformly robust to all data pathologies. The original formulation is explicitly described as susceptible to massive label noise, since incorrect labels force large losses under a strict margin constraint. This sensitivity motivated later modifications that relax the single-center or fixed-margin assumptions rather than abandoning the hyperspherical framework itself (Deng et al., 2018).
4. Variants and methodological extensions
The first major extension is Sub-center ArcFace, in which each class is assigned 2 sub-centers and a sample needs only to be close to one positive sub-center. This addresses both label noise and multi-modal intra-class structure. With 3, the method improved IJB-C TPR@4 from approximately 5 to approximately 6 on noisy MS1MV0, and after purification reached approximately 7; on cleaner MS1MV3, sub-centers largely matched standard ArcFace (Deng et al., 2018). The interpretation offered in that work is that one dominant sub-class tends to absorb clean faces while non-dominant sub-classes capture hard or noisy samples.
A second line of work replaces the fixed global margin with a stochastic one. ElasticFace samples a margin 8 for each sample and iteration, preserving the same normalized geometry while allowing the decision boundary to expand and retract during training. Reported gains were strongest on high-variation benchmarks such as AgeDB-30 and CFP-FP, with ElasticFace advancing or matching state of the art on seven of nine mainstream benchmarks (Boutros et al., 2021). This suggests that a single rigid margin can be suboptimal when intra-class and inter-class variation are highly heterogeneous.
Other extensions adapt ArcFace to auxiliary structure or tasks rather than modifying only the margin. In masked face recognition, Multi-Task ArcFace augments an ArcFace-trained LResNet-50 with a binary mask-usage head and optimizes
9
achieving masked-face verification gains such as 0 vs. 1 on Masked LFW and an average mask-usage classification accuracy of 2 while preserving nearly the same non-masked accuracy (Montero et al., 2021). In clustering-oriented face recognition, Cluster-Guided ArcFace replaces the single margin by a class-adaptive margin 3, where 4 measures class concentration, and supplements it with supervised contrastive clustering and center alignment; reported improvements included CFP-FP 5 vs. 6 and IJB-C TAR@7 8 vs. 9 over an ArcFace baseline (Zhang, 2023).
Long-tailed recognition has produced yet another modification. In large-scale landmark recognition, Sub-center ArcFace was combined with class-size-dependent dynamic margins of the form 0. The best reported setting used 1 with bounds 2, improving a validation GAP from 3 under constant 4 to 5 (Ha et al., 2020). The consistent theme across these variants is not rejection of ArcFace’s geometry, but refinement of how the margin should be assigned under noise, class imbalance, auxiliary supervision, or clustering structure.
5. Transfer, reuse, and domain expansion
Although ArcFace was developed for face recognition, later work shows that its embeddings are informative far beyond identity matching. A frozen ArcFace ResNet100 backbone produced 512-dimensional features that supported gender classification with conventional classifiers, with Gaussian-kernel SVM reaching 6 accuracy and 7 F1, and ROC AUC of 8 for either positive class convention (Farzaneh, 2021). The strong performance of cosine KNN relative to Euclidean KNN in that study is consistent with the fact that ArcFace embeddings live on a hypersphere.
Transfer to affective tasks follows a similar pattern. In facial emotion recognition on AffectNet, a ResNet100 backbone pretrained with ArcFace on MS1MV2 achieved 9 validation accuracy after fine-tuning, outperforming ImageNet-pretrained ResNeXt and EfficientNet baselines; however, minority classes such as Fear, Disgust, and Contempt remained difficult (Waldner et al., 2024). Earlier work on Aff-Wild2 adapted ArcFace directly to basic expression recognition inside a multi-task framework and reported consistent improvements over non-ArcFace counterparts across AffectNet, RAF-DB, IMFDB, and FER2013 (Kollias et al., 2019). These results indicate that ArcFace’s identity-trained facial features transfer well to other face-centric taxonomies even when the downstream semantics are not identity labels.
ArcFace has also been reused as a frozen backbone inside multimodal systems. In caption-guided face recognition, a pretrained ArcFace ResNet18-IR supplied global and local facial features while textual modules learned cross-modal aggregation; the resulting system improved ArcFace-only verification on a degraded Multi-Modal CelebA-HQ setting from AUC 0 and Rank-1 1 to AUC 2 and Rank-1 3 (Hasan et al., 2023). In augmentation-invariant image retrieval, ArcFace heads trained with millions of instance classes and aggressive social-media augmentations underpinned a solution that achieved second place in the 2021 Facebook AI Image Similarity Challenge: Descriptor Track (Papadakis et al., 2021).
The same normalized angular-margin principle has been transplanted to non-face biometrics and even non-biometric retrieval. In visual place recognition, end-to-end fine-tuning with ArcFace outperformed triplet and contrastive losses by approximately 4–5 outdoors and 6–7 indoors under thresholded localization criteria (Alijani et al., 2022). In ECG biometrics, a 1D Inception-v1 trained with ArcFace yielded externally validated Rank@1 of 8 on ASUGI-DB, 9 on MIMIC-GC, and 0 on HEEDB-GC, with predictable degradation under domain shift and multi-year temporal gaps (Scagnetto, 6 Apr 2026). In contactless fingerprint anti-spoofing, ArcFace combined with Center loss inside a modified ResNet-18 achieved 1, 2, and 3 (Adami et al., 2023). These adaptations do not imply that ArcFace is domain-agnostic by itself; rather, they show that normalized angular discrimination is a reusable supervisory pattern across heterogeneous recognition problems.
6. Limitations, security, privacy, and current directions
ArcFace’s limitations are closely tied to its strengths. The same strict margin that sharpens identity boundaries makes the basic formulation sensitive to label noise and difficult samples; without sub-centers, wrong labels can drive disproportionately large losses (Deng et al., 2018). Extreme poses and occlusions remain challenging, which is why masked recognition, profile views, and clustering-aware extensions continue to modify the original fixed-margin objective rather than treating it as universally sufficient (Montero et al., 2021).
Another misconception is that ArcFace embeddings encode only identity. Empirical work contradicts that view. Gender can be inferred from frozen ArcFace features with high accuracy, and the same observation motivates explicit privacy warnings: biometric embeddings may leak stable demographic attributes even when the deployed task is nominally identity verification (Farzaneh, 2021). A plausible implication is that deployment concerns extend beyond false matches and false non-matches to attribute leakage and downstream fairness auditing.
Security studies have shown that ArcFace is vulnerable to physical adversarial manipulation. A targeted adversarial patch attack on LResNet100E-IR with ArcFace produced physical-test cosine values of 4 to a target identity versus 5 to the attacker’s own identity for eyeglass-frame patches, and similar target-favoring shifts for forehead patches (Pautov et al., 2019). A related “AdvHat” attack used a printable rectangular sticker on a hat brim and reported genuine cosine drops exceeding 6 in most fixed-condition cases while transferring to other face-ID models (Komkov et al., 2019). These studies show that angular-margin training does not, by itself, confer robustness to structured physical perturbations.
Template protection has therefore become a parallel line of research. IronMask retrofits ArcFace embeddings with an orthogonal transformation and a real-valued error-correcting code on the hypersphere, reporting 7 TAR at 8 FAR when combined with ArcFace while providing at least 115-bit security against known attacks (Kim et al., 2021). At the loss-function level, newer work has also questioned whether geometric margins are the only viable route. Q-Margin, an 9-divergence alternative that encodes the penalty in the reference measure rather than directly in the logit geometry, outperformed ArcFace under identical recipes on IJB-B and IJB-C at 0, with IJB-C improving from 1 for ArcFace to 2 (Koutsianos et al., 30 Jun 2026). This does not invalidate ArcFace; it indicates that ArcFace remains the reference baseline against which new low-FAR verification objectives are still measured.
ArcFace’s enduring significance lies in that combination of exact geometry, practical simplicity, and extensibility. Its core insight—normalize features and class centers, then impose a constant additive angular margin—has become a template from which later work either departs locally or generalizes, but rarely discards entirely.