Skip to content

LinusBleistein/fair_ot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimal Transport Under Group Fairness Constraints

Overview

This repo contains the code to reproduce the experiments of the paper:

Linus Bleistein, Mathieu Dagréou, Francisco Andrade, Thomas Boudou, Aurélien Bellet. Optimal Transport under Group Fairness Constraints. In International Conference on Machine Learning (ICML), 2026.

Installation

To install the package in editable mode, follow these steps:

  1. Navigate to the fair_ot directory in your terminal.
  2. Run the following command:
pip install -e .

This command will install the package in editable mode, allowing you to make changes to the source code in the src directory and have them reflected immediately without needing to reinstall the package.

Usage

Figure 2 - Plot simulated data

To reproduce Figure 2, run the following command

python exps/plot_data.py 

Figure 3.a, b, c - Results on simulated data

Mixture of Gaussians case

To reproduce the results concerning the gaussian data:

  • Run the following command for penalized OT
python exps/exp_gaussian/exp_penalized_ot.py
  • Run the following command for cost learning
python exps/exp_gaussian/exp_cost_learning.py
  • Run the following command for entropic OT
python exps/exp_gaussian/exp_entropic_ot.py
  • Run the following command for FairSinkhorn and get the Figure 3.a
python exps/exp_gaussian/exp_fairsinkhorn.py
  • Run the following command to get the top part of Figure 3. b and c
python exps/exp_gaussian/plot_cost_vs_fairness.py

Nested circles case

To reproduce the results concerning the nested circles:

  • Run the following command for penalized OT
python exps/exp_circles/exp_penalized_ot.py
  • Run the following command for cost learning
python exps/exp_circles/exp_cost_learning.py
  • Run the following command for entropic OT
python exps/exp_gaussian/exp_entropic_ot.py
  • Run the following command to get the bottom part of Figure 3. b and c
python exps/exp_circles/plot_cost_vs_fairness.py

Figure 4 - Generalization and inference time experiments

To reproduce the results of Figure 4, run

python exps/exp_gaussian/exp_generalization.py

Figure 5 - Dating app experiment

Preparation

To reproduce the results of Figure 5, first download and preprocess the data:

python exps/exp_dating/pre_process_data.py

Then run

python exps/exp_dating/match_matrix.py

Cost learning

Run

python exps/exp_dating/exp_cost_learning.py

Penalized OT

Run

python exps/exp_dating/exp_penalized_ot.py

Figure generation

After the above steps, run the following command to get the figure

python exps/exp_dating/plot_dating.py

Figure 7 (a) - Convergence of FairSinkhorn

To reproduce the results of Figure 7 (a), run

python exps/exp_gaussian/exp_convergence_fairsinkhorn.py

Figure 7 (b) - Deterministic transport plans

To reproduce the results of Figure 7 (b), run

python exps/exp_gaussian/exp_sampling_from_ot_plan.py

Cite

If you use this code in your research, please cite the original paper:

@inproceedings{Bleistein2026fairOT,
  title = {Optimal {{Transport}} under {{Group Fairness Constraints}}},
  author = {Bleistein, Linus and Dagréou, Mathieu and Andrade, Francisco and Boudou, Thomas and Bellet, Aurélien},
  year = 2026,
  booktitle = {International Conference on Machine Learning},
}

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages