NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ADAPT : Awesome Domain Adaptation Python Toolbox

Antoine de Mathelin, François Deheeger, Guillaume Richard, Mathilde Mougeot, Nicolas VayatisarXiv 2021

Abstract

In this paper, we introduce the ADAPT library, an open source Python API providing the implementation of the main transfer learning and domain adaptation methods. The library is designed with a user-friendly approach to facilitate access to domain adaptation for a wide public. ADAPT is compatible with scikit-learn and TensorFlow, and full documentation is available online at https://adapt-python.github.io/adapt/ with a substantial gallery of examples.

Introduction

Machine learning models often experience a significant drop in performance when deployed in real-world scenarios where the deployment data (target) differs from the training data (source). This "domain shift" is a major hurdle for practitioners. Domain Adaptation (DA) and Transfer Learning aim to mitigate this shift, yet the field suffers from a fragmented landscape of open-source implementations. Existing tools often rely on different backends like PyTorch or TensorFlow and are frequently hardcoded for specific research benchmarks, making them difficult to apply to custom industrial datasets.

The ADAPT (Awesome Domain Adaptation Python Toolbox) library addresses this accessibility crisis by unifying over 30 classic and deep transfer learning methods under a single, user-friendly interface. By adopting the familiar scikit-learn fit and predict style, ADAPT bridges the gap between academic research and practical application.

Methods and Architecture

ADAPT is designed as a comprehensive software architecture compatible with scikit-learn and TensorFlow. Every DA object in the library implements standard methods such as fit, predict, and score, ensuring full compatibility with scikit-learn utilities like GridSearchCV and model cloning.

The library categorizes DA techniques into three distinct modules based on their underlying mathematical strategy:

  • Feature-Based: These methods learn a new representation of input features where source and target distributions align. This is often used for unsupervised DA, such as correcting sensor drift.
  • Instance-Based: These methods reweight source instances to correct distribution differences, which is effective for handling sample bias.
  • Parameter-Based: These methods adapt the parameters of a pre-trained source model using a few target observations, often referred to as fine-tuning or source-free DA.
Feature-based domain adaptation aligns source and target distributions in an encoded space.

Key Insights

  • API Consistency: By mimicking scikit-learn, ADAPT allows users to swap standard classifiers for DA-aware ones with minimal code changes, lowering the barrier to entry for non-experts.
  • Unified Classic and Deep Learning: Unlike many modern libraries that focus exclusively on deep learning, ADAPT includes both "classic" statistical methods and deep neural network-based approaches. This allows practitioners to evaluate simpler, faster methods before committing to complex deep learning models.
  • Unsupervised Hyperparameter Tuning: ADAPT provides specific scoring metrics to enable the unsupervised selection of hyperparameters using standard grid search tools, solving a common pain point in DA where labeled target data is unavailable.

Key Results and Ecosystem Comparison

ADAPT offers comprehensive coverage of the field, implementing 12 deep learning methods and 22 classic methods. Its design prioritizes documentation, unit testing, and cross-ecosystem support.

Comparison of ADAPT with other transfer learning and domain adaptation libraries.

As shown in the comparison table, ADAPT stands out for its unique combination of PyPI availability, support for both Deep Domain Adaptation (DDA) and Classic Domain Adaptation (CDA), and adherence to the scikit-learn style. The library has gained significant traction, with over 1,000 downloads per month and successful applications in fields ranging from tire design to cosmology.

Limitations and Future Work

Currently, ADAPT focuses primarily on single-source to single-target adaptation. Future development will aim to expand the library's capabilities to include multisource domain adaptation—learning from multiple distinct source datasets—and semi-supervised domain adaptation, which leverages small amounts of labeled target data alongside larger unlabeled pools.

Summary updated

BibTeX
@misc{mathelin2021adapt,
  author = {Antoine de Mathelin and François Deheeger and Guillaume Richard and Mathilde Mougeot and Nicolas Vayatis},
  title = {{ADAPT : Awesome Domain Adaptation Python Toolbox}},
  year = {2021},
  eprint = {2107.03049},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.03049},
}
Figure