Skip to content

co234/FairBADS

Repository files navigation

Fair-BADS is a Bayesian framework for fairness-aware data selection. It jointly learns model parameters and sample weights for each demographic group, and aligns their posteriors to a shared central distribution using a chosen divergence. Supported divergence measures include Wasserstein distance, Maximum Mean Discrepancy (MMD), and f-divergence. The inference is performed using Stein Variational Gradient Descent (SVGD) for efficient and scalable updates.

Installation Python 3.12+ is required. We recommend using a CUDA 12.6-compatible GPU. Install the project with:

pip install .

Or with Poetry:

poetry install

All dependencies are managed in pyproject.toml, including: • PyTorch (with CUDA 12.6) • Lightning • POT (Python Optimal Transport) • wandb • torchvision • CLIP from OpenAI GitHub Make sure git is installed to fetch CLIP.

Usage

Run an experiment with:

python main.py --dataset_name utkface --barycenter_method wasserstein

Available options for --barycenter_method are: wasserstein, mmd, js. Supported datasets: UTKFace, LFW-A, FairFace.

The code for processing the LFWA_W dataset is located in the dataset/lfwa_w folder. For UTKFace and FairFace, please download the datasets manually and place them under utkface/ and fairface/ folders, respectively.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages