GithubHelp home page GithubHelp logo

jasonshere / fairgan Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 6.0 131 KB

FairGAN: GANs-based Fairness-aware Learning for Recommendations with Implicit Feedback

License: Apache License 2.0

Python 100.00%
deep-learning fairness gan machine-learning ranking recommender-system fair-ranking

fairgan's Introduction

FairGAN: GANs-based Fairness-aware Learning for Recommendations with Implicit Feedback

DOI: https://doi.org/10.1145/3485447.3511958

Please feel free to contact with me by Email: [email protected] or

Create Issues if you have any questions.

Abstract:

Ranking algorithms in recommender systems influence people to make decisions. Conventional ranking algorithms based on implicit feedback data aim to maximize the utility to users by capturing users’ preferences over items. However, these utility-focused algorithms tend to cause fairness issues that require careful consideration in online platforms. Existing fairness-focused studies does not explicitly consider the problem of lacking negative feedback in implicit feedback data, while previous utility-focused methods ignore the importance of fairness in recommendations. To fill this gap, we propose a Generative Adversarial Networks (GANs) based learning algorithm FairGAN mapping the exposure fairness issue to the problem of negative preferences in implicit feedback data. FairGAN does not explicitly treat unobserved interactions as negative, but instead, adopts a novel fairness-aware learning strategy to dynamically generate fairness signals. This optimizes the search direction to make FairGAN capable of searching the space of the optimal ranking that can fairly allocate exposure to individual items while preserving users’ utilities as high as possible.

The structure of FairGAN:

The structure of FairGAN

Introduction

An implementation of FairGAN, which consists of two GANs-based models, Ranker and Controller. The ranker tries to capture users' preferences from only observed interactions, while the controller captures the exposure distribution of items based on rankings that is derived from relevance scores generated by the generator of the ranker. Then the controller generates fairness signals to enforce the ranker to generate fair rankings from a fair searching space. There are two steps to run FairGAN model:

  • Processing Data: Preparing and Storing processed data into disk for FairGAN algorithm
  • Fitting and Evaluating Model: Fitting FairGAN algorithm on training set and Evaluating on test set

For a more detailed overview of FairGAN, please checkout our paper published on WWW'22 (paper).

Installation

This implementation of FairGAN supports running on CPU and GPU and has been tested with:

It is recommended to install the package and its dependencies via PyPi:

pip install tensorflow
pip install tensorflow_ranking
pip install lenskit
pip install scipy
pip install pandas
pip install numpy 

Quick Start

There are two steps to run this implementation, processing data and fitting and evaluating the algorithm.

Step 1:

Before fitting the algorithm, you will need to download and process the dataset first:

python process.py --dataset=Amazon-toys-and-games

Datasets that can be passed to --dataset:

  • Amazon-toys-and-games
  • Amazon-beauty
  • Amazon-office-products
  • Amazon-digital-music

The processed dataset will be stored into ./data directory for fitting and evaluating FairGAN later. We use LensKit to split the dataset, 5 splits will be stored, each of which extracts 20% of the rows for testing and leaves 80% for training.

Step 2:

Start to fit FairGAN using training set and evaluate the fitted model using test set:

# fitting and evaluating FairGAN on fold 1 of Amazon toys and games dataset
# the value of --fold can be 1, 2, 3, 4, 5

python train.py --dataset=Amazon-toys-and-games --fold=1

Citation

Please cite our work using the following BibTex if you find it's helpful in your reasearch:

@inproceedings{li2022fairgan,
    title={FairGAN: GANs-based Fairness-aware Learning for Recommendations with Implicit Feedback},
    author={Li, Jie and Ren, Yongli and Deng, Ke},
    booktitle={Proceedings of the ACM Web Conference 2022},
    pages={297--307},
    year={2022}
}

License

Apache License 2.0

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.