EHRMENEIA
EHRMENEIA, foundation models, electronic health records, EHR, benchmark, longitudinal trajectories, few-shot learning, clinical AI, open science, UPC, B2SLab
| Full title | EHRMENEIA: A Benchmark for Foundation Models on Longitudinal Electronic Health Records |
| Type | Evaluation methodology · open software · versioned clinical concept space · public results platform |
| Status | Active · benchmark v1.0.0 · concept space v1.0.0 |
| First author / contact | Joana Gelabert-Xirinachs |
| B2SLab PI | Alexandre Perera-Lluna |
| Publication | bioRxiv preprint · posted 27 November 2026 |
| Funding | MCIN/AEI/10.13039/501100011033 and European Union · PID2025-173811OB-I00 |
| Benchmark | ehrmeneia.upc.edu |
| Code | dev.b2s.club/joana/ehrmeneia-benchmark |
The scientific challenge
Longitudinal electronic health record (EHR) foundation models learn from diagnoses, medications, laboratory measurements, procedures and other events recorded during clinical care. They can represent patient histories, forecast subsequent events and, for autoregressive implementations, generate future trajectories.
Their evaluation is difficult because models differ in clinical vocabulary, event granularity, tokenization, temporal representation and adaptation procedure. Even when two evaluations report the same metric, their outcome panels, follow-up definitions or statistical support may differ. Conversely, a model that lacks death observations or a validated timed-generation interface cannot support every clinical evaluation question.
EHRMENEIA addresses this problem by defining a shared clinical evaluation locus while preserving each model’s native architecture and representation. The framework evaluates both observed performance and the conditions under which a performance estimate is clinically interpretable.
The name derives from the Greek hermēneia—interpretation or explanation—and refers to the relation between clinical phenomena and the successive signs, codes and computational representations through which they become observable.
Three dimensions and four evaluation levels
| Dimension | Level | Evaluation target | Main metrics |
|---|---|---|---|
| Predictive competence | 1 · Native next-event prediction | Immediate next-concept forecasting from at most 20 distinct targets per patient, stratified over time | Top-5 / Top-10 accuracy, macro-AUROC, macro-averaged average precision (AP); patient-history frequency reference |
| Clinical and population fidelity | 2 · Temporal clinical fidelity | Event occurrence within 30, 90, 180 and 365 days, estimated from Monte Carlo-generated futures at index ages 30, 50 and 80 | Macro-AUROC, macro-AP, macro-Brier score; marginal-prevalence reference |
| Clinical and population fidelity | 3 · Population-scale fidelity | Five-year generated trajectories compared with observed cohorts, including marginal outcomes and local event transitions | Integrated survival error, integrated cumulative-incidence error, transition Jensen–Shannon divergence (JSD); observed–observed split-half references |
| Representation transferability | 4 · Few-shot adaptation | Information accessible in frozen pretrained representations for new anchor–target–horizon tasks | AUROC and AP for \(K=8,16,32,64,128\) labelled examples per class, with 20 support draws |
The levels form a prespecified space of complementary questions, not a hierarchy culminating in a composite score. Level 4 is extensible through additional clinically defined task catalogues without changing the underlying frozen-backbone protocol.
Evaluation safeguards
- Follow-up-aware outcomes: a future-window negative requires observation through the full window; indeterminate outcomes are excluded from the relevant estimate.
- Competing risks: Level 3 uses Aalen–Johansen cumulative-incidence estimates and treats death before disease onset as a competing event.
- Uncertainty: Levels 1–3 use 1,000 patient-level Bayesian-bootstrap replicates when explicit patient IDs are supplied; Level 4 uses 2,000 bootstrap resamples of support-draw scores with the test cohort fixed.
- Explicit empirical support: counts of eligible patients, outcomes, concepts and transitions accompany the metrics.
- Non-estimability: insufficient class support or missing clinically necessary observations is retained and explained rather than converted into a numerical score.
First applications
The preprint demonstrates the framework across four model–dataset implementations selected for their released interfaces, executable code and accessible evaluation data:
| Implementation | Evaluation setting | Role in the study |
|---|---|---|
| CLMBR-T | EHRSHOT | Released clinical checkpoint |
| ETHOS | MIMIC-IV 2.2 | Released clinical checkpoint |
| Delphi | Author-provided synthetic data | Locally trained synthetic implementation demonstration |
| CEHR-GPT | Synthea OMOP example | Locally trained synthetic implementation demonstration |
Across the implementation-specific evaluation cohorts, EHRMENEIA processed 359,037 next-event prediction points from 33,098 patients, 2,151,600 generated futures and 2,320 frozen-backbone adaptation heads.
The applications showed that:
- Evaluation domains differ. Level 1 macro-metrics covered 1,400 computable concepts for CLMBR-T, 1,697 for ETHOS, 829 for Delphi and 89 for CEHR-GPT—a nearly twentyfold difference in evaluation scope between the smallest and largest panels. CLMBR-T lacked a validated timed-trajectory generation interface; Delphi supported diagnosis-only outputs; CEHR-GPT lacked laboratory and mortality observations.
- Metric choice changes interpretation. Model ordering differed between macro-AUROC and Top-k accuracy. For ETHOS, discrimination above the Level 2 marginal-prevalence reference coexisted with higher Brier scores, showing that ranking quality and probability prediction error are not interchangeable.
- Trajectory fidelity is multidimensional. For ETHOS, an integrated survival error of 0.0015 at index age 30 coexisted with transition JSD values of 0.38–0.49 across index ages 30, 50 and 80. Close marginal survival agreement therefore did not imply equally accurate local sequential structure. Observed–observed split-half comparisons help characterize cohort variability, but do not define universal thresholds.
- Transfer is task- and support-dependent. Few-shot performance did not improve uniformly across tasks and implementations, and some task–\(K\) settings remained non-estimable.
Detailed numerical results, evaluation metadata, concept-level information and population curves are available on the public evaluation platform.
Open, decentralized evaluation
EHRMENEIA runs where the model and evaluation data already reside. Developers use their native model implementation, export the documented evaluation tables and metadata, validate the submission and compute the levels their interface supports. The evaluator then creates a portable ZIP containing aggregate results for review and publication.
Patient-level records, individual predictions, representations, generated trajectories and checkpoints are not included in the submission package. Source datasets and checkpoints are not redistributed by the repository; access remains subject to each original provider’s terms. Published submissions are reviewed by an administrator before becoming public.
The repository includes the model-independent evaluators, a versioned clinical concept space, validation utilities, synthetic workflow examples and source-only adapters for the four article implementations. The synthetic examples enable independent exploration and methodological scrutiny of the workflow without access to restricted clinical data. EHRMENEIA software is licensed under Apache-2.0. Original benchmark resources are licensed under CC BY 4.0, subject to third-party terminology rights and restrictions.
Explore evaluation results Submission workflow Open repository Read the research story
Scope and limitations
The initial validation is not a universal ranking of EHR foundation models. Two applications use released clinical checkpoints and two are synthetic demonstrations. Broader evaluation across additional checkpoints, institutions and datasets is required to understand how evaluation domains generalize. The released four levels and task catalogue are an initial operationalization, not an exhaustive ontology of model capabilities.
EHRMENEIA evaluates fidelity to documented healthcare trajectories. Those records reflect coding, measurement frequency, access to care, clinical practice and institutional workflows as well as underlying patient health. Results must therefore be interpreted in relation to the observational process that generated them.
Team
The project is developed at B2SLab, Institute for Research and Innovation in Health (IRIS), Universitat Politècnica de Catalunya, with affiliations to CIBER-BBN and Institut de Recerca Sant Joan de Déu:
Funding and acknowledgements
This work was supported by the Spanish Ministry of Economy and Competitiveness (MCIN/AEI/10.13039/501100011033) and the European Union, project PID2025-173811OB-I00. The authors acknowledge the Networking Biomedical Research Centre in Bioengineering, Biomaterials and Nanomedicine (CIBER-BBN), initiatives of Instituto de Investigación Carlos III (ISCIII), and the CERCA Programme / Generalitat de Catalunya. B2SLab is certified as 2025 SGR 00245. Jordi Fonollosa acknowledges support from the Serra Húnter programme, and Joana Gelabert-Xirinachs from the FPU Santander 2024 grant.