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.
