atlas

Research map / Large language models / Language, safety and interpretability

Context Clues: Evaluating Long Context Models for Clinical Prediction Tasks on EHR Data

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Data and evaluation methodology

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Systematically evaluates context length (512 to 16k tokens) for GPT, Llama, Mamba and Hyena EHR foundation models pretrained on 2.5M patients, showing Mamba at 16k beats prior SOTA on EHRSHOT and that EHR-specific properties degrade performance but longer contexts are more robust.

Problem

Existing EHR foundation models use context windows under 1k tokens, so they cannot model full longitudinal patient records that can exceed tens of thousands of events; the effect of long context and subquadratic architectures on EHR clinical prediction is unexplored.

Approach

Pretrain 120M-scale GPT, Llama, Mamba and Hyena models over multiple context lengths on longitudinal structured EHRs, then stratify downstream performance by three EHR-specific properties (copy-forwarding repetition, irregular inter-event intervals, disease progression perplexity) to test robustness.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase Mamba context length to 16k tokensMamba · EHRSHOT (14 tasks)mean AUROC: +0.03 points over prior SOTAHelped
Increase context length (ablation)Mamba and Llama · EHRSHOT clinical prediction tasksAUROCHelped
Increase context length beyond 4k tokens (ablation)Hyena · EHRSHOT clinical prediction tasksAUROCHurt
Use Artificial Time Tokens (ATT) in tokenization (ablation)EHR prediction models · EHRSHOT clinical prediction tasksAUROCHurt
Increase patient timeline repetitivenessEHR prediction models · EHRSHOT, repetitiveness quartilesBrier scoreHurt
Increase context from 1k to 16k tokens (ablation)Mamba · EHRSHOT, repetitiveness quartilesBrier score: 0.0644 -> 0.0605; 0.0737 -> 0.0670; 0.0744 -> 0.0700; 0.0790 -> 0.0746Helped
Increase patient timeline irregularityEHR prediction models · EHRSHOT, irregularity quartilesBrier scoreHurt
Increase context from 1k to 16k tokens (ablation)Mamba · EHRSHOT, irregularity quartilesBrier score: 0.0693 -> 0.0641; 0.0729 -> 0.0678; 0.0731 -> 0.0679; 0.0764 -> 0.0723Helped
Evaluate patients with the most irregular rather than least irregular timelinesEHR prediction models · EHRSHOTBrier score: 14% worseHurt
Use longer context (ablation)Mamba and Llama · EHR-OMOP token predictionperplexityHelped
Use longer context (ablation)Hyena · EHR-OMOP token predictionperplexityHurt
Use longer contexts of 2k and 4k tokens (ablation)GPT · EHR-OMOP token predictionperplexityMixed

Surprising findings

Limitations

Experimental setup

Datasets: EHR-OMOP (2.5M train, 0.5M validation patients from an academic medical center) EHRSHOT WikiText-103

Benchmarks: EHRSHOT (14 binary tasks)

Metrics: AUROC Brier score perplexity

Baselines: CLMBR-t-base EHRMamba GPT Hyena

Builds on: Mamba EHRSHOT CLMBR CEHR-BERT Hyena

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy