Abstract
Black-Box Domain Adaptation (BDA) addresses the challenge of adapting a model to a target domain when only API-level access to the source model is available. This setting preserves privacy and intellectual property but prevents the use of gradients or internal features. We propose SEAL (SEparation and ALignment), a novel framework that treats the target domain as a structured graph. SEAL dynamically partitions target data into "well-adapted" and "under-adapted" subsets, then employs graph contrastive learning to align difficult samples with reliable anchors and local neighbors. Our approach achieves state-of-the-art results across multiple benchmarks, including Office-Home and VisDA-2017.
Introduction
Domain adaptation (DA) is a fundamental task in machine learning, aimed at mitigating the performance drop when a model trained on a source domain is deployed on a different target domain. Traditional DA requires concurrent access to source and target data. Recent "Source-Free" methods (SFDA) relax this by requiring only the source model weights. However, Black-Box Domain Adaptation (BDA) represents the most restrictive and privacy-preserving scenario: the source model is accessible only as a "black box" via an API.
In BDA, the lack of gradients and internal features makes adaptation notoriously difficult. Existing methods typically rely on static pseudo-labeling or fixed confidence thresholds to identify "easy" samples for training. These approaches often ignore the evolving structure of the target data as the model learns. SEAL addresses these limitations by introducing a dynamic separation mechanism and a graph-based alignment strategy that leverages the underlying manifold of the target domain.
Methodology: The SEAL Framework
The SEAL framework operates through a cycle of dynamic data separation followed by topological alignment.
1. Well/Under-Adapted Separation
Instead of relying on a static set of easy samples, SEAL continuously re-evaluates the target data. It identifies "well-adapted" samples using two complementary signals:
- Loss Ranking: Leveraging the "memorization effect"—where neural networks learn simple, clean patterns before noisy ones—SEAL selects samples with the lowest current loss.
- Flexible Confidence Threshold: Unlike standard fixed thresholds (e.g., 0.9), SEAL employs a threshold that adjusts per-class based on the model's current performance on that category. This allows the model to capture reliable samples even in classes that are harder to adapt.
2. Graph Contrastive Learning (GCL) for Alignment
The core of SEAL is treating the target domain as a structured graph where samples are nodes. The goal is to align "under-adapted" samples with "well-adapted" anchors.
As shown in the framework overview, the process involves:
- Locality Alignment: Encouraging under-adapted samples to move closer to their k-nearest neighbors in the feature space.
- Class Alignment: Pulling under-adapted samples toward well-adapted samples of the same predicted class.
3. Nearest-Centroid Augmentation
To further refine the feature space, SEAL calculates class centroids. Under-adapted samples are guided to align with these centroids, ensuring that the final clusters are both tightly packed and discriminative. To maintain robustness against early-stage noise, the framework uses a lower weight for edges involving under-adapted samples in the graph construction.
Experimental Results
We evaluated SEAL on four major domain adaptation benchmarks: Office-31, Office-Home, VisDA-2017, and DomainNet.
Performance on Office-Home
On the challenging Office-Home dataset (65 classes), SEAL achieved an average accuracy of 74.5%, outperforming the previous state-of-the-art method, BETA, by 2.4%.
Performance on VisDA-2017
In the large-scale synthetic-to-real VisDA-2017 challenge, SEAL reached 89.2% average accuracy. This represents a significant 4.1% improvement over the BETA baseline, demonstrating the effectiveness of the graph-based alignment in large-scale scenarios.
Ablation and Insights
Ablation studies confirmed that the Graph Contrastive Loss ($L_{cont}$) is the most critical component of the framework. Removing it led to the most substantial performance degradation. Furthermore, the dynamic nature of the "well-adapted" set was found to be crucial; as training progresses, the model successfully incorporates more samples into the reliable pool, effectively shrinking the domain gap.
Conclusion
SEAL provides a robust framework for Black-Box Domain Adaptation by moving beyond static sample selection. By treating the target domain as a manifold and using dynamic thresholds, it effectively propagates information from easy to hard samples. While SEAL assumes the source model provides an initial signal, its topological approach offers a powerful way to handle the "moving target" of adaptation. Future work will explore extending this framework to open-world scenarios where the target domain may contain novel classes.
Summary updated