generated from eliahuhorwitz/Academic-project-page-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
439 lines (393 loc) · 33.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Meta tags for social media banners, these should be filled in appropriately as they are your "business card" -->
<meta name="description" content="EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records.">
<meta property="og:title" content="EHRMamba"/>
<meta property="og:description" content="Discover EHRMamba, a robust foundation model designed to overcome key challenges in EHR modeling, and the Odyssey toolkit to support EHR model development and deployment."/>
<meta property="og:url" content="https://vectorinstitute.github.io/EHRMamba/"/>
<meta property="og:image" content="static/images/odyssey.png" />
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta name="twitter:title" content="EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records">
<meta name="twitter:description" content="Discover EHRMamba, a robust foundation model designed to overcome key challenges in EHR modeling, and the Odyssey toolkit to support EHR model development and deployment.">
<meta name="twitter:image" content="static/images/odyssey.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="keywords" content="EHRMamba, Electronic Health Records, foundation models, Odyssey toolkit, Mamba, HL7 FHIR, clinical prediction, EHR forecasting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google-site-verification" content="upXbjC_I0bxfiRcy_LeDwd-UFLQr-CZeId3tRw5KcIE" />
<title>EHRMamba</title>
<link rel="icon" type="image/x-icon" href="static/images/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro" rel="stylesheet">
<link rel="stylesheet" href="static/css/bulma.min.css">
<link rel="stylesheet" href="static/css/bulma-carousel.min.css">
<link rel="stylesheet" href="static/css/bulma-slider.min.css">
<link rel="stylesheet" href="static/css/fontawesome.all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="static/css/index.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script defer src="static/js/fontawesome.all.min.js"></script>
<script src="static/js/bulma-carousel.min.js"></script>
<script src="static/js/bulma-slider.min.js"></script>
<script src="static/js/index.js"></script>
</head>
<body>
<section class="hero">
<div class="hero-body">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column has-text-centered">
<div style="text-align:center; margin-bottom:15px;">
<img src="static/images/odyssey.png" alt="Odyssey Toolkit Image" style="vertical-align: middle; height: 80px; width: 80px; margin-right: 10px;">
<h1 class="title is-1 publication-title" style="display: inline; vertical-align: middle;">EHRMamba</h1>
</div>
<h1 class="title is-2 publication-title">Towards Generalizable and Scalable
Foundation Models for Electronic Health Records</h1>
<div class="is-size-5 publication-authors">
<!-- Paper authors -->
<span class="author-block">
<a href="https://adibvafa.github.io/Portfolio/" target="_blank">Adibvafa Fallahpour<sup>1, 2</sup>, </a></span>
<span class="author-block">
<a href="https://www.linkedin.com/in/mahshid-alinoori/" target="_blank">Mahshid Alinoori<sup>1</sup>, </a></span>
<span class="author-block">
<a href="https://www.linkedin.com/in/arash-afkanpour-5a623943/" target="_blank">Arash Afkanpour<sup>1</sup>, </a></span>
<span class="author-block">
<a href="https://www.linkedin.com/in/amritkrishnan" target="_blank">Amrit Krishnan<sup>1</sup></a></span>
</div>
<div class="is-size-5 publication-authors" style="margin-top:15px;">
<span class="author-block">
<sup>1</sup>
Vector Institute
<img src="static/images/vector.png" alt="Vector Institute" style="float:right;width:30px;height:30px;">
</span>
<span class="author-block">
<sup>2</sup>
University of Toronto
<img src="static/images/uoft2.png" alt="University of Toronto" style="float:right;width:40px;height:40px;margin-top:-5px;">
</span>
</div>
<div class="column has-text-centered">
<div class="publication-links">
<!-- Arxiv PDF link -->
<span class="link-block">
<a href="https://arxiv.org/abs/2405.14567" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="ai ai-arxiv"></i>
</span>
<span>arXiv</span>
</a>
</span>
<!-- Github link -->
<span class="link-block">
<a href="https://github.com/VectorInstitute/Odyssey" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>GitHub</span>
</a>
</span>
<!-- ArXiv abstract Link -->
<span class="link-block">
<a href="https://arxiv.org/pdf/2405.14567" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-file-pdf"></i>
</span>
<span>Paper</span>
</a>
</span>
<!-- Interactive Forecasting -->
<span class="link-block">
<a href="forecasting" target="_blank" class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-globe"></i>
</span>
<span>Interactive Forecasting</span>
</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Paper abstract -->
<section class="section hero light">
<div class="container is-max-widescreen">
<div class="columns is-centered has-text-centered">
<div class="column is-nine-tenth">
<h2 class="title is-3">Abstract</h2>
<div class="content has-text-justified is-size-abstract">
<p>
Transformers have significantly advanced the modeling of Electronic Health
Records (EHR), yet their deployment in real-world healthcare is limited by several
key challenges. Firstly, the quadratic computational cost and insufficient context
length of these models pose significant obstacles for hospitals in processing the extensive
medical histories typical in EHR data. Additionally, existing models employ
separate finetuning for each clinical task, complicating maintenance in healthcare
environments. Moreover, these models focus exclusively on either clinical prediction
or EHR forecasting, lacking the flexibility to perform well across both. To
overcome these limitations, we introduce EHRMamba, a robust foundation model
built on the Mamba architecture. EHRMamba can process sequences up to four
times longer than previous models due to its linear computational cost. We also
introduce a novel approach to Multitask Prompted Finetuning (MPF) for EHR
data, which enables EHRMamba to simultaneously learn multiple clinical tasks
in a single finetuning phase, enhancing deployment & cross-task
generalization. Furthermore, our model leverages the HL7 FHIR data standard
to simplify integration into existing hospital systems. Alongside EHRMamba,
we open-source Odyssey, a toolkit designed to support the development &
deployment of EHR foundation models, with an emphasis on data standardization
& interpretability. Our evaluations on the MIMIC-IV dataset demonstrate that
EHRMamba advances state-of-the-art performance across 6 major clinical tasks
and excels in EHR forecasting, marking a significant leap forward in the field.
</p>
</div>
</div>
</div>
</div>
</section>
<!-- End paper abstract -->
<!-- Introduction -->
<!-- <section class="section" id="Introduction">
<div class="container is-max-desktop">
<h2 class="title is-3">Introduction</h2>
<div class="content is-size-5 has-text-justified">
<p>Personalized medicine is the pinnacle of healthcare innovation, and AI represents a promising solution. Central to this revolution are Electronic Health Records (EHR), which document the entire medical histories of patients in hospital visits. These records form detailed chronological sequences that include diagnoses, procedures, observations, medications, laboratory tests, demographics, and clinical notes of millions of patients over decades. With over 80% of hospitals in the US and Canada adopting EHR systems, this extensive data provides an unparalleled resource for training EHR foundation models. These models hold the potential to personalize treatment plans, uncover disease patterns, detect the onset of rare illnesses, and enhance clinical predictions.</p>
<p>Transformer-based models, particularly variants of BERT, have demonstrated remarkable capabilities in modeling EHR data and predicting clinical outcomes. However, their translation to real-world clinical settings remains an open challenge. Existing models often prioritize research performance and may not adequately consider the practical constraints faced by hospitals for deploying such large-scale models. These include limited computational resources, data privacy regulations mandating on-premise deployments, and the need for flexible models that generalize to new tasks and integrate seamlessly with existing healthcare infrastructure.</p>
<p>In this paper, we mainly focus on the following bottlenecks:</p>
<p><strong>Computational Constraints.</strong> Deploying Transformer-based models in hospital settings is significantly challenged by the length of EHR data. The quadratic scaling of computational and memory requirements becomes prohibitive when sequences span tens of thousands of tokens to capture a patient’s entire medical history. Early diagnoses, noted at the beginning of these sequences, influences the interpretation of visits occurring decades later, requiring extensive context lengths to effectively capture these longitudinal healthcare dynamics. However, the computational resources required for such comprehensive analysis often far exceed what is available in many hospitals.</p>
<p><strong>Finetuning Overhead.</strong> Finetuning EHR models for each downstream clinical predictive task, such as predicting patient mortality, presents several significant challenges. This process entails creating a separate copy of the base pretrained model and finetuning it for each specific task, leading to the simultaneous management and maintenance of multiple specialized models within hospitals. This multiplicity demands considerable resources and requires initiating each finetuning process from the base model. Moreover, finetuning task-specific models in isolation hinders their ability to integrate insights across different tasks, impairing the reliability and performance of the system.</p>
</div>
</div>
</section> -->
<!-- End Introduction -->
<section class="section" id="Introduction">
<div class="container is-max-desktop">
<h2 class="title is-3">Introduction</h2>
<div class="content is-size-5-5 has-text-justified">
<p>Personalized medicine is the pinnacle of healthcare innovation, and AI represents a promising solution. Central to this revolution are Electronic Health Records (EHR), which document the
entire medical histories of patients in hospital visits. With over 80% of hospitals in the
US and Canada adopting EHR systems, this extensive data provides an unparalleled resource for
training EHR foundation models. These models hold the potential to personalize treatment
plans, uncover disease patterns, detect the onset of rare illnesses, and enhance clinical predictions
</p>
<p>Transformer-based models, have demonstrated remarkable
capabilities in modeling EHR data. However,
their translation to real-world clinical settings remains an open challenge. Existing models often
prioritize research performance and may not adequately consider the practical constraints faced
by hospitals for deploying such large-scale models. These include limited computational
resources, data privacy regulations mandating on-premise deployments, and the need for flexible
models that generalize to new tasks and integrate seamlessly with existing healthcare infrastructure.
</p>
<p><strong>Computational Constraints:</strong> Deploying Transformer-based models in hospital settings is significantly
challenged by the length of EHR data. The quadratic scaling of computational and memory
requirements becomes prohibitive when sequences span tens of thousands of tokens to capture an entire medical history. However, the computational resources required for
such comprehensive analysis often far exceed what is available in many hospitals.</p>
<p><strong>Finetuning Overhead:</strong> Finetuning EHR models for each clinical predictive task, such as mortality prediction, involves creating and maintaining separate copies of the base pretrained model for each task, leading to the management of multiple specialized models in hospitals. This multiplicity demands considerable resources and requires initiating each finetuning process from the
base model. Moreover, finetuning task-specific models in isolation hinders their ability to integrate
insights across different tasks, impairing the reliability and performance of the system.</p>
</div>
</div>
</section>
<!-- EHRMamba -->
<section class="section light" id="EHRMamba">
<div class="container is-max-desktop">
<h2 class="title is-3">Contributions</h2>
<div class="content is-size-5-5 has-text-justified">
<p>To overcome these limitations, we propose EHRMamba, a robust foundation model based on Mamba and designed for scalable, deployable, and generalizable EHR modeling. EHRMamba introduces several key contributions:</p>
<p><strong>Scalability.</strong> EHRMamba reduces computational and memory demands to a linear scale during inference while enabling large-scale training through parallel processing. It extends the context length fourfold compared to previous transformer-based models, enabling the processing of longer EHR sequences and the inclusion of more comprehensive information in the sequence.</p>
<p><strong>Multitask Prompted Finetuning (MPF).</strong> We train EHRMamba using a variant of MPF for EHR data, allowing simultaneous learning of multiple clinical predictive tasks within a single finetuning phase. This approach enhances cross-task generalization, supports the learning of new tasks without modifying the model architecture, and simplifies real-world deployment in hospitals.</p>
<p><strong>Dual Competence.</strong> EHRMamba is the first model to perform both EHR forecasting, predicting future data in EHR sequences, and clinical predictive modeling, predicting patient outcomes such as mortality. This dual functionality enables comprehensive disease pattern forecasting and personalized prediction timelines, facilitating tailored treatment plans based on individual patient trajectories.</p>
<p><strong>Odyssey.</strong> EHRMamba is built using Odyssey, a toolkit designed to facilitate the development and deployment of EHR foundation models. Odyssey supports gathering and processing EHR sequences using the HL7 Fast Healthcare Interoperability Resources (FHIR) standard, which simplifies integration into existing hospital systems due to its widespread adoption in healthcare settings. See Appendix A for more information on Odyssey.</p>
<p>We assess EHRMamba on 6 clinical predictive tasks using the MIMIC-IV dataset. Our results show that EHRMamba achieves state-of-the-art performance while operating with significant memory and computational efficiency. Additionally, we present a patient case study highlighting EHR forecasting capabilities & interpretability methods.</p>
</div>
</div>
</section>
<!-- End EHRMamba -->
<!-- Data Representation -->
<section class="section" id="DataRepresentation">
<div class="container is-max-desktop">
<h2 class="title is-3">Data Representation</h2>
<div class="content is-size-5-5 has-text-justified">
<p>Patient data in EHR sequences are represented as a time series of event tokens, with each event capturing a medical occurrence. These sequences begin with a [CLS] token and include a series of visits marked by [VS] (visit start) and [VE] (visit end) tokens. Time intervals between visits are indicated by special tokens, such as [W2] for two weeks, and a [REG] token follows each visit end. Each event token is enriched with attributes like type (procedure, medication, lab result), age at the event, exact timestamp, visit segment, visit order, and position within the sequence. These attributes are mapped to distinct token spaces, and their embeddings are combined with the event token embeddings. The comprehensive embedding scheme integrates concept, type, age, time, segment, visit order, and positional embeddings, providing a rich temporal and contextual representation of patient data.</p>
</div>
<div class="columns is-centered" style="margin-top:15px;text-align:center;">
<div class="column is-nine-tenth">
<img src="static/images/patient.png" alt="Data" style="width:90%;">
</div>
</div>
</div>
</section>
<!-- End Data Representation--
<!-- EHRMamba -->
<section class="section light" id="EHRMamba">
<div class="container is-max-desktop">
<h2 class="title is-3">EHRMamba</h2>
<div class="content is-size-5-5 has-text-justified">
<p><strong>Architecture.</strong> The EHRMamba architecture is designed to optimize EHR modeling through a specialized embedding layer, multiple Mamba blocks, and custom heads for various tasks. The embedding layer maps input sequences to embedded inputs using information described in data representation. Stacked Mamba blocks form the core of the architecture, functioning as sequence-to-sequence modules that preserve input and output dimensions and map input embeddings to an output tensor. A key feature of EHRMamba is its adaptability to both forecasting and clinical prediction tasks, with distinct heads tailored for each.</p>
</div>
<div class="content is-size-5-5 has-text-justified" style="margin-top:20px;">
<p><strong>Pretraining.</strong> EHRMamba undergoes pretraining using Next Token Prediction (NTP) to predict future events in patient sequences. This phase focuses on learning general temporal patterns and dynamics from unlabeled EHR data, preparing the model for more specific tasks.</p>
</div>
<div class="content is-size-5-5 has-text-justified" style="margin-top:20px;">
<p><strong>Finetuning.</strong> In the finetuning stage, EHRMamba adapts the knowledge gained during pretraining to specific clinical tasks. This involves using a smaller, labeled dataset to optimize the model for predicting specific clinical outcomes, enhancing its precision and reliability in real-world applications.</p>
</div>
<div class="content is-size-5-5 has-text-justified" style="margin-top:20px; margin-bottom:-25px;">
<p><strong>Multitask Prompted Finetuning (MPF).</strong> We introduce MPF for EHR, enabling a single finetuned model to efficiently handle multiple clinical tasks. By replacing the first ([CLS]) and last ([REG]) tokens of a patient sequence with task-specific tokens (e.g., [MOR] for mortality prediction), the model can use the same patient sequence data for various tasks. This approach embeds task-specific information at the input level, enhancing task-specific processing and generalization. MPF simplifies deployment and maintenance by reducing the need for multiple classification heads, streamlining the addition of new tasks, and ensuring compatibility with frameworks like HuggingFace.</p>
</div>
</div>
</section>
<div class="columns is-centered" style="margin-top:10px;text-align:center;">
<div class="column is-nine-tenth">
<img src="static/images/mamba_together_strong.png" alt="EHRMamba" style="width:30%;">
</div>
</div>
<!-- End EHRMamba -->
<!-- Experimental Setup -->
<section class="section" id="ExperimentalSetup">
<div class="container is-max-desktop">
<h2 class="title is-3">Experimental Setup</h2>
<div class="content is-size-5-5 has-text-justified">
<p><strong>Dataset.</strong> We evaluate EHRMamba on MIMIC-IV, a real-world, publicly available EHR dataset from Beth Israel Deaconess Medical Center. It includes records from over 431,000 visits and 180,000 patients, featuring detailed temporal information on medical events such as procedures, medications, and lab results, along with demographic information such as age.</p>
<p><strong>Clinical Predictive Tasks.</strong> We assess model performance on 6 primary clinical predictive binary classification tasks: (1) Mortality Prediction, predicting whether a patient will pass away within one month after hospital discharge; (2) Length of Stay Prediction, estimating whether a patient’s hospitalization will exceed one week based on the first 24 hours of admission; (3) Readmission Prediction, predicting the likelihood of a patient being readmitted within one month of the most recent discharge; (4) Condition 0 (Hypertension), predicting for specific diagnostic condition Hypertension; (5) Condition 1 (Fluid Disorders), predicting for specific diagnostic condition Fluid Disorders; (6) Condition 2 (Lipoid Metabolism Disorders), predicting for specific diagnostic condition Lipoid Metabolism Disorders.</p>
<p><strong>Evaluation Metrics.</strong> We evaluate model performances using the Area Under the Receiver Operating Characteristic Curve (AUROC), the Area Under the Precision-Recall Curve (AUPRC), and the F1-Score metrics. We calculate averages and standard deviations by conducting experiments three times with randomized seeds, and use independent two-sample T-tests to assess statistical significance.</p>
</div>
</div>
</section>
<!-- End Experimental Setup -->
<!-- Baseline Models -->
<section class="section light" id="BaselineModels">
<div class="container is-max-desktop">
<h2 class="title is-3">Baseline Models</h2>
<div class="content is-size-5-5 has-text-justified">
<p>We compare EHRMamba to 5 baseline models, which except for XGBoost, use the same embedding layer. Additionally, except MultiBird & EHRMamba, other models are trained or finetuned separately for each clinical task.</p>
<ul>
<li style="margin-bottom: 20px; margin-top: 15px;"><strong>XGBoost.</strong> The input features of the XGBoost model are frequencies of tokens from the vocabulary, excluding any special tokens, along with the age of patients in their first and last visits.</li>
<li style="margin-bottom: 20px;"><strong>LSTM.</strong> This is a standard bi-directional LSTM model.</li>
<li style="margin-bottom: 20px;"><strong>CEHR-BERT.</strong> An adaptation of the BERT architecture for EHR data that introduced the idea of incorporating temporal information using time embeddings and special time interval tokens. CEHR-BERT outperformed prior clinical BERT adaptations in various tasks including predicting patient mortality, hospital readmission, and several disease diagnoses.</li>
<li style="margin-bottom: 20px;"><strong>BigBird Transformer.</strong> The BigBird Transformer, a variant of the BERT model, employs a form of attention known as block sparse attention. This modification allows for more efficient memory usage, facilitating the processing of longer EHR sequences. Here, we use a vanilla BigBird model with a context length of 2048 tokens, 4x greater than that of the CEHR-BERT model.</li>
<li><strong>MultiBird Transformer.</strong> The MultiBird Transformer adopts the structural framework of the BigBird model but is trained using MPF, which enables a single finetuned model to excel across multiple downstream tasks. This training strategy is compatible with existing BigBird model implementations on HuggingFace, simplifying deployment of trained models.</li>
</ul>
</div>
</div>
</section>
<!-- End Baseline Models -->
<!-- Main Results -->
<section class="section" id="MainResults">
<div class="container is-max-desktop">
<h2 class="title is-3">Main Results</h2>
<div class="content is-size-5-5 has-text-justified">
<p>EHRMamba and MultiBird show a significant performance advantage over other models, due to their finetuning with MPF, which enhances their ability to integrate insights across multiple tasks. This is especially beneficial for complex tasks like readmission prediction and tasks with fewer data points like Condition 2. There is no substantial performance difference between BigBird and CEHR-BERT, underscoring the efficacy of block sparse attention over global attention. However, BigBird does outperform CEHR-BERT in condition prediction tasks, due to its longer context length. Notably, XGBoost struggles with tasks that require capturing temporal and sequential information, as it primarily processes token frequencies. Overall, EHRMamba outperforms MultiBird while also being far more memory and computational efficient, making it a superior choice for a wide range of EHR modeling objectives.</p>
</div>
<div class="columns is-centered" style="margin-top:5px;text-align:center;">
<div class="column is-nine-tenth">
<img src="static/images/results.png" alt="Main Results" style="width:75%;">
</div>
</div>
</div>
</section>
<!-- End Main Results--
<!-- Visualized Case Study -->
<section class="section light" id="CaseStudy">
<div class="container is-max-desktop">
<h2 class="title is-3">Visualized Case Study</h2>
<div class="content is-size-5-5 has-text-justified" style="margin-bottom:-25px;">
<p>We present a case study of deceased Patient X below:</p>
<p><strong>Interpretability.</strong> We use integrated gradients to assess the impact of each token in the EHR sequence on the clinical predictions. This method integrates the gradients of the model’s outputs with respect to each input token, from a baseline (such as all zeros) to the actual input. The right figure shows the average attribution scores for EHRMamba's positive predictions on the mortality task.</p>
<p><strong>Forecasting.</strong> Using EHRMamba, we forecast the next event tokens in the sequence given the preceding tokens. The left figure compares some of these predictions with the actual events. Although the predicted tokens do not always match, they often represent relevant medical concepts.</p>
</div>
</div>
</section>
<div class="columns is-centered" style="margin-top:20px;text-align:center;">
<div class="column is-nine-tenth">
<img src="static/images/interp.png" alt="Case Study" style="width:45%">
</div>
</div>
<!-- End Visualized Case Study-->
<!-- Odyssey -->
<section class="section" id="Odyssey">
<div class="container is-max-desktop">
<h2 class="title is-3">Odyssey Toolkit</h2>
<div class="content is-size-5-5 has-text-justified">
<p>Odyssey toolkit is designed to support the development and deployment of EHR foundation models:</p>
<div style="text-align: center; margin-bottom: 10px;">
<a href="https://github.com/VectorInstitute/Odyssey" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>Odyssey Toolkit GitHub</span>
</a>
</div>
<p>It includes 4 major modules:</p>
<ul>
<li style="margin-bottom: 20px;"><strong>data</strong>: This module includes scripts designed for gathering EHR datasets from HL7 FHIR resources. It handles the generation and processing of patient sequences for each clinical task, tokenizing the data, and creating the necessary data splits for model training. Additionally, it provides the dataset class used for training the models.</li>
<li style="margin-bottom: 20px;"><strong>models</strong>: This module offers implementations for models used in this study, including XGBoost, LSTM, CEHR-BERT, BigBird, MultiBird, and EHRMamba. It also includes various embedding classes essential for the models.</li>
<li style="margin-bottom: 20px;"><strong>evals</strong>: This module includes tools for testing models on different clinical prediction tasks and forecasting. It provides evaluation metrics that ensure a thorough assessment of model performance.</li>
<li><strong>interp</strong>: This module contains methods for interpreting model decisions. It includes interactive visualization of the attention matrix for Transformer-based models, novel interpretability techniques for EHRMamba, and gradient attribution methods. These tools enhance the transparency and understanding of model decisions.</li>
</ul>
<div class="columns is-centered" style="margin-top:-10px;text-align:center;">
<div class="column is-nine-tenth">
<img src="static/images/odyssey.png" alt="Odyssey" style="width:40%;">
</div>
</div>
</div>
</div>
</section>
<!-- End Odyssey-->
<!-- Conclusion -->
<section class="section light" id="Conclusion">
<div class="container is-max-desktop">
<h2 class="title is-3">Conclusion</h2>
<div class="content is-size-5-5 has-text-justified">
We introduced EHRMamba, a novel EHR foundation model based on Mamba that leverages
Multitask Prompted Finetuning (MPF) to overcome the limitations of current transformer-based
models. EHRMamba excels in handling long temporal sequences and learning multiple tasks
simultaneously, achieving state-of-the-art performance on 6 clinical prediction tasks in the MIMIC-IV
dataset. Additionally, we open-sourced the Odyssey toolkit, supporting the development and
deployment of EHR models. EHRMamba significantly advances EHR modeling, offering a robust,
scalable, and generalizable solution for improving patient outcomes and clinical decision-making.
</div>
</div>
</section>
<!-- End Conclusion-->
<!--BibTex citation -->
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>@misc{fallahpour2024EHRMamba,
title={EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records},
author={Adibvafa Fallahpour and Mahshid Alinoori and Arash Afkanpour and Amrit Krishnan},
year={2024},
eprint={2405.14567},
archivePrefix={arXiv},
primaryClass={cs.LG}
}</code></pre>
</div>
</section>
<!--End BibTex citation -->
<footer class="footer">
<div class="container">
<div class="columns is-centered">
<div class="column is-three-quarters">
<div class="content">
<p>
This page was built using the <a href="https://github.com/eliahuhorwitz/Academic-project-page-template" target="_blank">Academic Project Page Template</a> which was adopted from the <a href="https://nerfies.github.io" target="_blank">Nerfies</a> project page.
You are free to borrow the of this website, we just ask that you link back to this page in the footer. <br> This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative
Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
</div>
</div>
</div>
</div>
</footer>
<!-- Statcounter tracking code -->
<!-- You can add a tracker to track page visits by creating an account at statcounter.com -->
<!-- End of Statcounter Code -->
</body>
</html>