Papers
Topics
Authors
Recent
Search
2000 character limit reached

ArcFace: Angular Margin in Face Recognition

Updated 5 July 2026
  • 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 scos(mθyi)s\cdot\cos(m\theta_{y_i}) Multiplicative angular
CosFace s(cosθyim)s\cdot(\cos\theta_{y_i}-m) Additive cosine
ArcFace scos(θyi+m)s\cdot\cos(\theta_{y_i}+m) Additive angular

This geometric clarity is one of ArcFace’s defining properties. In the binary case, its decision boundary is determined by cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2), which on [0,π][0,\pi] implies θ1+m=θ2\theta_1+m=\theta_2. 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 xiRdx_i\in\mathbb{R}^d denote the embedding of sample ii and WjRdW_j\in\mathbb{R}^d the classifier weight vector for class jj. ArcFace normalizes both:

s(cosθyim)s\cdot(\cos\theta_{y_i}-m)0

so that similarity becomes purely angular:

s(cosθyim)s\cdot(\cos\theta_{y_i}-m)1

With a scale s(cosθyim)s\cdot(\cos\theta_{y_i}-m)2 and additive angular margin s(cosθyim)s\cdot(\cos\theta_{y_i}-m)3, the ArcFace loss is

s(cosθyim)s\cdot(\cos\theta_{y_i}-m)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 s(cosθyim)s\cdot(\cos\theta_{y_i}-m)5. The scale s(cosθyim)s\cdot(\cos\theta_{y_i}-m)6 restores useful logit magnitude after normalization, while the margin s(cosθyim)s\cdot(\cos\theta_{y_i}-m)7 increases the angular burden borne by the ground-truth class. Typical settings reported for face recognition are s(cosθyim)s\cdot(\cos\theta_{y_i}-m)8, s(cosθyim)s\cdot(\cos\theta_{y_i}-m)9, and scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)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 scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)1 before feature extraction. Optimization is commonly done with SGD and momentum, with large batches and fixed scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)2 and scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)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 scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)4 on LFW, scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)5–scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)6 on CFP-FP, scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)7–scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)8 on AgeDB, MegaFace Rank-1 of approximately scos(θyi+m)s\cdot\cos(\theta_{y_i}+m)9, and IJB-C verification of approximately cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)0 TPR at cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)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 cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)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 cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)3, the method improved IJB-C TPR@cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)4 from approximately cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)5 to approximately cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)6 on noisy MS1MV0, and after purification reached approximately cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)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 cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)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

cos(θ1+m)=cos(θ2)\cos(\theta_1+m)=\cos(\theta_2)9

achieving masked-face verification gains such as [0,π][0,\pi]0 vs. [0,π][0,\pi]1 on Masked LFW and an average mask-usage classification accuracy of [0,π][0,\pi]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 [0,π][0,\pi]3, where [0,π][0,\pi]4 measures class concentration, and supplements it with supervised contrastive clustering and center alignment; reported improvements included CFP-FP [0,π][0,\pi]5 vs. [0,π][0,\pi]6 and IJB-C TAR@[0,π][0,\pi]7 [0,π][0,\pi]8 vs. [0,π][0,\pi]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 θ1+m=θ2\theta_1+m=\theta_20. The best reported setting used θ1+m=θ2\theta_1+m=\theta_21 with bounds θ1+m=θ2\theta_1+m=\theta_22, improving a validation GAP from θ1+m=θ2\theta_1+m=\theta_23 under constant θ1+m=θ2\theta_1+m=\theta_24 to θ1+m=θ2\theta_1+m=\theta_25 (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 θ1+m=θ2\theta_1+m=\theta_26 accuracy and θ1+m=θ2\theta_1+m=\theta_27 F1, and ROC AUC of θ1+m=θ2\theta_1+m=\theta_28 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 θ1+m=θ2\theta_1+m=\theta_29 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 xiRdx_i\in\mathbb{R}^d0 and Rank-1 xiRdx_i\in\mathbb{R}^d1 to AUC xiRdx_i\in\mathbb{R}^d2 and Rank-1 xiRdx_i\in\mathbb{R}^d3 (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 xiRdx_i\in\mathbb{R}^d4–xiRdx_i\in\mathbb{R}^d5 outdoors and xiRdx_i\in\mathbb{R}^d6–xiRdx_i\in\mathbb{R}^d7 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 xiRdx_i\in\mathbb{R}^d8 on ASUGI-DB, xiRdx_i\in\mathbb{R}^d9 on MIMIC-GC, and ii0 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 ii1, ii2, and ii3 (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 ii4 to a target identity versus ii5 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 ii6 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 ii7 TAR at ii8 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 ii9-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 WjRdW_j\in\mathbb{R}^d0, with IJB-C improving from WjRdW_j\in\mathbb{R}^d1 for ArcFace to WjRdW_j\in\mathbb{R}^d2 (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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ArcFace.