Shu Hu, George H. Chen
Shu Hu, George H. Chen
This repository is the official implementation of our two papers "Distributionally Robust Survival Analysis: A Novel Fairness Loss Without Demographics" (ML4H, 2022) and "Fairness in Survival Analysis with Distributionally Robust Optimization" (JMLR, 2024).
Some of the codes are extracted from FairSurv and SODEN.
If you would like to use the SEER dataset, you should request access from https://seer.cancer.gov/data/.
To install requirements:
pip install -r requirements.txt
Please also consider to install necessary packages from the SODEN.
python -u run_dro_cox.py --dataset FLC --model Linear --eps 0.15 --seed 7 > FLC_Linear_joint_dro.log 2>&1 &
python -u run_dro_cox.py --dataset FLC --model MLP --eps 0.3 --seed 7 > FLC_MLP_joint_dro.log 2>&1 &
python -u run_dro_cox.py --dataset SUPPORT --model Linear --eps 0.15 --seed 7 > SUPPORT_Linear_joint_dro.log 2>&1 &
python -u run_dro_cox.py --dataset SUPPORT --model MLP --eps 0.5 --seed 7 > SUPPORT_MLP_joint_dro.log 2>&1 &
python -u run_dro_cox.py --dataset SEER --model Linear --eps 0.2 --seed 7 > SEER_Linear_joint_dro.log 2>&1 &
python -u run_dro_cox.py --dataset SEER --model MLP --eps 0.15 --seed 7 > SEER_MLP_joint_dro.log 2>&1 &
python -u run_dro_cox_split.py --dataset FLC --model Linear --eps 0.1 --seed 7 > FLC_Linear_joint_dro_split.log 2>&1 &
python -u run_dro_cox_split.py --dataset FLC --model MLP --lr 0.0001 --eps 0.05 --seed 7 > FLC_MLP_joint_dro_split.log 2>&1 &
python -u run_dro_cox_split.py --dataset SUPPORT --model Linear --eps 0.15 --seed 7 > SUPPORT_Linear_joint_dro_split.log 2>&1 &
python -u run_dro_cox_split.py --dataset SUPPORT --model MLP --lr 0.0001 --eps 0.2 --seed 7 > SUPPORT_MLP_joint_dro_split.log 2>&1 &
python -u run_dro_cox_split.py --dataset SEER --model Linear --eps 0.15 --seed 7 > SEER_Linear_joint_dro_split.log 2>&1 &
python -u run_dro_cox_split.py --dataset SEER --model MLP --lr 0.0001 --eps 0.2 --seed 7 > SEER_MLP_joint_dro_split.log 2>&1 &
Setting dataset = 'FLC' in plot.py
python plot.py
Setting dataset = 'SUPPORT' in plot.py
python plot.py
Setting dataset = 'SEER' in plot.py
python plot.py
python -u run_dro_deephit.py --dataset FLC --model MLP --eps 0.3 --seed 7 > FLC_MLP_joint_dro_deephit.log 2>&1 &
python -u run_dro_deephit.py --dataset SUPPORT --model MLP --eps 0.5 --seed 7 > SUPPORT_MLP_joint_dro_deephit.log 2>&1 &
python -u run_dro_deephit.py --dataset SEER --model MLP --eps 0.15 --seed 7 > SEER_MLP_joint_dro_deephit.log 2>&1 &
python -u run_dro_deephit_split.py --dataset FLC --model MLP --lr 0.0001 --eps 0.05 --seed 7 > FLC_MLP_joint_dro_deephit_split.log 2>&1 &
python -u run_dro_deephit_split.py --dataset SUPPORT --model MLP --lr 0.0001 --eps 0.2 --seed 7 > SUPPORT_MLP_joint_dro_deephit_split.log 2>&1 &
python -u run_dro_deephit_split.py --dataset SEER --model MLP --lr 0.0001 --eps 0.2 --seed 7 > SEER_MLP_joint_dro_deephit_split.log 2>&1 &
Please first read the settings of the original SODEN code and then use our method.
python -u ./SODEN/main_DRO_COX_ODE.py --dataset flc > FLC_MLP_joint_dro_SODEN.log 2>&1 &
python -u ./SODEN/main_DRO_COX_ODE.py --dataset support > SUPPORT_MLP_joint_dro_SODEN.log 2>&1 &
python -u ./SODEN/main_DRO_COX_ODE.py --dataset seer > SEER_MLP_joint_dro_SODEN.log 2>&1 &
python -u run_dro_cox_full.py --dataset FLC > FLC_MLP_joint_dro_cox_full.log 2>&1 &
python -u run_dro_cox_full.py --dataset support > SUPPORT_MLP_joint_dro_cox_full.log 2>&1 &
python -u run_dro_cox_full.py --dataset seer > SEER_MLP_joint_dro_cox_full.log 2>&1 &
Please kindly consider citing our paper in your publications.
@inproceedings{hu2022distributionally,
title={Distributionally robust survival analysis: A novel fairness loss without demographics},
author={Hu, Shu and Chen, George H},
booktitle={Machine Learning for Health},
pages={62--87},
year={2022},
organization={PMLR}
}