Introduction
Deep learning has significantly advanced Unsupervised Domain Adaptation (UDA), enabling models trained on labeled "source" datasets to generalize to unlabeled "target" datasets with different distributions. However, the computational intensity of state-of-the-art UDA models often precludes their deployment on resource-constrained edge devices. This paper introduces Transfer Channel Pruning (TCP), a novel framework designed to compress UDA models while maintaining, or even enhancing, their cross-domain performance.
The Challenge of UDA Pruning
Standard network compression techniques, particularly channel pruning, typically rely on labeled data to determine which channels are redundant. In UDA scenarios, the target domain lacks labels, making traditional importance metrics unreliable. Furthermore, conventional pruning is "domain-blind"—it ignores the distribution shift between the source and target. Pruning based solely on source-domain performance risks removing features critical for bridging the gap to the target domain, a phenomenon known as negative transfer.
The Transfer Channel Pruning (TCP) Framework
TCP addresses these challenges by treating pruning as an optimization problem integrated directly into the adaptation process. Unlike two-stage approaches that prune first and adapt later, TCP iteratively refines the model's architecture and weights simultaneously.
Key Components
- Transfer Channel Evaluation: TCP employs a first-order Taylor expansion to estimate the impact of removing a specific channel on the total loss. This allows for an efficient assessment of channel importance without exhaustive retraining.
- Dual-Purpose Loss Function: The importance of a channel is determined by its contribution to both task accuracy and domain alignment. The loss function combines:
- Classification Loss ($L_{cls}$): Preserves discriminative power on the source domain.
- Maximum Mean Discrepancy (MMD) Loss ($L_{mmd}$): Quantifies the distance between source and target feature distributions.
- Dynamic Weighting: A dynamic factor ($\beta$) balances these losses, gradually increasing the emphasis on domain alignment as the pruning progresses to ensure stable convergence.
- Iterative Refinement: The process follows a loop: evaluate channels, remove the $K$ least important ones, perform short-term fine-tuning to recover performance, and repeat until the target compression ratio is achieved.
Experimental Results
The authors evaluated TCP using VGG16 and ResNet50 backbones on two major UDA benchmarks: Office-31 and ImageCLEF-DA.
Performance Highlights
- VGG16 on Office-31: TCP achieved a 26% reduction in FLOPs while increasing average accuracy from 74.5% to 74.8%. Even at a drastic 70% FLOP reduction, TCP maintained 67.1% accuracy, significantly outperforming standard pruning and random selection baselines.
- ResNet50: The framework demonstrated similar robustness, achieving higher accuracy on several tasks even after pruning 12% of the network's FLOPs.
- Efficiency vs. Accuracy: As shown in the performance curves, TCP consistently maintains higher accuracy across various levels of compression compared to "Two-stage" methods (which prune on the source then adapt) and "TCP without Domain Adaptation" (TCP_w/o_DA).
Insights: Pruning as a Regularizer
A key finding of this research is that TCP often improves model accuracy post-pruning. This suggests that many channels in over-parameterized networks capture domain-specific noise or quirks that actually hinder generalization. By specifically targeting channels that increase domain discrepancy (via the MMD loss), TCP acts as a "negative transfer filter," removing the parts of the network that cause the model to overfit to the source domain.
Furthermore, visualization of the pruned layers revealed that TCP tends to prune more aggressively in higher layers. This supports the intuition that lower layers learn general features (like edges) useful for any domain, while higher layers learn task-specific features that are more likely to be redundant or domain-sensitive in a UDA context.
Conclusion and Future Directions
TCP represents a significant step toward deploying efficient UDA models. By incorporating domain discrepancy into the pruning criteria, it bridges the gap between model compression and domain adaptation. Future work may explore extending TCP to adversarial-based UDA frameworks (like DANN) and addressing heterogeneous UDA where source and target feature spaces differ fundamentally.
Summary updated