Electronic health record (EHR) foundation models promise scalable clinical prediction across health systems, but deployment is limited by a tokenization bottleneck. The same clinical concept may appear as different ontology codes, local identifiers, synonyms, or free‑text descriptions, which standard EHR tokenizers treat as unrelated symbols. A model trained on MIMIC‑III with a closed‑vocabulary tokenizer can use only about 13% of eICU events.
We introduce MEDIATOR, a discrete ontology‑agnostic tokenizer that maps any clinical concept expressed as text into a shared vector‑quantized codebook, turning EHR harmonization into open‑vocabulary tokenization without manual mappings or a fixed vocabulary. MEDIATOR is trained with synonym supervision and guided by enriched concept descriptions, code co‑occurrence, and relation graphs, collapsing equivalent expressions while organizing distinct concepts in a medically meaningful discrete space.
When used as the token interface of an EHR Transformer, MEDIATOR improves mean AUPRC by 4.0 points (8% relative) on 20 MIMIC‑III tasks and by 8.6 points (29% relative) in zero‑shot transfer to 14 eICU tasks, while utilizing all events. The transfer gain combines coverage and representation, and MEDIATOR remains the best tokenizer under identical inputs (+1.0 and +1.9 points on operational and sub‑cohort mortality tasks). Same‑encoder controls show that the text encoder drives in‑domain accuracy, whereas MEDIATOR’s learned objectives drive transfer robustness and entity‑linking quality. MEDIATOR also enables transferable attribution across hospitals.
Review: MEDIATOR’s discrete vector‑quantization approach provides ontology‑agnostic concept unification, offering broader coverage and more robust cross‑domain transfer for EHR models, highlighting the strong potential of open‑vocabulary tokenization in medical AI.