Skip to content
Machine Learning

ArcFace: The Loss Function That Makes Modern Face Recognition So Accurate

ArcFace is a loss function that trains face recognition by adding an angular margin between each face and the wrong identities, which forces tighter, better-separated clusters. It trains like a simple classifier, so it avoids the pair mining that contrastive and triplet loss need. Ollie's model uses CosFace, a close relative that applies the margin to the cosine instead.

Liam BradleyJune 15, 2026 · 4 min read
3D plot of a unit sphere with an arc drawn across its surface
Image: BagLuke, CC BY-SA 4.0, via Wikimedia Commons (resized)

From Contrastive to Angular Margin Loss

Contrastive and triplet loss were the dominant training objectives for face recognition through 2017. Both work on pairs or triplets, requiring careful hard negative mining and batch construction. They are effective but require significant engineering effort and can be unstable.

ArcFace (Deng et al., 2019) introduced a simpler and more powerful approach: angular margin softmax. Rather than training on pairs, ArcFace adds a fixed angular margin m to the angle between a face embedding and its correct class centre in the embedding space. This forces the network to push same-class embeddings to be not just closer to their class centre than to other class centres, but distinctly closer by a defined angular amount.

Why Angular Margin Works So Well

The angular margin in ArcFace produces more uniformly distributed class centres in the embedding space and cleaner decision boundaries between classes. Unlike triplet loss, which only requires pairwise ordering, ArcFace enforces absolute angular separation, producing tighter clusters and larger inter-class gaps.

The practical effect is that ArcFace-trained models produce embeddings that separate cleanly at lower similarity thresholds, making face verification more reliable at intermediate confidence levels. ArcFace achieves 99.83% accuracy on LFW,essentially saturating that benchmark. It has become the standard loss function for production-grade face recognition systems worldwide.

Frequently Asked Questions

What is ArcFace?

ArcFace is a face recognition training objective that adds an angular margin to the standard softmax classification loss, producing tighter identity clusters and larger inter-class gaps in the embedding space.

Why does ArcFace outperform contrastive loss?

ArcFace enforces absolute angular separation between classes rather than relative ordering, producing more uniform and discriminative embedding space structure. It is also simpler to train as it operates on individual examples, not pairs.

Try it yourself

Find your celebrity lookalike

Upload a photo and see which celebrities you look most like. Free to try, and your photo is never stored.

Find my celebrity look alike

Related Articles