[CIKM23] AmpliBias: Mitigating Dataset Bias through Bias Amplification in Few-shot Learning for Generative Models
Official PyTorch Implementation of AmpliBias: Mitigating Dataset Bias through Bias Amplification in Few-shot Learning for Generative Models (CIKM 2023) by Donggeun Ko et. a
python=3.8 torch=2.0.1 torchvision=0.15.2
Used A100 GPU with CUDA version of 11.7. I tried with Torch version >=1.7.0 and it works perfectly fine. The dependencies should match with FastGAN-PyTorch when training FastGAN.
The code is structured as follows:
-
models.py : Model classifiers. For each dataset, we use different models. (CMNIST: 3-Layers MLP, Rest of the dataset: ResNet18)
-
train_classifier.py : train code for the model classifiers. This is the first part where we intentionally train biased classifier with GCE loss.
-
extract_bias.py: extract bias from the trained model classifier. This is the second part where we extract bias samples with high loss values from the trained model classifier
Dataset can be downloaded from the link below. The datasets are curated from BiasEnsemble by Jungsoo Lee et. al.
''' pip install -r requirements.txt '''