This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the International Conference on Learning Representations (ICLR) 2024.
You need to download the dataset on your own and specify the dataset path in the code/configs/default.py
file. Please refer to Domainbed repo.
The core operations of the algorithm are implemented in the code/algorithms/DISAM.py
file.
bash ./runs/run_trainer.py --algorithm DISAM_Trainer --dataset pacs --test_domain p --lambda_weight 0.1 --rho 0.05 --lr 1e-3 --batch_size 32 --epoch 50
If you find our work useful in your research, please consider citing:
@inproceedings{zhang2024domaininspired,
title={Domain-Inspired Sharpness Aware Minimization Under Domain Shifts},
author={Ruipeng Zhang and Ziqing Fan and Jiangchao Yao and Ya Zhang and Yanfeng Wang},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=I4wB3HA3dJ}
}
This project is licensed under the MIT License.