Introduction
Modern face recognition systems rely on massive datasets containing millions of unique identities. While increasing data volume generally improves model robustness, it introduces a significant bottleneck: the Fully Connected (FC) layer. In standard classification, the FC layer stores a weight vector for every identity. As the number of identities scales into the tens of millions, the memory required to store these weights exceeds the capacity of modern GPUs, and the computational cost of calculating loss across millions of classes becomes prohibitive.
As shown in the figure above, while the backbone computation remains constant, the time cost of the FC layer grows linearly with the number of identities, eventually dominating the training cycle.
Faster Face Classification (F2C)
To address these scaling issues, researchers proposed Faster Face Classification (F2C). This framework replaces the static, memory-intensive FC layer with a Dynamic Class Pool (DCP).
The Dynamic Class Pool (DCP)
Instead of maintaining a fixed weight matrix for all identities, F2C treats identity centers as a dynamic cache. The DCP stores a subset of identity features that are updated on the fly. When a new identity is encountered in a training batch, its feature is generated and added to the pool, while the most outdated features are removed using a Least Recently Used (LRU) policy. This decoupling allows the memory footprint to remain independent of the total number of identities in the dataset.
Twin Backbone Architecture
The F2C system utilizes two identical networks:
- Gallery Net (G-Net): Responsible for generating the identity centers stored in the DCP. It is updated via a moving average of the primary model to ensure stable feature representations.
- Probe Net (P-Net): The main model being trained. It extracts features from the current batch to be compared against the identity centers in the DCP.
Dual Data Loading
To ensure the DCP remains representative of the entire dataset, a specialized dual data loader is used. It combines standard random instance sampling with identity-based sampling (ensuring multiple images per identity). This prevents "rare" identities from being prematurely evicted from the DCP and ensures high-quality positive and negative samples for every training step.
Results and Impact
F2C was evaluated on ultra-large-scale datasets, including Webface42M (2 million identities). The results demonstrate significant improvements in efficiency:
- Memory Stability: Unlike standard methods that hit Out-of-Memory (OOM) limits as identities increase, F2C maintains a low, constant memory footprint.
- Computational Speed: By avoiding the massive FC layer computation, F2C training speed remains nearly flat even as the dataset scales to tens of millions of identities.
- Competitive Accuracy: Despite using a DCP size of only 10% of the total identities, F2C achieved state-of-the-art accuracy across benchmarks like IJB-C and MegaFace, nearly matching the performance of full FC training at a fraction of the cost.
Conclusion
The F2C framework provides a scalable solution for training face recognition models on massive datasets. By rethinking identity centers as a dynamic resource rather than a static parameter set, it overcomes the hardware limitations that previously hindered the development of very large-scale recognition systems.
Summary updated