Implementation of FedCT framework.
Pivot citation:
@inproceedings{liu2021fedct,
title={FedCT: Federated Collaborative Transfer for Recommendation},
author={Liu, Shuchang and Xu, Shuyuan and Yu, Wenhui and Fu, Zuohui and Zhang, Yongfeng and Marian, Amelie},
booktitle={Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval},
pages={716--725},
year={2021}
}
Full code is still under optimization. Please contact Shuchang for temporary code.
conda create -n fedct python=3.9
conda activate fedct
conda install -c anaconda ipykernel
python -m ipykernel install --user --name fedct --display-name "FedCT"
conda install pytorch cudatoolkit=11.3 -c pytorch -c conda-forge
conda install -c conda-forge scikit-learn
conda install -c conda-forge tqdm
conda install pandas
conda install setprotitle
pip install matplotlib
Run notebook 'data/Amazon.ipynb'
Corresponding data will be saved in the specified directory 'XXX/domain_data/' with the following sub contents:
- multicore_data/
- tsv_data/
- meta_data/
Then run:
bash run_domain_reader.sh
This will save data readers in 'XXX/domain_data/reader/'
bash run_domain_pretrain.sh
Training logs and models will be saved in:
- XXX/env_logs/
- XXX/env_models/
Run notebook 'data/Amazon_FedCT.ipynb' with your specified target_path (e.g. 'XXX/transfer_data/')
Corresponding data will be saved in the specified directory target_path with the following sub contents:
- id_train.tsv
- domain_model_logs.txt
- ${target_domain}_val.tsv
- ${target_domain}_test.tsv
bash run_emcdr.sh
bash run_cue.sh
Training logs and models will be saved in:
- XXX/transfer_logs/
- XXX/transfer_models/
Notebooks:
- DomainModelResult.ipynb: domain-specific model results, standard recommendation, no cold-start
- ColdStartTransferResult.ipynb: EMCDR and DUE results