{"url":"/method/arcface","slug":"arcface","name":"ArcFace","full_name":"Additive Angular Margin Loss","full_name_withheld":false,"description_markdown":"**ArcFace**, or **Additive Angular Margin Loss**, is a loss function used in face recognition tasks. The [softmax](https://paperswithcode.com/method/softmax) is traditionally used in these tasks. However, the softmax loss function does not explicitly optimise the feature embedding to enforce higher similarity for intraclass samples and diversity for inter-class samples, which results in a performance gap for deep face recognition under large intra-class appearance variations. \r\n\r\nThe ArcFace loss transforms the logits $W^{T}\\_{j}x\\_{i} = || W\\_{j} || \\text{ } || x\\_{i} || \\cos\\theta\\_{j}$,\r\nwhere $\\theta\\_{j}$ is the angle between the weight $W\\_{j}$ and the feature $x\\_{i}$. The individual weight $ || W\\_{j} || = 1$ is fixed by $l\\_{2}$ normalization. The embedding feature $ ||x\\_{i} ||$ is fixed by $l\\_{2}$ normalization and re-scaled to $s$. The normalisation step on features and weights makes the predictions only depend on the angle between the feature and the weight. The learned embedding\r\nfeatures are thus distributed on a hypersphere with a radius of $s$. Finally, an additive angular margin penalty $m$ is added between $x\\_{i}$ and $W\\_{y\\_{i}}$ to simultaneously enhance the intra-class compactness and inter-class discrepancy. Since the proposed additive angular margin penalty is\r\nequal to the geodesic distance margin penalty in the normalised hypersphere, the method is named ArcFace:\r\n\r\n$$ L\\_{3} = -\\frac{1}{N}\\sum^{N}\\_{i=1}\\log\\frac{e^{s\\left(\\cos\\left(\\theta\\_{y\\_{i}} + m\\right)\\right)}}{e^{s\\left(\\cos\\left(\\theta\\_{y\\_{i}} + m\\right)\\right)} + \\sum^{n}\\_{j=1, j \\neq y\\_{i}}e^{s\\cos\\theta\\_{j}}} $$\r\n\r\nThe authors select face images from 8 different identities containing enough samples (around 1,500 images/class) to train 2-D feature embedding networks with the softmax and ArcFace loss, respectively. As the Figure shows, the softmax loss provides roughly separable feature embedding\r\nbut produces noticeable ambiguity in decision boundaries, while the proposed ArcFace loss can obviously enforce a more evident gap between the nearest classes.\r\n\r\nOther alternatives to enforce intra-class compactness and inter-class distance include [Supervised Contrastive Learning](https://arxiv.org/abs/2004.11362).","description_state":"present","introduced_year":null,"introduced_by":{"title":"ArcFace: Additive Angular Margin Loss for Deep Face Recognition","paper":"/paper/arcface-additive-angular-margin-loss-for-deep","first_author":"Jiankang Deng","n_authors":6,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/arcface-additive-angular-margin-loss-for-deep"},"source":{"url":"https://arxiv.org/abs/1801.07698v4","title":"ArcFace: Additive Angular Margin Loss for Deep Face Recognition","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/ronghuaiyang/arcface-pytorch/blob/47ace80b128042cd8d2efd408f55c5a3e156b032/models/metrics.py#L10","code_snippet_url_on_a_code_host":true,"categories":[{"area":"General","area_id":"general","collection":"Loss Functions","url":"/methods/category/loss-functions","pwc_aliases":[]}],"n_papers_tagged":94,"archive_num_papers":94,"papers_newest_first":[{"paper":null,"title":"Enhancing Few-shot Keyword Spotting Performance through Pre-Trained Self-supervised Speech Models","date":"2025-06-21","arxiv_id":"2506.17686","n_code_links":0,"syntology":null},{"paper":null,"title":"Towards Large-Scale Pose-Invariant Face Recognition Using Face Defrontalization","date":"2025-06-04","arxiv_id":"2506.04496","n_code_links":0,"syntology":null},{"paper":null,"title":"Accuracy and Fairness of Facial Recognition Technology in Low-Quality Police Images: An Experiment With Synthetic Faces","date":"2025-05-20","arxiv_id":"2505.14320","n_code_links":0,"syntology":null},{"paper":null,"title":"LaPIG: Cross-Modal Generation of Paired Thermal and Visible Facial Images","date":"2025-03-20","arxiv_id":"2503.16376","n_code_links":0,"syntology":null},{"paper":"/paper/universal-embedding-function-for-traffic","title":"Universal Embedding Function for Traffic Classification via QUIC Domain Recognition Pretraining: A Transfer Learning Success","date":"2025-02-18","arxiv_id":"2502.12930","n_code_links":1,"syntology":null},{"paper":null,"title":"Omni-ID: Holistic Identity Representation Designed for Generative Tasks","date":"2024-12-12","arxiv_id":"2412.09694","n_code_links":0,"syntology":null},{"paper":"/paper/multispecies-animal-re-id-using-a-large","title":"Multispecies Animal Re-ID Using a Large Community-Curated Dataset","date":"2024-12-07","arxiv_id":"2412.05602","n_code_links":1,"syntology":null},{"paper":null,"title":"Pairwise Discernment of AffectNet Expressions with ArcFace","date":"2024-12-01","arxiv_id":"2412.01860","n_code_links":0,"syntology":null},{"paper":null,"title":"Hypersphere Secure Sketch Revisited: Probabilistic Linear Regression Attack on IronMask in Multiple Usage","date":"2024-09-19","arxiv_id":"2409.12884","n_code_links":0,"syntology":null},{"paper":null,"title":"HyperSpaceX: Radial and Angular Exploration of HyperSpherical Dimensions","date":"2024-08-05","arxiv_id":"2408.02494","n_code_links":0,"syntology":null},{"paper":"/paper/analyzing-the-feature-extractor-networks-for","title":"Analyzing the Feature Extractor Networks for Face Image Synthesis","date":"2024-06-04","arxiv_id":"2406.02153","n_code_links":1,"syntology":null},{"paper":null,"title":"Deep Privacy Funnel Model: From a Discriminative to a Generative Approach with an Application to Face Recognition","date":"2024-04-03","arxiv_id":"2404.02696","n_code_links":0,"syntology":null},{"paper":"/paper/arc2face-a-foundation-model-of-human-faces","title":"Arc2Face: A Foundation Model for ID-Consistent Human Faces","date":"2024-03-18","arxiv_id":"2403.11641","n_code_links":3,"syntology":{"ran":1,"of":4,"unverified":3,"pointer_only":3}},{"paper":"/paper/vigface-virtual-identity-generation-model-for","title":"VIGFace: Virtual Identity Generation for Privacy-Free Face Recognition","date":"2024-03-13","arxiv_id":"2403.08277","n_code_links":1,"syntology":null},{"paper":null,"title":"Mitigating the Impact of Attribute Editing on Face Recognition","date":"2024-03-12","arxiv_id":"2403.08092","n_code_links":0,"syntology":null},{"paper":null,"title":"X2-Softmax: Margin Adaptive Loss Function for Face Recognition","date":"2023-12-08","arxiv_id":"2312.05281","n_code_links":0,"syntology":null},{"paper":null,"title":"Improved Face Representation via Joint Label Classification and Supervised Contrastive Clustering","date":"2023-12-07","arxiv_id":"2312.04029","n_code_links":0,"syntology":null},{"paper":null,"title":"A Universal Anti-Spoofing Approach for Contactless Fingerprint Biometric Systems","date":"2023-10-23","arxiv_id":"2310.15044","n_code_links":0,"syntology":null},{"paper":null,"title":"An Empirical Study of Self-supervised Learning with Wasserstein Distance","date":"2023-10-16","arxiv_id":"2310.10143","n_code_links":0,"syntology":null},{"paper":null,"title":"Trading-off Mutual Information on Feature Aggregation for Face Recognition","date":"2023-09-22","arxiv_id":"2309.13137","n_code_links":0,"syntology":null},{"paper":"/paper/unitsface-unified-threshold-integrated-sample","title":"UniTSFace: Unified Threshold Integrated Sample-to-Sample Loss for Face Recognition","date":"2023-09-21","arxiv_id":null,"n_code_links":1,"syntology":null},{"paper":"/paper/patent-image-retrieval-using-transformer","title":"Patent image retrieval using transformer-based deep metric learning","date":"2023-09-01","arxiv_id":null,"n_code_links":1,"syntology":null},{"paper":"/paper/global-features-are-all-you-need-for-image","title":"Global Features are All You Need for Image Retrieval and Reranking","date":"2023-08-14","arxiv_id":"2308.06954","n_code_links":2,"syntology":{"ran":13,"of":18,"unverified":5,"pointer_only":0}},{"paper":null,"title":"Improving Face Recognition from Caption Supervision with Multi-Granular Contextual Feature Aggregation","date":"2023-08-13","arxiv_id":"2308.06866","n_code_links":0,"syntology":null},{"paper":null,"title":"On the Biometric Capacity of Generative Face Models","date":"2023-08-03","arxiv_id":"2308.02065","n_code_links":0,"syntology":null},{"paper":"/paper/promptstyler-prompt-driven-style-generation","title":"PromptStyler: Prompt-driven Style Generation for Source-free Domain Generalization","date":"2023-07-27","arxiv_id":"2307.15199","n_code_links":1,"syntology":{"ran":0,"of":1,"unverified":1,"pointer_only":0}},{"paper":null,"title":"RPG-Palm: Realistic Pseudo-data Generation for Palmprint Recognition","date":"2023-07-26","arxiv_id":"2307.14016","n_code_links":0,"syntology":null},{"paper":null,"title":"ChildGAN: Large Scale Synthetic Child Facial Data Using Domain Adaptation in StyleGAN","date":"2023-07-25","arxiv_id":"2307.13746","n_code_links":0,"syntology":null},{"paper":null,"title":"Imperceptible Physical Attack against Face Recognition Systems via LED Illumination Modulation","date":"2023-07-25","arxiv_id":"2307.13294","n_code_links":0,"syntology":null},{"paper":"/paper/blendface-re-designing-identity-encoders-for","title":"BlendFace: Re-designing Identity Encoders for Face-Swapping","date":"2023-07-20","arxiv_id":"2307.10854","n_code_links":2,"syntology":{"ran":5,"of":9,"unverified":4,"pointer_only":9}}],"papers_shown":30,"tasks":[{"task":"/task/face-recognition","name":"Face Recognition","papers":51},{"task":"/task/face-verification","name":"Face Verification","papers":14},{"task":"/task/retrieval","name":"Retrieval","papers":8},{"task":"/task/image-retrieval","name":"Image Retrieval","papers":6},{"task":"/task/representation-learning","name":"Representation Learning","papers":6},{"task":"/task/transfer-learning","name":"Transfer Learning","papers":6},{"task":"/task/attribute","name":"Attribute","papers":5},{"task":"/task/face-identification","name":"Face Identification","papers":5},{"task":"/task/tar","name":"TAR","papers":5},{"task":null,"name":"Triplet","papers":5},{"task":"/task/adversarial-attack","name":"Adversarial Attack","papers":4},{"task":"/task/data-augmentation","name":"Data Augmentation","papers":4},{"task":"/task/landmark-recognition","name":"Landmark Recognition","papers":4},{"task":"/task/diversity","name":"Diversity","papers":3},{"task":"/task/image-classification","name":"Image Classification","papers":3},{"task":"/task/image-generation","name":"Image Generation","papers":3},{"task":"/task/metric-learning","name":"Metric Learning","papers":3},{"task":"/task/clustering","name":"Clustering","papers":2},{"task":"/task/domain-adaptation","name":"Domain Adaptation","papers":2},{"task":"/task/emotion-recognition","name":"Emotion Recognition","papers":2}],"tasks_shown":20,"n_tasks":100,"usage_by_year":[{"year":"2018","papers":1},{"year":"2019","papers":8},{"year":"2020","papers":14},{"year":"2021","papers":19},{"year":"2022","papers":14},{"year":"2023","papers":23},{"year":"2024","papers":10},{"year":"2025","papers":5}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/arcface"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}