# CosFace: Large Margin Cosine Loss for Deep Face Recognition

**Authors:** Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Zhifeng Li, Dihong Gong, Jingchao Zhou, Wei Liu  
**arXiv:** [1801.09414](https://arxiv.org/abs/1801.09414)  
**Date:** 2018-01-29  
**Summary page:** https://www.summarizepaper.com/en/paper/1801.09414v1/

## Key points

- Face recognition advancements facilitated by deep convolutional neural networks (CNN)
- Limitations of traditional softmax loss function in discriminating facial features
- Introduction of alternative loss functions like central loss, large margin softmax loss, and angular softmax loss
- Proposal of a novel approach called large margin cosine loss (LMCL) to enhance feature discrimination
- Reformulation of softmax loss as cosine loss by L2 normalizing feature vectors and weight vectors
- Introduction of a cosine margin term to enhance decision margins in angular space
- Leveraging normalization and maximizing cosine decision margins to achieve minimum intra-class variance and maximum inter-class variance
- Evaluation of the model trained with LMCL (CosFace) through experiments on popular face recognition datasets such as MegaFace Challenge, Youtube Faces (YTF), and Labeled Face in the Wild (LFW)
- Outperformance of CosFace compared to existing methods, achieving state-of-the-art performance on benchmark datasets

## Summary

In their paper titled "CosFace: Large Margin Cosine Loss for Deep Face Recognition," authors Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Zhifeng Li, Dihong Gong, Jingchao Zhou, and Wei Liu discuss the significant advancements in face recognition facilitated by deep convolutional neural networks (CNN). The primary focus of face recognition tasks such as verification and identification lies in discriminating facial features. However, the traditional softmax loss function used in deep CNNs often falls short in terms of discrimination power. To address this limitation, recent research has introduced alternative loss functions like central loss, large margin softmax loss, and angular softmax loss. These approaches aim to maximize inter-class variance while minimizing intra-class variance. This study proposes a novel approach called large margin cosine loss (LMCL) to tackle this challenge from a different perspective. The LMCL reformulates the softmax loss as cosine loss by L2 normalizing both feature vectors and weight vectors to eliminate radial variation. Additionally, a cosine margin term is introduced to enhance decision margins in angular space further. By leveraging normalization and maximizing cosine decision margins, the LMCL achieves minimum intra-class variance and maximum inter-class variance. The model trained with LMCL - referred to as CosFace - is evaluated through extensive experiments on popular face recognition datasets such as MegaFace Challenge, Youtube Faces (YTF), and Labeled Face in the Wild (LFW). The results demonstrate that CosFace outperforms existing methods and achieves state-of-the-art performance on these benchmark datasets. This confirms the effectiveness of the proposed approach in enhancing face recognition accuracy through improved feature discrimination.
