Models that flag rare events in hospital records, such as sepsis after major trauma, are usually trained on data where fewer than one patient-day in twenty is positive. A common fix is to train in two steps: first on a class-balanced version of the data, so the network learns what positives look like, then on the real, skewed data, so it learns how rare they are. This note argues that in retrospective health records, how the balanced set is built decides what the network learns. If negatives are drawn at random, the easiest cue separating a septic patient-day from a typical one is how sick the patient already is and how hard clinicians are already looking: more labs, more cultures, more drugs. A network pretrained on that contrast learns "clinicians are worried" rather than "infection is developing." It then raises alarms on every critically ill trauma patient, which matches the specificity collapse reported for the best existing trauma sepsis model.
We propose to build the balanced phase the way epidemiologists build a nested case-control study. Each positive patient-day is paired with a negative patient-day drawn from patients still at risk at the same point in their stay, matched on baseline severity and on how intensely they were being measured. In this balanced set, severity and clinician attention carry no information about the label. The network has to learn the physiology that separates sepsis from the inflammation of injury itself. The second phase then fine-tunes on the natural distribution, so any real predictive value in severity is recovered there, on top of a representation that no longer depends on it.
Core Claim
Balanced-then-imbalanced training on health records works better when the balanced phase uses risk-set matched controls instead of random controls. The gain should show up mainly as recovered specificity at clinically useful sensitivity and as higher precision-recall area, not as higher AUROC. It should be largest among the patients clinicians find hardest to tell apart: sick, heavily monitored, non-septic trauma patients.
This differs from every precedent in the file. Rare Event Early Detection builds a MIMIC-III trauma sepsis cohort with trauma-specific onset criteria and pretrains a masked autoencoder on an unselected, imbalanced general ICU cohort. It never balances the source and never controls for confounders. NPRL pretrains with a label-free task, telling individual patient-nights apart, and reaches higher sensitivity (0.8280) but specificity of only 0.6120. That pattern is exactly what we expect when the representation cannot separate septic patients from patients who are merely very ill. DiffuPT and USFP do build explicit 50/50 pretraining sets, by diffusion synthesis or resampling, but in imaging and weather, where label assignment does not depend on clinician behavior. ECRT recombines disentangled factors to create minority samples. It assumes the feature-generating mechanism is the same across classes, which the indication-driven measurement in health records breaks. Our design borrows its matching logic from propensity-adjusted retrospective studies such as Tewari et al., which compare patients matched on how likely they were to receive treatment. We repurpose that idea from estimating effects to choosing training examples.
Research Program
Index events. The primary testbed is the Jin et al. MIMIC-III trauma cohort (1,570 admissions, 440 positive sepsis instances, imbalance ratio 0.050), using their daily, morning-aligned task and trauma-specific onset definition. Each positive patient-day is an index event.
Matched controls. For each index event we sample controls from the risk set: patient-days from trauma patients not yet septic at the same day since admission. Controls are matched on three things:
- injury severity and the trauma-adjusted organ-dysfunction components Jin et al. retain;
- measurement intensity in the preceding 24 hours (number of laboratory draws and vital-sign recordings), which captures the missing-not-at-random signal;
- recent intervention exposure (vasopressors, ventilation).
Exact matching is infeasible with 440 cases. We therefore match on a "pseudo-propensity" score: a logistic model predicting the label from these confounder variables alone. Controls are drawn by nearest neighbor within a caliper.
Using all the controls. A single fixed matched set would throw away most negatives, the standard objection to undersampling. Instead we redraw matched controls every epoch. Over training, most non-septic patient-days appear while every individual batch stays balanced and confounder-neutral.
Two training phases. The backbone matches the strongest available architecture: the Jin et al. masked-autoencoder sequence encoder, optionally initialized from their general ICU pretraining. Phase one trains encoder and head on the matched balanced stream. Phase two fine-tunes on the natural distribution with all inputs, including the confounders, and with a short learning-rate schedule.
Second testbed. We replicate on intervention-onset prediction from MIMIC-Extract, predicting the start of mechanical ventilation and of vasopressors. Here the label is itself a clinician decision, so confounding by indication is built into the target. That pipeline reports AUPRC often below 0.50 despite macro AUROC of 0.90–0.94 for random forests.
Portability. We rebuild the trauma cohort in MIMIC-IV using the MIMIC-IV processing pipeline and Jin et al.'s criteria. To avoid patient overlap, we restrict to admissions after the MIMIC-III collection period. Models trained on MIMIC-III are then tested there without retraining. This tests the claim that confounder-neutral representations should transfer better when local severity mix and monitoring habits change.
Baselines
Training from scratch. The naive reference is a single-phase recurrent or transformer model trained from scratch on the natural trauma distribution with standard cross-entropy. Jin et al. report this is "highly biased" toward the negative class but give no numbers. We will run it ourselves.
Strongest existing method. This is the Jin et al. pipeline: masked-autoencoder pretraining on general ICU data, then fine-tuning on trauma labels. It is the strongest published competitor because it uses the same public cohort, the same task and the same encoder. We use their released cohort and splits and give it the same hyperparameter search budget as our method. No reported result found on Lacuna for numeric AUROC or AUPRC of this pipeline, so we reproduce it and report its numbers as the bar. Beating it means higher AUPRC and higher specificity at 80% sensitivity, with non-overlapping bootstrap intervals over patients.
NPRL. NPRL's published numbers (AUROC 0.7870, sensitivity 0.8280, specificity 0.6120) come from the proprietary Harborview cohort and cannot be compared directly. We reimplement its patient-night discrimination pretraining on the MIMIC-III cohort as a second strong baseline.
Key ablation: random-control balancing. This is identical to our method except that phase-one controls are drawn uniformly at random. It keeps the 50/50 balance, the per-epoch redrawing, the encoder and the fine-tuning, and changes only whether controls are matched. If matching is the active ingredient, this ablation should match our AUROC but lose on specificity among high-severity patients.
Balanced training plus analytic prior correction. A second ablation removes phase two. We train on the matched balanced stream and shift the output logit by $\log\frac{\pi}{1-\pi} - \log\frac{\rho}{1-\rho}$, where $\pi$ is the natural positive rate and $\rho$ is the training positive rate. This tests whether fine-tuning does more than correct the prior.
All methods share data splits, input features, encoder size and a fixed number of tuning trials.
Why not just…?
Why not just reweight the loss or use focal or margin losses in one phase? Reweighting changes how much positives count. It does not change which negatives the model contrasts them with, so it inherits the same severity shortcut. On CIFAR-100, ECRT reports the margin loss LDAM at 50.46% against 53.00% for representation transfer, but that is images, not records. We will run class-weighted and focal-loss single-phase models. If either matches the matched-control model on specificity among high-severity patients, our claim fails.
Why not just balance randomly and fix calibration afterwards? This is the most direct threat, and it is exactly the random-control and prior-correction ablations. Prior correction can repair calibration. It cannot repair a representation that ranks sick non-septic patients above early septic ones. The within-stratum metrics below will show which failure dominates.
Why not just mine hard negatives with the model itself? Online hard-negative mining also feeds the model sick-looking negatives, and it may do as well as covariate matching. That is a real possibility. We include a variant that picks the highest-scoring negatives from the current model each epoch. The difference we predict is that model-mined negatives are hard for whatever reason the model currently errs, including the shortcuts it has learned. Matched negatives are hard specifically on the known confounders. If model mining ties us in-distribution, we expect matching to win on the MIMIC-IV transfer, because severity mix shifts there. If it ties there too, the honest conclusion is that the epidemiological framing adds interpretability but not accuracy.
Why not just add severity scores as inputs? Giving the model severity as an input makes the shortcut easier to learn, not harder. Our phase two already supplies these variables. The question is only whether they should drive the representation during phase one.
Proposed Experiments
Primary metrics. On the held-out MIMIC-III trauma split we report AUPRC, AUROC, specificity at 80% sensitivity, and Brier score.
First decisive check: within-stratum discrimination. We split test patient-days into quintiles of the pseudo-propensity score and compute AUROC within each quintile. The prediction is that our method beats random-control balancing most in the top quintiles, where NPRL-style false alarms concentrate. Uniform gains, or no gains, would refute the mechanism even if overall AUPRC improves.
Second check: shortcut probing. We train a linear probe on frozen phase-one representations to predict measurement intensity. Matched pretraining should encode it markedly less than random-balanced pretraining.
Third check: earliness. We evaluate on positive days that precede the first blood-culture order. Here the clinician-suspicion signal is not yet present, so a physiology-based representation should keep its advantage.
Fourth check: portability. We repeat all comparisons on the MIMIC-IV trauma cohort and on MIMIC-Extract ventilation and vasopressor onset, the second testbed where the label is itself a clinician decision. Each method's drop in AUPRC from source to target is reported alongside its absolute scores.
The proposal succeeds if matched controls beat random controls on high-quintile specificity and earliness in both testbeds, and if the advantage holds or grows under the MIMIC-IV shift.
References
- Rare Event Early Detection: A Dataset of Sepsis Onset for Critically Ill Trauma Patients
- NPRL: Nightly Profile Representation Learning for Early Sepsis Onset Prediction in ICU Trauma Patients
- DiffuPT: Class Imbalance Mitigation for Glaucoma Detection via Diffusion Based Generation and Model Pretraining
- USFP: An unbalanced severe typhoon formation prediction framework based on transfer learning
- Supercharging Imbalanced Data Learning With Causal Representation Transfer
- Long-Term Survival in Men With High Grade Prostate Cancer: A Comparison Between Conservative Treatment, Radiation Therapy and Radical Prostatectomy—A Propensity Scoring Approach
- MIMIC-Extract: a data extraction, preprocessing, and representation pipeline for MIMIC-III
- An Extensive Data Processing Pipeline for MIMIC-IV