dengdeng c2762cf198 | 1 month ago | |
---|---|---|
config | 1 month ago | |
datasets | 1 month ago | |
images | 1 month ago | |
model | 1 month ago | |
FedGM.pdf | 1 month ago | |
README.md | 1 month ago | |
main_dg.py | 1 month ago |
Here is the Mindspore Implementation of the paper ["Multi-Source Collaborative Gradient Discrepancy Minimization for Federated Domain Generalization", AAAI 2024].
Federated Domain Generalization aims to learn a domain-invariant model from multiple decentralized source domains for deployment on unseen target domain. Due to privacy concerns, the data from different source domains are kept isolated, which poses challenges in bridging the domain gap. To address this issue, we propose a Multi-source Collaborative Gradient Discrepancy Minimization (MCGDM) method for federated domain generalization. Specifically, we propose intra-domain gradient matching between the original images and augmented images to avoid overfitting the domain-specific information within isolated domains. Additionally, we propose inter-domain gradient matching with the collaboration of other domains, which can further reduce the domain shift across decentralized domains. Combining intra-domain and inter-domain gradient matching, our method enables the learned model to generalize well on unseen domains. Furthermore, our method can be extended to the federated domain adaptation task by fine-tuning the target model on the pseudo-labeled target domain. The extensive experiments on federated domain generalization and adaptation indicate that our method outperforms the state-of-the-art methods significantly.
Please prepare the PACS dataset.
base_path
│
└───dataset
│ │ pacs
│ │ images
│ │ splits
The configuration files can be found under the folder ./config
, and we provide four config files with the format .yaml
. To perform the FedDG on the specific dataset (e.g., PACS), please use the following commands:
CUDA_VISIBLE_DEVICES=0 python main_dg.py --config PACS.yaml --target-domain art_painting -bp ../
CUDA_VISIBLE_DEVICES=0 python main_dg.py --config PACS.yaml --target-domain cartoon -bp ../
CUDA_VISIBLE_DEVICES=0 python main_dg.py --config PACS.yaml --target-domain photo -bp ../
CUDA_VISIBLE_DEVICES=0 python main_dg.py --config PACS.yaml --target-domain sketch -bp ../
If you find this useful in your work please consider citing:
@article{wei2024multi,
title={Multi-Source Collaborative Gradient Discrepancy Minimization for Federated Domain Generalization},
author={Wei, Yikang and Han, Yahong},
journal={AAAI},
year={2024}
}
This work is supported by the CAAI-Huawei MindSpore Open Fund.
天津大学 韩亚洪老师团队
Python
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》