Code Monkey home page Code Monkey logo

decrs's Introduction

Deconfounded Recommendation for Alleviating Bias Amplification

This is the pytorch implementation of our paper at KDD 2021:

Deconfounded Recommendation for Alleviating Bias Amplification

Wenjie Wang, Fuli Feng, Xiangnan He, Xiang Wang, Tat-Seng Chua.

Environment

  • Anaconda 3
  • python 3.7.3
  • pytorch 1.4.0
  • numpy 1.16.4

Usage

Data

The experimental data are in './data' folder, except 'item_feature_file.npy' of amazon_book. It is uploaded to Google drive:DecRS/data/amazon_book due to the large size.

Training

python main.py --model=$1 --dataset=$2 --lr=$3 --batch_size=$4 --dropout=$5 --alpha=$6 --lamda=$7 --gpu=$8

or use run.sh

sh run.sh model dataset lr batch_size dropout alpha lamda gpu_id
  • The log file will be in the './code/{dataset}/log/' folder.
  • The explanation of hyper-parameters can be found in './code/{dataset}/main.py'.
  • The default hyper-parameter settings are detailed in './code/{dataset}/hyper-parameters.txt'.

Inference

  1. Download the ranking scores released by us from Google drive:DecRS/ranking_scores/{dataset}/.
  2. Put four '.npy' file into the corresponding folder, i.e., './code/{dataset}/inference'.
  3. Get the results of DecRS over different user groups by running DecFM.py or DecNFM.py:
python DecFM.py 

Examples

  1. Train DecFM on ML-1M:
cd ./code/ml-1m
sh run.sh DecFM ml_1m 0.05 1024 [0.3,0.3] 0.2 0.1 0
  1. Inference DecNFM on amazon_book
cd ./code/amazon-book/inference
python DecNFM.py

Citation

If you use our code or data, please kindly cite:

@inproceedings{wang2021deconfounding,
  title={Deconfounded Recommendation for Alleviating Bias Amplification},
  author={Wenjie Wang, Fuli Feng, Xiangnan He, Xiang Wang, and Tat-Seng Chua},
  booktitle={KDD},
  year={2021},
  publisher={ACM}
}

Acknowledgment

Thanks to the FM/NFM implementation:

License

NUS © NExT++

decrs's People

Contributors

wenjiewwj avatar

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.