Context Clues: Evaluating Long Context Models for Clinical Prediction Tasks on EHRs
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
Foundation Models (FMs) trained on Electronic Health Records (EHRs) have achieved state-of-the-art results on numerous clinical prediction tasks. However, most existing EHR FMs have context windows of <1k tokens. This prevents them from modeling full patient EHRs which can exceed 10k's of events. Recent advancements in subquadratic long-context architectures (e.g., Mamba) offer a promising solution. However, their application to EHR data has not been well-studied. We address this gap by presenting the first systematic evaluation of the effect of context length on modeling EHR data. We find that longer context models improve predictive performance -- our Mamba-based model surpasses the prior state-of-the-art on 9/14 tasks on the EHRSHOT prediction benchmark. For clinical applications, however, model performance alone is insufficient -- robustness to the unique properties of EHR is crucial. Thus, we also evaluate models across three previously underexplored properties of EHR data: (1) the prevalence of "copy-forwarded" diagnoses which creates artificial repetition of tokens within EHR sequences; (2) the irregular time intervals between EHR events which can lead to a wide range of timespans within a context window; and (3) the natural increase in disease complexity over time which makes later tokens in the EHR harder to predict than earlier ones. Stratifying our EHRSHOT results, we find that higher levels of each property correlate negatively with model performance, but that longer context models are more robust to more extreme levels of these properties. Our work highlights the potential for using long-context architectures to model EHR data, and offers a case study for identifying new challenges in modeling sequential data motivated by domains outside of natural language. We release our models and code at: https://github.com/som-shahlab/long_context_clues
Key facts. Cited by 39 papers in the map (data through 7 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 39 of its 55 references that are in the map. First posted on arXiv 9 Dec 2024.
Builds on
39 of 55 references.
Closest ancestors · 4
Same direction, newest first
- 2024Jamba: A Hybrid Transformer-Mamba Language Model28 Mar
- 2024RankMamba: Benchmarking Mamba's Document Ranking Performance in the Era of Transformers27 Mar
- 2024Simple linear attention language models balance the recall-throughput tradeoff28 Feb
- 2021Efficiently Modeling Long Sequences with Structured State Spaces31 Oct
Other references · 35
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2020Efficient Transformers: A Surveycited by 784
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
23 more
- 2016Recurrent Neural Networks for Multivariate Time Series with Missing Valuescited by 548
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 388
- 2020Med-BERT: pre-trained contextualized embeddings on large-scale structured electronic health records for disease predictioncited by 368
- 2023ClimaX: A foundation model for weather and climatecited by 325
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2019BEHRT: Transformer for Electronic Health Recordscited by 258
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
- 2023HyenaDNA: Long-Range Genomic Sequence Modeling at Single Nucleotide Resolutioncited by 187
- 2022It's Raw! Audio Generation with State-Space Modelscited by 171
- 2023EHRSHOT: An EHR Benchmark for Few-Shot Evaluation of Foundation Modelscited by 101
- 2020Language Models Are An Effective Patient Representation Learning Technique For Electronic Health Record Datacited by 85
- 2021CEHR-BERT: Incorporating temporal information from structured EHR data to improve prediction taskscited by 75
- 2023MOTOR: A Time-To-Event Foundation Model For Structured Medical Recordscited by 75
- 2024Zero Shot Health Trajectory Prediction Using Transformercited by 74
- 2022Integrated multimodal artificial intelligence framework for healthcare applicationscited by 69
- 2024State Space Model for New-Generation Network Alternative to Transformers: A Surveycited by 59
- 2023Event Stream GPT: A Data Pre-processing and Modeling Library for Generative, Pre-trained Transformers over Continuous-time Sequences of Complex Eventscited by 46
- 2024Toto: Time Series Optimized Transformer for Observabilitycited by 44
- 2022GenHPF: General Healthcare Predictive Framework with Multi-task Multi-source Learningcited by 35
- 2024CEHR-GPT: Generating Electronic Health Records with Chronological Patient Timelinescited by 22
- 2024CORE-BEHRT: A Carefully Optimized and Rigorously Evaluated BEHRTcited by 20
- 2023General-Purpose Retrieval-Enhanced Medical Prediction Model Using Near-Infinite Historycited by 12
- 2022UniHPF : Universal Healthcare Predictive Framework with Zero Domain Knowledgecited by 4
Built on by
Citing papers per year: 2025: 15; 2026: 24.
39 papers.
Sort:
By area:
- 2025MedHELM: Holistic Evaluation of Large Language Models for Medical Taskscited by 60
- 2025TIMER: Temporal Instruction Modeling and Evaluation for Longitudinal Clinical Recordscited by 33
- 2025Clinical ModernBERT: An efficient and long context encoder for biomedical textcited by 26
- 2025Beyond Sensor Data: Foundation Models of Behavioral Data from Wearables Improve Health Predictionscited by 18
- 2025Foundation models for electronic health records: representation dynamics and transferabilitycited by 11
- 2025A Collection of Innovations in Medical AI for patient records in 2024cited by 7
- 2026Tokenization Tradeoffs in Structured EHR Foundation Modelscited by 6
- 2025MedCoT-RAG: Causal Chain-of-Thought RAG for Medical Question Answeringcited by 5
- 2026One Loss to Rule Them All: Marked Time-to-Event for Structured EHR Foundation Modelscited by 5
- 2025CEHR-XGPT: A Scalable Multi-Task Foundation Model for Electronic Health Recordscited by 4
- 2025Quantifying surprise in clinical care: Detecting highly informative events in electronic health records with foundation modelscited by 3
- 2025EHR2Path: Comprehensive Pathway-Level Modeling of Longitudinal Patient Trajectories from Multimodal Electronic Health Recordscited by 2
27 more
- 2025Traj-CoA: Patient Trajectory Modeling via Chain-of-Agents for Lung Cancer Risk Predictioncited by 2
- 2025Count-Based Approaches Remain Strong: A Benchmark Against Transformer and LLM Pipelines on Structured EHRcited by 2
- 2026Efficient Generative Prediction for EHR Foundation Models: The SCOPE and REACH Estimatorscited by 2
- 2026Learning Clinical Representations Under Systematic Distribution Shiftcited by 2
- 2026Discriminative Representation Learning for Clinical Predictioncited by 2
- 2026Retrieval-aligned Tabular Foundation Models Enable Robust Clinical Risk Prediction in Electronic Health Records Under Real-world Constraintscited by 2
- 2025Integrating Genomics into Multimodal EHR Foundation Modelscited by 1
- 2026Learning Longitudinal Health Representations from EHR and Wearable Datacited by 1
- 2026Uncertainty-Aware Foundation Models for Clinical Datacited by 1
- 2026TrajOnco: a multi-agent framework for temporal reasoning over longitudinal EHR for multi-cancer early detectioncited by 1
- 2026Handling and Interpreting Missing Modalities in Patient Clinical Trajectories via Autoregressive Sequence Modelingcited by 1
- 2026Agentifying Patient Dynamics within LLMs through Interacting with Clinical World Modelcited by 1
- 2025Stable Prediction of Adverse Events in Medical Time-Series Datacited by 0
- 2025Trajectory-guided discharge stratification for heart failure using short-context electronic health record sequence modelingcited by 0
- 2026A pipeline for enabling path-specific causal fairness in observational health datacited by 0
- 2026Dense Feature Learning via Linear Structure Preservation in Medical Datacited by 0
- 2026Risk Horizons: Structured Hypothesis Spaces for Longitudinal Clinical Predictioncited by 0
- 2026Vital Trace: Protocol-Constrained Patient-State Reasoning for Longitudinal Clinical Trajectoriescited by 0
- 2026Event Fields: Learning Latent Event Structure for Waveform Foundation Modelscited by 0
- 2026WISTERIA: Learning Clinical Representations from Noisy Supervision via Multi-View Consistency in Electronic Health Recordscited by 0
- 2026EHR-RAGp: Retrieval-Augmented Prototype-Guided Foundation Model for Electronic Health Recordscited by 0
- 2026COTCAgent: Preventive Consultation via Probabilistic Chain-of-Thought Completioncited by 0
- 2026AURORA: Contextual Orthogonalization for Geometric Representation Learning in Healthcare Foundation Modelscited by 0
- 2026How Should Transformers Encode Numeric Values in Electronic Health Records?cited by 0
- 2026MorphologyFM: A Foundation Model for Morphology-Aware Representation Learning from ECG and Pulse Oximetry Waveformscited by 0
- 2026Federated generative event models for tokenized electronic health recordscited by 0
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemiccited by 0
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemic17 Aug 2026
- 2026Federated generative event models for tokenized electronic health records3 Aug 2026
- 2026MorphologyFM: A Foundation Model for Morphology-Aware Representation Learning from ECG and Pulse Oximetry Waveforms3 Jul 2026
- 2026How Should Transformers Encode Numeric Values in Electronic Health Records?1 Jul 2026
- 2026AURORA: Contextual Orthogonalization for Geometric Representation Learning in Healthcare Foundation Models18 May 2026
- 2026COTCAgent: Preventive Consultation via Probabilistic Chain-of-Thought Completion14 May 2026
- 2026Agentifying Patient Dynamics within LLMs through Interacting with Clinical World Model14 May 2026
- 2026EHR-RAGp: Retrieval-Augmented Prototype-Guided Foundation Model for Electronic Health Records12 May 2026
- 2026WISTERIA: Learning Clinical Representations from Noisy Supervision via Multi-View Consistency in Electronic Health Records10 May 2026
- 2026Event Fields: Learning Latent Event Structure for Waveform Foundation Models9 May 2026
- 2026Handling and Interpreting Missing Modalities in Patient Clinical Trajectories via Autoregressive Sequence Modeling20 Apr 2026
- 2026TrajOnco: a multi-agent framework for temporal reasoning over longitudinal EHR for multi-cancer early detection12 Apr 2026
27 more
- 2026Uncertainty-Aware Foundation Models for Clinical Data5 Apr 2026
- 2026Retrieval-aligned Tabular Foundation Models Enable Robust Clinical Risk Prediction in Electronic Health Records Under Real-world Constraints2 Apr 2026
- 2026Discriminative Representation Learning for Clinical Prediction21 Mar 2026
- 2026Learning Clinical Representations Under Systematic Distribution Shift7 Mar 2026
- 2026Tokenization Tradeoffs in Structured EHR Foundation Models3 Mar 2026
- 2026Vital Trace: Protocol-Constrained Patient-State Reasoning for Longitudinal Clinical Trajectories13 Feb 2026
- 2026Risk Horizons: Structured Hypothesis Spaces for Longitudinal Clinical Prediction13 Feb 2026
- 2026Dense Feature Learning via Linear Structure Preservation in Medical Data7 Feb 2026
- 2026Efficient Generative Prediction for EHR Foundation Models: The SCOPE and REACH Estimators3 Feb 2026
- 2026One Loss to Rule Them All: Marked Time-to-Event for Structured EHR Foundation Models31 Jan 2026
- 2026Learning Longitudinal Health Representations from EHR and Wearable Data18 Jan 2026
- 2026A pipeline for enabling path-specific causal fairness in observational health data14 Jan 2026
- 2025Trajectory-guided discharge stratification for heart failure using short-context electronic health record sequence modeling20 Nov 2025
- 2025Count-Based Approaches Remain Strong: A Benchmark Against Transformer and LLM Pipelines on Structured EHR2 Nov 2025
- 2025Integrating Genomics into Multimodal EHR Foundation Models24 Oct 2025
- 2025Stable Prediction of Adverse Events in Medical Time-Series Data16 Oct 2025
- 2025Traj-CoA: Patient Trajectory Modeling via Chain-of-Agents for Lung Cancer Risk Prediction12 Oct 2025
- 2025CEHR-XGPT: A Scalable Multi-Task Foundation Model for Electronic Health Records3 Sep 2025
- 2025MedCoT-RAG: Causal Chain-of-Thought RAG for Medical Question Answering20 Aug 2025
- 2025Quantifying surprise in clinical care: Detecting highly informative events in electronic health records with foundation models30 Jul 2025
- 2025Beyond Sensor Data: Foundation Models of Behavioral Data from Wearables Improve Health Predictions30 Jun 2025
- 2025EHR2Path: Comprehensive Pathway-Level Modeling of Longitudinal Patient Trajectories from Multimodal Electronic Health Records5 Jun 2025
- 2025MedHELM: Holistic Evaluation of Large Language Models for Medical Tasks26 May 2025
- 2025Foundation models for electronic health records: representation dynamics and transferability14 Apr 2025
- 2025Clinical ModernBERT: An efficient and long context encoder for biomedical text4 Apr 2025
- 2025TIMER: Temporal Instruction Modeling and Evaluation for Longitudinal Clinical Records6 Mar 2025
- 2025A Collection of Innovations in Medical AI for patient records in 202425 Feb 2025
- 2025MedCoT-RAG: Causal Chain-of-Thought RAG for Medical Question Answeringcited by 5
- 2025Traj-CoA: Patient Trajectory Modeling via Chain-of-Agents for Lung Cancer Risk Predictioncited by 2
- 2026TrajOnco: a multi-agent framework for temporal reasoning over longitudinal EHR for multi-cancer early detectioncited by 1
- 2026Vital Trace: Protocol-Constrained Patient-State Reasoning for Longitudinal Clinical Trajectoriescited by 0
- 2026COTCAgent: Preventive Consultation via Probabilistic Chain-of-Thought Completioncited by 0
- 2026COTCAgent: Preventive Consultation via Probabilistic Chain-of-Thought Completion14 May 2026
- 2026TrajOnco: a multi-agent framework for temporal reasoning over longitudinal EHR for multi-cancer early detection12 Apr 2026
- 2026Vital Trace: Protocol-Constrained Patient-State Reasoning for Longitudinal Clinical Trajectories13 Feb 2026
- 2025Traj-CoA: Patient Trajectory Modeling via Chain-of-Agents for Lung Cancer Risk Prediction12 Oct 2025
- 2025MedCoT-RAG: Causal Chain-of-Thought RAG for Medical Question Answering20 Aug 2025
- 2025MedHELM: Holistic Evaluation of Large Language Models for Medical Taskscited by 60
- 2025TIMER: Temporal Instruction Modeling and Evaluation for Longitudinal Clinical Recordscited by 33
- 2025Clinical ModernBERT: An efficient and long context encoder for biomedical textcited by 26
- 2025Beyond Sensor Data: Foundation Models of Behavioral Data from Wearables Improve Health Predictionscited by 18
- 2025Foundation models for electronic health records: representation dynamics and transferabilitycited by 11
- 2025A Collection of Innovations in Medical AI for patient records in 2024cited by 7
- 2026Tokenization Tradeoffs in Structured EHR Foundation Modelscited by 6
- 2026One Loss to Rule Them All: Marked Time-to-Event for Structured EHR Foundation Modelscited by 5
- 2025CEHR-XGPT: A Scalable Multi-Task Foundation Model for Electronic Health Recordscited by 4
- 2025Quantifying surprise in clinical care: Detecting highly informative events in electronic health records with foundation modelscited by 3
- 2025EHR2Path: Comprehensive Pathway-Level Modeling of Longitudinal Patient Trajectories from Multimodal Electronic Health Recordscited by 2
- 2025Count-Based Approaches Remain Strong: A Benchmark Against Transformer and LLM Pipelines on Structured EHRcited by 2
12 most cited of 32 All 32 (JSON)
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemic17 Aug 2026
- 2026Federated generative event models for tokenized electronic health records3 Aug 2026
- 2026MorphologyFM: A Foundation Model for Morphology-Aware Representation Learning from ECG and Pulse Oximetry Waveforms3 Jul 2026
- 2026How Should Transformers Encode Numeric Values in Electronic Health Records?1 Jul 2026
- 2026AURORA: Contextual Orthogonalization for Geometric Representation Learning in Healthcare Foundation Models18 May 2026
- 2026WISTERIA: Learning Clinical Representations from Noisy Supervision via Multi-View Consistency in Electronic Health Records10 May 2026
- 2026Event Fields: Learning Latent Event Structure for Waveform Foundation Models9 May 2026
- 2026Handling and Interpreting Missing Modalities in Patient Clinical Trajectories via Autoregressive Sequence Modeling20 Apr 2026
- 2026Uncertainty-Aware Foundation Models for Clinical Data5 Apr 2026
- 2026Retrieval-aligned Tabular Foundation Models Enable Robust Clinical Risk Prediction in Electronic Health Records Under Real-world Constraints2 Apr 2026
- 2026Discriminative Representation Learning for Clinical Prediction21 Mar 2026
- 2026Learning Clinical Representations Under Systematic Distribution Shift7 Mar 2026
12 newest of 32 All 32 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024EHRMamba: Towards Generalizable and Scalable Foundation Models for Electronic Health Records
- 2026EHR-RAG: Bridging Long-Horizon Structured Electronic Health Records and Large Language Models via Enhanced Retrieval-Augmented Generation
- 2025Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs
- 2025Building the EHR Foundation Model via Next Event Prediction
- 2026LLM4EHR: Aligning Clinical Time Series with Medical Event Sequences via Large Language Models
- 2026ChatHealthAI: Aligning Electronic Health Record Representations with Large Language Models for Grounded Clinical Reasoning
- 2025EHRStruct: A Comprehensive Benchmark Framework for Evaluating Large Language Models on Structured Electronic Health Record Tasks
- 2025Large Language Models with Temporal Reasoning for Longitudinal Clinical Summarization and Prediction