Discrete Neural Interlingua for Ontology-Agnostic EHR Modeling
Organizations: Mass General Brigham AI Institute · Harvard University · Massachusetts Institute of Technology
Abstract
EHR foundation models promise scalable clinical prediction across health systems, yet their deployment is constrained by a tokenization bottleneck. The same clinical concept can 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 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. Trained with synonym supervision and guided by enriched concept descriptions, code co-occurrence, and relation graphs, MEDIATOR collapses equivalent expressions while organizing distinct concepts in a medically meaningful discrete space. Used as the token interface of an EHR Transformer, MEDIATOR improves mean AUPRC over the strongest prior tokenizer 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, where it uses all events. The transfer gain combines coverage and representation, as MEDIATOR remains the best tokenizer under identical inputs (+1.0 and +1.9 points on operational and subcohort-mortality tasks). Same-encoder controls show that the text encoder drives in-domain accuracy, while the learned objectives of MEDIATOR drive transfer robustness and entity-linking quality. MEDIATOR also enables transferable attribution across hospitals.
Figures & tables
| Task | Code Emb | ClinVec | MedTok | -top5 | -top1 | Mediator |
| Operational tasks | ||||||
| LOS 7 | 0.819(0.012) | 0.807(0.004) | 0.827(0.007) | 0.830(0.005) | 0.762(0.011) | 0.829(0.007) |
| ICU Mortality | 0.571(0.015) | 0.484(0.006) | 0.556(0.008) | 0.563(0.007) | 0.418(0.014) | 0.573(0.010) |
| Readmission | 0.336(0.026) | 0.342(0.018) | 0.366(0.021) | 0.347(0.021) | 0.336(0.022) | 0.374(0.023) |
| Mean | 0.576 | 0.544 | 0.583 | 0.580 | 0.505 | 0.592 |
| Subcohort mortality tasks | ||||||
| Task | Code Emb | ClinVec | MedTok | -top5 | -top1 | Mediator |
| Operational tasks | ||||||
| LOS 7 | 0.933(0.003) | 0.939(0.002) | 0.934(0.001) | 0.941(0.026) | 0.939(0.001) | 0.942(0.004) |
| ICU Mortality | 0.259(0.018) | 0.211(0.010) | 0.282(0.009) | 0.162(0.066) | 0.145(0.048) | 0.349(0.005) |
| Mean | 0.596 | 0.575 | 0.608 | 0.552 | 0.542 | 0.645 |
| Subcohort mortality tasks | ||||||
| Acute Kidney Injury | 0.318(0.032) | 0.237(0.019) | 0.347(0.013) | 0.233(0.031) | 0.213(0.002) | 0.408(0.011) |
| NCBI | MedMentions | COMETA | |||||||
| Model | Acc. | Pur. | F1 | Acc. | Pur. | F1 | Acc. | Pur. | F1 |
| Qwen3-8B + -means | 0.487 | 0.928 | 0.639 | 0.450 | 0.543 | 0.492 | 0.648 | 0.807 | 0.718 |
| MedTok text -top5 | 0.195 | 0.986 | 0.326 | 0.045 | 0.885 | 0.085 | 0.231 | 0.913 | 0.368 |
| MedTok text -top1 | 0.269 | 0.360 | 0.308 | 0.131 | 0.082 | 0.101 | 0.384 | 0.101 | 0.160 |
| Mediator | 0.524 | 0.907 | 0.664 | 0.471 | 0.516 | 0.493 | 0.682 | 0.794 | 0.734 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| MIMIC-III | eICU | ||||
| Group | Task | Total Stays | Events | Total Stays | Events |
| Hospital Operation | LOS 7 days | 40757 | 18931 | 83166 | 21818 |
| ICU Mortality | 31650 | 2954 | 83166 | 7003 | |
| Readmission | 9515 | 2613 | – | – | |
| Subcohort ICU Mortality | Acute Kidney Injury | 6757 | 1370 | 8309 | 1367 |
| Acute MI | 3681 | 439 | 5671 | 414 | |
| Codebook size | NCBI | MedMentions | COMETA | Mean |
| 10k | 0.663 | 0.343 | 0.669 | 0.558 |
| 20k | 0.670 | 0.409 | 0.707 | 0.595 |
| 40k | 0.681 | 0.451 | 0.723 | 0.619 |
| 60k | 0.637 | 0.469 | 0.732 | 0.613 |
| 80k | 0.673 | 0.484 | 0.738 | 0.632 |
| 100k | 0.664 | 0.493 | 0.734 | 0.630 |
| MIMIC-III | eICU | ||||||
| Method | Oper. | Mort. | Surv. | All | Oper. | Mort. | All |
| 0.582 0.010 | 0.524 0.010 | 0.610 0.023 | 0.554 0.003 | 0.642 0.006 | 0.334 0.010 | 0.378 0.008 | |
| (PPMI) | 0.585 0.011 | 0.530 0.013 | 0.628 0.054 | 0.562 0.008 | 0.644 0.005 | 0.324 0.013 | 0.370 0.011 |
| 0.590 0.007 | 0.549 0.006 | 0.585 0.045 | 0.564 0.010 | 0.644 0.005 | 0.330 0.010 | 0.375 0.009 | |
| 0.588 0.009 | 0.537 0.022 | 0.601 0.051 | 0.561 0.018 | 0.640 0.008 | 0.337 0.007 | 0.380 0.006 | |
| Mediator full | 0.592 0.007 | 0.533 0.012 | 0.639 0.037 | 0.568 0.011 | 0.645 0.003 | 0.340 0.009 | 0.384 0.007 |
| Objective | MIMIC-III Oper. | eICU Oper. |
| Baseline | 0.585 | 0.641 |
| Baseline | 0.586 | 0.642 |
| Baseline (PPMI) | 0.580 | 0.645 |
| Baseline | 0.584 | 0.635 |
| Baseline | 0.583 | 0.644 |
| Baseline | 0.584 | 0.637 |
| Analysis | Variant | Dim. | MIMIC-III | eICU |
| A. Alternative frozen encoders for Mediator | ||||
| Encoder | BioLORD-2023 | 768 | 0.551 | 0.312 |
| Encoder | Qwen3-Embedding-0.6B | 1024 | 0.550 | 0.372 |
| Encoder | Qwen3-Embedding-8B | 4096 | 0.568 | 0.384 |
| B. Same-encoder clustering controls | ||||
| Tokenizer | Qwen embeddings + -means | 4096 | 0.568 | 0.378 |
| Tokenizer | MIMIC-III | eICU |
| GT-BEHRT | ||
| Code Emb | 0.572 | 0.313 |
| ClinVec | 0.535 | 0.280 |
| MedTok | 0.573 | 0.313 |
| MedTok text -top1 | 0.511 | 0.219 |
| MedTok text -top5 | 0.534 | 0.224 |
| Task | Code Emb | ClinVec | MedTok | -top5 | -top1 | Mediator |
| Operational tasks | ||||||
| LOS 7 | 0.933(0.003) | 0.939(0.002) | 0.934(0.001) | 0.937(0.004) | 0.926(0.003) | 0.938(0.002) |
| ICU Mortality | 0.259(0.018) | 0.211(0.010) | 0.282(0.009) | 0.138(0.022) | 0.130(0.010) | 0.298(0.021) |
| Mean | 0.596 | 0.575 | 0.608 | 0.537 | 0.528 | 0.618 |
| Subcohort mortality tasks | ||||||
| Acute Kidney Injury | 0.318(0.032) | 0.237(0.019) | 0.347(0.013) | 0.184(0.023) | 0.185(0.011) | 0.345(0.010) |
| Input string | |||
| “shortness of breath” (clinical phrase) | |||
| “can’t breathe” (colloquial) | |||
| “dyspnea” (SNOMED CT term) | |||
| “diabetes mellitus” (distinct concept) |