PyTorch implementation for DCBR proposed in the following paper:
Disentangled Contrastive Bundle Recommendation with Conditional Diffusion
Jiuqiang Li
In AAAI 2025
Paper
We implement our code in the following environment.
- OS: Ubuntu 20.04
- GPU: NVIDIA RTX 3090(24GB) * 1
- CPU: 14 vCPU Intel(R) Xeon(R) Platinum 8362 CPU @ 2.80GHz
- Python 3.8.10
- torch==1.11.0+cu113
- numpy==1.22.4
- PyYAML==6.0.2
- scipy==1.10.1
- tqdm==4.61.2
Run the following command to install the dependencies.
pip install -r requirements.txtThe datasets utilized in the experiments include
The command to train DCBR on the
python train.py -m DCBR -d {dataset_name}Please set the hyperparameters in the configs/models/DCBR.yaml file.
The command to evaluate the performance of the pretrained checkpoints on the specified dataset is as follows.
python test.py -m DCBR -d {dataset_name} -c {checkpoint_path}In test.py, two evaluation methods are provided. Specifically:
quick_test(): Directly calculates metrics using the pre-trained embeddings from the checkpoints.test(): Infers to obtain embeddings before calculating metrics.
We report the best configuration, training logs, and corresponding checkpoints of DCBR to reproduce the results in Table 2 of our paper.
| Dataset | Download | ||
|---|---|---|---|
| MealRecH+ | conf | log | checkpoint |
| MealRecL+ | conf | log | checkpoint |
| iFashion | conf | log | checkpoint |
If you find this work is helpful to your research, please kindly cite the following paper.
@inproceedings{li2025disentangled,
title={Disentangled Contrastive Bundle Recommendation with Conditional Diffusion},
author={Li, Jiuqiang},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={39},
number={11},
pages={12067--12075},
year={2025}
}This repository is based on CrossCBR, MultiCBR, DiffRec and CoHeat. Thanks for their work.
