Official PyTorch Code base for "ASRec: Adaptive Sequential Recommendation with Dynamic and Periodic Preferences Capturing". The code is built on the RecBole library, implemented by @WLHao0313.
- The model implementation is at
recbole/model/sequential_recommender/asrec.py
The code is stable while using Python 3.7.12, PyTorch >= 1.13.1.
- Clone this repository:
git clone https://github.com/WLHao0313/ASRec
cd ASRec
- To install all the dependencies using conda:
conda create -n asrec python=3.7.12 -y
conda activate asrec
pip install -r requirements.txt
Following is the statistics of the datasets we use:
On ml-1m dataset:
python run_ASRec.py --dataset=ml-1m
For other datasets, simply replace "ml-1m" with the dataset name (e.g. ml-100k, amazon-beauty, amazon-sports-outdoors, yelp).
The model ASRec successfully captures users' periodic and dynamic preference displays: