QGFace: Joint Training for Mixed-Quality Faces
- QGFace is a quality-guided joint training approach that partitions face images using learned feature norms to assign tailored supervision for high- and low-quality samples.
- It integrates margin-based classification for high-quality images with contrastive learning for low-quality images, leveraging a single shared encoder.
- The method employs a proxy-updated real-time queue to maintain alignment of contrastive negatives, boosting low-quality recognition at a modest high-quality trade-off.
QGFace is a quality-guided joint training approach for mixed-quality face recognition that uses a single encoder to learn high-quality (HQ) and low-quality (LQ) face images simultaneously, while assigning different supervision signals according to each sample’s estimated quality. The method partitions training data by a learned quality indicator derived from feature norms, applies margin-based classification to HQ samples, applies self-supervised image-image contrastive learning to LQ samples, and introduces a proxy-updated real-time queue so that contrastive negatives remain aligned with the main encoder and classifier. It is evaluated on the low-quality datasets SCface and Tinyface, the mixed-quality dataset IJB-B, and five high-quality datasets, with the explicit objective of improving recognition under realistic mixed-quality conditions without ensembling, pre-trained extra backbones, or auxiliary teacher structures (Song et al., 2023).
1. Problem setting and conceptual premise
Mixed-quality face recognition is framed as the problem of identifying or verifying faces when image quality varies substantially because of camera resolution, subject–camera distance, illumination condition, and related factors. The central difficulty is that approaches optimized for HQ imagery and approaches optimized for LQ imagery tend to fail outside their intended regimes. In the formulation associated with QGFace, HQ-trained classifiers lose discriminability on very degraded inputs, while LQ-specialized methods generally sacrifice performance on HQ data (Song et al., 2023).
The design premise is that different quality regimes should not be trained under a single undifferentiated supervisory signal. Purely classification-based losses such as ArcFace and CosFace are described as relying on crisp, identity-bearing details and therefore stumbling on blurred or low-resolution images. Conversely, self-supervised or contrastive schemes can learn instance-level distinctions in impoverished images, but alone they do not provide the fine-grained cross-identity discrimination needed for retrieval or large-scale identification. QGFace therefore treats mixed-quality recognition as a routing problem: partition training data into HQ and LQ subsets via a learned quality indicator, then apply margin-based classification for HQ and InfoNCE-style contrastive learning for LQ.
This formulation makes quality a training-time control variable rather than a purely post hoc confidence estimate. The intended effect is not to build separate models for different quality regimes, but to make a single encoder competent across them.
2. Quality partition and routing mechanism
QGFace adopts the empirical observation of MagFace and AdaFace that a feature’s Euclidean norm correlates strongly with input quality. For sample , if is the embedding produced by the encoder, the raw quality-related statistic is
Let and denote the running mean and standard deviation of over the training set. QGFace standardizes and clips the norm to obtain a bounded quality indicator :
Here is a scale factor, exemplified as , chosen so that most standardized norms lie in 0. During backpropagation, the gradient 1 is blocked so that the network is not forced to inflate norms artificially for easier learning (Song et al., 2023).
A threshold 2 is then used to partition training samples. In practice, 3 is used. Samples with 4 are routed to the HQ branch, and samples with 5 are routed to the LQ branch. For contrastive learning, routing is defined on feature pairs rather than isolated samples: the pair quality is the lower of the two constituent quality indicators, and only pairs with 6 are sent into the LQ branch.
This routing mechanism is the operational core of QGFace. It converts quality estimation into an explicit partition strategy while preserving a single shared backbone. A plausible implication is that the method treats quality not as a categorical label provided by annotation, but as a continuously estimated internal signal derived from representation geometry.
3. Shared encoder and HQ supervision
All samples, whether HQ or LQ, share a single ResNet-34 backbone that maps each face crop 7 to a 8-dimensional embedding 9. The architecture is specified as input, followed by conv1, residual blocks 1–4, a global 0 average pool, and a 1-dimensional feature output. For the HQ branch, 2 is 3-normalized and passed into a margin-based softmax classifier 4. For the LQ branch, the same feature 5 and its augmented counterpart are used directly in the contrastive loss, with no extra MLP head (Song et al., 2023).
HQ supervision uses AdaFace, identified as a variant of additive-angular-margin softmax that adaptively modulates margins based on 6. The quality-dependent terms are
7
with static margin 8, exemplified as 9, and global scale 0, exemplified as 1. Under this parameterization, high-quality samples with 2 receive a large additive margin of approximately 3, while borderline HQ samples receive a smaller effective margin. The stated effect is to balance easy versus hard positives automatically.
The HQ branch retains the standard face-recognition requirement for inter-identity discrimination at scale. Rather than redefining recognition around quality degradation alone, QGFace preserves the classifier-based regime where identity-bearing detail is sufficiently available.
4. LQ supervision, supervised masking, and the proxy-updated real-time queue
For LQ images, QGFace replaces identity classification with self-supervised instance-level contrastive learning. Each pair consists of an original face and one on-the-fly augmentation of that same face. The formulation uses a single augmentation per sample rather than two. The augmentation suite includes down/up-sampling, random crop and resize, rotation, color jitter in brightness, contrast, and saturation, and JPEG compression; horizontal flip appears in the training pipeline generally, while the LQ branch specifically uses the low-quality simulation operations (Song et al., 2023).
To avoid conflict with the HQ classification head, QGFace introduces a Supervised Contrastive Mask that excludes any negative whose identity matches the positive identity. The per-pair InfoNCE loss is written as
4
where 5 is a queue of negative keys and 6 is again set to 7.
A central architectural contribution is the proxy-updated real-time queue. Classical MoCo uses a momentum encoder to populate a large negative queue, but the QGFace description argues that in the joint-training scenario this momentum encoder drifts away from the main model and yields whitened features that are no longer aligned with the HQ-supervised classifier. QGFace instead maintains a feature queue of the last 8 encoder outputs and a parallel proxy queue of the corresponding classifier weights. When a new key is pushed into the queue, its current classifier weight 9 is pushed as a proxy. At each iteration, stored features are refreshed according to
0
The queue size is set to 1, the number of identities, so that the contrastive branch compares against as many negatives as the classification branch. The stated purpose is to keep queued negatives discriminative and consistent with the current classification boundary.
5. Joint objective, inference pathway, and optimization details
The combined training objective is the sum of the HQ classification loss over HQ-routed samples and the LQ contrastive loss over LQ-routed pairs:
2
No extra weighting is required in practice; the thresholding itself routes each sample to its designated supervision regime. During inference, both HQ and LQ faces pass only through the shared encoder. The classifier head and the queue are discarded, and matching uses pure cosine similarity on the embeddings (Song et al., 2023).
The specified training configuration uses VGGFace2, described as approximately 3 million images and 4 thousand identities. The backbone is ResNet-34 with output dimension 5. Loss parameters are AdaFace classification plus contrastive InfoNCE, both with 6, 7, and threshold 8. Optimization uses SGD with learning rate 9 at the sixth epoch and 0 at the ninth epoch, for a total of 1 epochs, with momentum 2 and weight decay 3. Batch size is 4, mixing HQ and LQ samples.
These design choices emphasize end-to-end joint training under a single backbone. The method is explicitly described as requiring no pre-trained teacher, no separate “teacher” or momentum encoder, and no separate super-resolution module.
6. Empirical behavior, benchmarks, and trade-offs
QGFace is evaluated on three benchmark categories: five HQ datasets—LFW, AgeDB-30, CFP-FP, CALFW, and CPLFW; two LQ datasets—SCface and TinyFace; and one mixed-quality dataset—IJB-B. SCface is evaluated as rank-1 identification against an HQ gallery at distances 5 m, 6 m, and 7 m. TinyFace is evaluated by rank-1 retrieval. IJB-B is evaluated by 8 verification with 9 (Song et al., 2023).
| Benchmark | Metric | AdaFace 0 QGFace |
|---|---|---|
| SCface 1 | Rank-1 % | 61.7 2 92.3 |
| SCface 3 | Rank-1 % | 97.2 4 99.5 |
| SCface 5 | Rank-1 % | 99.9 6 100.0 |
| TinyFace | Rank-1 % | 64.0 7 69.9 |
| IJB-B | 8 | 90.3% 9 95.4% |
| HQ average over 5 sets | Acc % | 95.6% 0 93.1% |
The reported pattern is asymmetric across quality regimes. On low-quality and mixed-quality benchmarks, QGFace improves substantially relative to AdaFace; on the five-dataset HQ average, it drops by approximately 1. The paper interprets this as a trade for large gains at low quality.
The ablation results further specify the mechanism of that trade-off. Without partitioning, using 2 or 3, the two losses conflict and mixed-quality performance drops. A pure momentum-encoder queue degrades both low- and high-quality results. The proxy-updated queue produces the best LQ gains with minimal HQ sacrifice. The best threshold is approximately 4, which balances the two branches. These findings establish that the method’s benefit is not merely the addition of a contrastive term, but the interaction among partitioning, branch-specific objectives, and queue synchronization.
7. Relation to explicit face-quality assessment and possible extensions
QGFace estimates quality implicitly from feature norms, but the broader face-biometrics literature also contains explicit quality-assessment systems. FaceQvec defines a 5-dimensional quality vector 6 aligned with ISO/IEC 19794-5, with individual tests covering blur, eyes direction, illumination, contrast, pixelation, pose estimation, shadows, occlusions, other faces, white noise estimation, and expression, among others (Hernandez-Ortega et al., 2021).
An extension described in relation to FaceQvec couples such an explicit quality vector to QGFace. In that description, FaceQvec can feed directly into QGFace as a 7-dimensional feature vector 8 or as the pre-thresholded raw score vector 9, enabling QGFace to use quality as auxiliary input, compare or fuse FaceQvec dimensions with learned quality dimensions, adapt thresholds per deployment, or treat each 0 as a soft constraint when predicting enrollment or verification success. This is not part of the original QGFace training procedure, which relies on the scalar norm-derived indicator 1, but it indicates a route toward attribute-aware quality profiling.
The relation between QGFace and FaceQvec also clarifies a broader distinction in face biometrics. QGFace uses quality to determine which supervision signal is most appropriate during representation learning; FaceQvec operationalizes quality as a structured, ISO-aligned vector of interpretable tests. This suggests a complementarity between implicit quality guidance for optimization and explicit quality auditing for deployment, threshold calibration, or failure analysis.