PyTorch implementation of CGCDR for cold-start cross-domain recommendation.
Training pipeline, model definition, dataset layout, logging, and checkpoint saving are all included in this repository.
- Designed for cold-start users in cross-domain recommendation settings.
- Includes separate training for source domain, target domain, and overlap/meta stage.
- Supports multiple domain pairs such as
Sport_Cloth,Game_Video, andMovies_CD.
pip install torch numpy==1.26.4 pandas==2.2.3 tqdm==4.67.1Recommended environment:
- Python
3.10+ - PyTorch
- CUDA-enabled GPU if available
CGCDR/
├── data/
│ ├── Cloth_Sport/
│ ├── CD_Movies/
│ ├── Elec_Phone/
│ ├── Game_Video/
│ ├── Movies_CD/
│ ├── Phone_Elec/
│ ├── Sport_Cloth/
│ └── Video_Game/
├── log/
├── saved/
├── models.py
├── run.py
├── trainer.py
└── utils.py
Dataset download:
After extraction, organize the files like this:
data/
├── Cloth_Sport/
│ ├── id_info.json
│ ├── stage1_train_src.csv
│ ├── stage1_train_tgt.csv
│ ├── stage1_train_meta.csv
│ ├── stage1_val.csv
│ └── stage1_test.csv
├── CD_Movies/
├── Elec_Phone/
├── Game_Video/
├── Movies_CD/
├── Phone_Elec/
├── Sport_Cloth/
└── Video_Game/
python run.py --Task=Sport_Cloth --alpha=0.001 --beta=0.001Other available tasks:
Sport_Cloth | Cloth_Sport | Game_Video | Video_Game | Movies_CD | CD_Movies | Elec_Phone | Phone_Elec
| Argument | Description |
|---|---|
--Task |
Dataset task name |
--model |
Model name, default is CGCDR |
--epoch |
Number of training epochs |
--lr |
Learning rate |
--alpha |
Cluster-related loss weight |
--beta |
Contrastive loss weight |
--seed |
Random seed |
--info |
Extra suffix for log filename |
The training process writes:
- logs to
log/ - checkpoints to
saved/<Task>/
If this repository is useful for your research, please cite the corresponding CGCDR paper.