TL;DR
Before you even train a medical AI model, how you chop up a patient's electronic health record (EHR) into tokens—the "words" the model reads—can make or break its performance. By benchmarking 156 models across different tokenization strategies, this paper shows that simpler, compact representations (like fusing medical codes with 10-bin value deciles, or using an expert-curated clinical schema) consistently outperform more granular and continuous alternatives.
What Problem Does This Paper Address?
Generative medical event models treat a patient's hospital stay like a sentence, learning to predict the next clinical event (a lab test, a vital sign, or a medication) in a sequence. While researchers spend a lot of effort scaling up model architectures and datasets, they almost always leave the tokenizer fixed.
Yet tokenization is a lossy bottleneck: any nuance lost when converting raw numbers and timestamps into tokens cannot be recovered downstream. For example, potassium levels of 5.5 and 7.0 mEq/L carry very different cardiac risks, but standard 10-bin (decile) quantization might lump them into the same bucket. The authors tackle this gap by systematically benchmarking how tokenization choices—binning granularity, code–value fusion, continuous numeric encodings, time representations, and clinical data schemas—affect downstream predictions.
Methods
The authors trained 156 causal decoder models from scratch (using both Llama-3.2-style and Qwen3-style architectures, ~104M–124M parameters, across three random seeds) on full hospitalizations. They then froze the models and used linear probes on the first 24 hours of a patient's stay to predict outcomes in hours 24–48 across eight clinician-defined families (four binary classification, four min/max regression).
They ran three main experiments:
- Experiment 1 (Quantization & Fusion): Testing 10, 20, 30, and 100 equal-frequency bins, plus reference-range anchored bins for lab values. Each was tested in an unfused layout (separate code and value tokens) and a fused layout (one combined token per code–value pair).
- Experiment 2 (Numeric & Temporal Encoding): Comparing discrete deciles against soft discretization (linearly interpolating between adjacent bin embeddings) and two xVal variants (scaling a shared
[NUM]embedding by the normalized value). They also compared three ways to represent time: explicit time tokens, event order only, and admission-relative Rotary Position Embeddings (RoPE). - Experiment 3 (Schema Remapping): Comparing raw native MIMIC event streams against streams mapped to the Common Longitudinal Intensive Care Unit Data Format (CLIF 2.1.0), an expert-curated schema that consolidates codes and standardizes units.
Datasets
All models were trained and evaluated on MIMIC-IV (version 3.1), a large, publicly available dataset of real-world hospitalizations. For Experiment 3, the authors used the CLIF 2.1.0 conversion of MIMIC-IV on a cohort of hospitalizations involving ICU care, using identical hospitalization IDs and outcome labels across both pipelines.
Key Insights and Ideas
- Fusing codes and values is a big win: Pairing a medical code with its value decile into a single token boosted performance across the board, especially for regression tasks like predicting future heart rate or hemoglobin.
- Finer isn't always better: Moving from 10 bins (deciles) to 100 bins (centiles) or anchoring bins to clinical reference ranges didn't consistently improve 24-hour predictions. Interestingly, next-token training did naturally organize centile embeddings into smooth, ordered trajectories and made reference ranges linearly decodable (93–97% accuracy)—it just didn't translate to better downstream probes.
- Continuous encodings struggled: Both xVal variants underperformed discrete deciles across every single outcome family, while soft discretization performed about the same as discrete deciles.
- You can drop explicit time tokens: Simply using event order or admission-relative RoPE shortened first-24h sequences by ~11% (from 93 to 83 tokens) while slightly improving performance.
- Expert-curated schemas compress and conquer: Mapping raw data to CLIF cut training tokens by 71.4% and shrunk the vocabulary by 97.8% (from 17,752 to 397 tokens), yet still improved half of the outcome families.
Key Results
- Code–Value Fusion: Fused deciles significantly outperformed unfused deciles in 6 of 8 outcome families, including all four regression families (+0.032 to +0.114 Spearman correlation) and vital-signs classification (+0.033 AUROC). Across all six granularities, 38 of 48 fusion comparisons were statistically significant.
- Numeric Encodings: Code-normalized and affine xVal dropped performance across all 8 families (by 0.050–0.057 AUROC and 0.065–0.162 Spearman correlation).
- Temporal Encodings: Event order and admission-relative RoPE yielded small but statistically significant gains over explicit time tokens in 5 and 4 of 8 families, respectively.
- CLIF Schema: Remapping to CLIF produced statistically significant gains in 4 of 8 families (e.g., +0.099 Spearman correlation on vital signs, +0.032 AUROC on vital signs), no significant change in 2, and decreases in 2 (organ support AUROC −0.009, electrolytes −0.035).
Limitations and Future Work
- Shared training recipe: Training 156 transformers is expensive, so all configurations shared one optimization schedule and model size rather than receiving individual hyperparameter tuning.
- Single-site data: Results come from MIMIC-IV alone; multi-site testing with shared schemas like CLIF is still needed.
- Confounded variables: Choices like fusion and schema remapping alter vocabulary size, sequence length, and parameter counts simultaneously, meaning the experiments estimate their combined effects.
- Probe-based evaluation: Performance was measured using linear probes on frozen 24-hour representations rather than full generative rollouts.
Summary updated