This repo contains the code to reproduce the experiments of the paper:
To install the package in editable mode, follow these steps:
- Navigate to the
fair_otdirectory in your terminal. - 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.
To reproduce Figure 2, run the following command
python exps/plot_data.py 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.pyTo 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.pyTo reproduce the results of Figure 4, run
python exps/exp_gaussian/exp_generalization.pyTo reproduce the results of Figure 5, first download and preprocess the data:
python exps/exp_dating/pre_process_data.pyThen run
python exps/exp_dating/match_matrix.pyRun
python exps/exp_dating/exp_cost_learning.pyRun
python exps/exp_dating/exp_penalized_ot.pyAfter the above steps, run the following command to get the figure
python exps/exp_dating/plot_dating.pyTo reproduce the results of Figure 7 (a), run
python exps/exp_gaussian/exp_convergence_fairsinkhorn.pyTo reproduce the results of Figure 7 (b), run
python exps/exp_gaussian/exp_sampling_from_ot_plan.pyIf 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},
}