This code is a PyTorch implementation of our paper "Fairness Without Harm: An Influence-Guided Active Sampling Approach" accepted by NeurIPS 2024. - Jinlong Pang, Jialu Wang, Zhaowei Zhu, Yuanshun Yao, Chen Qian, Yang Liu.
You can install the replicable Python environment by using
pip install -r requirements.txt
The main code for executing our methods on different datasets are provided as follows.
You can use bash run_celeba.sh
to directly train a new model on the CelebA dataset. For a custom configuration, you can use the following example:
python src/run_celeba.py --runs 0 --warm_epoch 0 --epoch 10 --metric dp --label_ratio 0.05 --val_ratio 0.1 --strategy 2
You can use bash run_adult.sh
to directly train a new model on the Adult dataset. Alternatively, you can use the following command to specify settings:
python src/run_adult.py --group_key age --warm_epoch 0 --metric dp --label_ratio 0.2 --val_ratio 0.1 --strategy 2
To train a new model on the Compas dataset, you can run bash run_compas.sh
. Or specify settings with the following command:
python src/run_compas.py --runs 0 --epoch 50 --metric dp --label_ratio 0.2 --val_ratio 0.2 --strategy 2 --warm_epoch 50
You can access the experimental results by running:
python read_results.py
If you used this repository, please cite our work:
@article{pang2024fair,
title={Fair Classifiers Without Harm: An Influence-Guided Data Sampling Approach},
author={Pang, Jinlong and Wang, Jialu and Zhu, Zhaowei and Yao, Yuanshun and Qian, Chen and Liu, Yang},
journal={arXiv preprint arXiv:2402.12789},
year={2024}
}