Skip to main content

Learning Queueing Policies for Organ Transplantation Allocation using Interpretable Counterfactual Survival Analysis
J. Berrevoets, A. M. Alaa, Z. Qian, J. Jordon, A. E. S. Gimson, M. van der Schaar [ICML 2021]

organsync arXiv License: MIT

image

In this repository we provide code for our ICML21 paper introducing OrganSync, a novel organ-to-patient allocation system. Note that this code is used for research purposes and is not intented for use in practice.

In our paper we benchmark against OrganITE a previously introduced paper of ours. We have reimplemented OrganITE (as well as other benchmarks) using the same frameworks in this repository, such that all code is comparable throughout. For all previous implementations, we refer to OrganITE's dedicated repository.

Code author: J. Berrevoets (jb2384@cam.ac.uk)

Repository structure

This repository is organised as follows:

organsync/
    |- src/
        |- organsync/                       # Python library core
            |- data/                        # code to preprocess data
            |- eval_policies/               # code to run allocation simulations
            |- models/                      # code for inference models
    |- experiments/
        |- data                             # data modules
        |- models                           # training logic for models
        |- notebooks/wandb
            |- simulation_tests.ipynb       # experiments in Tab.1
            |- a_composition                # experiments in Fig.3
            |- sc_influence.ipynb           # experiments in Fig.4, top row
            |- rep_influence.ipynb          # experiments in Fig.4, bottom row
    |- test                                 # unit tests
    |- data                                 # datasets

Installing

We have provided a requirements.txt file:

pip install -r requirements.txt
pip install .

Please use the above in a newly created virtual environment to avoid clashing dependencies. All code was written for python 3.8.6.

Available Models

Model Paper Code
Organsync Learning Queueing Policies for Organ Transplantation Allocation using Interpretable Counterfactual Survival Analysis Code
OrganITE OrganITE: Optimal transplant donor organ offering using an individual treatment effect Code
TransplantBenefit Policies and guidance Code
MELD A model to predict poor survival in patients undergoing transjugular intrahepatic portosystemic shunts Code
MELDna Hyponatremia and Mortality among Patients on the LiverTransplant Waiting List Code
MELD3 MELD 3.0: The Model for End-Stage Liver Disease Updated for the Modern Era Code
UKELD Selection of patients for liver transplantation and allocation of donated livers in the UK Code

Used frameworks

We make extensive use of Weights and Biases (W&B) to log our model performance as well as trained model weights. To run our code, we recommend to create a W&B account (here) if you don't have one already. All code is written in pytorch and pytorch-lightning.

Running experiments

As indicated above, each notebook represents one experiment. The comments provided in the project hierarchy indicate the figure or table, and the specific paper the experiment is presented in. As a sidenote, in order to run simulation experiments (experiments/notebooks/wandb/simulation_tests.ipynb), you will need to have trained relevant inference models if the allocation policy requires them.

Training a new model (e.g. src/organsync/models/organsync_network.py) is done simply as

python -m experiments.models.organsync

(Please run python -m experiments.models.organsync --help to see options). When training is done, the model is automatically uploaded to W&B for use later in the experiments.*

Citing

Please cite our paper and/or code as follows:

@InProceedings{organsync,
  title = 	 {{Learning Queueing Policies for Organ Transplantation Allocation using Interpretable Counterfactual Survival Analysis}},
  author =       {Berrevoets, Jeroen and Alaa, Ahmed M. and Qian, Zhaozhi and Jordon, James and Gimson, Alexander E.S. and van der Schaar, Mihaela},
  booktitle = 	 {Proceedings of the 38th International Conference on Machine Learning},
  pages = 	 {792--802},
  year = 	 {2021},
  editor = 	 {Meila, Marina and Zhang, Tong},
  volume = 	 {139},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {18--24 Jul},
  publisher =    {PMLR},
  pdf = 	 {http://proceedings.mlr.press/v139/berrevoets21a/berrevoets21a.pdf},
  url = 	 {http://proceedings.mlr.press/v139/berrevoets21a.html},
}

* Note that we retrain the models used in TransplantBenefit to give a fair comparison to the other benchmarks, as well as compare on the UNOS data.

Metadata

Release files for organsync 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for organsync 0.1.5
File Interpreter ABI Platform
organsync-0.1.5-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details
organsync-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 89.5 kB

Release files / organsync-0.1.5-py3-none-macosx_10_14_x86_64.whl

Download URL organsync-0.1.5-py3-none-macosx_10_14_x86_64.whl
Size 44.5 kB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
a844b43d57a5478a52a8361cd9a2b0e19fcc5413dccf8818963cf327fe929742
BLAKE2b-256 checksum
How to use checksums
f537cd13db1634db7f5ff0b0566ee9baeebfbc038e15402bece104039de1e8b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.14

Release files / organsync-0.1.5-py3-none-any.whl

Download URL organsync-0.1.5-py3-none-any.whl
Size 45.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
226dd9a088b906021b9c078ff74ea021aad956a81c181b0bdbab20fdbf6705ed
BLAKE2b-256 checksum
How to use checksums
2e0dc68a1784474dc59c49e8d82ebcf3c8629b35eabb15031c1a2e52cbda70ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page