Deep dive · Representation Learning · Health AI
Foundation Models for Health
From representation learning to EHR, sleep and time-series foundation models: the objectives, tokenizers and architectures behind them, how they are evaluated, and how to build and adapt one in practice.
Summary
- A health foundation model is a network pretrained without labels on a large, broad corpus of one or more health modalities, whose representations transfer to many downstream tasks with little labeled data.
- Almost every model in this space reuses one of four objectives: contrastive (InfoNCE), masked reconstruction, next-token or next-patch prediction, or latent prediction (JEPA). What changes from modality to modality is the tokenizer and how positive pairs are defined.
- Time-series FMs (TimesFM, Chronos, Moirai, MOMENT, Lag-Llama, TimeGPT) began with univariate point forecasts. In 2025–2026 they moved toward covariates, multivariate inputs and in-context learning (Chronos-2, TimesFM 2.5 and 3.0, Moirai 2.0). Zero-shot claims need leakage-aware benchmarks.
- Wearable and biosignal FMs include Apple's PPG/ECG and behavior models, Google's LSM and LSM-2, PaPaGei and ECG-FM. Pretraining on 104–107 hours of sensor data yields embeddings that predict demographics, conditions and physiology. These models also show that handling missing data is a first-class design problem.
- Sleep FMs grew from epoch-by-epoch staging (DeepSleepNet, U-Sleep) to multimodal polysomnography encoders. SleepFM (ICML 2024; Nature Medicine 2026) uses leave-one-out contrastive learning. It predicts risk for many future diseases from one night.
- EHR FMs began as masked models over codes (BEHRT, Med-BERT). They moved to autoregressive and time-to-event pretraining (CLMBR, MOTOR), then to generative "world models" of patient timelines that predict by simulation (ETHOS, Delphi-2M, CoMET). EHRSHOT-style few-shot evaluation shows the pretrained advantage is largest when labels are scarce.
- In practice: start with a frozen linear probe, use patient-level and temporal splits, and test across sites and devices. Report calibration and subgroup metrics. Plan for privacy, federated training and regulation (FDA PCCPs; EU AI Act obligations for medical devices now from August 2028).
Key Concepts
The core ideas of this book, one card each: a definition, an explanation from basics, why it matters, a common misconception and a diagram. Click a card, or any dotted-underlined term with a badge in the text, to open it in the side panel. To add your own, highlight any phrase and choose Key Concept.
What a Health Foundation Model Is
A foundation model is a model trained on broad data, usually with self-supervision at scale, that can be adapted to a wide range of downstream tasks. The term was coined by Bommasani et al. (2021). Such a model is valuable in medicine because labels are expensive, slow and scarce, while unlabeled data is plentiful.
In health, "broad data" means millions of patient timelines in an electronic health record (EHR), hundreds of thousands of hours of overnight sleep recordings, or billions of minutes of smartwatch signals. "Downstream tasks" means anything from sleep staging to predicting heart failure five years out.
The idea is not new to health. Learned patient representations predate the term by several years (Choi et al. 2015; Steinberg et al. 2020). What changed after 2023 is scale and breadth:
- Sensor models trained on data from more than 100,000 people (Abbaspourazad et al. 2023; Narayanswamy et al. 2024).
- Forecasting models pretrained on tens to hundreds of billions of time points (Das et al. 2023; Liu et al. 2025).
- EHR models trained on more than 100 million patients (Waxler et al. 2025).
A 2023 review of clinical foundation models nonetheless called their evaluation foundations "shaky" (Wornow et al. 2023). Much of this book is about why.
The book moves from fundamentals to specialization:
- Foundations sets up the lineage, what makes a representation good, and the data modalities.
- Objectives and Tokens derives the four self-supervised objectives and shows how continuous signals and clinical events become tokens.
- Model families come next: Time Series, Wearables and Sleep and EHR, followed by Multimodal and LLMs.
- Adaptation and Evaluation covers probing, fine-tuning, LoRA and leakage-free evaluation.
- Practice gives a reference architecture, production challenges, code and a playbook.
- Outlook closes with open problems.
The format follows Lilian Weng's long-form notes.
\(x\) is an input (a signal window, a patient timeline), \(f_\theta\) an encoder with parameters \(\theta\), and \(z = f_\theta(x) \in \mathbb{R}^d\) its representation. A timeline is a sequence of events \((c_i, t_i)\) with codes \(c_i\) from a vocabulary \(\mathcal{V}\) and times \(t_i\). In contrastive learning, \(s(\cdot,\cdot)\) is a similarity (usually cosine), \(\tau\) a temperature and \(N\) the number of candidates per anchor. \(y\) is a downstream label and \(k\) the number of labeled examples per class.
Lineage: Where Health Foundation Models Come From
Health foundation models are the meeting point of six older threads, three from general representation learning and three from health and forecasting. Each thread contributes one ingredient: what to learn (representations), how to learn it without labels (objectives), and what the data looks like (signals, timelines, sleep).
- Distributed representations. Autoencoders learn a compact code by reconstructing their input. Hinton & Salakhutdinov (2006) showed deep ones beat PCA. word2vec (2013) learned word vectors from context alone. It set the template for "embed a code by its neighbors" that EHR models still use. Bengio et al. (2013) framed the goal: representations that disentangle the factors of variation.
- Contrastive and predictive learning. Contrastive Predictive Coding (2018) introduced the InfoNCE loss. SimCLR (2020) made augmentation-based contrast work at scale. CLIP (2021) aligned two modalities in one space. I-JEPA (2023) predicts in latent space instead of pixel space.
- Masked and autoregressive pretraining. GPT (2018) and BERT (2018) established next-token and masked-token pretraining. MAE (2021) carried masking to images with high mask ratios. Scaling laws (2020) and Chinchilla (2022) made "how much data per parameter" a quantitative question.
- Forecasting. Box–Jenkins ARIMA (1970) fit one model per series. DeepAR (2017) trained one global network across many series. N-BEATS (2019) and PatchTST (2022) showed pure deep models and patch tokens could win. TimesFM (2023) pretrained one model for every series.
- Clinical event modeling. Doctor AI (2015) predicted the next visit's codes with an RNN. BEHRT (2019) and Med-BERT (2020) brought BERT to codes. CLMBR (2020) and MOTOR (2023) used autoregressive and time-to-event objectives. CoMET (2025) scaled generative event models to more than 100 million patients.
- Sleep and biosignals. The Rechtschaffen & Kales manual (1968) defined 30-second sleep epochs, revised by the AASM in 2007. DeepSleepNet (2017) and U-Sleep (2021) learned staging end to end. Apple's PPG/ECG models (2023) and SleepFM (2024) turned them into self-supervised foundation models.
The health-FM era (roughly 2023 onward) combines the six: tokens and objectives from NLP and vision, global models from forecasting, event vocabularies from clinical informatics, and the epoch-and-channel structure of sleep medicine.
What Makes a Good Representation
A good representation makes the target downstream tasks easy. A simple model on top of it (often linear) reaches high accuracy with few labels. It keeps that accuracy when the device, site or population changes.
"Easy" is the operative word. Any invertible encoding contains all the information in the input. What pretraining buys is information that is accessible, not merely present.
Concretely, I check six properties, roughly in order of how often they fail in health data:
- Linear accessibility. Clinically relevant factors (age, heart rate, sleep stage, disease status) should be linearly decodable. This is why linear probing is the standard first test (Adaptation).
- Label efficiency. Performance with \(k = 1\ldots128\) labels per class should beat training from scratch. EHRSHOT was built around exactly this curve.
- Invariance to nuisances. Sensor placement, device firmware, hospital coding habits and signal quality should not dominate the embedding. If the nearest neighbors of a patient are mostly patients from the same hospital, the representation has learned the hospital.
- Sensitivity to the signal. Invariance can go too far. A PPG augmentation that destroys pulse morphology may also destroy the information about vascular aging the model was meant to capture. PaPaGei was designed around this tension.
- Robustness to missingness. Health data is missing by design (sensors off the wrist, labs not ordered). Good representations degrade gracefully when channels or hours are absent. LSM-2 targets this property directly.
- Geometry that supports retrieval. Contrastive representations spread embeddings over the hypersphere while keeping positives close (Wang & Isola 2020). This geometry enables nearest-neighbor search ("patients like this one") and cross-modal retrieval.
A Taxonomy of Health Data
Health data is not one modality but at least six. They differ in sampling rate, structure and missingness more than images differ from text. Each modality demands a different tokenizer and a different notion of "similar". So the first design decision for a health FM is which of these it eats.
| Modality | Structure | What it demands | Typical pretraining | Examples |
|---|---|---|---|---|
| EHR codes and events | Irregular sequence of discrete codes (diagnoses, drugs, labs) with timestamps and values | Time-aware tokens, huge vocabularies, censoring, long contexts | Masked codes; next code; time-to-event; next visit | BEHRT, Med-BERT, CLMBR, MOTOR, CEHR-GPT, CoMET |
| Clinical text | Free-text notes, reports | Domain vocabulary, negation, de-identification | Masked or causal LM | NYUTron, Med-PaLM |
| Waveforms (ECG, PPG, EEG) | Dense, 64–500+ Hz, one to dozens of channels | Patching, channel handling, noise and artifact robustness | Contrastive; masked reconstruction; wav2vec-style | Apple PPG/ECG, PaPaGei, ECG-FM, LaBraM |
| Polysomnography | Overnight multichannel recording (EEG, EOG, EMG, ECG, respiratory) | Variable channel sets across clinics, 30-s epochs, cross-modal structure | Cross-modal contrastive | SleepFM, OSF |
| Wearable time series | Minute- or hour-level aggregates (steps, HR, HRV, sleep) over months | Heavy missingness, device heterogeneity, behavior vs physiology | Masked autoencoding; contrastive | LSM, LSM-2, WBM |
| Medical imaging | 2D/3D images | Resolution, 3D context, report alignment | MAE; image–report contrastive | (out of scope here) |
Table. Health data modalities and what each demands of a foundation model. Imaging is listed for completeness; this book focuses on sequences.
EHR Codes and Events
Structured EHR data is a sequence of coded events per patient. The events are diagnoses (ICD-10), procedures, medications, lab orders with values, and visits, each with a timestamp. This data is closer to language than to signals, which is why BERT and GPT transferred so easily.
It differs from language in three ways that matter:
- Time carries meaning. The gap between tokens matters: a lab repeated after an hour is different from one repeated after a year.
- Records are censored. A patient leaves the system and we never see their outcome.
- Codes repeat. Repeated or copied-forward codes are common. Wornow et al. (2024) found this makes EHR sequences harder to model than text.
Public research data comes mostly from MIMIC-IV (Johnson et al. 2023), the UK Biobank, and institutional datasets released under data use agreements.
Clinical Text
Notes and reports carry the reasoning that codes leave out (why a drug was stopped, what the clinician suspected). Language models pretrained on a health system's notes work as general prediction engines. Jiang et al. (2023) trained NYUTron on NYU Langone's notes. They fine-tuned it for readmission, mortality, length of stay and insurance denial. Text is where general LLMs are strongest. It is also the natural interface to everything else in this book (Multimodal and LLMs).
Waveforms: ECG, PPG and EEG
Biosignal waveforms are dense, quasi-periodic signals sampled tens to hundreds of times per second. An optical PPG (photoplethysmogram) on a watch measures blood volume changes. An ECG measures cardiac electrical activity. EEG measures cortical activity.
They share three challenges:
- Noise. Motion artifacts and poor contact corrupt the signal.
- Channel heterogeneity. A 12-lead hospital ECG differs from a single-lead watch ECG.
- Subject identity leakage. A person's waveform is a fingerprint that a model can memorize instead of learning physiology.
Polysomnography
Polysomnography (PSG) is the overnight clinical sleep study. It records EEG, EOG (eye movements), chin and leg EMG, ECG, airflow, respiratory effort and oxygen saturation together for about eight hours. Every channel is a waveform, but the set of channels, their montage and sampling rates vary by clinic and era.
PSG is the richest routinely collected multimodal physiological recording. Resources such as the National Sleep Research Resource make tens of thousands of studies available for research.
Wearable Time Series
Consumer wearables produce two layers of data:
- Sensor streams. Raw or lightly processed accelerometer, PPG, skin temperature and electrodermal activity.
- Derived aggregates. Step counts, heart rate, heart rate variability and sleep duration at minute or hour resolution.
The aggregates are long (months to years). They are riddled with gaps whenever the device is off-wrist or charging.
Behavioral aggregates can be as predictive as raw physiology for some outcomes. Erturk et al. (2025) found a behavior model beat a PPG model on sleep-related tasks while PPG was stronger for others.
Imaging, Briefly
Imaging foundation models (radiology, pathology, retinal) follow the vision playbook (MAE, image–text contrast) and deserve their own book. They matter here as a reminder that the same four objectives recur, and as a modality to fuse with EHR and signals.
A Map of Self-Supervised Objectives
Self-supervised learning (SSL) manufactures a prediction task from unlabeled data, so that solving it forces the encoder to learn useful structure. Nearly every health foundation model uses one of four such tasks, or a combination of them.
- Contrastive. Tell matching pairs apart.
- Masked reconstruction. Fill in what was hidden.
- Autoregressive. Predict what comes next.
- Joint-embedding prediction. Predict the representation of what was hidden.
The differences between models are mostly in the tokenizer and in what counts as a "matching pair".
Contrastive Learning and InfoNCE
Contrastive learning trains an encoder so that an anchor's embedding is closer to its positive than to \(N-1\) negatives, using a softmax over similarities. The loss, introduced as InfoNCE by van den Oord et al. (2018), is
where \(z = f_\theta(x)\) is the anchor embedding, \(z^{+}\) the embedding of its positive, \(z_j^{-}\) the negatives (usually the other items in the batch), \(s\) cosine similarity and \(\tau\) a temperature. It is a cross-entropy for picking the positive out of \(N\) candidates.
SimCLR (Chen et al. 2020) showed that strong augmentations, a projection head and large batches make this work for images. CLIP (Radford et al. 2021) applied it symmetrically across two modalities. That is the template for sensor–text and cross-signal models.
Two health-specific observations:
- Negatives can be false negatives. Two different patients with the same arrhythmia are pushed apart. Larger batches add more such collisions. This is one reason health models often prefer subject-level or cross-modal positives over augmentations.
- Collapse-free alternatives exist. BYOL (Grill et al. 2020) avoids negatives with a momentum target network. The Apple biosignal models combined a regularized contrastive loss with momentum training (Abbaspourazad et al. 2023).
Deeper Deriving InfoNCE and its mutual-information view
Setup. Draw a positive pair \((x, x^{+}) \sim p(x, x^{+})\) and \(N-1\) negatives \(x_j^{-} \sim p(x^{+})\) independently. Put the \(N\) candidates in random order. The task is to identify which one was drawn jointly with \(x\). The Bayes-optimal classifier assigns candidate \(i\) the posterior
because the joint density of the candidate set factorizes as \(p(x_i \mid x)\prod_{k\neq i} p(x_k)\). So the optimal critic \(\exp(s(z, z_k)/\tau)\) is proportional to the density ratio \(p(x_k \mid x)/p(x_k)\). InfoNCE is the cross-entropy of a learned critic against this posterior.
The bound. Substituting the optimal critic and using \(\mathbb{E}[\cdot]\) over draws gives
the result in van den Oord et al. (2018), tightened and analyzed by Poole et al. (2019). Since \(\mathcal{L}_{\text{NCE}} \ge 0\), the estimate can never exceed \(\log N\). With a batch of 256, the bound saturates at about 5.5 nats no matter how much mutual information the views share.
Why this matters less than it seems. Representation quality does not track the MI estimate closely: a tighter bound is not a better encoder. Wang & Isola (2020) explained the loss instead as two forces: alignment (positives close) and uniformity (embeddings spread on the hypersphere). As \(N \to \infty\),
where the first term is alignment and the second a log-partition that is minimized by uniform spread.
Practical reading.
- The choice of positives decides what is aligned, and therefore what becomes invariant.
- The temperature trades alignment against uniformity.
- Batch size matters mostly through the quality of the partition estimate.
Masked Reconstruction
Masked modeling hides part of the input and trains the network to reconstruct it from the rest. For discrete tokens (BERT, BEHRT, Med-BERT) the loss is cross-entropy over the masked positions. For continuous patches (MAE, MOMENT, LSM) it is usually mean squared error:
where \(M\) is the set of masked patch indices, \(x_{\setminus M}\) the visible patches, \(f_\theta\) the encoder and \(g_\phi\) a light decoder that is discarded after pretraining.
He et al. (2021) found that high mask ratios (75% for images) make the task non-trivial. They also cut compute, because the encoder only processes visible patches. Time series are more redundant locally than text, so they also tolerate high ratios. MOMENT masks about 30% of 8-step patches (Goswami et al. 2024).
Masking is also the natural objective when the downstream task is imputation. That is why wearable models such as LSM use it (Narayanswamy et al. 2024).
Autoregressive and Next-Patch Prediction
Autoregressive models factor the sequence probability left to right and maximize likelihood of each element given its past:
For discrete events (CLMBR, Foresight, CoMET) \(p_\theta\) is a softmax over the vocabulary. For continuous series the output head varies:
- Chronos quantizes values and keeps cross-entropy (Ansari et al. 2024).
- Lag-Llama outputs a parametric distribution.
- TimesFM predicts an entire output patch at once (Das et al. 2023).
- Moirai 2.0 predicts nine quantiles with the pinball loss (Liu et al. 2025):
where \(\hat{y}_q\) is the predicted \(q\)-quantile. Averaged over \(q\), pinball loss approximates the continuous ranked probability score (CRPS) that forecasting benchmarks report.
Autoregressive models are the only family that can generate futures. This matters for EHR simulation (Generative EHR Models). They need care with exposure bias over long horizons. Exposure bias = training on true histories but generating from the model's own outputs, so early errors compound.
Joint-Embedding Predictive Architectures
A joint-embedding predictive architecture (JEPA) predicts the embedding of a hidden target from the embedding of a visible context. The model is therefore never asked to reproduce unpredictable low-level detail. Assran et al. (2023) trained I-JEPA with
where \(x_C\) is the context block, \(T\) the target indices, \(h_\psi\) a predictor conditioned on target positions, and \(\bar f_\xi\) a target encoder whose weights \(\xi\) are an exponential moving average of \(\theta\) (with no gradient). The moving-average target prevents the trivial solution of mapping everything to a constant.
The appeal for biosignals is obvious. Much of a PPG or EEG trace is sensor noise that a pixel-level loss would waste capacity on. Published health results for JEPA-style training are still limited compared with contrastive and masked approaches. Treat it as promising rather than proven.
Choosing Positives in Health Data
The most consequential design choice in contrastive health models is the definition of a positive pair. Whatever differs between positives becomes something the representation ignores.
Five recipes recur:
- Same participant, different time. Abbaspourazad et al. (2023) paired PPG or ECG segments from the same Apple Heart and Movement Study participant. The study covered about 141K people over about three years. The embedding thus captures stable traits of the person and discards momentary state. The embeddings encoded demographics and health conditions.
- Adjacent segments. CLOCS (Kiyasseh et al. 2021) treated temporally adjacent ECG segments and different leads of the same recording as positives. ECG-FM combines this with wav2vec-style masking.
- Different modality, same moment. SleepFM aligns brain, cardiac and respiratory signals recorded in the same window. Apple's accelerometer model distills from PPG embeddings of the same time window (Abbaspourazad et al. 2024).
- Physiologically similar. PaPaGei-S (Pillai et al. 2024) defines positives by bins of a PPG morphology index (sVRI) rather than by subject, and adds auxiliary heads for other morphology metrics.
- Sensor and text. SensorLM (Zhang et al. 2025) pairs sensor windows with automatically generated captions describing statistics, trends and events.
A useful rule follows from what differs between positives:
- Time. Positives that differ in time make the embedding about the person.
- Modality. Positives that differ in modality make it about the physiological state.
- Augmentation. Positives that differ by augmentation make it invariant to whatever the augmentation changes. So choose augmentations that only change nuisance factors.
Tokenizing Continuous Signals and Clinical Events
Transformers consume sequences of vectors, so every health FM starts with a tokenizer that turns raw data into tokens. That choice fixes the model's resolution, context length and inductive bias before any training happens.
Continuous signals are tokenized by patching, quantization or lag features. Clinical events are tokenized by mapping codes, times and values to discrete symbols or embeddings.
Signals: Patches, Bins and Lags
Continuous signals have no natural vocabulary. Models either cut them into fixed windows, discretize their values, or build tokens from lagged values. Each choice trades resolution against sequence length.
- Patching. Nie et al. (2022) showed that splitting a series into patches of \(P\) steps, with channel independence, made transformers competitive for long-horizon forecasting. A sequence of length \(L\) becomes \(L/P\) tokens, cutting attention cost by \(P^2\). TimesFM uses input patches of 32 steps and output patches of 128 steps (Das et al. 2023). Moirai learns separate projections for several patch sizes chosen by sampling frequency (Woo et al. 2024).
- Quantization. Chronos divides each series by its mean absolute value and maps the values into a fixed vocabulary of bins. It then trains an unmodified T5 with cross-entropy (Ansari et al. 2024). The output is a categorical distribution, so it can be multimodal without assuming a parametric form. The cost is resolution: a value is known only to within a bin.
- Lag features. Lag-Llama builds each token from the current value plus values at a set of lags (one step, one day, one week back). This gives a decoder explicit access to seasonal structure (Rasul et al. 2023).
- Learned codebooks. A VQ-VAE (van den Oord et al. 2017) learns a discrete codebook. EEG models such as LaBraM (Jiang et al. 2024) train a neural tokenizer of this kind. They then pretrain by predicting the codes of masked patches.
- Per-beat or per-epoch tokens. Physiology offers natural units: a heartbeat for ECG and PPG, a 30-second epoch (or a 5-second window, as in SleepFM) for sleep. Aligning tokens to these units makes probes simpler and keeps clinically meaningful boundaries intact.
Deeper Patching and tokenization choices, in numbers
Patch length. For context length \(L\) and patch length \(P\), self-attention costs \(O((L/P)^2 d)\) and the embedding layer \(O(L d)\). Doubling \(P\) quarters attention cost but halves temporal resolution of each token.
A rule of thumb: pick \(P\) so that one patch covers a meaningful unit (a beat, a breath, an hour). The context should then hold a few hundred to a few thousand tokens. For a 64 Hz PPG, a 1-second patch is 64 samples and a 10-minute window is 600 tokens.
Normalization. Pretraining across series with wildly different scales requires per-series scaling. Common choices: mean absolute scaling (Chronos), instance normalization with the statistics added back at the output (often called RevIN), or standardization per patch.
For physiological signals, keep the scale statistics as side inputs when absolute level matters. A resting heart rate of 50 vs 90 is clinically meaningful, and per-window standardization erases it.
Quantization error. With \(B\) uniform bins over a scaled range \([-c, c]\), the bin width is \(2c/B\) and the maximum rounding error is \(c/B\). Chronos trains with bins spaced uniformly over \([-15, 15]\) after mean scaling. With a hypothetical \(B = 4{,}000\) bins, the rounding error would be under 0.004 of the series' mean absolute value. Values outside the range are clipped, which is a real risk for spiky clinical signals.
Missingness. Three options, in increasing order of faithfulness:
- Impute then tokenize. Simple, but it hides the gap.
- Add a binary mask channel per token. WBM feeds a 168 × 27 matrix plus its missingness indicators.
- Drop missing tokens and use attention masking. The model never sees fabricated values (LSM-2's AIM).
Multivariate inputs. Channel independence (one series per sequence, shared weights) is robust and simple. Two alternatives capture cross-channel structure at higher cost. One flattens variates into one sequence with variate embeddings (Moirai's any-variate attention). The other exchanges information across a group of series at each time step (Chronos-2's group attention).
EHR vocabularies. Raw code vocabularies run to hundreds of thousands of codes, most rare. Typical steps:
- Map to a standard ontology (OMOP concepts).
- Drop codes below a count threshold, or roll them up the hierarchy.
- Bin numeric lab values into per-lab quantiles, so "HbA1c, decile 9" is a token.
- Add explicit time tokens or time embeddings.
Clinical Events: Codes, Time and Values
EHR tokenization has to encode three things a word tokenizer never sees: when each event happened, what value it had, and which visit it belonged to. The design space has narrowed to a few patterns.
- Summed embeddings. BEHRT (Li et al. 2019) adds code, age, position and visit-segment embeddings, borrowing BERT's segment trick to mark visits.
- Explicit time. CEHR-BERT (Pang et al. 2021) inserts artificial time tokens between visits and adds time and age embeddings, so the model sees both order and spacing. CEHR-GPT carries this into a generative model (Pang et al. 2024).
- Values and quantiles. Generative models that must output labs need value tokens. ETHOS represents a patient as a tokenized Patient Health Timeline (Renc et al. 2024).
- Standard formats. The Medical Event Data Standard (MEDS) represents every dataset as (subject, time, code, value) rows. Tokenizers and models can then be shared across MIMIC-IV, EHRSHOT and institutional data.
A pitfall specific to EHR tokens: repeated codes. A chronic diagnosis is re-recorded at many visits, and a model rewarded for predicting the next code learns to copy. Rajamohan et al. (2025) showed that metrics are inflated unless new onsets are distinguished from repeats. They added a regularizer for repeated events.
From ARIMA to Global Deep Forecasters
Classical forecasting fits one model per series. Foundation models fit one model for all series. Everything between those two poles is the history of time-series machine learning. That history explains why time-series FMs work, and where they still lose to simple baselines.
- Local statistical models. ARIMA models a differenced series as a linear function of its own lags and past errors. The Box–Jenkins method (1970) turned identification, estimation and diagnostic checking into a procedure. Exponential smoothing and its state-space forms remain strong baselines for short, seasonal series.
- Global neural models. DeepAR (Salinas et al. 2017) trained a single autoregressive RNN across thousands of related series and output a likelihood. Related series thus share statistical strength. N-BEATS (Oreshkin et al. 2019) used a pure deep architecture with no time-series-specific components. On M3, M4 and Tourism it beat a statistical benchmark by about 11%, and the hand-crafted hybrid that won M4 by about 3%.
- Transformers, doubted and rescued. Zeng et al. (2022) showed a one-layer linear model beat several forecasting transformers on long-horizon benchmarks, a useful humbling. PatchTST (Nie et al. 2022) recovered transformer performance with patching and channel independence. Patching (cutting a series into short windows that act as tokens) is now the tokenization most FMs use.
- Pretrained forecasters. From 2023, models pretrained on large multi-domain corpora started to forecast unseen series zero-shot. The next section covers them.
For health, the lesson is that forecasting is rarely the end task. A clinician does not need tomorrow's heart rate. They need to know whether today's is abnormal for this patient. Time-series FMs are most useful in health as encoders, imputers and anomaly detectors, and as baselines for the specialized biosignal models in the next part.
Time-Series Foundation Models
Time-series foundation models (TSFMs) are transformers pretrained on billions of observations from many domains to forecast, impute or classify series they have never seen. They differ along four axes:
- Architecture: decoder-only, encoder–decoder or masked encoder.
- Tokenization: patches, bins or lags.
- Output: point, quantiles or a distribution.
- Input scope: univariate only, or multivariate with covariates.
| Model | First release | Architecture | Tokens | Output | Notes |
|---|---|---|---|---|---|
| TimesFM (Google) | Oct 2023 | Decoder-only | Patches (in 32, out 128) | Point (+ quantile head in 2.5) | ~100B time points incl. synthetic; 2.5 (Sep 2025) 200M params, 16k context; 3.0 (Aug 2026) |
| TimeGPT-1 (Nixtla) | Oct 2023 | Encoder–decoder | Values | Point + intervals | Commercial API; >100B data points |
| Lag-Llama | Oct 2023 | Decoder-only (LLaMA-style) | Lag features | Distribution | Open; univariate probabilistic |
| Moirai (Salesforce) | Feb 2024 | Masked encoder | Multi-size patches | Mixture distribution | LOTSA (~27.6B obs); any-variate attention |
| MOMENT (CMU) | Feb 2024 | Masked encoder (T5-style) | Patches of 8 | Reconstruction | Time Series Pile; forecasting, classification, anomaly detection, imputation |
| Chronos (Amazon) | Mar 2024 | Encoder–decoder (T5) | Quantized bins | Categorical | 20M–710M params; GP synthetic data |
| Toto (Datadog) | Jul 2024 | Decoder-only | Patches | Distribution | Observability metrics focus |
| Chronos-2 (Amazon) | Oct 2025 | Encoder with group attention | Patches | Quantiles | 120M params; multivariate, covariates, in-context learning |
| Moirai 2.0 (Salesforce) | Nov 2025 | Decoder-only | Single patch size | 9 quantiles | ~30× smaller than Moirai-Large, better on GIFT-Eval |
Table. Major time-series foundation models. Dates are first arXiv or announcement; details from each paper or repository as of October 2026.
Decoder-Only Patch Models
Decoder-only forecasters treat a series like a document of patches and predict the next patch. Das et al. (2023) built TimesFM this way:
- Patching. Input patches hold 32 points and output patches 128, so a long horizon needs few autoregressive steps.
- Data. About 200M parameters, pretrained on roughly 100B time points. Sources were Google Trends, Wikipedia pageviews, public datasets and about 3M synthetic series (ARMA, seasonal, trend and step patterns). The mix was half real and half synthetic.
- Results. Zero-shot accuracy came close to supervised models on Monash, Darts and ETT benchmarks. It improved monotonically from 17M to 200M parameters.
The TimesFM repository tracks the line since:
- TimesFM 2.5 (September 2025) cut parameters from 500M to 200M, raised context to 16k and added an optional quantile head.
- Covariates and fine-tuning. Covariate support through XReg was restored in October 2025. A LoRA fine-tuning example was added in April 2026.
- TimesFM 3.0 (August 2026) adds native multivariate forecasting and past and future covariates. Its weights carry a non-commercial license, with commercial use offered through Google Cloud.
Datadog's Toto applies the same design to observability metrics. A 2025 paper released a 151M-parameter version together with BOOM, a benchmark of about 350M observations from Datadog telemetry (Cohen et al. 2025).
Forecasting as Language Modeling
Chronos asks how far an unmodified language model can go if values are turned into words. Ansari et al. (2024) mean-scaled each series and quantized values into uniform bins over \([-15, 15]\). They then trained T5 models from about 20M to 710M parameters with ordinary cross-entropy:
- Synthetic data. Training mixed public datasets with synthetic series sampled from Gaussian processes, which improved generalization.
- Results. On a 42-dataset benchmark, Chronos was strongest on datasets seen in training. On unseen ones it roughly matched dataset-specific models zero-shot.
- Probabilistic output. Sampling from the categorical output gives probabilistic forecasts and naturally handles multimodal futures.
Its successors moved away from pure language modeling. A faster Chronos-Bolt variant followed in 2024. Chronos-2 (Ansari et al. 2025; 120M parameters) adds a group attention layer that shares information across related series at each patch position.
Group attention lets one model do univariate, multivariate and covariate-informed forecasting by in-context learning. Amazon reports that Chronos-2 ranks first among pretrained models on GIFT-Eval. Its largest gains are on covariate tasks in fev-bench (Amazon Science 2025).
Masked Encoders: Moirai and MOMENT
Masked-encoder TSFMs pose forecasting as filling in masked future patches. This also makes imputation and classification first-class tasks. Woo et al. (2024) designed Moirai around heterogeneity:
- Multi patch size projections selected by sampling frequency, so hourly and minute data get appropriately sized tokens.
- Any-variate attention. All variates are flattened into one sequence. Rotary embeddings encode time and learned biases distinguish variates, so the model accepts any number of channels.
- A mixture output (Student's t, negative binomial, log-normal, low-variance normal) to fit counts, positive values and heavy tails.
- Data and sizes. Pretrained on LOTSA, about 27.6B observations across nine domains, in sizes from 14M to 311M parameters.
Moirai 2.0 then reversed course. It is a decoder-only model with a single patch size, multi-token prediction and a quantile loss. It is about 30 times smaller than Moirai-Large and better on GIFT-Eval. Ablations credit the decoder-only backbone and quantile decoding (Liu et al. 2025).
MOMENT (Goswami et al. 2024) targets general analysis rather than forecasting. Its 512-step inputs are split into 64 patches, and about 30% are masked. It was evaluated on forecasting, classification, anomaly detection and imputation, and released with the Time Series Pile.
Lag Features and Hosted Models
Lag-Llama (Rasul et al. 2023) is a decoder-only model whose tokens are built from lagged values. It targets univariate probabilistic forecasting. It generalized reasonably zero-shot and became state of the art after fine-tuning on small slices of new datasets.
TimeGPT-1 (Garza et al. 2023) is an encoder–decoder transformer trained on more than 100B data points and offered as a commercial API. It ranked in the top three across frequencies on more than 300,000 series. Its paper notes, though, that comparisons with other foundation models were incomplete.
For health data, hosted models raise one question first: whether patient data may leave the institution's environment at all.
2025–2026: Covariates, Multivariate Inputs and In-Context Learning
The clearest 2025–2026 trend is that univariate zero-shot forecasting is no longer the frontier. The frontier is using context: related series, known future covariates (a medication schedule, a planned procedure) and examples supplied at inference time.
Chronos-2's group attention and TimesFM 3.0's native covariates are two answers. Moirai 2.0's result is a reminder that simpler, smaller decoders often win once data is right. For health applications, covariate support matters because the most predictive signals (activity, meals, medication) are usually separate channels.
Zero-Shot Forecasting Evaluation and Its Pitfalls
"Zero-shot" means the model was never trained on the evaluation series. As pretraining corpora absorb every public dataset, that has become hard to guarantee. Good TSFM evaluation therefore needs three things:
- a broad benchmark with strong baselines;
- probabilistic metrics normalized against a naive forecast;
- an explicit audit of overlap between pretraining data and test windows.
Benchmarks: GIFT-Eval and fev-bench
Two benchmarks have become the common reference points for TSFMs, and both were designed with the leakage problem in mind.
- GIFT-Eval (Aksu et al. 2024) spans 23 datasets and about 144,000 series, totalling 177M points. These cover seven domains and ten frequencies, with univariate and multivariate tasks at short to long horizons. It also ships a pretraining corpus of about 230B points designed not to leak into its test splits. Point and probabilistic errors are normalized against seasonal naive.
- fev-bench (Shchur et al. 2025) has 100 tasks across seven domains, 46 with covariates. It reports win rates and skill scores with bootstrapped confidence intervals, so that small leaderboard gaps are not over-read.
Metrics That Travel
Scale-free metrics are essential when averaging over heterogeneous series. The mean absolute scaled error divides the forecast MAE by the in-sample MAE of a seasonal naive forecast,
where \(H\) is the horizon, \(T\) the context length and \(m\) the seasonal period. MASE below 1 therefore beats seasonal naive.
For probabilistic forecasts, the standard metrics are the CRPS or the weighted quantile loss. The CRPS (continuous ranked probability score) measures the distance between the forecast distribution and the observed value; it is approximated by averaging pinball losses over quantiles. Report geometric means of relative scores across datasets, since arithmetic means are dominated by a few hard series.
Leakage and Familiarity
Meyer et al. (2025) argue that much published TSFM evaluation suffers from the two leakage types in the figure above. In their view, this inflates reported zero-shot performance. The practical consequences:
- Audit overlap. Ask every model card for its pretraining datasets. Exclude overlaps from the evaluation set by name and by time window.
- Test after the cutoff. For correlated domains (neighboring sensors, sibling hospital units), evaluate on windows after the pretraining cutoff.
- Keep baselines. Keep statistical baselines (seasonal naive, ETS, ARIMA) and a linear model in every table, as Zeng et al. taught the field.
What the Evidence Says for Health Data
Health is a small slice of TSFM pretraining corpora, and direct evidence is mixed:
- Peräkylä et al. (2026) forecast heart rate variability from consumer wearables zero-shot with TimesFM, Chronos-Bolt and Moirai. TimesFM and Chronos beat mean, EWMA and ETS baselines, with average MASE about 0.81–0.87 for the FMs. Moirai's gain over the mean baseline was not significant.
- Wang et al. (2025) combined All of Us EHRs with Fitbit data for ten conditions. Adding wearables improved AUROC (area under the ROC curve) for all ten. But simple hand-engineered wearable statistics outperformed MOMENT embeddings.
- OpenMHC (Schuetz et al. 2026) released more than 60M hours from 11,894 My Heart Counts participants. Its benchmark pits classical methods against wearable and multivariate TSFMs on prediction, imputation and forecasting.
My reading: general TSFMs are reasonable zero-shot forecasters for smooth physiological aggregates. As representations of health, though, they lose to modality-specific models and even to well-chosen summary statistics. Treat them as strong baselines, not as the answer.
Wearable and Biosignal Foundation Models
Biosignal foundation models are encoders pretrained without labels on large volumes of physiological signals (PPG, ECG, accelerometry, EEG) or on the minute- and hour-level aggregates that wearables derive from them. They exist because wearables generate orders of magnitude more data than anyone can label. A watch records continuously, but a diagnosis arrives rarely.
Before 2023 the standard approach was a supervised network per task (atrial fibrillation from PPG, sleep stage from accelerometry). The foundation-model approach pretrains once on a large cohort and probes for many targets.
Apple: PPG, ECG, Accelerometry and Behavior
Apple's research line is the clearest example of scaling a biosignal FM on a single consented cohort, the Apple Heart and Movement Study. Abbaspourazad et al. (2023) pretrained separate PPG and ECG encoders on data from about 141K participants over about three years:
- Participant-level positives: two segments from the same person form a positive pair. Training used a stochastic augmentation module and a regularized contrastive loss with a momentum encoder.
- Findings: the frozen embeddings encoded demographics and health conditions well enough to be predicted by simple heads. The PPG model was generally the stronger of the two. The paper appeared at ICLR 2024.
Two follow-ups extended the idea in different directions:
- Distillation to low-power sensors. Abbaspourazad et al. (2024) distilled the PPG encoder into an accelerometer encoder. They used about 20M minutes of unlabeled data from about 172K participants. Accelerometer embeddings retrieved the matching PPG embedding with 99.2% top-1 accuracy on unseen data. The distilled encoders beat accelerometer-only self-supervised or supervised encoders by 23–49% on heart rate and HRV prediction.
- Behavior, not just physiology. Erturk et al. (2025) built WBM on 27 hourly HealthKit quantities (activity, cardiovascular, vitals, gait, body measurements, fitness). The data came from about 162K people and more than 2.5B hours. Each week is a 168 × 27 matrix plus missingness indicators. After comparing three tokenizers and three backbones, a dense tokenizer with a bidirectional Mamba-2 encoder won.
WBM's results are the most useful for practitioners. It was evaluated on 57 tasks:
- Against a baseline: it won on 39 of 47 static outcomes and on all 8 time-varying ones.
- Against the PPG model: it won on 18 of 47 static outcomes, mostly sleep-related.
- Combined: concatenating WBM and PPG embeddings was best on 42 of 47.
Behavior and physiology are therefore complementary. The authors note selection bias, self-reported labels and unreleased weights as limitations.
Google: Scaling and Missingness
Google's Large Sensor Model line asks two questions: how do wearable FMs scale, and how should they handle data that is missing most of the time? Narayanswamy et al. (2024) trained LSM, a masked-reconstruction ViT, on more than 40M hours of multimodal Fitbit and Pixel Watch data. The data came from about 165,000 people (Google Research 2024):
- Scaling. Performance improved with compute, data and model size, with sublinear gains. With more data, gains slowed after roughly 105 hours, but larger models kept improving past 106 hours.
- Depth over breadth. At fixed total hours, more hours per person mattered more than more people.
- One model, many tasks. The same model handled imputation, interpolation, forecasting and classification. Few-shot activity recognition beat supervised baselines with 5–10 labeled examples. The paper appeared at ICLR 2025.
LSM-2 attacks missingness directly (Xu et al. 2025; Google Research 2025). Its Adaptive and Inherited Masking (AIM) treats natural gaps and artificial masks the same way. A fixed number of masked tokens is dropped before the encoder for efficiency. The remainder, natural gaps included, is handled by attention masking, so the model never sees imputed values.
LSM-2 was trained on about 40M hours from more than 60,000 participants. It beat LSM-1 on hypertension, anxiety and 20-class activity recognition. It also degraded less when whole sensors or parts of the day were removed.
Open PPG, ECG and EEG Models
Open models matter because most large wearable cohorts cannot release data or weights. Several groups built FMs on public or clinical recordings instead:
- PaPaGei (Pillai et al. 2024) pretrained on about 57,000 hours of PPG (about 20M segments from 13,517 subjects in VitalDB, MIMIC-III and MESA). It was evaluated on 20 tasks across 10 datasets. Its morphology-aware variant defines positives by pulse shape rather than subject. Code and weights are public.
- Pulse-PPG (Saha et al. 2025) pretrained only on raw PPG from a 100-day field study of 120 people. Field pretraining beat a clinically pretrained model on many tasks, a reminder that noise in pretraining data can be a feature.
- SiamQuality (Ding et al. 2024) pretrained a CNN on more than 36M pairs of 30-second ICU PPG signals. Each pair joins a high- and a low-quality signal from similar physiological states, so the representation is robust to signal quality.
- ECG-FM (McKeen et al. 2025, JAMIA Open) is a 90.9M-parameter transformer in the style of wav2vec 2.0 (Baevski et al. 2020). It was pretrained on about 1.4M 12-lead ECG segments. Its objective combines masked span prediction, contrastive learning across adjacent segments and random lead masking. It was evaluated on ECG interpretation and reduced ejection fraction.
- LaBraM (Jiang et al. 2024, ICLR) pretrained on about 2,500 hours of EEG from about 20 datasets. It uses a vector-quantized tokenizer and masked code prediction over channel patches.
Scaling Behavior in Health Data
Health FMs show scaling laws, but with different constants than language:
- Sensors. LSM and LSM-2 report improvement with data, compute and model size. SensorLM reports the same for sensor–language models.
- EHR. The largest EHR study found power laws with exponents close to language. Its compute-optimal ratio, though, was roughly 1,000 tokens per parameter, far more than text (Waxler et al. 2025).
Deeper Scaling laws, and what changes for health data
The form. Kaplan et al. (2020) found that language-model loss falls as a power law in parameters \(N\), data \(D\) and compute \(C\). This holds when the other two are not bottlenecks. A common joint form, used by Hoffmann et al. (2022), is
where \(E\) is the irreducible loss and \(A, B, \alpha, \beta\) are fitted. Minimizing \(L\) at fixed compute \(C \approx 6ND\) gives the compute-optimal split. For text this came out near 20 tokens per parameter.
What differs for health.
- Redundancy. Physiological signals are highly autocorrelated, so an hour of PPG carries far fewer "effective tokens" than an hour of text. LSM's finding that gains slow after about 105 hours for smaller models is consistent with this.
- Subjects vs hours. At fixed total hours, LSM found more hours per subject helped more than more subjects. For person-level downstream tasks (disease status), the opposite may hold. Measure both axes.
- Token-hungry EHR models. CoMET's fitted optimum of about 1,000 tokens per parameter means the best EHR models at a given compute are relatively small and trained on very many events. That suits health systems that have data but limited GPUs.
- Loss to task. CoMET reports that lower pretraining loss predicts downstream performance through a sigmoid-like relationship. Small loss improvements near saturation can therefore still move tasks. In sensor models the link between reconstruction loss and clinical utility is weaker, so validate on probes, not on loss.
Cohorts and Benchmarks
Wearable FMs are only as general as their cohorts, and most are trained on volunteers who own a particular brand of device:
- Apple's models come from the Apple Heart and Movement Study.
- Google's come from consented Fitbit and Pixel users.
- The open models come from ICU and clinical recordings.
2026 brought an open benchmark. OpenMHC releases 60M+ hours from 19 sensor channels for 11,894 participants, with up to 169 linked health and behavior variables. Access is open to qualified researchers, and it includes reference implementations of recent wearable FMs.
Sleep Foundation Models
Sleep foundation models are encoders pretrained on overnight polysomnography (PSG, the multi-sensor recording made in a sleep lab). They serve sleep staging, apnea detection and, increasingly, prediction of future disease. Sleep is a natural FM domain for three reasons:
- One night yields eight hours of synchronized brain, heart, muscle and breathing signals.
- Clinics have recorded hundreds of thousands of studies.
- The labels that exist (stages, apnea events) cover only a sliver of what the signals contain.
From Manual Scoring to Learned Staging
Sleep staging began as a manual standard. The 1968 Rechtschaffen and Kales manual divided recordings into 30-second epochs scored by eye. The AASM's 2007 manual revised the stages to Wake, N1, N2, N3 and REM (de Chazal et al. 2022).
Human agreement bounds what models can show. A meta-analysis cited there put inter-scorer Cohen's κ (agreement corrected for chance) at about 0.76 overall, with N1 only fair. Deep learning then automated the standard:
- DeepSleepNet (Supratak et al. 2017) learned staging from a single raw EEG channel with CNNs and a recurrent layer.
- U-Sleep (Perslev et al. 2021) trained one fully convolutional model across many cohorts and channel configurations. It can output stages at higher frequency than 30 seconds.
These are supervised models of one task. The FM step is to pretrain on the signals themselves and treat staging as one probe among many.
SleepFM
SleepFM is a multimodal PSG foundation model from Stanford, published in two stages. Thapa et al. (2024, ICML) pretrained on more than 100,000 hours of PSG from over 14,000 participants. Separate encoders handle brain activity, ECG and respiratory signals:
- Objective. They compared standard pairwise contrastive learning with a leave-one-out variant. Leave-one-out gave significantly better downstream results.
- Linear probes. A logistic regression on SleepFM embeddings beat an end-to-end CNN on two tasks. On sleep staging, macro AUROC was 0.88 vs 0.72. On sleep-disordered breathing detection, AUROC was 0.85 vs 0.69.
- Retrieval. Cross-modal retrieval reached 48% top-1 accuracy among 90,000 candidates.
The leave-one-out objective aligns each modality's embedding with an aggregate of the other modalities. For modalities \(m = 1..K\) with embeddings \(z^{(m)}\), let \(\bar z^{(\setminus m)} = \tfrac{1}{K-1}\sum_{m' \ne m} z^{(m')}\); then
where each term is InfoNCE (a contrastive loss that picks the true match out of a batch) with other windows in the batch as negatives. The alternative sums all \(K(K-1)/2\) pairwise losses. Here, instead, each modality must agree with the consensus of the rest. That is more robust when one modality is noisy or missing. (This is a simplified statement; see the paper for the exact form.)
The second stage scaled the model and changed the question from "what stage is this?" to "what will happen to this person?". The Nature Medicine paper was published in January 2026. It is summarized below from its preprint and Stanford's announcement (Thapa et al. 2025 preprint; Stanford Bio-X 2026):
- Data: about 585,000 hours of PSG from more than 65,000 participants. Sources were Stanford Sleep Clinic (35,052 studies), BioSerenity, MESA and MrOS. SHHS (6,441 adults) was held out for transfer evaluation.
- Architecture: 5-second tokens at 128 Hz and channel-agnostic attention pooling within modalities (brain, ECG, EMG, respiratory). A transformer runs over 5-minute context.
- Disease prediction: Stanford recordings were linked to EHR diagnoses mapped to 1,041 phecodes (groupings of billing codes into disease categories). A head on frozen embeddings was trained with a multi-label Cox proportional hazards loss. Stanford reported 130 conditions predicted with reasonable accuracy. Example C-indices (the share of patient pairs ranked in the right order of risk) were 0.84 for all-cause mortality and 0.85 for dementia.
- Against demographics: SleepFM models beat a demographics-only baseline (age, sex, race/ethnicity, BMI) by about 5–17% AUROC, depending on disease category. This held even when the SleepFM head used only age and sex.
Two caveats apply:
- Cohort. The cohort is a sleep-clinic population, sicker than the general public.
- Labels. C-index on EHR-derived phecodes inherits coding noise and differential follow-up.
The results show that one night of PSG carries prognostic signal beyond demographics. They do not yet show clinical utility.
Benchmarks and Pretraining Comparisons
Two 2025–2026 efforts compared pretraining methods head-to-head on large PSG corpora:
- Stanford Sleep Bench (Kjaer et al. 2025) assembled 17,467 recordings (over 163,000 hours) with 13 disease-prediction tasks plus staging, apnea and age. Most SSL (self-supervised learning) methods performed similarly on staging, apnea and age. For mortality and disease prediction, contrastive learning did noticeably better and converged faster.
- OSF (Shuai et al., ICML 2026) built SleepBench, about 166,500 hours from nine public sources. It found that existing models handle missing channels poorly and that channel-invariant features matter during pretraining. Sample size, capacity and multi-source diversity all improve results.
Both point the same way as LSM-2: in physiological data, robustness to missing and heterogeneous channels is not a detail but a core design goal.
Sleep Without the Lab
PSG is expensive and done once. Wearables measure sleep every night with far fewer channels. Two signals from this book's sources suggest where the field is heading:
- Behavior models predict sleep well. WBM's biggest gains over the PPG model were on sleep duration, efficiency, deep and REM sleep (Erturk et al. 2025).
- Language models coach on sleep. They now sit on top of wearable sleep data to coach users (PH-LLM).
The open problem is linking the two worlds: distilling PSG-trained representations into wearable encoders, as Apple did from PPG to accelerometry.
Modeling Patient Timelines
EHR foundation models learn representations of patients from their sequences of coded clinical events. A single pretrained model can then support risk prediction, phenotyping, cohort discovery and operational forecasting. The core analogy, a patient timeline as a sentence of medical codes, is a decade old. What has changed is the objective (masked, autoregressive, time-to-event, generative) and the scale.
Early Sequence Models
Choi et al. (2015) introduced Doctor AI, an RNN that reads a patient's visits. It predicts the diagnosis and medication codes of the next visit, along with the time until it. The framing (the EHR as a multivariate point process over codes) set the agenda: learn from the sequence itself, not from hand-built features.
Two of its problems persist today:
- Coding habits. The model learns an institution's coding habits along with its medicine.
- Irregular timing. Sparse, irregular visits make "next" a poorly defined target.
Masked Models over Codes
When BERT appeared, EHR researchers adapted it within months. The common recipe masks a fraction of codes and predicts them from the rest. Embeddings encode visits and time:
- Li et al. (2019) trained BEHRT on records of nearly 1.6 million people with code, age, position and visit-segment embeddings. On onset prediction for 301 conditions it improved average precision by 8.0–10.8 points over earlier deep EHR models.
- Rasmy et al. (2020) pretrained Med-BERT on structured diagnosis data from 28,490,650 patients. Fine-tuned for heart failure in diabetics and pancreatic cancer, it raised AUC by 2.02–7.12%. With only 300–500 training samples it raised AUC by more than 20%, matching a training set about ten times larger.
- Pang et al. (2021) trained CEHR-BERT on 2.4M patients from Columbia's OMOP data. It inserts artificial time tokens between visits (week, month and long-term gap tokens). It also adds a visit-type prediction objective alongside masking.
The Med-BERT result is the pattern that recurs across this book: pretraining helps most when labeled data is scarce.
Autoregressive Representation Learning
Steinberg et al. (2020) argued that a plain language-modeling objective over codes is an effective representation learner. They named the model CLMBR. Across five prediction tasks, CLMBR representations improved AUROC by 3.5% on average over standard baselines. With few training records, the gain was 19%.
CLMBR's transformer successor, CLMBR-T-base (141M parameters, pretrained on 2.57M Stanford patients), became the reference model for the EHRSHOT benchmark.
Generative EHR Models
Generative EHR models are autoregressive models of future clinical events that predict by simulation. Given a patient's history, they sample many possible futures and count how often an outcome occurs. This turns one pretrained model into a zero-shot predictor for any outcome expressible in its vocabulary, without training a task head.
- Kraljevic et al. (2022) built Foresight, a GPT over clinical concepts extracted from free text by named-entity recognition and linking. It was trained on 811,336 patients from King's College Hospital, South London and Maudsley, and MIMIC-III. Precision@10 for the next disorder was 0.68–0.88 across sites. Clinicians judged the top forecast relevant in 97% of 34 synthetic timelines. It was later published in The Lancet Digital Health (2024).
- Pang et al. (2024) extended CEHR-BERT's time tokens to a GPT, CEHR-GPT, that generates synthetic patient timelines while preserving visit timing.
- Renc et al. (2024) proposed ETHOS, a transformer over tokenized Patient Health Timelines that predicts future trajectories zero-shot, without labeled data or fine-tuning (npj Digital Medicine, 2024).
- Shmatko et al. (2025) trained Delphi-2M, a modified GPT, on about 0.4M UK Biobank participants. It predicts rates of more than 1,000 diseases from a person's history. It was validated without changes on about 1.9M Danish individuals (Nature, 2025). Accuracy was comparable to single-disease models, and the model can sample synthetic health trajectories up to 20 years ahead.
- Waxler et al. (2025) trained CoMET, decoder-only models of 62M to 1B parameters, on Epic Cosmos. The data covered 118M patients, about 115B events and 151B tokens. Across 78 tasks (diagnosis, prognosis, operations), the largest model generally matched or beat task-specific supervised models. It did so zero-shot, by Monte Carlo simulation. Scaling followed power laws with a compute-optimal ratio near 1,000 tokens per parameter.
Simulation has costs:
- Compute. Inference is \(n\) times a forward rollout per patient per question.
- Drift. Errors compound over long horizons.
- Calibration. The model's calibration depends on how faithfully it reproduces censoring and care patterns.
A generative model trained on a health system's data also learns that system's practice patterns. "What will happen" therefore partly means "what this hospital usually does".
Time-to-Event Pretraining
Most clinical questions are "when", not "whether": time to diagnosis, readmission or death. Many patients are censored (their follow-up ends) before an outcome can be observed. Time-to-event (TTE) pretraining makes this the pretraining objective itself, so representations are shaped by survival structure from the start.
Steinberg et al. (2023) built MOTOR this way:
- Data. Pretraining used up to 55M patient records (about 9B clinical events) from EHR and claims data.
- Tasks. There are 8,192 TTE pretraining tasks, each "time until code \(c\) next occurs". A piecewise exponential head with low-rank task weights handles them.
- Model. A 143M-parameter transformer with local causal attention produces a representation at each event.
- Results. On 19 target tasks, time-dependent C-statistic improved 4.6% over state-of-the-art baselines. TTE pretraining beat next-code pretraining by 2.0%. Label efficiency improved by up to 95%.
- Robustness. The model was more robust to temporal shift and transferred to MIMIC-IV. It appeared at ICLR 2024.
Deeper Survival objectives: Cox, piecewise exponential and MOTOR
Censored data. For patient \(i\) and outcome \(t\), we observe \(T_i = \min(\text{event time}, \text{censoring time})\) and an indicator \(\delta_i = 1\) if the event was observed. The hazard \(\lambda(u \mid x)\) is the instantaneous event rate at time \(u\), and the survival function is \(S(u \mid x) = \exp\big(-\int_0^u \lambda(s \mid x)\,ds\big)\). The log-likelihood of one observation is
which rewards a high hazard at the event time and penalizes cumulative hazard over the time the patient was at risk. Censored patients contribute only the second term. That is exactly why discarding them, or treating "no event observed" as a negative label, biases a model.
Cox proportional hazards. The Cox model assumes \(\lambda(u \mid x) = \lambda_0(u)\exp(\beta^\top h(x))\) and maximizes the partial likelihood, which removes the baseline \(\lambda_0\):
It is a softmax over the risk set at each event time, structurally similar to InfoNCE. SleepFM's disease head uses a multi-label version of this loss on frozen embeddings.
Piecewise exponential. Partition time into bins \(b = 1..B\) with boundaries \(0 = u_0 < u_1 < \dots < u_B\) and assume a constant hazard \(\lambda_{b}(x)\) in each bin. With \(\Delta_b(T)\) the time spent in bin \(b\) before \(T\) and \(b(T)\) the bin containing \(T\),
MOTOR uses this form for thousands of tasks at once, with \(\log \lambda_{b,t}(x) = w_t^\top h_b(x)\). This pairs a shared per-bin representation \(h_b(x)\) with low-rank task vectors \(w_t\), so adding tasks is cheap. (This is a simplified statement of the model; see the paper for the exact parameterization and its sparse implementation.)
Evaluation. Harrell's C-index is the fraction of comparable pairs (one had the event earlier while the other was still at risk) that the model orders correctly; 0.5 is chance. Time-dependent C-statistics restrict to a horizon. Report calibration too, since a model can rank well and still be badly calibrated. One option is observed versus predicted risk at fixed horizons, using Kaplan–Meier estimates.
EHR Benchmarks and Evaluation
EHR foundation models were long evaluated on private data with bespoke tasks, which made comparison impossible. A 2023 review counted few shared benchmarks and called the evaluation landscape "shaky" (Wornow et al. 2023). Three developments since have improved this: a public few-shot benchmark with released weights, a shared data standard, and studies of what EHR sequences demand of architectures.
- EHRSHOT (Wornow et al. 2023, NeurIPS Datasets and Benchmarks) releases de-identified records of 6,739 Stanford patients (41.6M events, 921,499 encounters). It has 15 few-shot tasks in four groups: operational outcomes, lab result anticipation, new diagnoses and chest X-ray findings. It evaluates at \(k \in \{1, 2, 4, \dots, 128\}\) labeled examples and releases CLMBR-T-base. The pretrained model beat a count-based gradient-boosting (GBM) baseline at \(k \le 64\). Its advantage shrank as \(k\) grew, and the GBM won on new-diagnosis tasks above \(k = 64\).
- Context Clues (Wornow et al. 2024, ICLR 2025) pretrained GPT, Llama, Mamba and Hyena models at context lengths up to 16k tokens. Each had about 120M parameters and was trained on about 2.5M patients. Mamba at 16k reached the best mean AUROC on 14 EHRSHOT tasks (0.807 vs a prior best of 0.777). Three EHR properties made modeling harder: copy-forwarded repetition, irregular time intervals, and rising perplexity later in a timeline (the opposite of text).
- MEDS (Medical Event Data Standard) puts datasets into a common event format. It comes with tooling for tabular baselines (MEDS-Tab) and a public MIMIC-IV demo, so tokenizers, models and tasks can move between institutions.
| Model | Year | Objective | Pretraining data (as reported) | Notable result |
|---|---|---|---|---|
| Doctor AI | 2015 | Next-visit codes and time (RNN) | Longitudinal visit records | Early sequence model of EHR |
| BEHRT | 2019 | Masked codes | ~1.6M patients | +8.0–10.8 APS on 301 conditions |
| Med-BERT | 2020 | Masked codes | 28.5M patients | >20% AUC gain with 300–500 labels |
| CLMBR | 2020 | Autoregressive codes | Stanford; T-base: 2.57M patients | +19% AUROC in low-label regime |
| CEHR-BERT | 2021 | Masked codes + visit type, time tokens | 2.4M patients (OMOP) | Explicit time tokens |
| Foresight | 2022 | Autoregressive concepts from text | 811K patients, 3 sites | Precision@10 up to 0.91 |
| MOTOR | 2023 | Time-to-event (8,192 tasks) | 55M records, ~9B events | +4.6% time-dependent C |
| CEHR-GPT | 2024 | Generative, time tokens | OMOP data | Synthetic timelines |
| ETHOS | 2024 | Generative PHT tokens | Tokenized timelines | Zero-shot trajectory prediction |
| Delphi-2M | 2025 | Generative disease history | 0.4M UK Biobank (+1.9M Danish validation) | 1,000+ disease rates |
| CoMET | 2025 | Generative events, scaled | 118M patients, ~115B events | 78 tasks zero-shot; ~1,000 tokens/param optimum |
Table. EHR foundation models, by objective. Numbers are as reported by each paper; tasks and cohorts differ, so rows are not comparable to one another.
Multimodal Models and LLM Integration
A patient is not one modality, and the most useful health models will combine records, signals and language. Four main patterns integrate these sources:
- Serialize. Turn the data into text for an LLM.
- Encode and adapt. Encode the data with a modality-specific FM and feed the embeddings to an LLM through an adapter.
- Align. Align modalities contrastively in a shared space.
- Call tools. Let an LLM call specialized models and analysis code as tools.
Sensor–Language Models
Sensor–language models learn a joint space for signals and text, so a model can be queried in words. Zhang et al. (2025) trained SensorLM on about 59.7M hours of sensor data. The data came from 103,643 people across 127 countries.
The bottleneck in this pattern is paired text. The authors therefore generated captions automatically, with a hierarchical pipeline that describes statistics, trends and events:
- Training combined a contrastive objective (match a window to its caption among alternatives) with generative captioning.
- The model classified 20 activities zero-shot, meaning without any labeled examples. It also supported few-shot learning and cross-modal retrieval in both directions.
- Raters judged its captions more coherent and factual than those of general LLMs.
- Performance improved with data, model size and compute. The paper appeared at NeurIPS 2025.
LLMs over Wearable Data
Large language models can reason over wearable data directly, with modest adaptation. Liu et al. (2023) showed that few-shot tuning lets an LLM ground physiological and behavioral time series. Their tasks were cardiac signal analysis, activity recognition, calorie estimation and mental-health screeners.
Cosentino et al. (2025) fine-tuned Gemini into PH-LLM for sleep and fitness coaching (Nature Medicine, 2025):
- On multiple-choice exams it scored 79% in sleep medicine and 88% in fitness. A sample of human experts scored lower (76% and 71%).
- On 857 real-world case studies it performed similarly to experts for fitness and improved on base Gemini for personalized sleep insights.
- It predicted self-reported sleep quality from a multimodal encoding of wearable data, the encoder-plus-adapter pattern.
Serializing numbers as text works for short summaries but not for months of minute-level data. The encoder-plus-adapter pattern is how signal FMs and LLMs are likely to meet.
Clinical Text and Medical LLMs
Language models trained or tuned on clinical text are the most mature health FMs, and they are increasingly the interface to the others. Two examples illustrate the point:
- NYUTron. Jiang et al. (2023) pretrained it on 4.1B words of inpatient notes from 387,144 NYU Langone patients. They fine-tuned it for readmission, in-hospital mortality, comorbidity, length of stay and insurance denial.
- Med-PaLM. Singhal et al. (2022) introduced it with the MultiMedQA benchmark for medical question answering (Nature, 2023).
For structured data, the practical question is whether to serialize EHR events as text for an LLM or use a dedicated EHR FM. The evidence so far favors dedicated models for prediction and LLMs for explanation and interaction.
Language Models as Forecasters
A parallel line tries to make general LLMs forecast by aligning series with text. Jin et al. (2023) proposed Time-LLM. It reprograms patches into text prototypes for a frozen LLM and adds a prompt prefix. The authors reported gains over specialized forecasters, including in few-shot and zero-shot settings.
Such claims deserve the scrutiny of the zero-shot evaluation section. The fair test compares against purpose-built TSFMs and simple baselines at equal compute.
Fusing EHR and Wearables
Fusing modalities usually helps, but not always in the way the most complex model predicts. Two results are worth remembering:
- Apple embeddings. Combining Apple's behavior and PPG embeddings beat either alone on 42 of 47 outcomes (Erturk et al. 2025).
- All of Us. Adding Fitbit features improved prediction of all ten conditions studied, with about 8.9% average AUROC gain. Yet CEHR-GPT's advantage over simple OMOP indicators largely disappeared once wearables were added. Hand-crafted wearable statistics also beat MOMENT embeddings (Wang et al. 2025).
Complementary information matters more than representational sophistication.
Specializing Foundation Models
Adaptation is how a general representation becomes a clinical tool. The right method depends mostly on two things: how many labels exist, and how far the data sits from the pretraining distribution.
The options, in rough order of cost:
- a frozen linear probe;
- few-shot or in-context use;
- parameter-efficient fine-tuning (LoRA);
- full fine-tuning;
- continued pretraining;
- distillation into a smaller model for deployment.
Linear Probing and Nearest Neighbors
A linear probe freezes the encoder and fits a logistic (or Cox, or ridge) regression on its embeddings. It is the cheapest adaptation and the most honest measure of representation quality. It is often the best choice for small clinical datasets. For a binary label,
where \(f_\theta\) is frozen, \(\sigma\) the logistic function and \(\lambda\) a regularization strength chosen by cross-validation grouped by patient. Most papers in this book (SleepFM, the Apple models, EHRSHOT) report probes as their primary result.
A k-nearest-neighbor classifier on normalized embeddings is a useful second check. It needs no training. It also exposes whether neighbors share clinical labels or merely share a site.
Full Fine-Tuning and LP-FT
Fine-tuning updates all weights and wins when labels are plentiful, but it can damage what pretraining learned. Kumar et al. (2022) showed that fine-tuning with a randomly initialized head can distort pretrained features. Out of distribution, it can then underperform linear probing. They proposed LP-FT: fit a linear probe first, then fine-tune from that head.
For health models that will meet new sites and devices, LP-FT is a cheap default.
Parameter-Efficient Fine-Tuning
Parameter-efficient fine-tuning trains a small number of new parameters while freezing the backbone. The most widely used method is LoRA (Hu et al. 2021), which adds a low-rank update to selected weight matrices:
where \(W_0\) is frozen, only \(A\) and \(B\) are trained (with \(B\) initialized to zero so training starts at the pretrained model), and \(\alpha\) scales the update. For a 768 × 768 attention projection, rank 8 trains about 12K parameters instead of 590K.
LoRA brings three practical benefits in health:
- Sharing. One backbone can serve many sites or tasks, with a small adapter each.
- Locality. Adapters can be trained where the data lives.
- Stability. The frozen backbone limits forgetting.
TimesFM's repository added a LoRA fine-tuning example in 2026 (TimesFM repository).
Few-Shot Use and Prompting Time-Series Models
"Prompting" a time-series FM means choosing what goes into its context. For a zero-shot forecaster, there are three levers:
- Context length. More history usually helps, until it reaches past a regime change.
- Related series and covariates. Choosing which to include is now supported by Chronos-2 and TimesFM 3.0.
- Aggregation. Sampled forecasts must be aggregated into quantiles.
For generative EHR models, the prompt is the patient's history. The "question" is the outcome counted in simulated futures.
Few-shot classification with frozen encoders (a probe on \(k\) examples) is a separate regime. It has its own benchmark protocol, and the EHRSHOT \(k\)-shot curves are the template.
Distillation
Distillation trains a small student to match a large teacher. It matters when models must run on a watch or within a hospital's inference budget.
Apple's accelerometer encoder is a cross-modal example. The student sees only low-power accelerometry but learns to match PPG embeddings. It outperformed accelerometer-only models on heart rate and HRV (heart-rate variability) (Abbaspourazad et al. 2024).
The same idea applies to costly generative EHR simulation. The simulated risk estimates can be distilled into a direct predictor for the outcomes needed often.
When to Train from Scratch
Pretraining a custom model is justified less often than it is attempted. The decision turns on four questions:
| Question | Adapt an existing FM if… | Pretrain or train from scratch if… |
|---|---|---|
| Modality match | An FM exists for your signal, sampling rate and channel set | Your sensor or coding system is novel (new device, unusual montage) |
| Data rights | Weights are licensed for your use (check non-commercial terms) | No usable license; consent forbids sending data to a vendor |
| Unlabeled volume | You have thousands of hours or patients | You have 105+ hours or millions of patients in-domain |
| Evidence | A probe on the FM beats your supervised baseline | Hand-crafted features or GBMs match the FM (then you may not need either) |
Table. Adapt versus pretrain. The last row is the one most often skipped: run the simple baseline first.
Evaluating Health Foundation Models
Evaluating a health FM means answering five questions. Each has a standard protocol, and leakage can invalidate all five:
- Breadth. Does it help across many tasks?
- Label scarcity. Does it help when labels are scarce?
- Shift. Does it survive a change of site, device or time?
- Fairness. Is it equally good for every group?
- Calibration. Are its probabilities trustworthy?
Task Suites
A single headline task says little about a foundation model. A useful suite spans task types (classification, regression, time-to-event, forecasting), horizons and modalities. It also fixes the adaptation protocol, so models are compared on representations rather than tuning effort.
The suites in this book are the templates:
- EHR. EHRSHOT.
- PSG. Stanford Sleep Bench and SleepBench.
- Wearables. OpenMHC.
- Forecasting. GIFT-Eval and fev-bench.
Every suite should include strong non-FM baselines (count features with gradient boosting, summary statistics, ETS). Several studies above found them hard to beat.
Label Scarcity
The value of pretraining is a function of label count, so report curves, not points. Plot the metric against \(k\) labeled examples per class for the FM probe and for a from-scratch baseline, with confidence intervals over resampled training sets.
Distribution Shift across Sites, Devices and Time
Health data shifts along three axes, and a model should be tested on each separately:
- Site. Hospitals differ in coding practice, case mix and order sets. Hold out entire sites, as SleepFM did with SHHS and MOTOR did with MIMIC-IV.
- Device. Sensors, firmware and placement change signals. Pulse-PPG's lab-versus-field results and LSM-2's sensor-removal tests are examples; test on the devices you will deploy on.
- Time. Coding systems, treatments and populations drift. Train on data before a date and test after it; MOTOR reported better robustness to temporal shift than baselines.
Fairness
Fairness failures in health often come from the label, not the model. Obermeyer et al. (2019) showed a widely used risk algorithm was biased against Black patients because it predicted health-care cost as a proxy for health need. Foundation models inherit both label proxies and biases in the pretraining population. Delphi-2M's authors explicitly found biases inherited from training data.
A fairness check has three parts:
- Report metrics by age, sex, race and ethnicity, site and device.
- Check calibration within each group.
- Look for proxies in the labels before blaming the encoder.
Calibration
A risk score is used as a probability, so it must be calibrated. The expected calibration error bins predictions and compares confidence with observed frequency:
where \(B_m\) is the set of predictions in bin \(m\), \(\bar{p}\) their mean predicted probability and \(\bar{y}\) the observed event rate. Report it with reliability diagrams and the Brier score.
Calibration usually breaks first under shift. It can be repaired cheaply with temperature or isotonic scaling on a small local sample. That is one more reason to keep a held-out set from each deployment site.
Leakage: Patient-Level and Temporal Splits
Leakage is the most common reason health ML results fail to replicate. Kapoor & Narayanan (2023) catalogued leakage across ML-based science and found it widespread.
Health FMs add three specific risks:
- Shared patients. Windows from the same patient appear in train and test, so the model recognizes the person.
- Future information. Features include a code recorded after the prediction time.
- Pretraining overlap. Pretraining corpora include the evaluation patients.
Deeper A leakage audit for health foundation models
- Pretraining overlap. List every dataset in pretraining. Remove evaluation patients from pretraining (or evaluate only on patients and sites never seen). For public TSFMs, check the model card for the benchmark datasets and their time windows.
- Unit of splitting. Split by patient (or by participant for wearables), never by window or visit. For families or repeated enrollments, split by the highest-level identifier available.
- Prediction time. Define an index time per example and drop every event recorded after it. This includes codes whose recording time is later than their clinical time (billing codes are often entered days later).
- Label leakage through codes. Remove codes that encode the label or its treatment (a diagnosis code for the outcome, a drug only given for it). For onset tasks, exclude patients with the condition before index and distinguish new onsets from repeats (Rajamohan et al. 2025).
- Temporal hold-out. Keep a test set strictly after the training period. Report the gap between random-patient and temporal splits; a large gap is a warning.
- Site and device hold-out. Hold out at least one site or device type entirely.
- Hyperparameter hygiene. Tune only on validation folds grouped by patient. Never select checkpoints on the test set, including "early stopping on test".
- Sanity probes. Train a probe to predict patient ID or site from embeddings. If it succeeds easily, downstream results may be driven by identity or site rather than physiology.
Reference Architecture
A health foundation-model system is a pipeline from raw clinical and sensor data to monitored predictions, and most of the engineering effort sits outside the model.
The architecture below is a synthesis of the systems in this book. It runs left to right through data, tokenization and pretraining. It then runs right to left through registry, adaptation, evaluation and deployment, with monitoring feeding back into data.
Production Challenges and Solutions
Moving a health FM from a paper to a clinic or a watch runs into problems that benchmarks do not measure. They include who may see the data, where training can run, how devices differ, and what regulators require. The table maps each challenge to concrete mitigations.
| Challenge | Why it bites | Solutions |
|---|---|---|
| Privacy and consent | Health data is regulated and consent may restrict secondary use or model release (Apple did not release WBM weights for this reason) | De-identify at ingestion; train inside the governed environment; tag models with consent scope; release only probes or aggregated results when weights cannot leave |
| Data access and silos | The data needed for breadth sits in many institutions that cannot pool it | Federated averaging (McMahan et al. 2016) for pretraining or LoRA adapters; common formats (MEDS, OMOP) so code travels instead of data; data use agreements for released models (EHRSHOT's approach) |
| Device heterogeneity | Sensors, firmware, sampling rates and placement shift signals; models trained on one brand fail on another | Channel-agnostic encoders (SleepFM's attention pooling); per-device normalization statistics; device hold-out evaluation; small per-device adapters |
| Missingness | Wearables are off-wrist, labs are ordered selectively, PSG channels vary by clinic | Mask-aware tokenization and attention masking (LSM-2's AIM); missingness indicators as inputs; evaluate with channels and hours removed |
| Label scarcity and noise | Clinical labels are rare, delayed and noisy (inter-scorer κ ≈ 0.76 for sleep staging) | Frozen probes and few-shot protocols; time-to-event labels that use censored patients; report label agreement as the ceiling |
| Distribution shift | Practice patterns, populations and codes drift; site effects dominate embeddings | Temporal and site hold-outs; drift monitors on inputs and embeddings; local recalibration; scheduled re-validation |
| Fairness | Proxy labels and skewed cohorts (device owners, sleep-clinic patients) create unequal performance | Subgroup metrics and calibration; audit labels for proxies; reweighting or targeted data collection |
| Regulation | Clinical use may make the model a medical device, and FMs change often | US: plan updates with a predetermined change control plan (FDA final PCCP guidance, Dec 2024) and follow the draft lifecycle guidance (Jan 2025). EU: high-risk obligations for AI in medical devices now apply from 2 August 2028 after the 2026 AI Omnibus (Regulation (EU) 2026/1744) |
| Licensing | Open weights may restrict commercial use (TimesFM 3.0's weights are non-commercial; 2.5 and earlier are Apache-2.0) | Track licenses in the registry; prefer permissive models for products; use hosted offerings where the license requires |
| Compute and latency | Long contexts, multimodal encoders and generative simulation (n rollouts per patient) are expensive | Patch and context sizing; subquadratic backbones (Mamba-style, as in WBM and Context Clues); cache embeddings; distill simulated risks into direct predictors |
Table. Production challenges for health foundation models and the mitigations that address them. Regulatory dates as of October 2026.
Code: Key Techniques
The snippets below are minimal, framework-standard implementations of the core techniques in this book. They are written for clarity, not speed:
- the InfoNCE loss;
- masked patch pretraining for a signal encoder;
- EHR event tokenization;
- a leakage-safe linear probe.
InfoNCE Loss
A symmetric, CLIP-style InfoNCE with in-batch negatives, plus the leave-one-out multimodal variant used by SleepFM-style models.
import torch
import torch.nn.functional as F
def info_nce(z_a, z_b, tau=0.1):
"""Symmetric InfoNCE (CLIP-style). z_a[i] and z_b[i] are a positive pair:
two views, two segments of the same participant, or two modalities."""
z_a = F.normalize(z_a, dim=-1)
z_b = F.normalize(z_b, dim=-1)
logits = z_a @ z_b.T / tau # (N, N) cosine similarities
targets = torch.arange(z_a.size(0), device=z_a.device)
return 0.5 * (F.cross_entropy(logits, targets) +
F.cross_entropy(logits.T, targets))
def leave_one_out_nce(zs, tau=0.1):
"""SleepFM-style: align each modality with the mean of the others.
zs: list of K tensors, each (N, d), one per modality."""
loss = 0.0
for m, z in enumerate(zs):
others = torch.stack([zs[j] for j in range(len(zs)) if j != m]).mean(0)
loss = loss + info_nce(z, others, tau)
return loss / len(zs)
Masked Patch Pretraining
A minimal masked-patch encoder for one signal channel that hides both natural gaps and artificial masks and computes the loss only where the true value is known.
import torch, torch.nn as nn
class MaskedPatchModel(nn.Module):
def __init__(self, patch_len=64, d=256, depth=6, heads=8, max_patches=1024):
super().__init__()
self.patch_len = patch_len
self.embed = nn.Linear(patch_len, d)
self.pos = nn.Parameter(torch.zeros(1, max_patches, d))
self.mask_token = nn.Parameter(torch.zeros(1, 1, d))
layer = nn.TransformerEncoderLayer(d, heads, 4 * d, batch_first=True, norm_first=True)
self.encoder = nn.TransformerEncoder(layer, depth)
self.head = nn.Linear(d, patch_len) # light decoder, dropped after pretraining
def forward(self, x, mask_ratio=0.5, observed=None):
# x: (B, L) one channel; observed: (B, L) bool, False where data is missing
B, L = x.shape
P = L // self.patch_len
patches = x[:, :P * self.patch_len].reshape(B, P, self.patch_len)
# per-window normalization; keep stats if absolute level matters downstream
mu = patches.mean(dim=(1, 2), keepdim=True)
sd = patches.std(dim=(1, 2), keepdim=True) + 1e-5
patches = (patches - mu) / sd
if observed is None:
obs = torch.ones(B, P, dtype=torch.bool, device=x.device)
else:
obs = observed[:, :P * self.patch_len].reshape(B, P, -1).all(-1)
art = (torch.rand(B, P, device=x.device) < mask_ratio) & obs # artificial mask
hidden = art | ~obs # natural gaps too
tok = self.embed(patches.nan_to_num(0.0))
tok = torch.where(hidden[..., None], self.mask_token.expand(B, P, -1), tok)
h = self.encoder(tok + self.pos[:, :P])
recon = self.head(h)
# loss only where we hid a value we actually know
err = ((recon - patches.nan_to_num(0.0)) ** 2).mean(-1)
return (err * art).sum() / art.sum().clamp(min=1)
@torch.no_grad()
def embed_window(self, x):
B, L = x.shape
P = L // self.patch_len
p = x[:, :P * self.patch_len].reshape(B, P, self.patch_len)
p = (p - p.mean(dim=(1, 2), keepdim=True)) / (p.std(dim=(1, 2), keepdim=True) + 1e-5)
return self.encoder(self.embed(p) + self.pos[:, :P]).mean(1) # (B, d)
For production, drop hidden tokens before the encoder (MAE-style) or pass a key-padding mask instead of mask tokens. Natural gaps then never enter attention, which is the AIM idea.
EHR Event Tokenization
Turning MEDS-like (subject, time, code, value) rows into token ids, with per-code value quantiles and explicit time-gap tokens. Only events before the prediction time are used.
import numpy as np
from collections import Counter
def build_vocab(events, min_count=20, n_bins=10):
"""events: iterable of dicts with keys subject_id, time, code, value (MEDS-like)."""
counts = Counter(e["code"] for e in events)
vocab = {"[PAD]": 0, "[UNK]": 1, "[VISIT]": 2}
for gap in ["[GAP:<1d]", "[GAP:1-7d]", "[GAP:1-4w]", "[GAP:1-12m]", "[GAP:>1y]"]:
vocab[gap] = len(vocab)
edges = {}
for code, c in counts.items():
if c < min_count:
continue
vals = [e["value"] for e in events if e["code"] == code and e["value"] is not None]
if len(vals) >= min_count: # numeric code: per-code quantile bins
edges[code] = np.quantile(vals, np.linspace(0, 1, n_bins + 1)[1:-1])
for q in range(n_bins):
vocab[f"{code}|Q{q}"] = len(vocab)
else:
vocab[code] = len(vocab)
return vocab, edges
def gap_token(dt_days):
if dt_days < 1: return "[GAP:<1d]"
if dt_days < 7: return "[GAP:1-7d]"
if dt_days < 28: return "[GAP:1-4w]"
if dt_days < 365: return "[GAP:1-12m]"
return "[GAP:>1y]"
def tokenize_patient(patient_events, vocab, edges, index_time, birth_time):
"""Return token ids and ages (years) for events strictly BEFORE index_time."""
ev = sorted((e for e in patient_events if e["time"] < index_time), key=lambda e: e["time"])
ids, ages, last_t = [], [], None
for e in ev:
if last_t is not None and (e["time"] - last_t).days >= 1:
ids.append(vocab[gap_token((e["time"] - last_t).days)])
ages.append((e["time"] - birth_time).days / 365.25)
code = e["code"]
if code in edges and e["value"] is not None:
tok = f"{code}|Q{int(np.searchsorted(edges[code], e['value']))}"
else:
tok = code
ids.append(vocab.get(tok, vocab["[UNK]"]))
ages.append((e["time"] - birth_time).days / 365.25)
last_t = e["time"]
return ids, ages
Two details matter more than the model:
- The strict
< index_timefilter. Use recording time, not clinical time, if they differ. - Fitting
build_vocabon training patients only. Quantile edges computed on all patients leak test-set statistics.
Leakage-Safe Linear Probe
A frozen-embedding logistic probe with patient-grouped cross-validation, plus an identity probe that checks whether embeddings encode who or where rather than physiology.
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import GroupKFold
from sklearn.metrics import roc_auc_score, brier_score_loss
def probe(train_emb, train_y, train_pid, test_emb, test_y,
Cs=(0.01, 0.1, 1.0, 10.0)):
"""Frozen-embedding probe. Patients never cross folds; test set is untouched
until the end (ideally later in time and from a held-out site)."""
mu, sd = train_emb.mean(0), train_emb.std(0) + 1e-6
Xtr, Xte = (train_emb - mu) / sd, (test_emb - mu) / sd
best_c, best_auc = None, -1
for C in Cs:
aucs = []
for tr, va in GroupKFold(n_splits=5).split(Xtr, train_y, groups=train_pid):
m = LogisticRegression(C=C, max_iter=2000).fit(Xtr[tr], train_y[tr])
aucs.append(roc_auc_score(train_y[va], m.predict_proba(Xtr[va])[:, 1]))
if np.mean(aucs) > best_auc:
best_c, best_auc = C, np.mean(aucs)
m = LogisticRegression(C=best_c, max_iter=2000).fit(Xtr, train_y)
p = m.predict_proba(Xte)[:, 1]
return {"C": best_c, "cv_auroc": best_auc,
"test_auroc": roc_auc_score(test_y, p),
"test_brier": brier_score_loss(test_y, p)}
def identity_probe(emb, pid):
"""Sanity check: if site or patient ID is easy to decode, worry."""
m = LogisticRegression(max_iter=2000).fit(emb, pid)
return m.score(emb, pid)
A Practical Playbook
The steps below are the order I would follow to build and adapt a health foundation model at a hospital or a device company. They start from the cheapest test of whether an FM helps at all and escalate only when evidence says so.
- Define the decision and the deployment target. Write down the task, the prediction time and the horizon. Also record who acts on the output and on which device or site it will run. These fix the split design and the metrics.
- Harmonize and freeze a snapshot. Convert to MEDS or OMOP (EHR) or a standard signal format with QC flags. Assign patient-level split keys once, and version the snapshot. Hold out a later time period and at least one site or device now, before anyone looks at results.
- Build the baselines first. Count features with gradient boosting for EHR; summary statistics for wearables; seasonal naive and ETS for forecasting; the existing supervised model. Several studies in this book found these hard to beat.
- Probe an existing FM. Extract frozen embeddings from the closest public model: CLMBR-T-base or MOTOR for EHR, PaPaGei or ECG-FM for signals, a TSFM for forecasting. Fit a linear or Cox probe. Plot \(k\)-shot curves against the baselines.
- Run the leakage audit and identity probe. If embeddings decode site or patient easily, or the random-split and temporal-split gap is large, fix data handling before modeling.
- Adapt incrementally. If the probe helps but not enough, try LP-FT or LoRA. For forecasting, add covariates and related series to the context. Fine-tune fully only with ample labels.
- Pretrain only with evidence. Pretrain only if no FM fits the modality, or if in-domain unlabeled data dwarfs public corpora. Choose the objective that matches the downstream use: masked for imputation, contrastive across modalities or time for person-level traits, time-to-event for prognosis. Run small scaling sweeps and select checkpoints by probe performance, not pretraining loss.
- Evaluate like a regulator. Report the task suite with confidence intervals, subgroup and per-site metrics, calibration and reliability diagrams, and results with channels or hours removed.
- Ship with change control. Register weights, tokenizer and data cards. Plan updates in a PCCP-style document (PCCP = predetermined change control plan). Deploy with drift and missingness monitors, recalibrate locally, and route monitored data back into the snapshot pipeline.
Open Problems
Health foundation models have shown that self-supervision at scale yields transferable representations for records, signals and sleep. They have not yet shown routine clinical benefit. The open problems below are where I expect the next few years of work.
- Beating simple baselines reliably. In several 2025–2026 comparisons, hand-crafted features or gradient boosting matched or beat FM embeddings when labels were plentiful. Understanding when pretraining helps, and building benchmarks that make the answer clear, is the field's most basic open question.
- Missingness as signal. Which sensors are worn and which labs are ordered carries information about the patient and the clinician. Models that treat missingness as informative without learning care patterns as shortcuts are still early.
- Cross-modal, cross-scale models. No model yet spans 500 Hz waveforms, nightly PSG, daily wearable aggregates and decades of EHR in one representation. Linking them, for instance by distilling PSG representations into wearables, is open.
- Evaluation without leakage at scale. As pretraining corpora absorb every public dataset, clean zero-shot evaluation needs prospective or post-cutoff benchmarks and shared contamination audits.
- Generative models as simulators. EHR world models can sample futures, but their outputs mix biology with institutional practice. Separating the two, and validating counterfactual "what if we treat" simulations, is unsolved.
- Calibration and fairness under shift. Representations that are calibrated and equitable across sites, devices and populations, with guarantees rather than post-hoc fixes, remain a research target.
- Open data and weights. The largest wearable and EHR models cannot release weights because of consent and privacy. Federated pretraining, privacy-preserving release and open cohorts such as OpenMHC are partial answers.
- Clinical utility. Prospective studies that show FMs change decisions and outcomes, not just AUROC, are rare. Regulatory pathways now exist for updating AI devices. The evidence base that would justify foundation models in care has to catch up.
All figures are original drawings made for this book. Figures marked "Adapted and redrawn" or "Concept adapted" follow the description or design in the linked source, with labels paraphrased; no figure is reproduced from a paper. Charts drawn from formulas with made-up parameters say "illustrative" in their captions.
Citation
Cited as:
@article{cheng2026healthfm,
title = "Foundation Models for Health: From Representation Learning to EHR, Sleep and Time Series",
author = "Cheng, Kevin",
journal = "Kevin's Notes",
year = "2026",
month = "Oct"
}
References
- Bommasani, R., et al. "On the Opportunities and Risks of Foundation Models." arXiv 2021. arxiv.org/abs/2108.07258
- Hinton, G. E., & Salakhutdinov, R. R. "Reducing the Dimensionality of Data with Neural Networks." Science 2006. pubmed.ncbi.nlm.nih.gov/16873662
- Mikolov, T., et al. "Efficient Estimation of Word Representations in Vector Space." arXiv 2013. arxiv.org/abs/1301.3781
- Bengio, Y., Courville, A., & Vincent, P. "Representation Learning: A Review and New Perspectives." IEEE TPAMI 2013. arxiv.org/pdf/1206.5538
- van den Oord, A., Li, Y., & Vinyals, O. "Representation Learning with Contrastive Predictive Coding." arXiv 2018. arxiv.org/abs/1807.03748
- Chen, T., et al. "A Simple Framework for Contrastive Learning of Visual Representations." ICML 2020. arxiv.org/abs/2002.05709
- Radford, A., et al. "Learning Transferable Visual Models From Natural Language Supervision." ICML 2021. arxiv.org/pdf/2103.00020
- Grill, J.-B., et al. "Bootstrap Your Own Latent: A New Approach to Self-Supervised Learning." NeurIPS 2020. arxiv.org/abs/2006.07733
- Assran, M., et al. "Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture." CVPR 2023. arxiv.org/abs/2301.08243
- Wang, T., & Isola, P. "Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere." ICML 2020. arxiv.org/abs/2005.10242
- Poole, B., et al. "On Variational Bounds of Mutual Information." ICML 2019. arxiv.org/abs/1905.06922
- Radford, A., et al. "Improving Language Understanding by Generative Pre-Training." OpenAI 2018. cdn.openai.com/…/language_understanding_paper.pdf
- Devlin, J., et al. "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding." NAACL 2019. arxiv.org/abs/1810.04805
- He, K., et al. "Masked Autoencoders Are Scalable Vision Learners." CVPR 2022. arxiv.org/abs/2111.06377
- Kaplan, J., et al. "Scaling Laws for Neural Language Models." arXiv 2020. arxiv.org/abs/2001.08361
- Hoffmann, J., et al. "Training Compute-Optimal Large Language Models." NeurIPS 2022. arxiv.org/pdf/2203.15556
- van den Oord, A., Vinyals, O., & Kavukcuoglu, K. "Neural Discrete Representation Learning." NeurIPS 2017. arxiv.org/abs/1711.00937
- Baevski, A., et al. "wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations." NeurIPS 2020. arxiv.org/pdf/2006.11477
- Salinas, D., et al. "DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks." International Journal of Forecasting 2020. arxiv.org/abs/1704.04110
- Oreshkin, B. N., et al. "N-BEATS: Neural Basis Expansion Analysis for Interpretable Time Series Forecasting." ICLR 2020. arxiv.org/abs/1905.10437
- Zeng, A., et al. "Are Transformers Effective for Time Series Forecasting?" AAAI 2023. arxiv.org/pdf/2205.13504
- Nie, Y., et al. "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers." ICLR 2023. arxiv.org/pdf/2211.14730
- Das, A., Kong, W., Sen, R., & Zhou, Y. "A Decoder-Only Foundation Model for Time-Series Forecasting." ICML 2024. arxiv.org/abs/2310.10688
- Google Research. "TimesFM" repository and update log (2.5, 3.0). GitHub 2025–2026. github.com/google-research/timesfm
- Ansari, A. F., et al. "Chronos: Learning the Language of Time Series." TMLR 2024. arxiv.org/abs/2403.07815
- Ansari, A. F., et al. "Chronos-2: From Univariate to Universal Forecasting." arXiv 2025. arxiv.org/abs/2510.15821
- Woo, G., et al. "Unified Training of Universal Time Series Forecasting Transformers" (Moirai). ICML 2024. arxiv.org/abs/2402.02592
- Liu, C., et al. "Moirai 2.0: When Less Is More for Time Series Forecasting." arXiv 2025. arxiv.org/abs/2511.11698
- Goswami, M., et al. "MOMENT: A Family of Open Time-series Foundation Models." ICML 2024. arxiv.org/abs/2402.03885
- Rasul, K., et al. "Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting." arXiv 2023. arxiv.org/abs/2310.08278
- Garza, A., Challu, C., & Mergenthaler-Canseco, M. "TimeGPT-1." arXiv 2023. arxiv.org/abs/2310.03589
- Cohen, B., et al. "This Time is Different: An Observability Perspective on Time Series Foundation Models." arXiv 2025. arxiv.org/abs/2505.14766
- Aksu, T., et al. "GIFT-Eval: A Benchmark for General Time Series Forecasting Model Evaluation." NeurIPS Workshop 2024. arxiv.org/abs/2410.10393
- Shchur, O., et al. "fev-bench: A Realistic Benchmark for Time Series Forecasting." arXiv 2025. arxiv.org/abs/2509.26468
- Meyer, M., Kaltenpoth, S., Zalipski, K., & Müller, O. "Rethinking Evaluation in the Era of Time Series Foundation Models: (Un)known Information Leakage Challenges." arXiv 2025. arxiv.org/abs/2510.13654
- Jin, M., et al. "Time-LLM: Time Series Forecasting by Reprogramming Large Language Models." ICLR 2024. arxiv.org/abs/2310.01728
- Peräkylä, L., et al. "Zero-Shot Heart Rate Variability Forecasting from Consumer Wearables Using Time Series Foundation Models." arXiv 2026. arxiv.org/pdf/2607.20027
- Abbaspourazad, S., et al. "Large-scale Training of Foundation Models for Wearable Biosignals." ICLR 2024. arxiv.org/abs/2312.05409
- Abbaspourazad, S., et al. "Wearable Accelerometer Foundation Models for Health via Knowledge Distillation." arXiv 2024. arxiv.org/abs/2412.11276
- Erturk, E., et al. "Beyond Sensor Data: Foundation Models of Behavioral Data from Wearables Improve Health Predictions." arXiv 2025. arxiv.org/abs/2507.00191
- "Understanding Activity and Physiology at Scale: The Apple Heart & Movement Study." 2024. ncbi.nlm.nih.gov/pmc/articles/PMC11387614
- Narayanswamy, G., et al. "Scaling Wearable Foundation Models." ICLR 2025. arxiv.org/pdf/2410.13638
- Xu, M. A., Narayanswamy, G., et al. "LSM-2: Learning from Incomplete Wearable Sensor Data." arXiv 2025. arxiv.org/abs/2506.05321
- Zhang et al. "SensorLM: Learning the Language of Wearable Sensors." NeurIPS 2025. neurips.cc/virtual/2025/poster/117808
- Pillai, A., Spathis, D., Kawsar, F., & Malekzadeh, M. "PaPaGei: Open Foundation Models for Optical Physiological Signals." ICLR 2025. arxiv.org/abs/2410.20542
- Saha, M., et al. "Pulse-PPG: An Open-Source Field-Trained PPG Foundation Model for Wearable Applications Across Lab and Field Settings." arXiv 2025. arxiv.org/abs/2502.01108
- Ding, C., et al. "SiamQuality: A ConvNet-Based Foundation Model for Imperfect Physiological Signals." arXiv 2024. arxiv.org/abs/2404.17667
- McKeen, K., Masood, S., Toma, A., Rubin, B., & Wang, B. "ECG-FM: An Open Electrocardiogram Foundation Model." JAMIA Open 2025. pmc.ncbi.nlm.nih.gov/articles/PMC12530324
- Kiyasseh, D., et al. "CLOCS: Contrastive Learning of Cardiac Signals Across Space, Time, and Patients." ICML 2021. arxiv.org/abs/2005.13249
- Jiang, W.-B., Zhao, L.-M., & Lu, B.-L. "Large Brain Model for Learning Generic Representations with Tremendous EEG Data in BCI" (LaBraM). ICLR 2024. arxiv.org/abs/2405.18765
- Schuetz, N., et al. "OpenMHC: Accelerating the Science of Wearable Foundation Models." arXiv 2026. arxiv.org/abs/2607.16235
- National Sleep Research Resource. "About." sleepdata.org/about
- de Chazal, P., Mazzotti, D. R., & Cistulli, P. A. "Automated Sleep Staging Algorithms: Have We Reached the Performance Limit Due to Manual Scoring?" Sleep 2022. pmc.ncbi.nlm.nih.gov/articles/PMC9453612
- Supratak, A., et al. "DeepSleepNet: A Model for Automatic Sleep Stage Scoring Based on Raw Single-Channel EEG." IEEE TNSRE 2017. arxiv.org/abs/1703.04046
- Perslev, M., et al. "U-Sleep: Resilient High-Frequency Sleep Staging." npj Digital Medicine 2021. pmc.ncbi.nlm.nih.gov/articles/PMC8050216
- Thapa, R., et al. "SleepFM: Multi-modal Representation Learning for Sleep Across Brain Activity, ECG and Respiratory Signals." ICML 2024. arxiv.org/abs/2405.17766
- Thapa, R., Kjaer, M. R., et al. "A Multimodal Sleep Foundation Model for Disease Prediction." medRxiv 2025; Nature Medicine 2026. medrxiv.org/content/10.1101/2025.02.04.25321675
- Stanford Bio-X. "New AI model predicts disease risk while you sleep." 2026. biox.stanford.edu/highlight/…
- Kjaer, M. R., et al. "Stanford Sleep Bench: Evaluating Polysomnography Pre-training Methods for Sleep Foundation Models." arXiv 2025. arxiv.org/abs/2512.09591
- Shuai, Z., Xu, Z., Yang, D., Wang, W., & Yang, Y. "OSF: On Pre-training and Scaling of Sleep Foundation Models." ICML 2026. icml.cc/virtual/2026/poster/61286
- Choi, E., et al. "Doctor AI: Predicting Clinical Events via Recurrent Neural Networks." MLHC 2016. arxiv.org/abs/1511.05942
- Li, Y., et al. "BEHRT: Transformer for Electronic Health Records." Scientific Reports 2020. arxiv.org/abs/1907.09538
- Rasmy, L., Xiang, Y., Xie, Z., Tao, C., & Zhi, D. "Med-BERT: Pretrained Contextualized Embeddings on Large-Scale Structured Electronic Health Records for Disease Prediction." npj Digital Medicine 2021. arxiv.org/abs/2005.12833
- Steinberg, E., et al. "Language Models Are an Effective Representation Learning Technique for Electronic Health Record Data" (CLMBR). Journal of Biomedical Informatics 2021. arxiv.org/abs/2001.05295
- Pang, C., et al. "CEHR-BERT: Incorporating Temporal Information from Structured EHR Data to Improve Prediction Tasks." ML4H 2021. arxiv.org/pdf/2111.08585
- Pang, C., et al. "CEHR-GPT: Generating Electronic Health Records with Chronological Patient Timelines." arXiv 2024. arxiv.org/abs/2402.04400
- Kraljevic, Z., et al. "Foresight—a generative pretrained transformer for modelling of patient timelines using electronic health records: a retrospective modelling study." The Lancet Digital Health 2024. pmc.ncbi.nlm.nih.gov/articles/PMC11220626
- Steinberg, E., Fries, J. A., Xu, Y., & Shah, N. "MOTOR: A Time-to-Event Foundation Model for Structured Medical Records." ICLR 2024. arxiv.org/abs/2301.03150
- Renc, P., et al. "Zero Shot Health Trajectory Prediction Using Transformer" (ETHOS). npj Digital Medicine 2024. arxiv.org/abs/2407.21124
- Shmatko, A., et al. "Learning the Natural History of Human Disease with Generative Transformers" (Delphi-2M). Nature 2025. ukbiobank.ac.uk/publications/…
- Waxler, S., et al. "Generative Medical Event Models Improve with Scale" (CoMET). arXiv 2025. arxiv.org/abs/2508.12104
- Rajamohan, H. R., et al. "Foundation Models for Clinical Records at Health System Scale." arXiv 2025. arxiv.org/abs/2507.00574
- Wornow, M., et al. "The Shaky Foundations of Large Language Models and Foundation Models for Electronic Health Records." npj Digital Medicine 2023. arxiv.org/abs/2303.12961
- Wornow, M., et al. "EHRSHOT: An EHR Benchmark for Few-Shot Evaluation of Foundation Models." NeurIPS Datasets and Benchmarks 2023. arxiv.org/abs/2307.02028
- Wornow, M., et al. "Context Clues: Evaluating Long Context Models for Clinical Prediction Tasks on EHRs." ICLR 2025. arxiv.org/abs/2412.16178
- Medical Event Data Standard (MEDS). GitHub organization. github.com/Medical-Event-Data-Standard
- Johnson, A. E. W., et al. "MIMIC-IV, a Freely Accessible Electronic Health Record Dataset." Scientific Data 2023. pmc.ncbi.nlm.nih.gov/articles/PMC9810617
- Wang, W. K., et al. "Beyond the Clinic: A Large-Scale Evaluation of Augmenting EHR with Wearable Data for Diverse Health Prediction." arXiv 2025. arxiv.org/pdf/2509.22920
- Jiang, L. Y., et al. "Health System-Scale Language Models Are All-Purpose Prediction Engines" (NYUTron). Nature 2023. pmc.ncbi.nlm.nih.gov/articles/10338337
- Singhal, K., et al. "Large Language Models Encode Clinical Knowledge" (Med-PaLM). Nature 2023. arxiv.org/abs/2212.13138
- Liu, X., et al. "Large Language Models are Few-Shot Health Learners." arXiv 2023. arxiv.org/abs/2305.15525
- Cosentino, J., et al. "A Personal Health Large Language Model for Sleep and Fitness Coaching" (PH-LLM). Nature Medicine 2025. research.google/pubs/a-personal-health-…
- Kumar, A., et al. "Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution." ICLR 2022. arxiv.org/abs/2202.10054
- Hu, E. J., et al. "LoRA: Low-Rank Adaptation of Large Language Models." ICLR 2022. arxiv.org/abs/2106.09685
- Obermeyer, Z., et al. "Dissecting Racial Bias in an Algorithm Used to Manage the Health of Populations." Science 2019. chmi.berkeley.edu/news/…
- Kapoor, S., & Narayanan, A. "Leakage and the Reproducibility Crisis in Machine-Learning-Based Science." Patterns 2023. pmc.ncbi.nlm.nih.gov/articles/PMC10499856
- McMahan, H. B., et al. "Communication-Efficient Learning of Deep Networks from Decentralized Data." AISTATS 2017. arxiv.org/abs/1602.05629
- Ropes & Gray. "FDA Finalizes Guidance on Predetermined Change Control Plans for AI-Enabled Devices." Dec 2024. ropesgray.com/en/insights/alerts/2024/12/…
- U.S. FDA. "Artificial Intelligence-Enabled Device Software Functions: Lifecycle Management and Marketing Submission Recommendations." Draft guidance, Jan 2025. fda.gov/regulatory-information/…
- Mondaq. "EU Digital Omnibus on AI Enters Into Force" (Regulation (EU) 2026/1744). 2026. mondaq.com/eu-digital-omnibus-on-ai-enters-into-force