Giter VIP home page Giter VIP logo

ppac's Introduction

PPAC

This is the source code of PPAC.

Paper: Debiasing Recommendation with Popular Popularity (WWW'24)

Running environment

conda create -n ppac python=3.8.8
conda activate ppac

pip install torch==1.13.1 --index-url https://download.pytorch.org/whl/cu116
pip install gym==0.23.0 tensorflow-probability==0.20.1 matplotlib scikit-learn
pip install dgl==1.1.3 -f https://data.dgl.ai/wheels/cu116/repo.html

Guidelines to run our codes

If you want to train PPAC, when you use mf/ncf as base model, please use the following scripts:

python run_MF.py --model ppacmf --dataset {dataset} --train
python run_MF.py --model ppacncf --dataset {dataset} --train

If you want to use LightGCN as base model and train PPAC:

python run_LightGCN.py --model ppaclg --dataset {dataset} --train

${dataset} can be chosen from ['ml-1M', 'gowalla', 'yelp2018'].

For example:

python run_MF.py --model ppacmf --dataset ml-1M --train

After training, if you want to use your pre-trained model to conduct inference, use the below script (remove --train flag).

python run_MF.py --model ppacmf --dataset {dataset} --gamma {gamma} --beta {beta}
python run_MF.py --model ppacncf --dataset {dataset} --gamma {gamma} --beta {beta}
python run_LightGCN.py --model ppaclg --dataset {dataset} --gamma {gamma} --beta {beta}

We provide the hyper-parameters used in our experiments for your references.

ml-1M Gowalla Yelp2018
$\gamma$ $\beta$ $\gamma$ $\beta$ $\gamma$ $\beta$
BPRMF 64 -32 512 -1024 256 -512
NCF 32 -16 64 -256 128 -256
LightGCN 16 -8 64 -512 32 -128

For example:

python run_MF.py --model ppacmf --dataset ml-1M --gamma 64 --beta -32

Tips to tune $\gamma$ and $\beta$

Since $\gamma$ and $\beta$ are only used during inference, we can set both values to zero during training. Once the results on validation sets converge and the training process is completed, we begin tuning the values of $\gamma$ and $\beta$ on the validation sets. Since the model learnable parameters are fixed, we only need to conduct inference, which is very fast (only several seconds).

Citation

If you use our datasets or codes, please cite our paper.

@inproceedings{PPAC,
    author = {Ning, Wentao and Cheng, Reynold and Yan, Xiao and Kao, Ben and Huo, Nan and Haldar, Nur Al Hasan and Tang, Bo},
    title = {Debiasing Recommendation with Popular Popularity},
    booktitle = {WWW},
    publisher = {ACM},
    year = {2024}
}

ppac's People

Contributors

stevenn9981 avatar

Stargazers

Liu Junrui avatar  avatar Ramsey avatar SY Tan avatar  avatar LAOMOU avatar  avatar 月社妃 avatar lu-416 avatar  avatar  avatar

Watchers

 avatar

ppac's Issues

dataset

May I ask how the balance_test balance_val is set in the gowalla of the dataset? And the difference between setting debias_data to false and true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.