Yunzhong Hou and Liang Zheng
Australian National University
Abstract
A source model trained on source data and a target model learned through unsupervised domain adaptation (UDA) usually encode different knowledge. To understand the adaptation process, we portray their knowledge difference with image translation. Specifically, we feed a translated image and its original version to the two models respectively, formulating two branches. Through updating the translated image, we force similar outputs from the two branches. When such requirements are met, differences between the two images can compensate for and hence represent the knowledge difference between models. To enforce similar outputs from the two branches and depict the adapted knowledge, we propose a source-free image translation method that generates source-style images using only target images and the two models. We visualize the adapted knowledge on several datasets with different UDA methods and find that generated images successfully capture the style difference between the two domains. For application, we show that generated images enable further tuning of the target model without accessing source data.
Introduction
In Unsupervised Domain Adaptation (UDA), models are trained on a labeled "source" domain (e.g., synthetic CAD drawings) and adapted to an unlabeled "target" domain (e.g., real-world photos). While performance metrics like accuracy provide a quantitative measure of success, understanding exactly what a model learns or discards during this adaptation process remains a challenge.
Existing visualization tools typically require access to the original source dataset. However, in many real-world applications, source data is unavailable due to privacy constraints or storage limitations. This paper introduces Source-Free Image Translation (SFIT), a framework designed to visualize the "knowledge gap" between source and target models without requiring any source-domain pixels.
The Challenge of Domain Gaps
The difficulty of UDA stems from the significant stylistic and contextual differences between domains. For instance, in the VisDA dataset, the source domain consists of clean, synthetic 3D models, while the target domain contains complex real-world imagery.
Proposed Method: Source-Free Image Translation (SFIT)
The core of the SFIT framework is a two-branch architecture involving a generator and two fixed models: the original Source Model and the adapted Target Model.
- Two-Branch Architecture: A target image is fed into the Target Model. Simultaneously, a generator creates a "translated" version of that same image, which is then fed into the Source Model.
- Optimization Goal: The generator is trained to modify the target image until the Source Model produces the same output as the Target Model.
- Knowledge Representation: If the Source Model reacts to the translated image the same way the Target Model reacts to the original image, the difference between these images represents the knowledge gained during adaptation.
- Relationship Preserving (RP) Loss: To avoid the pitfalls of traditional style transfer—where a few dominant features can overwhelm the translation—the authors introduce a row-wise normalized Gram matrix. This ensures the generator captures style across all feature channels evenly, preserving the semantic structure of the foreground object.
Key Insights and Results
Visualizing the "Aha!" Moment
On the VisDA dataset, SFIT reveals that adaptation primarily involves learning to ignore high color saturation and complex backgrounds. The generated images often appear as "bleached," simplified versions of the real world—effectively representing how the synthetic-trained source model "wants" to see the data to process it correctly.
Bridging the Performance Gap
The effectiveness of the translation is confirmed by feeding generated images back into the source model. On the SVHN → MNIST task, the source model's accuracy on target data rose from 72.3% to 98.6% when using SFIT-generated images, nearly matching the performance of the fully adapted target model.
Source-Free Fine-Tuning
Beyond visualization, SFIT enables practical applications in data-restricted scenarios. By using generated images to "self-train" the target model, the authors achieved a 0.7% accuracy improvement on the VisDA dataset without ever accessing the original source data.
Conclusion
SFIT demonstrates that a trained model's weights act as a repository of stylistic knowledge. By extracting this knowledge through image translation, researchers can not only debug the adaptation process but also improve model performance in source-free environments. Future work may extend these visualizations to incremental learning, helping models retain legacy knowledge while adapting to new domains.
Summary updated