[论文解读] EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records
EHRMamba基于Mamba架构引入了一个可扩展的EHR基础模型,Multitask Prompted Finetuning(MPF)实现多项临床任务与EHR预测的联合学习,在MIMIC-IV任务上达到最先进的结果。
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 hinder hospitals' ability 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 proficiency in both tasks. To overcome these limitations, we introduce EHRMamba, a robust foundation model built on the Mamba architecture. EHRMamba can process sequences up to 300% 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, significantly enhancing deployment and 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 and deployment of EHR foundation models, with an emphasis on data standardization and 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.
研究动机与目标
- 解决Transformer为基础的EHR模型在真实医院中的计算和上下文长度限制。
- 通过降低微调开销并实现跨任务泛化来实现可扩展部署。
- 在一个框架内同时支持EHR预测与临床预测建模。
- 利用HL7 FHIR实现更易于集成的医院系统。
- 提供工具(Odyssey)以标准化数据并提升可解释性。
提出的方法
- 采用基于Mamba的State Space Model架构,以实现线性时间推理和扩展的上下文长度。
- 引入EarMamba嵌入层,将事件标记与时间、年龄、就诊和位置属性融合。
- 在未标注的EHR序列上进行Next Token Prediction(NTP)或Masked Language Modeling(MLM)预训练。
- 通过Multitask Prompted Finetuning(MPF)进行微调,用任务特定提示替换[CLS]和[REG],实现一次阶段的多任务学习。
- 在预训练阶段使用预测未来标记的因果语言建模作为预测头。
- 在MPF微调中使用临床预测头(二元分类)以预测多项临床结局。

实验结果
研究问题
- RQ1EhrMamba是否能够以线性代价处理更长的EHR序列,从而在医院实现实际部署?
- RQ2Multitask Prompted Finetuning(MPF)是否能改善跨任务泛化并降低对多项临床任务的维护开销?
- RQ3单一模型是否能够有效同时执行EHR预测和临床预测建模?
- RQ4EhrMamba与基于HL7 FHIR的医院工作流集成能力如何,以及可解释性能力如何?
- RQ5在标准EHR任务上使用MIMIC-IV相对于强基线能达到怎样的性能提升?
主要发现
- EHRMamba在MIMIC-IV的六个临床预测任务上达到最先进的性能。
- 与基线相比,该模型在内存与计算效率方面有所提升。
- MPF实现跨任务知识共享,并简化对新任务的部署,无需架构变更。
- EhrMamba将上下文长度比先前的Transformer扩大四倍,同时保持线性推理成本。
- 结合integrated gradients的可解释性案例研究显示了对死亡率预测的逐标记归因。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。