Face recognition (FR) has achieved remarkable progress in recent years mainly because of deep learning techniques and the availability of massive,annotated face datasets. Large-scale models,such as ResNet,demonstrate excellent discriminative capability,but their deployment on resource-limited devices,such as mobile and embedded systems,remains highly challenging because of prohibitive computational and storage demands. Lightweight networks,including MobileFaceNet,can reduce complexity and enable real-time applications but often suffer from a noticeable accuracy drop,especially under unconstrained and cross-domain conditions. To address this dilemma,researchers have introduced knowledge distillation (KD) as an effective strategy for compressing large teacher models into small student models while retaining accuracy. However,conventional logit-based distillation is not very effective in FR because this task emphasizes discriminative feature embeddings rather than direct classification logits and faces additional challenges,including extremely large class space and flat soft targets. Recent studies have explored feature-based or relational distillation,but these approaches often couple student and teacher objectives too tightly,leading to gradient interference and unstable convergence. Furthermore,many methods rely solely on hard labels and overlook the rich relational information embedded in the training data. Motivated by these limitations,this study proposes a novel two-stage contrastive KD framework called TC-Face,which is designed to simultaneously enhance stability,efficiency,and recognition accuracy in lightweight FR models.
The proposed TC-Face framework consists of two decoupled yet complementary stages. At stage one,we introduce a self-supervised contrastive distillation strategy. Instead of directly relying on logit outputs,the student network learns from the relational structure of teacher embeddings through a momentum-updated dynamic feature memory bank. This design allows the student to mimic fine-grained intersample relations derived from the teacher without being overwhelmed by noisy gradients. A difficulty-aware weighting mechanism is employed to further improve robustness. Each training sample is adaptively assigned a weight in accordance with its alignment difficulty: simple and overly hard samples are down-weighted,and moderately challenging samples contribute the most to optimization. This approach balances the knowledge transfer process and prevents overfitting to ambiguous or mislabeled identities. Moreover,momentum updating ensures that the teacher feature bank evolves smoothly,stabilizing supervision signals across iterations. The overall loss integrates embedding alignment,contrastive distribution matching,and adaptive weighting. At stage two,the student transitions from imitation to independent optimization. Specifically,the classifier parameters pretrained by the teacher are reused to initialize the student classifier,thereby reducing redundant training cost and accelerating convergence. With ArcFace-based angular margin loss,the student network now learns to refine its feature space independently; it explores discriminative embeddings while avoiding collapse into mere replicas of the teacher. The classifier is trained with frozen student parameters during the first epochs,followed by joint fine-tuning with shared learning rate schedules,to accelerate early-stage convergence. This two-stage decoupling ensures that the student absorbs structured relational knowledge from the teacher then refines its representation capacity through direct discriminative optimization. Compared with single-stage or tightly coupled KD,TC-Face balances imitation and independence,thus achieving training stability and strong recognition accuracy.
We conduct extensive experiments on multiple public datasets to verify the effectiveness of TC-Face. Training is performed on MS1MV2 and MS1MV3 datasets (5.8 M and 5.1 M images,respectively),and evaluation covers widely used benchmarks,including labeled faces in the wild(LFW),AgeDB,cross-age labeled faces in the wild(CALFW),cross-pose labeled faces in the wild(CPLFW),celebrities in frontal-profile(CFP-FP),MegaFace,IJB-B,and IARPA janus benchmark(IJB-C). On the lightweight backbone MobileFaceNet (2.06 M parameters,0.45 giga floating point operations per second),our method consistently outperforms prior distillation strategies. For example,the silhouette coefficient of embeddings trained with vanilla ArcFace is 0.200,whereas our method improves it to 0.236,surpassing even large models,such as ResNet18 (0.224). This result demonstrates superior intraclass compactness and interclass separability in the feature space. Ablation studies on the IJB-C dataset reveal the contribution of each component. Using vanilla KD with mean squared error loss yields true acceptance rate at false acceptance rate (TAR@FAR) = 1E-4 of 91.29% and TAR@FAR = 1E-5 of 79.79%. Introducing contrastive KD (CKD) improves performance to 92.81% and 84.24%. Our full method with adaptive weighting (CKD+) further increases accuracy to 93.07% and 88.33%. Varying the momentum update rate for the teacher feature bank shows that
This work proposes TC-Face,a novel two-stage contrastive KD framework for lightweight face recognition. By decoupling imitation and discriminative optimization,TC-Face successfully mitigates the limitations of conventional KD methods. The first stage leverages a momentum-based feature bank and adaptive weighting to stabilize relational knowledge transfer,and the second stage enables independent embedding optimization with classifier parameter sharing. Extensive experiments across various benchmarks demonstrate that TC-Face not only improves accuracy by up to 5% TAR on challenging datasets,such as IJB-C,but also accelerates training and maintains efficiency suitable for mobile deployment. Compared with prior state-of-the-art KD methods,our approach achieves superior stability,faster convergence,and more discriminative embeddings,thus setting a new standard for lightweight FR training. In summary,TC-Face bridges the gap between large,high-accuracy teacher models and lightweight,deployable student models,providing a practical solution for real-world face recognition systems constrained by computational resources. Future work may extend this framework to other metric learning tasks,such as person re-identification or fine-grained visual categorization,where structured relational knowledge and decoupled training could similarly enhance lightweight model performance.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |