Partial FC: Training 10 Million Identities on a Single Machine

Xiang An, Xuhan Zhu, Yang Xiao, Lan Wu, Ming Zhang +5 more
10/11/2020
cs.CVcs.DC

Official code: deepinsight/insightface (29,968 stars, PyTorch, last commit 2026-03-29).

Abstract

Training face recognition models with millions of identities is challenging because classifier storage, logit memory, and computation grow linearly with the number of classes, eventually making full softmax impractical even when the backbone itself fits comfortably in memory. We present Partial FC (PFC), a scalable approximation to large-class softmax that preserves every positive class center while activating only a sampled subset of negative centers in each mini-batch. This asymmetric treatment retains every target term while avoiding exhaustive interaction with millions of mostly uninformative negatives. Our distributed implementation partitions the classifier across GPUs and samples within each owned shard, so sampling reduces local matrix multiplication and logit storage while sharding eliminates class-gradient synchronization across workers. Together, these properties reduce GPU-resident classifier memory, computation, and class-dependent communication without feature-based hard-negative retrieval. End-to-end system benchmarks demonstrate efficient scaling to massive class spaces, including 64 million classes on a single eight-GPU machine. Across large-scale face-recognition datasets, moderate sampling rates maintain competitive recognition accuracy while substantially improving training efficiency. Our best PFC configurations achieve 97.2\% TAR on IJB-C at FAR $=10^{-4}$ and 94.0\% TAR on ICCV21-MFR at FAR $=10^{-6}$. Beyond clean training data, PFC is robust to inter-class conflicts, label noise, and long-tailed identity distributions: under 40\% label noise, PFC with conflict filtering raises ICCV21-MFR TAR from 43.9\% to 80.2\%, while on long-tailed data PFC improves TAR from 87.4\% to 92.0\%. These results establish positive-preserving negative sampling as an effective foundation for scalable, accurate, and robust identity classification.

View on arXivView PDF

Code Implementations(1)

PyTorch

State-of-the-art 2D and 3D Face Analysis Project

29,9686,109C, C++Sep 1, 20176 months ago
age-estimationarcfaceface-alignmentface-detectionface-recognition+5 more

Similar Papers

Cite this paper

@article{an2020partial,
  title  = {Partial FC: Training 10 Million Identities on a Single Machine},
  author = {Xiang An and Xuhan Zhu and Yang Xiao and Lan Wu and Ming Zhang and Yuan Gao and Bin Qin and Debing Zhang and Ying Fu and Jiankang Deng},
  year   = {2020},
  eprint = {2010.05222},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.05222}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2010.05222.svg)](https://codeofpaper.com/paper/2010.05222)

Discussion