BalancingGroups
Code to replicate the experimental results from Simple data balancing baselines achieve competitive worst-group-accuracy.
Replicating the main results
Set environment variables
export DATASETS_PATH=/path/to/datasets
export SLURM_PATH=/path/to/slurm/logs
Download and extract datasets
- Waterbirds to
$DATASETS_PATH/waterbirds
- CelebA to
$DATASETS_PATH/celeba
- CivilComments to
$DATASETS_PATH/civilcomments
- MultiNLI to
$DATASETS_PATH/multinli
Generate dataset metadata
cd metadata/
python generate_metadata_waterbirds.py
python generate_metadata_celeba.py
python generate_metadata_civilcomments.py
python generate_metadata_multinli.py
cd ..
Launch jobs
# Launching 1400 combo seeds = 50 hparams for 4 datasets for 7 algorithms
# Each combo seed is ran 5 times to compute error bars, totalling 7000 jobs
./train.py --output_dir main_sweep --num_hparams_seeds 1400
Parse results
./parse.py main_sweep
License
This source code is released under the CC-BY-NC license, included here.