DeepJDOT: Deep Joint Distribution Optimal Transport for Unsupervised Domain Adaptation

Bharath Bhushan Damodaran, Benjamin Kellenberger, Rémi Flamary, Devis Tuia, Nicolas Courty

Introduction

Domain adaptation is a critical challenge in machine learning, where a model trained on a source domain (e.g., synthetic data) must generalize to a target domain (e.g., real-world images) despite a distribution shift. Traditional Unsupervised Domain Adaptation (UDA) methods often focus on aligning marginal feature distributions, neglecting the crucial relationship between features and labels. DeepJDOT addresses this by aligning the joint distribution in a deep latent space using Optimal Transport (OT).

The DeepJDOT Framework

DeepJDOT integrates Joint Distribution Optimal Transport (JDOT) directly into the training of deep neural networks. Unlike previous OT-based methods that operated on raw pixels, DeepJDOT calculates the Wasserstein distance between distributions in the penultimate layer of a Convolutional Neural Network (CNN). This allows the model to align domains based on high-level semantic concepts rather than low-level noise like lighting or background.

DeepJDOT Architecture: The model aligns source and target domains by minimizing a joint loss involving feature distance and label discrepancy.

As shown in the architecture above, the framework minimizes a cost function that balances two components: the distance between deep features $g(x)$ and the discrepancy in predicted labels $f(g(x))$. This ensures that label propagation from source to target is semantically consistent. The loss function also includes a term for source domain accuracy to prevent catastrophic forgetting.

Stochastic Minibatch Optimization

To overcome the $O(N^2)$ scalability issues inherent in global OT solvers, DeepJDOT employs a stochastic minibatch approach. The training follows an alternating optimization strategy for every minibatch:

Algorithm 1: Stochastic minibatch optimization for DeepJDOT.
  1. Coupling Update: Fix the network weights and solve a small-scale OT problem to find the optimal coupling $\gamma$ between source and target samples in the current minibatch.
  2. Network Update: Fix the coupling and update the network weights ($g$ and $f$) using standard backpropagation to minimize the joint loss.

Experimental Evaluation

The authors evaluated DeepJDOT across several challenging benchmarks, demonstrating state-of-the-art performance:

  • Digit Classification: On SVHN $\rightarrow$ MNIST, DeepJDOT achieved 96.7% accuracy, a massive jump over DANN's 70.8%. On MNIST $\rightarrow$ MNIST-M, it reached 92.4%.
  • Office-Home: Across 12 adaptation tasks involving Art, Clipart, Product, and Real-world images, DeepJDOT achieved a mean accuracy of 50.67%, outperforming the previous best of 44.94%.
  • VisDA-2017: In the synthetic-to-real challenge, the model reached 66.9% mean accuracy, proving its robustness to high-complexity shifts.

Key Insights

A notable finding is the "tentacle-like" structure observed in t-SNE visualizations of the embedding space. This structure indicates that source and target samples are perfectly interleaved within their respective classes, maximizing the margin between different categories. Furthermore, the paper highlights that aligning in the deep feature space is essential; attempts to use OT on raw pixels (StochJDOT) yielded significantly worse results, proving that the ground metric must be calculated on semantic features.

Conclusion

DeepJDOT provides a scalable and effective solution for UDA by leveraging the power of Optimal Transport in deep latent spaces. While its performance is currently tied to the capacity of the base CNN and relies on a stochastic approximation of the global OT coupling, it represents a significant step forward in aligning joint distributions for domain adaptation. Future work may explore more complex cost functions and multi-domain scenarios.

Summary updated

BibTeX
@inproceedings{damodaran2018deepjdot,
  author = {Bharath Bhushan Damodaran and Benjamin Kellenberger and Rémi Flamary and Devis Tuia and Nicolas Courty},
  title = {{DeepJDOT: Deep Joint Distribution Optimal Transport for Unsupervised Domain Adaptation}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01225-0\_28},
}
Figure