Skip to content

Code for "Bias Amplification Enhances Minority Group Performance"

Notifications You must be signed in to change notification settings

motivationss/BAM

Repository files navigation

Bias Amplification Enhances Minority Performance

This code repository is adapted from JTT's code and implements the following paper:

Bias Amplification Enhances Minority Group Performance

Environment

Create an environment with the following commands:

virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements.txt

Downloading Datasets

  • Waterbirds: Download waterbirds from here and put it in bam/cub.

    • In that directory, our code expects data/waterbird_complete95_forest2water2/ with metadata.csv inside.
  • 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/
  • 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
  • CivilComments: This dataset can be downloaded from here and put it in bam/jigsaw. In that directory, our code expects a folder data with the downloaded dataset.

Sample Commands for running BAM

python run_metaScript.py --dataset CUB --aux_lambda 50 --stageOne_epoch 150 --stageOne_T 20 --stageTwo_epochs 150 --up_weights 140 --seed 42

Citation

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}
}

About

Code for "Bias Amplification Enhances Minority Group Performance"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages