Skip to content
/ DCFR Public

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

License

Notifications You must be signed in to change notification settings

windxrz/DCFR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published