Giter VIP home page Giter VIP logo

flac's Introduction

FLAC: Fairness-Aware Representation Learning by Suppressing Attribute-Class Associations

This is a pytorch implementation of FLAC, a methodology that minimizes mutual information between the features extracted by the model and a protected attribute, without the use of attribute labels. To do that, FLAC proposes a sampling strategy that highlights underrepresented samples in the dataset, and casts the problem of learning fair representations as a probability matching problem that leverages representations extracted by a bias-capturing classifier. It is theoretically shown that FLAC can indeed lead to fair representations, that are independent of the protected attributes.

Python environment

python = 3.6 pytorch = 1.10.1

We also provide the .yml file of the environmnent we used (pytorch36_environment.yml). You can create an identical environment by running

conda env create -f pytorch36_environment.yml

Run the code

1.Download and extract UTKFace, CelebA, Imagenet, and Imagenet-A to a data folder.

2.Download the provided bias-capturing classifiers and put them under the bias_capturing_classifiers folder.

3.For Biased-MNIST run:

python train_biased_mnist.py --corr 0.99 --alpha 110
python train_biased_mnist.py --corr 0.995 --alpha 1500
python train_biased_mnist.py --corr 0.997 --alpha 2000
python train_biased_mnist.py --corr 0.999 --alpha 10000

4.For UTKFace run:

python train_utk_face.py --task race
python train_utk_face.py --task age

5.For CelebA run:

python train_celeba.py --task blonde --alpha 30000
python train_celeba.py --task makeup --alpha 20000

6.For Imagenet run:

python get_imagenet_bias_features.py
python train_imagenet.py

PWC

PWC

PWC

PWC

PWC

PWC

PWC

PWC

PWC

PWC

PWC

PWC

Cite

If you find this code useful in your research, please consider citing:

@article{sarridis2023flac,
  title={FLAC: Fairness-Aware Representation Learning by Suppressing Attribute-Class Associations},
  author={Sarridis, Ioannis and Koutlis, Christos and Papadopoulos, Symeon and Diou, Christos},
  journal={arXiv preprint arXiv:2304.14252},
  year={2023}
}

flac's People

Contributors

gsarridis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flac's Issues

trained race classifier

Could you please help me to understand where can i find the trained race classifier ? I would like to use race classifier.

How can I download the classifiers files?

Could you please offer the exact link about how to download the detailed bias-capturing classifiers? I clicked on the link in your README, but I couldn't find the file I was looking for. Thank you!

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.