Skip to content

rakutentech/SimPDO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

SimPDO

Implementation of the paper: One-class recommendation systems with the hinge pairwise distance loss and orthogonal representations, RecSys 2024

Note that the results in the paper are achieved by using by extending the DeepCF code and using the datasets provided in Deep CF repository.

Later, we found about the RecBole and we decided to put our code in this format so that everyone can use it easily.

We integrate our SimPDO model into the RecBole framework. The source code can be found at: recbole/model/general_recommender/simpdo.py

Installation

Please download our code and then follow the instruction in here.

Training with SimPDO on Lastfm dataset

We did some preprocessing on Lastfm dataset by removing users and items with less than 5 interactions. The details of the preprocessing and our model's hyper-parameters can be found in simpdo_lastfm.py

To run the code:

python simpdo_lastfm.py

Training with SimPDO on other datasets using run_recbole.py

First, you need to tune five hyper-parameters:

Param Default Description
--embedding_size 128 The embedding size.
--lambda1 1 The weight of the E_cont loss function.
--lambda2 10 The weight of the E_hpd loss function
--lambda3 100 The weight of the E_orth loss function
--margin 0.3 Margin in E_hpd

Please spend some time tuning these hyper-parameters to get the best results.

As an example, to run the model on ml100k datasets, you can run the following:

python run_recbole.py --model=SimPDO --dataset=ml-100k  --learning_rate=1e-3 --lambda1=1 --lambda2=100 --lambda3=10000 --margin=0.2

Tips for hyper-parameter tuning

To tune the hyper-parameters, I selected a small subset of data (10,000 pairs of users and items) for each dataset and tried the following techniques:

  • embedding_size: Similar to other approaches, increasing the embedding size should lead to better results until overfitting starts.
  • lambda1: Usually, you don't need to tune this parameter, and leaving it at 1 should work.
  • margin: One approach is to compute twice the sum of the variance of the embeddings at initialization. Use this number as the margin.
  • margin: Another approach is to run a method like BPR on the subset of training data. Compute twice the sum of the variance of the embeddings after a few epochs and use it as the margin.
  • lambda2: First, set lambda3 to 0. Then, run the method with different lambda2 values, such as 10, 100, 1000, etc., for a few epochs. Pick the smallest value for lambda2 that makes the E_dp=0.
  • lambda3: Given other hyper-parameters fixed, run the method with different lambda3 values, such as 1, 10, 100, 1000, etc., until you see the performance is increasing consistently.

Citation

If you use this code, please cite the following paper:

@inproceedings{10.1145/3640457.3688189,
author = {Raziperchikolaei, Ramin and Chung, Young-joo},
title = {One-class recommendation systems with the hinge pairwise distance loss and orthogonal representations},
year = {2024},
isbn = {9798400705052},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3640457.3688189},
booktitle = {Proceedings of the 18th ACM Conference on Recommender Systems},
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published