Skip to content

yuhuping/CGCDR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CGCDR

Cluster-Guided Disentangled Representation for Cold-Start Cross-Domain Recommendation

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.


Highlights

  • 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, and Movies_CD.

Requirements

pip install torch numpy==1.26.4 pandas==2.2.3 tqdm==4.67.1

Recommended environment:

  • Python 3.10+
  • PyTorch
  • CUDA-enabled GPU if available

Project Layout

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

Dataset download:

Google Drive

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/

Quick Start

python run.py --Task=Sport_Cloth --alpha=0.001 --beta=0.001

Other available tasks:

Sport_Cloth | Cloth_Sport | Game_Video | Video_Game | Movies_CD | CD_Movies | Elec_Phone | Phone_Elec

Main Arguments

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

Outputs

The training process writes:

  • logs to log/
  • checkpoints to saved/<Task>/

Citation

If this repository is useful for your research, please cite the corresponding CGCDR paper.

About

聚类引导解耦的跨域推荐系统模型

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages