Open-Source Healthcare AI
A Python toolkit for clinical deep learning — unifying datasets, tasks, and models across electronic health records, physiological signals, and medical imaging.
Datasets
Tasks
Models
Members
Researchers
Used in published research by teams at
Stanford UniversityHarvard UniversityCornell University Weill Cornell MedicineUniversity of PennsylvaniaDuke University Emory UniversityThe Ohio State UniversityGeorgia Tech UNC Chapel HillWashington University in St. Louis Cincinnati Children's HospitalOak Ridge National Laboratory AstraZenecaKing's College LondonHeidelberg University InsermTsinghua UniversityPeking University Chinese Academy of SciencesUniversity of Hong Kong Nanyang Technological UniversityKorea University Ben-Gurion University of the Negev
and 42 more institutions · 81 papers using or citing PyHealthWhat PyHealth saves you
Most of a clinical ML project is the work around the model. PyHealth ships that work, tested and shared, so your time goes to the idea.
5-Stage Pipeline in <15 Lines
The same pattern works for any task — swap the dataset and task class to move between mortality, readmission, drug recommendation, or imaging.
Mortality prediction on MIMIC-III
from pyhealth.datasets import MIMIC3Dataset, PatientSplit, get_dataloader from pyhealth.models import Transformer from pyhealth.tasks import MortalityPredictionMIMIC3 from pyhealth.trainer import Trainer if __name__ == "__main__": # 1. Load data: raw tables are processed once and cached dataset = MIMIC3Dataset( root="data/mimic3", tables=["diagnoses_icd", "procedures_icd", "prescriptions"], cache_dir="cache/", ) # 2. Task + patient split: preprocessing is fit on training patients only train_ds, val_ds, test_ds = dataset.set_task( MortalityPredictionMIMIC3(), split=PatientSplit((0.8, 0.1, 0.1), seed=0) ) train_loader = get_dataloader(train_ds, batch_size=32, shuffle=True) val_loader = get_dataloader(val_ds, batch_size=32) test_loader = get_dataloader(test_ds, batch_size=32) # 3. Train and evaluate model = Transformer(dataset=train_ds) trainer = Trainer(model=model, metrics=["pr_auc", "roc_auc"]) trainer.train(train_loader, val_loader, epochs=50, monitor="pr_auc") print(trainer.evaluate(test_loader))
Built for Scale — Efficient by Design
Benchmarked on MIMIC-IV at 4 parallel workers. PyHealth 2.0 uses a memory-mapped architecture that dynamically adapts to your hardware — whether you have 2 cores or 64, it scales without manual memory management so you can focus on the ML, not the infrastructure. Pandas values shown at 1 worker only (†) as it could not scale beyond single-threaded execution. PyHealth 2.0 even runs the full in-hospital mortality task on a consumer laptop in roughly 5 GB of memory.
Drug Recommendation
Wall Time (hours · lower is better)
Peak Memory (GB · lower is better)
Length of Stay Prediction
Wall Time (hours · lower is better)
Peak Memory (GB · lower is better)
In-Hospital Mortality
Wall Time (hours · lower is better)
Peak Memory (GB · lower is better)
† Pandas measured at 1 worker; failed beyond single-threaded execution. All other methods at 4 workers on MIMIC-IV. Laptop rows are PyHealth 2.0 on a MacBook Pro M2 Pro and an ASUS Zephyrus G16 at 4 workers, benchmarked for in-hospital mortality. Full benchmark in the PyHealth 2.0 paper (ICML 2026).
How PyHealth Standardizes Clinical AI Development
A unified API from raw clinical data to trustworthy, interpretable models — follow the pipeline step by step.
Data Foundation
Core patient and clinical event data structures.
Loaders for MIMIC-III/IV, eICU, OMOP, and 20+ more.
Standardized clinical prediction task definitions.
Modeling Pipeline
Feature extraction, encoding, and transformation.
50+ clinical ML models across EHR, signals, imaging, and generation.
Unified training loop with checkpointing and early stopping.
Evaluation & Trust
Clinical evaluation metrics and benchmarking utilities.
Explainability methods for transparent clinical AI.
Conformal prediction for rigorous uncertainty quantification.
Resources
Everything you need to get started or get involved.
Colab Tutorials
Nine hands-on notebooks for PyHealth 2.1, from a 15-minute quickstart to calibration, XGBoost, interpretability, clinical text and contributing. Every one runs on a free Colab runtime with public data.
Start learningDocumentation
Full API reference, tutorials, quickstart guides, and worked examples for all supported tasks.
Read the docsGitHub Repository
Browse the source code, open issues, submit pull requests, and track ongoing development.
View on GitHubDiscord Community
Join 750+ members to ask questions, share research, and collaborate on healthcare AI projects.
Join the serverResearch Initiative
A structured program of 10+ researchers — including healthcare domain experts — building and publishing open-source, reproducible clinical AI research on top of PyHealth. Apply to join and collaborate with clinicians, data scientists, and AI researchers advancing trustworthy healthcare AI.
Apply to joinCite PyHealth
If PyHealth helps your research, please cite the PyHealth 2.0 paper (ICML 2026). If you use the 1.x releases, cite the KDD 2023 paper.
PyHealth 2.0 · ICML 2026
@inproceedings{wu2026pyhealth,
title={PyHealth 2.0: A Comprehensive Open-Source Toolkit for Accessible and Reproducible Clinical Deep Learning},
author={John Wu and Yongda Fan and Zhenbang Wu and Paul Landes and Eric Schrock and Sayeed Sajjad Razin and Arjun Chatterjee and Naveen Baskaran and Joshua Steier and Andrea Fitzpatrick and Bilal Arif and Rian Atri and Jathurshan Pradeepkumar and Siddhartha Laghuvarapu and Junyi Gao and Adam Richard Cross and Jimeng Sun},
booktitle={Forty-third International Conference on Machine Learning},
year={2026},
url={https://openreview.net/forum?id=gMLVFN9hl8}
}
PyHealth 1.0 · KDD 2023
@inproceedings{pyhealth2023yang,
author={Yang, Chaoqi and Wu, Zhenbang and Jiang, Patrick and Lin, Zhen and Gao, Junyi and Danek, Benjamin P. and Sun, Jimeng},
title={{PyHealth}: A Deep Learning Toolkit for Healthcare Applications},
booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
pages={5788--5789},
year={2023},
doi={10.1145/3580305.3599178}
}