This code repository is adapted from JTT's code and implements the following paper:
Create an environment with the following commands:
virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements.txt
-
Waterbirds: Download waterbirds from here and put it in
bam/cub
.- In that directory, our code expects
data/waterbird_complete95_forest2water2/
withmetadata.csv
inside.
- In that directory, our code expects
-
CelebA: Download CelebA from here and put it in
bam/celebA
.- In that directory, our code expects the following files/folders:
- data/list_eval_partition.csv
- data/list_attr_celeba.csv
- data/img_align_celeba/
- In that directory, our code expects the following files/folders:
-
MultiNLI: Follow instructions here to download this dataset and put in
bam/multinli
- In that directory, our code expects the following files/folders:
- data/metadata.csv
- glue_data/MNLI/cached_dev_bert-base-uncased_128_mnli
- glue_data/MNLI/cached_dev_bert-base-uncased_128_mnli-mm
- glue_data/MNLI/cached_train_bert-base-uncased_128_mnli
- In that directory, our code expects the following files/folders:
-
CivilComments: This dataset can be downloaded from here and put it in
bam/jigsaw
. In that directory, our code expects a folderdata
with the downloaded dataset.
python run_metaScript.py --dataset CUB --aux_lambda 50 --stageOne_epoch 150 --stageOne_T 20 --stageTwo_epochs 150 --up_weights 140 --seed 42
Please cite our paper if you find this code or our paper useful for your work:
@article{li2023bias,
title={Bias Amplification Enhances Minority Group Performance},
author={Li, Gaotang and Liu, Jiarui and Hu, Wei},
journal={arXiv preprint arXiv:2309.06717},
year={2023}
}