Official Implementation of Kolmogorov-Arnold Network (KAN) for Recommendations. Any communications, collaborations, issues, PRs are welcomed. The contributors will be listed at contributor part. Please contact yueliu19990731@163.com or tianyuan.yang@u.nus.edu. If you find this repository useful to your research or work, it is really appreciate to star this repository. ❤️
Table of Contents
MovieLens-1m and MovieLens-20m.
datasets | #users | #items | #actions | average length | density |
---|---|---|---|---|---|
ML-1m | 6040 | 3416 | 1m | 163.5 | 4.79% |
ML-20m | 138,493 | 26,744 | 20m | 144.4 | 0.54% |
still updating...
codes are tested on Python3.8.16 and 1 NVIDIA Tesla V100 SXM2 16 GB
numpy==1.23.5
pandas==1.5.3
scipy==1.9.1
torch==2.0.0
tqdm==4.65.0
wget==3.2
for ml-1m dataset
python main.py --template train_kan4rec --lr 1e-2 --dataset_code ml-1m
for ml-20m dataset
python main.py --template train_kan4rec --lr 1e-2 --dataset_code ml-20m
NDCG | BERT4Rec | KAN4Rec |
---|---|---|
@1 | 0.3445 | 0.3499 |
@5 | 0.5068 | 0.5133 |
@10 | 0.5417 | 0.5477 |
@20 | 0.5657 | 0.5719 |
@50 | 0.5875 | 0.5932 |
@100 | 0.5937 | 0.5991 |
Recall | BERT4Rec | KAN4Rec |
---|---|---|
@1 | 0.3445 | 0.3499 |
@5 | 0.6517 | 0.6560 |
@10 | 0.7590 | 0.7622 |
@20 | 0.8535 | 0.8575 |
@50 | 0.9622 | 0.9635 |
@100 | 0.9997 | 0.9997 |
NDCG | BERT4Rec | KAN4Rec |
---|---|---|
@1 | 0.5980 | 0.5982 |
@5 | 0.7609 | 0.7612 |
@10 | 0.7796 | 0.7801 |
@20 | 0.7871 | 0.7871 |
@50 | 0.7895 | 0.7898 |
@100 | 0.7906 | 0.7908 |
Recall | BERT4Rec | KAN4Rec |
---|---|---|
@1 | 0.5980 | 0.5982 |
@5 | 0.8947 | 0.8949 |
@10 | 0.9518 | 0.9526 |
@20 | 0.9799 | 0.9798 |
@50 | 0.9928 | 0.9928 |
@100 | 0.9997 | 0.9996 |
still updating...
Our code are partly based on the following GitHub repository. Thanks for their awesome works.
- BERT4Rec-VAE-Pytorch: the implement of BERT4Rec model (PyTorch version).
- fast-kan: the implement of KAN (fast version).
If you find this repository helpful, please cite our paper (coming soon).