Abstract
Knowledge Distillation (KD) is a critical technique for deploying high-performance face recognition models on resource-constrained devices. However, traditional logits-based distillation often underperforms in face recognition due to the massive scale of identity classes. This paper introduces Grouped Knowledge Distillation (GKD), a method that identifies and discards "noise" in the teacher-student transfer process. By partitioning output logits into a primary group and a secondary "tail" group, GKD demonstrates that mimicking a teacher's near-zero predictions for thousands of irrelevant classes actually hinders student learning. By focusing on the most discriminative information, GKD achieves state-of-the-art performance across major benchmarks, including IJB-C and MegaFace.
Introduction
In the field of deep face recognition, there is a constant tension between model accuracy and computational efficiency. While large-scale teacher networks achieve remarkable precision, they are often too heavy for edge deployment. Knowledge Distillation (KD) offers a solution by training a smaller "student" network to mimic the behavior of a larger "teacher."
Distillation typically follows two paths: feature-based (matching internal representations) or logits-based (matching output probabilities). Logits-based KD is often preferred for its architectural flexibility, as it does not require the student and teacher to share internal dimensions. However, in face recognition—where datasets often contain tens of thousands of unique identities—logits-based KD has historically struggled. This paper explores why this performance gap exists and proposes a novel grouping strategy to overcome it.
The Challenge: The Long Tail of Logits
The primary obstacle in face recognition distillation is the dimensionality of the output vector. When a model is trained on a dataset like MS1MV2 (containing 85,000 identities), the resulting logit vector is massive. For any given input image, the vast majority of these logits are near zero.
The authors argue that a lightweight student model lacks the capacity to fit this "long tail" of minor information. Attempting to force the student to match the teacher's infinitesimal probabilities for thousands of incorrect classes acts as a bottleneck, preventing the student from effectively learning the most critical identity features. In essence, the teacher's distribution contains too much "noise" for a small model to process effectively.
Grouped Knowledge Distillation (GKD)
To address this, the authors propose Grouped Knowledge Distillation (GKD). The method involves three core components designed to streamline the knowledge transfer process:
1. Logit Partitioning
For every training sample, the student's predictions are ranked by probability. Using a cumulative probability threshold ($\tau$), the logits are split into two distinct groups:
- The Primary Group: The top-ranked predictions that account for the majority of the probability mass (defined by $\tau$).
- The Secondary Group: The remaining "long tail" of near-zero values.
2. Loss Reformulation
The standard Kullback-Leibler (KL) divergence loss is mathematically decomposed into three distinct components:
- Primary-KD: Distills the most discriminative knowledge from the top-ranked identities.
- Secondary-KD: Attempts to distill the minor knowledge contained in the tail.
- Binary-KD: Ensures the overall probability balance between the primary and secondary groups remains consistent between the teacher and the student.
3. Selective Distillation
Through rigorous ablation studies, the researchers identified that Secondary-KD is the primary factor restricting student performance. GKD therefore calculates the final distillation loss using only Primary-KD and Binary-KD. By effectively telling the student to ignore the teacher's noise in the tail, the optimization process becomes significantly more efficient.
Experimental Results
The authors evaluated GKD using the MS1MV2 training set (5.8M images) and tested it against a wide array of standard and large-scale benchmarks.
Performance on Large-Scale Benchmarks
GKD showed its most significant gains on challenging datasets where the "long tail" problem is most acute:
- IJB-C Benchmark: At a 1e-5 False Acceptance Rate (FAR), GKD achieved 91.01% accuracy. This represents a substantial improvement over the previous state-of-the-art (EKD) at 84.00% and the student baseline of 81.65%.
- MegaFace Challenge 1: GKD reached 95.87% verification accuracy, closing the teacher-student gap more effectively than traditional feature-based methods like FitNet.
Efficiency and Generalization
Despite the requirement to sort logits for partitioning, GKD remains computationally efficient. The training time per batch (0.121s) is nearly identical to standard KD (0.116s). Furthermore, experiments on the FaceX-Zoo dataset for Masked Face Recognition demonstrated that GKD's benefits generalize well to specialized recognition tasks.
Discussion and Key Insights
The success of GKD points toward a "less is more" philosophy in high-dimensional classification. By discarding the bottom ~7% of the probability mass (using an optimal $\tau=0.93$), the student model is freed from trying to replicate unachievable details.
Another critical insight is the role of Binary-KD. While the specific values in the tail are discarded, the existence of the tail still matters. Binary-KD acts as an anchor, ensuring the student correctly identifies the total confidence that should be assigned to the primary identities versus the background noise. This maintains the global structure of the probability distribution without the overhead of fine-grained tail matching.
Conclusion
Grouped Knowledge Distillation redefines how we approach logits-based distillation for face recognition. By shifting the focus from "what knowledge is available" to "what knowledge is achievable" for a lightweight architecture, GKD removes the optimization bottlenecks inherent in large-scale classification. The result is a highly efficient training process that yields student models with significantly higher accuracy on real-world, large-scale benchmarks.
Summary updated