Dynamic Instance Domain Adaptation

Zhongying Deng, Kaiyang Zhou, Da Li, Junjun He, Yi-Zhe Song, Tao Xiang · DOI

Abstract

Most existing studies on unsupervised domain adaptation (UDA) assume that training samples come with coarse domain labels (e.g., "painting" or "photo"). These methods typically attempt to learn domain-invariant features by aligning distributions across these broad categories. However, this assumption often fails in practice, as domains frequently contain finer-grained sub-distributions that differ dramatically. In this paper, we propose Dynamic Instance Domain Adaptation (DIDA), a novel perspective that treats each individual instance as its own unique domain. By utilizing a dynamic neural network with adaptive convolutional kernels, our model—DIDA-Net—generates instance-specific residuals to calibrate features for every image. This approach eliminates the need for explicit domain labels and complex alignment losses. DIDA-Net achieves state-of-the-art performance across major UDA benchmarks, including PACS, Office-Home, and DomainNet.

Introduction

Unsupervised Domain Adaptation (UDA) aims to bridge the gap between a labeled source domain and an unlabeled target domain. Traditional approaches rely heavily on the concept of monolithic domains, assuming all samples within a category like "Art" follow a single distribution. This coarse-grained view is often artificial; for instance, a hyper-realistic painting may share more features with a photograph than with a cubist sketch. Forcing feature alignment across such diverse and poorly defined groups can lead to "negative transfer," where the model's performance actually degrades.

We argue that the most effective way to handle domain shift is to move beyond coarse labels. Instead of aligning broad distributions, we propose that every image should be treated as its own fine-grained domain. By adapting the model at the instance level, we can bypass the limitations of subjective domain boundaries and create a more flexible, robust representation.

The DIDA-Net Framework

To implement this instance-level adaptation, we developed DIDA-Net. Unlike static models that apply the same transformations to every input, DIDA-Net employs a dynamic architecture consisting of two parallel branches:

  1. Static Sub-network: A standard convolutional backbone (e.g., ResNet) that extracts domain-agnostic features, focusing on the core semantic content of the image.
  2. DIDA Module (Dynamic Branch): This module contains a Kernel Generator that synthesizes custom convolutional kernels on the fly for each specific input. These kernels utilize varying dilation rates to capture multi-scale information. The output of this branch is an instance-adaptive residual, which is added to the static features to "calibrate" them based on the unique stylistic and structural properties of that specific image.

By combining these branches, the model adapts its feature extraction process for every image individually. Crucially, DIDA-Net does not require complex adversarial training or Maximum Mean Discrepancy (MMD) losses. Instead, it utilizes a shared classifier and a simple semi-supervised learning paradigm, employing standard cross-entropy for source data and pseudo-labeling (following the FixMatch framework) for target data.

Experimental Results

We evaluated DIDA-Net on five diverse UDA benchmarks, covering both single-source and multi-source scenarios:

  • PACS: DIDA-Net achieved a state-of-the-art (SOTA) accuracy of 91.83%, significantly outperforming previous methods like LtC-MSDA (89.85%) and dynamic competitors like DRT (87.30%).
  • DomainNet: On this large-scale dataset (~0.6 million images), DIDA-Net reached 51.9% average accuracy, establishing a new lead in multi-source adaptation.
  • Office-Home & Digits: The model consistently outperformed existing alignment-based methods across all sub-tasks.

Efficiency and Robustness

Despite its dynamic nature, DIDA-Net is highly efficient. It adds only approximately 0.22M parameters to a standard ResNet-18 backbone and maintains a similar computational footprint (MACs). Ablation studies confirmed the importance of the DIDA module; removing the dynamic residual component resulted in a 2.97% drop in accuracy on the PACS dataset. The model proved particularly robust in handling drastic shifts, such as the "Sketch" domain in PACS, where it improved accuracy by over 3% compared to prior art.

Discussion and Conclusion

The success of DIDA-Net suggests that the "instance-as-a-domain" philosophy is a powerful alternative to traditional feature alignment. By allowing the model to tweak its features per-instance, we achieve implicit alignment in a shared latent space without the need for explicit domain supervision.

One observed limitation is the model's sensitivity to extremely noisy target data, such as the "Infograph" domain in DomainNet, where irrelevant icons and text can lead to poor pseudo-labels. Future research will focus on enhancing the robustness of the pseudo-labeling process and exploring the application of instance-level adaptation to more complex tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@article{deng2022dynamic,
  author = {Zhongying Deng and Kaiyang Zhou and Da Li and Junjun He and Yi-Zhe Song and Tao Xiang},
  title = {{Dynamic Instance Domain Adaptation}},
  journal = {IEEE Trans. Image Process.},
  year = {2022},
  doi = {10.1109/tip.2022.3186531},
}
Figure