Source-linked AI summary

Deep Subdomain Adaptation Network for Image Classification

Yongchun Zhu, Fuzhen Zhuang, Jindong Wang, Guolin Ke, Jingwu Chen, Jiang Bian, Hui Xiong, Qing He

arXiv:2106.09388v1cs.CVcs.AI

TL;DR

Limited target labels and global alignment that ignores same-class subdomains motivate a finer-grained adaptation strategy. DSAN uses LMMD to align relevant subdomain distributions in deep activations without adversarial training, and experiments report strong results across object recognition and digit classification tasks.

  • Problem

    Existing deep adaptation methods mainly align global source and target distributions, overlooking same-class subdomain relationships and potentially losing fine-grained category information.

  • Method

    DSAN is a simple non-adversarial network that aligns relevant subdomain distributions in domain-specific layers using LMMD, trained through standard back-propagation.

  • Results

    DSAN outperforms compared methods on most object-recognition transfer tasks and largely outperforms baselines on digit-classification tasks except SVHN →MNIST.

  • Takeaways & Limitations

    The experiments support relevant subdomain alignment as a way to capture finer-grained information while retaining a simple, non-adversarial adaptation procedure.

Abstract

from arXiv · show

For a target task where labeled data is unavailable, domain adaptation can transfer a learner from a different source domain. Previous deep domain adaptation methods mainly learn a global domain shift, i.e., align the global source and target distributions without considering the relationships between two subdomains within the same category of different domains, leading to unsatisfying transfer learning performance without capturing the fine-grained information. Recently, more and more researchers pay attention to Subdomain Adaptation which focuses on accurately aligning the distributions of the relevant subdomains. However, most of them are adversarial methods which contain several loss functions and converge slowly. Based on this, we present Deep Subdomain Adaptation Network (DSAN) which learns a transfer network by aligning the relevant subdomain distributions of domain-specific layer activations across different domains based on a local maximum mean discrepancy (LMMD). Our DSAN is very simple but effective which does not need adversarial training and converges fast. The adaptation can be achieved easily with most feed-forward network models by extending them with LMMD loss, which can be trained efficiently via back-propagation. Experiments demonstrate that DSAN can achieve remarkable results on both object recognition tasks and digit classification tasks. Our code will be available at: https://github.com/easezyc/deep-transfer-learning

I. INTRODUCTION

Domain adaptation addresses distribution shifts when labeled target data is scarce, but global alignment can mix class-specific structures and lose fine-grained information. DSAN instead aligns relevant subdomains with LMMD, providing a simple non-adversarial approach evaluated across object recognition and digit classification tasks.

  • Domain adaptation transfers knowledge from labeled source data when collecting sufficient target labels is expensive, but distribution shifts can undermine model generalization.
  • Global domain adaptation aligns source and target distributions without modeling same-class subdomains, which can mix discriminative structures and lose category-level fine-grained information.
  • Subdomain Adaptation aligns relevant source and target distributions within the same category, exploiting local relationships while also approximately matching global distributions.
  • DSAN aligns relevant subdomain distributions in domain-specific layers for unsupervised adaptation using LMMD, which weights samples and is trainable by back-propagation.
  • DSAN is presented as simple, non-adversarial, and easy to implement, with experiments reporting results on object recognition and digit classification tasks.
  • Prior adaptation work includes statistic moment matching and adversarial losses, while DSAN is characterized as an MMD-based method.

III. DEEP SUBDOMAIN ADAPTATION NETWORK

Unsupervised domain adaptation uses labeled source samples and unlabeled target samples drawn from different distributions. Subdomain Adaptation combines source classification with alignment of same-class subdomains, addressing limitations of global distribution alignment through target pseudo-labels and LMMD.

  • Unsupervised domain adaptation uses labeled source samples and unlabeled target samples from different distributions to learn transferable representations while reducing relevant subdomain shifts.
  • Deep transfer methods commonly combine source classification loss with a domain adaptation loss weighted by a trade-off parameter λ.
  • Global alignment can bring irrelevant data too close for accurate classification because it ignores relationships between subdomains within the same category.
  • Subdomain Adaptation aligns distributions of same-class subdomains and can match both local and global distributions, addressing the limitation of global alignment.
  • Because target data is unlabeled, DSAN uses network outputs as target pseudo-labels to divide source and target domains into class-based subdomains.
  • LMMD is introduced as a nonparametric MMD-based estimate of discrepancy between relevant subdomain distributions, with the loss combining classification and subdomain adaptation terms.

A. Maximum Mean Discrepancy

MMD measures distribution discrepancy through differences between kernel mean embeddings in a reproducing kernel Hilbert space. DSAN applies this idea to relevant subdomain activations using LMMD minimization.

  • MMD is a kernel two-sample test that assesses whether two generating distributions are identical from observed samples.
  • With a characteristic kernel, MMD compares kernel mean embeddings in an RKHS, and the population discrepancy is zero if and only if the distributions are equal.
  • An empirical MMD estimate compares the squared distance between empirical kernel mean embeddings and can be computed with an unbiased estimator.
  • In DSAN, LMMD minimization reduces discrepancy between relevant subdomain distributions of activations across selected layers.

B. Local Maximum Mean Discrepancy

LMMD extends distribution discrepancy measurement from global source–target alignment to relevant subdomains within the same category. It uses class weights, including soft target predictions, to estimate and minimize local discrepancies in deep feature activations.

  • Local discrepancy measurement: LMMD measures discrepancies between relevant source and target subdomain distributions rather than only their global distributions.Minimizing LMMD draws same-category subdomains across domains closer, exploiting fine-grained category information.
  • Local discrepancy measurement: Each sample contributes to a class-specific distribution according to a weight that represents its membership in that class.The estimator assumes each sample belongs to each class according to weight w_c.
  • Soft target weighting: Source samples use one-hot true labels, whereas unlabeled target samples use the network’s predicted class probabilities to compute class weights.The target output f(x_i) is treated as a probability distribution over the C classes.
  • Soft target weighting: Soft predictions can reduce the negative impact of incorrect hard target labels by incorporating target-sample uncertainty.CMMD, which assigns equal weights to all samples, is a special case of LMMD.
  • Computable adaptation loss: LMMD is reformulated using kernel evaluations because the feature map φ(·) cannot be computed directly.The resulting Equation 8 can serve directly as an adaptation loss in feed-forward network models.

C. Deep Subdomain Adaptation Network

DSAN integrates LMMD with deep feature learning to align both global and relevant subdomain distributions in an end-to-end model. It applies LMMD to domain-specific layer activations and trains with standard optimization, while also estimating subdomain discrepancy through AL-distance.

  • DSAN architecture: DSAN aligns global source–target distributions together with relevant same-category subdomain distributions in one end-to-end deep learning model.Its design extends deep adaptation by combining feature learning and subdomain feature adaptation.
  • DSAN architecture: LMMD is applied over domain-specific layers as the subdomain adaptation loss.Equation 8 is used over the selected layer set L.
  • Training: DSAN training mainly follows standard mini-batch stochastic gradient descent after fine-tuning CNN models pre-trained on ImageNet 2012.The procedure also uses an EM-like refinement in which target labeling generally becomes more accurate during iterations.
  • Subdomain discrepancy measure: AL-distance estimates subdomain discrepancy by averaging class-specific A-distances weighted by target-domain class probabilities.For each class, the A-distance is based on a classifier’s error when discriminating same-class samples across domains.

D. Theoretical Analysis

The analysis frames target error through source error, domain divergence, and shared labeling loss, then uses pseudo-labels and subdomain alignment to approximate the otherwise unavailable target-label terms. It concludes that aligning relevant subdomains can reduce the shared expected loss and supports target prediction use in unsupervised adaptation.

  • Error bound: The domain-adaptation bound includes source error, target error relative to the source labeling function, and a shared expected loss term.The shared expected loss C may be large when cross-domain category alignment is not explicitly enforced.
  • Pseudo-label approximation: Because target true labels are unavailable, DSAN uses pseudo-labels to approximately evaluate and minimize the shared expected loss.This replaces direct measurement of the target-label-dependent term with an approximate evaluation.
  • Subdomain alignment: When target features from a class resemble source features from that class, the source labeling function and pseudo-target labeling function are expected to disagree less.Matching corresponding subdomain distributions is therefore expected to make RT(fS, f̂T) small.
  • Conclusion: Aligning relevant subdomain distributions can further minimize the shared expected loss C, supporting the effectiveness of target-sample predictions for unsupervised adaptation.This is the analysis’s stated summary of the role of subdomain alignment and prediction-based weighting.

IV. EXPERIMENT

The experiments evaluate DSAN against competitive transfer-learning baselines across object-recognition and digit-classification tasks using datasets from ImageCLEF-DA, Office-31, Office-Home, VisDA-2017, Adaptiope, MNIST, USPS, and SVHN.

  • Experimental setup: DSAN is evaluated against competitive transfer-learning baselines on both object-recognition and digit-classification tasks.Transfer tasks are denoted as source domain → target domain.
  • Datasets: Object-recognition experiments use ImageCLEF-DA, Office-31, Office-Home, VisDA-2017, and Adaptiope.
  • Datasets: Digit-classification transfer tasks are constructed from MNIST, USPS, and SVHN.

A. Setup

Experiments evaluate DSAN across object-recognition and digit-classification benchmarks using multiple transfer tasks and established baselines. The setup also measures accuracy, convergence, representations, and distribution discrepancies.

  • Datasets: ImageCLEF-DA uses 12 shared categories across Caltech-256, ImageNet ILSVRC 2012, and Pascal VOC 2012, forming 6 transfer tasks.
  • Datasets: Office-31 contains 4,110 images in 31 classes across Amazon, Webcam, and DSLR domains, evaluated on all 6 transfer tasks.
  • Datasets: Office-Home contains 15,588 images from 4 domains and 65 object categories, with 12 transfer tasks constructed from all domain combinations.
  • Datasets: VisDA-2017 and Adaptiope provide synthetic-to-real object-recognition settings, while MNIST-USPS-SVHN supplies 3 digit-transfer tasks.
  • Evaluation: DSAN is compared with standard deep and transfer-learning baselines, using ResNet architectures, SGD, and LMMD applied to a 256-unit bottleneck representation.The experiments report average classification accuracy and standard error over three random trials.

B. Results

DSAN performs strongly across object-recognition and digit-classification benchmarks. It generally outperforms compared methods, with especially large average gains on several object-recognition datasets and improved average digit accuracy over MSTN.

  • Object Recognition: DSAN outperforms all compared methods on most transfer tasks across ImageCLEF-DA, Office-Home, VisDA-2017, and Adaptiope.
  • Object Recognition: More than 3% average-accuracy improvements occur on ImageCLEF-DA, Office-Home, VisDA-2017, and Adaptiope.
  • Object Recognition: Across 24 object-recognition tasks, DSAN improves average performance by 6.65% over JAN.
  • Digit Classification: DSAN largely outperforms digit-classification baselines except on the SVHN →MNIST task.
  • Digit Classification: Compared with MSTN, DSAN achieves better average accuracy and more stable digit-classification results with lower standard error.

C. Analysis

Analysis indicates that DSAN produces better subdomain alignment and faster convergence than several alternatives. Its non-adversarial design uses fewer loss terms and hyperparameters while achieving strong comparative accuracy.

  • Feature Visualization: DSAN representations align same-class source and target subdomains closely while separating subdomains from different classes more clearly than JAN.
  • Distribution Discrepancy: DSAN yields smaller global and subdomain discrepancies than CNN and JAN representations on task A →W.
  • Distribution Discrepancy: DSAN activations produce smaller MMD and LMMD than CNN and JAN, while LMMD is smaller than MMD because it excludes irrelevant data.
  • Convergence: On task D →A, DSAN converges faster than CDAN and CDAN+E with the same iteration count, elapsed time, and per-iteration runtime.
  • Model Comparison: DSAN uses one classification loss, one LMMD loss, and one hyperparameter, whereas adversarial subdomain methods typically use several loss functions and hyperparameters.
  • Model Comparison: DSAN achieves the best performance in the comparison and is 3% more accurate than CDAN.

V. CONCLUSION

DSAN is a simple, non-adversarial approach to Subdomain Adaptation that uses LMMD to align relevant subdomain distributions. Experiments demonstrate its effectiveness on object recognition and digit classification tasks.

  • DSAN is a non-adversarial and easy-to-implement method for Subdomain Adaptation.
  • LMMD measures discrepancies between relevant subdomains within the same category across different domains.
  • Experiments demonstrate DSAN's effectiveness on both object recognition and digit classification tasks.
Loading 2106.09388v1…