Git Product home page Git Product logo

dcfr's Introduction

Derivable Conditional Fairness Regularizer

Source code for KDD 2020 paper Algorithmic Decision Making with Conditional Fairness.

DCFR is an adversarial learning method to deal with fairness issues in supervised machine learning tasks. More details can be found in the paper.

Installation

Requirements

  • Linux with Python >= 3.6
  • PyTorch >= 1.4.0
  • pip install -r requirements.txt

Quick Start

Run for single fair coefficient and random seed

Run DCFR model on Adult income dataset and conditional fairness task with fair coefficient 20.

python main.py --model DCFR --task CF --dataset adult --seed 0 --fair-coeff 20

You can see more options from

python main.py -h

Result files will be saved in results/. Saved models will be saved in saved/. Tensorboard logs will be saved in tensorboard/.

Run for multiple fair coefficients and random seeds

Run DCFR model on Adult income dataset and conditional fairness task.

bash scripts/dcfr.bash

Then type in adult and CF. More bash files are in scripts/.

Plot the accuracy-fairness trade-off curve

Plot the curve for existing models.

python plot.py

The results are shown in results/. pareto.png shows the pareto front while scatter.png shows the scatter diagram.

Citing DCFR

If you find this repo useful for your research, please consider citing the paper.

@inproceedings{xu2020algorithmic,
  title={Algorithmic Decision Making with Conditional Fairness},
  author={Xu, Renzhe and Cui, Peng and Kuang, Kun and Li, Bo and Zhou, Linjun and Shen, Zheyan and Cui, Wei},
  booktitle={Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery \& Data Mining},
  pages={2125--2135},
  year={2020}
}

Acknowledgements

Part of this code is inspired by David Madras et al.'s LAFTR: Learning Adversarially Fair and Transferable Representations.

dcfr's People

Contributors

windxrz avatar

Watchers

James Cloos 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.