Slimmable Domain Adaptation

Rang Meng, Weijie Chen, Shicai Yang, Jie Song, Luojun Lin, Di Xie, Shiliang Pu, Xinchao Wang, Mingli Song, Yueting Zhuang

Introduction

Deep learning models are increasingly deployed across a heterogeneous landscape of hardware, ranging from high-performance cloud servers to resource-constrained edge devices like smartwatches and IoT sensors. Traditionally, Unsupervised Domain Adaptation (UDA) focuses on transferring knowledge from a labeled source domain to an unlabeled target domain using a fixed neural architecture. However, this approach creates a significant bottleneck: if a model must be deployed on ten different devices with varying power budgets, the expensive UDA process must be repeated ten times.

Slimmable Domain Adaptation (SlimDA) addresses this inefficiency by introducing a "once-for-all" framework. It trains a single weight-sharing model bank capable of generating optimized sub-models for any hardware constraint. By integrating slimmable neural networks with UDA, SlimDA achieves state-of-the-art accuracy across diverse hardware without the need for architecture-specific retraining.

The Challenge of Multi-Device Adaptation

The authors identify two primary hurdles in adapting models to diverse hardware under domain shift:

  1. Weight Adaptation: Simultaneously optimizing the performance of hundreds of different sub-models within a single weight-sharing bank is computationally complex and prone to instability.
  2. Architecture Adaptation: In a UDA setting, the target data is unlabeled. This makes it difficult to determine which specific sub-model architecture (e.g., which width or channel configuration) will perform best on the target domain without ground-truth labels for validation.

Methodology

SlimDA utilizes a weight-sharing model bank where different "widths" (channel numbers) can be sampled to create models of varying capacities. To optimize this bank, the authors introduced three core innovations:

Stochastic EnsEmble Distillation (SEED)

Rather than training sub-models in isolation, SEED facilitates communication between them. It employs Monte Carlo sampling to aggregate predictions from multiple sub-networks, creating a high-quality "ensemble" teacher. This teacher guides the training of all models in the bank, effectively suppressing uncertainty in the unlabeled target data and ensuring that smaller models benefit from the collective knowledge of the bank.

Optimization-Separated Tri-Classifier (OSTC)

Standard UDA often utilizes two classifiers to detect and minimize domain shifts. However, the authors observed an "optimization conflict" when attempting to perform domain alignment and distillation simultaneously. To resolve this, they introduced a third, dedicated "distillation classifier" ($C^a$). This classifier receives knowledge from the ensemble without interfering with the primary domain-confusion task, allowing for cleaner gradient flow and more stable training.

Unsupervised Performance Evaluation Metric (UPEM)

To solve the architecture selection problem without target labels, the authors developed UPEM. This metric uses the largest model in the bank as an "anchor." By measuring the discrepancy between a candidate sub-model’s output and this anchor’s output, the framework can accurately rank architectures on the fly. This approach is theoretically grounded in the Triangle Inequality Theorem, which suggests that the distance between a sub-model and a high-performing anchor is a reliable proxy for actual accuracy.

Empirical Evaluation

The framework was evaluated on four standard UDA benchmarks: ImageCLEF-DA, Office-31, Office-Home, and VisDA. These datasets cover a wide range of challenges, from synthetic-to-real shifts to multi-category object recognition.

Key Results

  • Efficiency and Scalability: SlimDA demonstrated remarkable resilience to model compression. On the ImageCLEF-DA benchmark, a SlimDA sub-model with 1/64th the computational complexity (FLOPs) of a standard ResNet-50 achieved 86.6% accuracy—only a 2.3% drop from the full-sized model (88.9%).
  • Superiority over Specialized Architectures: SlimDA consistently outperformed popular human-designed and Neural Architecture Search (NAS) models, such as MobileNetV2 and EfficientNet, while maintaining a smaller parameter footprint.
  • The Weight-Sharing Advantage: Sub-models sampled from the SlimDA bank performed significantly better than the same architectures trained individually from scratch. This confirms that the weight-sharing and distillation process allows smaller models to "punch above their weight" by leveraging features learned by larger components of the bank.

Discussion and Future Work

SlimDA represents a significant step toward making UDA practical for real-world, multi-device deployments. By treating architecture and domain adaptation as a joint problem, it eliminates the need for redundant training cycles.

However, the authors note certain limitations. The framework currently relies on the "anchor assumption"—that the largest model in the bank is the most accurate—which may not hold in every extreme domain shift scenario. Furthermore, while highly effective for image classification, future research is needed to extend SlimDA to more complex tasks like object detection and semantic segmentation, where resource constraints on edge devices are even more taxing.

Paper Citation: Rang Meng, et al. "Slimmable Domain Adaptation." arXiv:2206.06620v1 [cs.CV], 2022.

Summary updated

BibTeX
@inproceedings{meng2022slimmable,
  author = {Rang Meng and Weijie Chen and Shicai Yang and Jie Song and Luojun Lin and Di Xie and Shiliang Pu and Xinchao Wang and Mingli Song and Yueting Zhuang},
  title = {{Slimmable Domain Adaptation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure