Abstract
Generalized Source-free Domain Adaptation (G-SFDA) addresses the critical challenge of adapting a pre-trained model to a new, unlabeled target domain without access to the original source data, while simultaneously preserving performance on the source domain. We propose two novel components: Local Structure Clustering (LSC) to exploit target domain geometry via nearest neighbors, and Sparse Domain Attention (SDA) to prevent catastrophic forgetting by regularizing gradients on source-critical feature channels. Our approach achieves state-of-the-art performance on the VisDA benchmark (85.4% target accuracy) while maintaining over 90% source accuracy, demonstrating its effectiveness for lifelong learning.
Introduction
In machine learning, Domain Adaptation (DA) involves transferring knowledge from a labeled source domain (e.g., synthetic images) to a different but related unlabeled target domain (e.g., real-world photos). Source-free Domain Adaptation (SFDA) is a more restrictive and realistic scenario where, due to privacy or storage constraints, only the pre-trained model is available for adaptation, not the original source data.
A major limitation of existing SFDA methods is their focus solely on target domain performance, which often leads to "catastrophic forgetting" of the source domain. This paper introduces Generalized Source-free Domain Adaptation (G-SFDA), aiming for a model that remains effective in both the old and new environments—essential for applications like autonomous driving where a model must adapt to new weather conditions without losing its ability to navigate clear skies.
Methods
The G-SFDA framework introduces two primary mechanisms to balance adaptation and retention:
1. Local Structure Clustering (LSC)
Since target data lacks ground-truth labels, LSC leverages the underlying "geometry" of the feature space. It assumes that samples close to each other in feature space likely belong to the same category. By maintaining a feature bank to identify a sample's $K$-nearest neighbors, the model is encouraged to produce consistent predictions across local neighborhoods, effectively clustering the target data into semantically meaningful groups.
2. Sparse Domain Attention (SDA)
SDA is the core mechanism for preventing forgetting. The model learns a sparse "mask" (near-binary attention vector) that activates specific feature channels for each domain.
- Source Protection: During adaptation, the model identifies channels critical for the source domain using the source mask.
- Gradient Regularization: During backpropagation on target data, the model regularizes gradients for these source-critical channels. This "gradient masking" prevents the optimizer from overwriting weights essential for source performance, allowing new target features to be learned in "empty" or less critical channels.
To handle inference across domains, a small Domain-ID estimator is trained to automatically select the appropriate attention mask for a given input.
Key Results
The authors evaluated G-SFDA on major benchmarks including VisDA-C (synthetic to real) and Office-Home.
- State-of-the-Art Target Performance: On VisDA-C, G-SFDA achieved 85.4% accuracy, outperforming previous source-free methods like SHOT (82.9%) and even some methods that utilize source data.
- Source Preservation: While standard SFDA methods saw source accuracy plummet (e.g., from 99% to ~75% on VisDA), G-SFDA maintained source accuracy at over 90%.
- Continual Adaptation: The method successfully adapted to sequences of multiple domains (A → B → C) while maintaining performance across all previous domains, highlighting its potential for lifelong learning.
Discussion and Limitations
While G-SFDA significantly advances generalized adaptation, some challenges remain. The authors noted that "inner layer forgetting" still occurs, as the current gradient regularization primarily protects the final layers of the feature extractor. Additionally, the model's performance is sensitive to Batch Normalization (BN) statistics, which shift between domains. Future work may focus on better managing these statistics or extending regularization deeper into the network. Finally, the system's reliance on a Domain-ID estimator suggests potential bottlenecks in scenarios where domains overlap significantly.
Summary updated