Introduction
In the current machine learning landscape, two significant hurdles often prevent the deployment of robust models: Domain Shift and Data Scarcity. Domain Generalization (DG) addresses the former by training models to perform well on unseen target domains, while Semi-Supervised Learning (SSL) addresses the latter by leveraging unlabeled data. However, the intersection of these fields—Semi-Supervised Domain Generalization (SSDG)—remains a formidable challenge. In SSDG, models must generalize to new domains using only a small fraction of labeled data from multiple source domains.
This paper introduces UPLM (Uncertainty-guided Pseudo-labelling with Model Averaging), a framework specifically designed to overcome the limitations of standard SSL when applied to domain-shifted data. By integrating uncertainty estimation and parameter averaging, UPLM achieves state-of-the-art performance across several rigorous benchmarks.
The Problem: When Confidence is Deceptive
Standard SSL pipelines, such as FixMatch, rely on a confidence threshold to generate pseudo-labels for unlabeled data. While effective for in-distribution data, these methods often collapse under domain shift. Models become "confidently wrong," assigning high-confidence scores to incorrect predictions on out-of-distribution data. This leads to the accumulation of noise in the training process, as the model essentially learns from its own mistakes.
The authors identify that under domain shift, the Expected Calibration Error (ECE) spikes. A high confidence score no longer correlates with accuracy, making traditional thresholding insufficient for robust pseudo-labelling.
The UPLM Framework
To address these issues, UPLM introduces two primary components into the SSL pipeline:
1. Uncertainty-guided Pseudo-Labelling (UPL)
UPL adds a secondary gate to the pseudo-labelling process: Predictive Uncertainty. Instead of a single forward pass, the model employs Monte-Carlo (MC) Dropout, performing multiple forward passes for each unlabeled image.
If the model's predictions vary significantly across these passes (indicating high uncertainty), the pseudo-label is rejected, even if the individual confidence score is high. This ensures that the model only incorporates "stable" predictions into its training set, effectively re-calibrating the semi-supervised process and filtering out the noise caused by domain shift.
2. Model Averaging (MA)
To combat overfitting to the limited labeled data, the authors utilize a weight-averaging strategy at inference time. Rather than relying on a single set of weights, they average the parameters ($\theta$) from three distinct states of the model:
- $\theta_{best}$: The model with the highest performance on the validation set.
- $\theta_{last}$: The model from the final training epoch.
- $\theta_{ema}$: The Exponential Moving Average (EMA) model.
This approach, reminiscent of stochastic weight averaging, smooths the loss landscape. By doing so, it enhances the model's ability to generalize to unseen target domains without the computational burden of a full ensemble at inference time.
Experimental Results
The UPLM framework was evaluated on four standard DG benchmarks (PACS, OfficeHome, TerraIncognita, and VLCS) in a "low-label" setting, typically using only 10 labels per class per domain.
Performance Gains
UPLM demonstrated substantial improvements over both standard DG methods and SSL baselines:
- VLCS: Accuracy improved from a baseline of 43.32% to 62.72%.
- TerraIncognita: Performance nearly doubled, jumping from 17.56% to 30.19%.
- PACS: Achieved an average accuracy of 78.94%, compared to 73.51% for the FixMatch baseline.
Pseudo-label Quality
A key finding was the direct impact of UPL on label quality. On the PACS dataset, the accuracy of the generated pseudo-labels rose from 85.34% to 92.20%. This confirms that the uncertainty gate successfully identifies and prunes incorrect high-confidence predictions.
Conclusion and Future Work
UPLM provides a robust solution for the SSDG problem by recognizing that confidence is an unreliable metric under domain shift. By incorporating Monte-Carlo dropout for uncertainty estimation and employing a parameter-averaging strategy, the framework significantly enhances model calibration and generalization.
While the method introduces some computational overhead due to multiple forward passes and requires hyperparameter tuning for the uncertainty threshold, its ability to leverage unlabeled data in domain-shifted environments marks a significant step forward. Future research may focus on adaptive thresholds to better handle class imbalances in large-scale datasets like OfficeHome.
Summary updated