# P2SGrad: Refined Gradients for Optimizing Deep Face Models

arXiv: https://arxiv.org/abs/1905.02479 · HTML: https://mlsanity.com/paper/1905.02479/

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 7 May 2019.

## Built on by (most cited first, 14 of 14)

- [AdaFace: Quality Adaptive Margin for Face Recognition](https://mlsanity.com/paper/2204.00964/) (2022)
- [Killing Two Birds with One Stone:Efficient and Robust Training of Face Recognition CNNs by Partial FC](https://mlsanity.com/paper/2203.15565/) (2022)
- [WebFace260M: A Benchmark for Million-Scale Deep Face Recognition](https://mlsanity.com/paper/2204.10149/) (2022)
- [SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition](https://mlsanity.com/paper/2205.12010/) (2022)
- [LVFace: Progressive Cluster Optimization for Large Vision Models in Face Recognition](https://mlsanity.com/paper/2501.13420/) (2025)
- [KappaFace: Adaptive Additive Angular Margin Loss for Deep Face Recognition](https://mlsanity.com/paper/2201.07394/) (2022)
- [Eight Years of Face Recognition Research: Reproducibility, Achievements and Open Issues](https://mlsanity.com/paper/2208.04040/) (2022)
- [NPT-Loss: A Metric Loss with Implicit Mining for Face Recognition](https://mlsanity.com/paper/2103.03503/) (2021)
- [AdaMS: Deep Metric Learning with Adaptive Margin and Adaptive Scale for Acoustic Word Discrimination](https://mlsanity.com/paper/2210.14564/) (2022)
- [Dissecting the impact of different loss functions with gradient surgery](https://mlsanity.com/paper/2201.11307/) (2022)
- [Dissecting Deep Metric Learning Losses for Image-Text Retrieval](https://mlsanity.com/paper/2210.13188/) (2022)
- [A Survey of Face Recognition](https://mlsanity.com/paper/2212.13038/) (2022)
- [Rethinking the Domain Gap in Near-infrared Face Recognition](https://mlsanity.com/paper/2312.00627/) (2023)
- [Towards multi-modal forgery representation learning for AI-generated video detection and localization](https://mlsanity.com/paper/2605.07232/) (2026)

## Abstract (arXiv)

Cosine-based softmax losses significantly improve the performance of deep face recognition networks. However, these losses always include sensitive hyper-parameters which can make training process unstable, and it is very tricky to set suitable hyper parameters for a specific dataset. This paper addresses this challenge by directly designing the gradients for adaptively training deep neural networks. We first investigate and unify previous cosine softmax losses by analyzing their gradients. This unified view inspires us to propose a novel gradient called P2SGrad (Probability-to-Similarity Gradient), which leverages a cosine similarity instead of classification probability to directly update the testing metrics for updating neural network parameters. P2SGrad is adaptive and hyper-parameter free, which makes the training process more efficient and faster. We evaluate our P2SGrad on three face recognition benchmarks, LFW, MegaFace, and IJB-C. The results show that P2SGrad is stable in training, robust to noise, and achieves state-of-the-art performance on all the three benchmarks.
