This is the official implementation for the algorithm Gradual DOmain Adaptation with Optimal Transport (GOAT) in the paper "Gradual Domain Adaptation: Theory and Algorithms.". The algorithm design is motivated by our previous work, "Understanding gradual domain adaptation: Improved analysis, optimal path and beyond", published in ICML 2022.
git clone https://github.com/yifei-he/GOAT.git
cd GOAT
pip install -r requirements.txt
The covertype dataset can be downloaded from: https://archive.ics.uci.edu/dataset/31/covertype.
The portraits dataset can be downloaded from here. We follow the same data preprocessing procedure from https://github.com/p-lambda/gradual_domain_adaptation. Namely after downloading, extract the tar file, and copy the "M" and "F" folders inside a folder called dataset_32x32 inside the current folder. Then run "python create_dataset.py".
To run experiments, follow the following syntax.
python experiments.py --dataset color_mnist --gt-domains 1 --generated-domains 2
Here, dataset
can be selected from [mnist, portraits, covtype, color_mnist]
; gt-domains
and generated-domains
are the number of given ground-truth intermediate domains (only available for the two MNSIT datasets) and domains generated by GOAT respectively, both default to be 0.
@misc{he2023gradual,
title={Gradual Domain Adaptation: Theory and Algorithms},
author={Yifei He and Haoxiang Wang and Bo Li and Han Zhao},
year={2023},
eprint={2310.13852},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
@inproceedings{wang2022understanding,
title={Understanding gradual domain adaptation: Improved analysis, optimal path and beyond},
author={Wang, Haoxiang and Li, Bo and Zhao, Han},
booktitle={International Conference on Machine Learning},
pages={22784--22801},
year={2022},
organization={PMLR}
}