Re4: Learning to Re-contrast, Re-attend, Re-construct for Multi-interest Recommendation
Shengyu Zhang, Lingxiao Yang, Dong Yao and Yujie Lu, Fuli Feng, Zhou Zhao, Tat-Seng Chua, Fei Wu
The ACM Web Conference 2022 (WWW 2022)
Key Words: Recommender Systems; Multi-interest; Backward Flow
[Paper], [Slides]
- Python 3
- PyTorch 1.8.1
- TensorFlow 2.x
- Install PyTorch 1.8.1
- Install TensorFlow 2.x
- Clone this repository
git clone https://github.com/DeerSheep0314/Re4-Learning-to-Re-contrast-Re-attend-Re-construct-for-Multi-interest-Recommendation.git
.
- Amazon-book dataset can be downloaded through:
- Microsoft OneDrive [Link]
To run the code, You can use python src/model.py --gpu {gpu_num} --thre {thre_num} --data {dataset_name} --ct_lambda {ct_weight} --cs_lambda {cs_weight} --att_lambda {att_weight} --numin {num_interests}
to train the R4 model on a specific dataset. You can set the above hyperparameters here, see the code for other hyperparameters.
For example, you can use python src/model.py --gpu 0 --thre -1 --numin 8 --data book --ct_lambda 0.1 --cs_lambda 0.1 --att_lambda 0.001
to train R4 model on Amazon-book dataset.
@inproceedings{DBLP:conf/www/ZhangYYLFZC022,
author = {Shengyu Zhang and
Lingxiao Yang and
Dong Yao and
Yujie Lu and
Fuli Feng and
Zhou Zhao and
Tat{-}Seng Chua and
Fei Wu},
title = {Re4: Learning to Re-contrast, Re-attend, Re-construct for Multi-interest
Recommendation},
booktitle = {{WWW} '22: The {ACM} Web Conference 2022},
pages = {2216--2226},
publisher = {{ACM}},
year = {2022},
url = {https://doi.org/10.1145/3485447.3512094},
}