Abstract
Beyond the complexity of CNNs that require training on large annotated datasets, the domain shift between design and operational data has limited the adoption of CNNs in many real-world applications. For instance, in person re-identification, videos are captured over a distributed set of cameras with non-overlapping viewpoints. The shift between the source (e.g. lab setting) and target (e.g. cameras) domains may lead to a significant decline in recognition accuracy. Additionally, state-of-the-art CNNs may not be suitable for such real-time applications given their computational requirements. Although several techniques have recently been proposed to address domain shift problems through unsupervised domain adaptation (UDA), or to accelerate/compress CNNs through knowledge distillation (KD), we seek to simultaneously adapt and compress CNNs to generalize well across multiple target domains. In this paper, we propose a progressive KD approach for unsupervised single-target DA (STDA) and multi-target DA (MTDA) of CNNs. Our method for KD-STDA adapts a CNN to a single target domain by distilling from a larger teacher CNN, trained on both target and source domain data in order to maintain its consistency with a common representation. Our proposed approach is compared against state-of-the-art methods for compression and STDA of CNNs on the Office31 and ImageClef-DA image classification datasets. It is also compared against state-of-the-art methods for MTDA on Digits, Office31, and OfficeHome. In both settings -- KD-STDA and KD-MTDA -- results indicate that our approach can achieve the highest level of accuracy across target domains, while requiring a comparable or lower CNN complexity.
Introduction
Deep learning models face two massive hurdles when deployed in the real world: domain shift and computational complexity.
- Domain Shift: A model trained on high-quality lab images (the source domain) often performs poorly when deployed on grainy security cameras (the target domain). Unsupervised Domain Adaptation (UDA) tries to fix this using unlabeled target data, but it is often computationally heavy.
- Complexity: State-of-the-art Convolutional Neural Networks (CNNs) are frequently too large for edge devices. Compression techniques like Knowledge Distillation (KD) or pruning can shrink them, but these usually require labeled data, which is unavailable for the target domain.
Combining these two solutions is notoriously difficult. Compressing a model first can lose the "over-parameterization" needed to adapt to a new domain. Conversely, adapting a large model first and then compressing it often fails because the lack of target domain labels ruins the distillation process. Furthermore, adapting a single model to multiple different target domains simultaneously (Multi-Target Domain Adaptation, or MTDA) typically requires training separate models for each environment, which is logistically impractical.
Proposed Methods
The authors propose a joint, progressive optimization strategy that tackles UDA and KD simultaneously to create efficient, adapted models.
Single-Target DA (KD-STDA)
In the KD-STDA framework, a large, pre-trained "teacher" CNN and a smaller "student" CNN are used. The teacher continuously adapts to the target domain using standard UDA techniques (such as MMD or RevGrad). Simultaneously, the teacher distills its knowledge to the student. To prevent the student from collapsing due to the lack of target labels, a consistency loss is introduced, forcing the student to retain labeled source domain knowledge. An exponential scheduling parameter ($\beta$) dynamically shifts the training focus: early on, the system focuses on UDA to allow the teacher to learn the target domain; later, it shifts to KD, forcing the student to absorb the teacher's newly acquired knowledge.
Multi-Target DA (KD-MTDA)
For multi-target scenarios, the authors employ a "divide and conquer" approach. They assign a separate teacher model to each specific target domain. These specialized teachers then sequentially take turns distilling their knowledge into a single, common student CNN. This allows the student to build highly transferable features without the computational bloat of deploying multiple models.
Experimental Setup
The methods were evaluated across several standard domain adaptation benchmarks:
- Digits: MNIST, MNIST-M, SVHN, and USPS (for MTDA).
- Office31: Images from Amazon, DSLR, and Webcam (for STDA and MTDA).
- ImageClef-DA: Subsets from ImageNet, Pascal-VOC, Caltech, and Bing (for STDA).
- PACS: Art painting, Photo, Cartoon, and Sketch (for MTDA).
- OfficeCaltech: Amazon, Caltech10, DSLR, and Webcam (for MTDA).
Key Insights
- Over-parameterization vs. Pruning: Distilling knowledge into a smaller, dense student model yields significantly better generalization than pruning a large model's weights.
- Progressive Learning: By jointly training the teacher and student, the student learns the adaptation process itself, resulting in a more robust final model.
- Scalability of Multiple Teachers: Mixing all target data together often causes confusion and degrades accuracy. Using specialized teachers that distill into one student is more effective for MTDA.
Results and Discussion
- Single-Target Performance: On the Office31 dataset, the KD-STDA method with a ResNet18 student achieved 83.2% average accuracy, significantly outperforming the Transfer Channel Pruning (TCP) baseline (71.3%), despite the ResNet18 having lower computational requirements (1.8 GFLOPs vs. 2.2 GFLOPs).
- Multi-Target Performance: On the highly varied PACS dataset, KD-MTDA achieved 46.6% average accuracy, nearly doubling the performance of the previous state-of-the-art MTDA-ITA method (30.5%).
- Ablation Studies: Joint progressive training (simultaneous UDA and KD) was shown to significantly outperform sequential pipelines.
Conclusion and Future Work
While the proposed methods achieve state-of-the-art results, the authors note that performance could be further improved by fine-tuning hyperparameters for specific source-target combinations. Future research will explore more efficient target domain knowledge transfer methods for higher compression rates and better fusion techniques for combining knowledge from multiple teachers.
Summary updated