Skip to content

EHRMamba Implementation Into PyHealth#809

Merged
jhnwu3 merged 9 commits intosunlabuiuc:masterfrom
lehendo:ehrmamba
Feb 4, 2026
Merged

EHRMamba Implementation Into PyHealth#809
jhnwu3 merged 9 commits intosunlabuiuc:masterfrom
lehendo:ehrmamba

Conversation

@lehendo
Copy link
Contributor

@lehendo lehendo commented Feb 3, 2026

Arjun Chatterjee
Model implementation

Adds EHRMamba, a Mamba model for electronic health records.
Closely modeled off of the paper - EHRMAMBA: Towards Generalizable and Scalable Foundation Models for Electronic Health Records

Main work:
pyhealth/models/ehrmamba.py: New module with RMSNorm, MambaBlock (SSM with causal conv), and EHRMamba (BaseModel). Uses existing EmbeddingModel, per-feature Mamba stacks, and get_last_visit for the classification head. Compatible with current PyHealth tasks and Trainer.

Testing and example notebook will also be included. I also included an icustays csv file because the mimic4ehrdataset class has default table icustays which is not present anywhere in the codebase.

Copy link
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this to the docs/ as well?

models.rst

and the api/models/ehr_mamba.rst here?

@lehendo lehendo requested a review from jhnwu3 February 4, 2026 03:12
Copy link
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jhnwu3 jhnwu3 merged commit 1550c33 into sunlabuiuc:master Feb 4, 2026
1 check passed
@lehendo lehendo deleted the ehrmamba branch February 4, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants