Skip to content

[NeurIPS 2024] An official source code for paper "End-to-end Learnable Clustering for Intent Learning in Recommendation".

License

Notifications You must be signed in to change notification settings

yueliu1999/ELCRec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intent learning, which aims to learn users' intents for user understanding and item recommendation, has become a hot research spot in recent years. However, existing methods suffer from complex and cumbersome alternating optimization, limiting performance and scalability. To this end, we propose a novel intent learning method termed ELCRec, by unifying behavior representation learning into an End-to-end Learnable Clustering framework, for effective and efficient Recommendation. Concretely, we encode user behavior sequences and initialize the cluster centers (latent intents) as learnable neurons. Then, we design a novel learnable clustering module to separate different cluster centers, thus decoupling users' complex intents. Meanwhile, it guides the network to learn intents from behaviors by forcing behavior embeddings close to cluster centers. This allows simultaneous optimization of recommendation and clustering via mini-batch data. Moreover, we propose intent-assisted contrastive learning by using cluster centers as self-supervision signals, further enhancing mutual promotion Experimental results demonstrate the superiority of ELCRec from six perspectives. Compared to the runner-up, ELCRec improves NDCG@5 by 8.9% and reduces computational costs by 22.5% on the Beauty dataset. Due to the scalability and universal applicability, we deploy ELCRec on the industrial recommendation system with 130 million page views and achieve promising results.

radar_plot

Figure 1. Intent learning in recommendation & ELCRec framework.

Table of Contents
  1. Usage
  2. Result
  3. Acknowledgement
  4. Citation

Usage

Requirements

  • python == 3.12.2
  • faiss==1.8.0
  • numpy==2.2.1
  • scipy==1.14.1
  • torch==2.4.1
  • tqdm==4.66.4
  • wandb==0.19.1

Quick Start

clone this repository and change directory to ./src

git clone https://github.com/yueliu1999/ELCRec.git
cd ./src

evaluation on trained model:

bash ./scripts/run_sports.sh

ELCRec-Sports_and_Outdoors-1
{'Epoch': 0, 'HIT@5': '0.0286', 'NDCG@5': '0.0185', 'HIT@20': '0.0648', 'NDCG@20': '0.0286'}
bash ./scripts/run_beauty.sh

ELCRec-Beauty-1
{'Epoch': 0, 'HIT@5': '0.0529', 'NDCG@5': '0.0355', 'HIT@20': '0.1079', 'NDCG@20': '0.0509'}
bash ./scripts/run_toys.sh

ELCRec-Toys_and_Games-1
{'Epoch': 0, 'HIT@5': '0.0585', 'NDCG@5': '0.0403', 'HIT@20': '0.1138', 'NDCG@20': '0.0560'}
bash ./scripts/run_yelp.sh

ELCRec-Yelp-1
{'Epoch': 0, 'HIT@5': '0.0236', 'NDCG@5': '0.0150', 'HIT@20': '0.0653', 'NDCG@20': '0.0266'}

re-train the model and evaluate:

python3 main.py --data_name Beauty --cf_weight 0.1 \
--model_idx 1 --gpu_id 0 \
--batch_size 256 --contrast_type Hybrid \
--num_intent_cluster 256 --seq_representation_type mean \
--intent_cf_weight 0.1 --num_hidden_layers 1
python3 main.py --data_name Sports_and_Outdoors --cf_weight 0.1 \
--model_idx 1 --gpu_id 0 \
--batch_size 256 --contrast_type Hybrid \
--num_intent_cluster 256 --seq_representation_type mean \
--intent_cf_weight 0.1 --num_hidden_layers 2
python3 main.py --data_name Toys_and_Games --cf_weight 0.1 \
--model_idx 1 --gpu_id 0 \
--batch_size 256 --contrast_type Hybrid \
--num_intent_cluster 256 --seq_representation_type mean \
--intent_cf_weight 0.1 --num_hidden_layers 3
python3 main.py --data_name Yelp --cf_weight 0.1 \
--model_idx 1 --gpu_id 0 \
--batch_size 256 --contrast_type Hybrid \
--num_intent_cluster 256 --seq_representation_type mean \
--intent_cf_weight 0.1 --num_hidden_layers 2

Result

radar_plot

Table 1. Comparision Experiment.

radar_plot

Figure 2. Ablation Study.

radar_plot

Figure 3. t-SNE Visualization.

Acknowledgement

Our code are partly based on the following GitHub repository. Thanks for their awesome works.

  • SASRec: the official implement of SASRec model.
  • ICLRec: the official implement of ICLRec model.
  • Dink-Net: the official implement of Dink-Net model.

Citation

If you find this repository helpful, please cite our papers.

@inproceedings{ELCRec,
  title={End-to-end Learnable Clustering for Intent Learning in Recommendation},
  author={Liu, Yue and Zhu, Shihao and Xia, Jun and Ma, Yingwei and Ma, Jian and Zhong, Wenliang and Liu, Xinwang and Yu, Shengju and Zhang, Kejun},
  booktitle={Proc. of NeurIPS},
  year={2024}
}

@inproceedings{Dink-Net,
  title={Dink-Net: Neural Clustering on Large Graphs},
  author={Liu, Yue and Liang, Ke and Xia, Jun and Zhou, Sihang and Yang, Xihong and Liu, Xinwang and Li, Stan Z.},
  booktitle={International Conference on Machine Learning},
  year={2023},
  organization={PMLR}
}

(back to top)

About

[NeurIPS 2024] An official source code for paper "End-to-end Learnable Clustering for Intent Learning in Recommendation".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published