Honest Error Bars for Prognostic Models Built from LLM-Extracted Clinical Notes

Hospitals increasingly build risk scores from features that a large language model (LLM) pulls out of free-text notes: "patient short of breath on exertion," "ejection fraction 45%," "lives alone." The headline numbers are good. A multi-agent extraction system matched clinician abstraction for prostate cancer recurrence and reached an area under the ROC curve (AUC) of 0.851 for 30-day heart-failure mortality in MIMIC-IV. These numbers share a hidden problem. The extraction prompts, the choice of which extracted features to keep, and the choice of which pipeline to deploy were all tuned on the same patients the model is scored on. The usual statistical safeguard in clinical modelling, the bootstrap (refitting a model on many resampled copies of the data to measure how much its apparent accuracy is inflated), is applied only to the final regression. Everything upstream is treated as fixed ground truth. So the reported accuracy is optimistic by an unknown amount, and the optimism is largest exactly in the small single-center cohorts where text extraction is most attractive.

We propose a whole-pipeline bootstrap for text-derived prognostic models. Inside every resample it repeats the label-dependent decisions: screening out redundant extracted features with the variance inflation factor (VIF, a per-feature score of how well the other features linearly predict it), choosing among candidate extraction pipelines with a multi-criteria rule, and fitting the final model. The selection rule is TOPSIS, which ranks options by closeness to an ideal "best on every criterion" point and distance from a "worst on every criterion" point. The claim is simple and testable. Fixed-table bootstrapping understates optimism for LLM-derived clinical models. Our procedure recovers the true out-of-sample performance, which we check against a large held-out MIMIC-IV reference, and it yields a statistically valid set of pipelines that could plausibly be best, rather than a single winner that may owe its rank to noise.

Core Claim

Three kinds of upstream choice inflate reported performance. The first is the pipeline-selection step, a "winner's curse" over configurations. The second is the feature-pruning step: text produces many near-duplicate variables, and which duplicate survives VIF screening changes from sample to sample. The third is corpus-adaptive extraction, as in agents that propose features after reading the notes. Each can be put inside a resampling loop at manageable cost for one reason. Label-free extraction runs per note and can be cached once per configuration, and only the corpus-adaptive and label-dependent steps need rerunning. We predict a specific ordering of optimism estimates. Fixed-table bootstrapping will sit closest to apparent performance. Our procedure will sit closest to the held-out truth. The gap will shrink as cohort size grows, the way selection-induced bias does as noise per decision falls.

Relation to Prior Work

The motivating evidence comes from the extraction literature. Scaling Clinician-Grade Feature Generation from Clinical Notes with Multi-Agent Language Models (SNOW) uses proposal, alignment, extraction, validation and aggregation agents to build patient-level feature tables. It filters those tables by missingness and clinician review. It reports neither collinearity diagnostics nor resampling stability of the features. Self-Verification Improves Few-Shot Clinical Information Extraction adds omission, evidence-grounding and pruning passes that trade recall, precision and token cost, raising MIMIC-IV ICD-10 F1 from 0.487 to 0.533 on static splits without uncertainty estimates. Both supply pipeline configurations we evaluate. Neither asks how much of its downstream performance survives honest validation.

The method comes from two places. Clinical nomogram work such as the lip carcinoma model of Development of a predictive nomogram based on preoperative inflammation-nutrition-related markers for prognosis in locally advanced lip squamous cell carcinoma after surgical treatment combines VIF screening with 1,000-resample optimism correction. There, the predictors are hand-collected lab values, so the bootstrap only has to cover the regression. We extend the loop upstream. The Leaderboard Lottery supplies the inferential tool: a paired bootstrap with Holm correction, called multiple comparisons with the best (MCB), which returns a confidence set containing the true best model with at least 95% probability. That paper ranks LLMs on scalar benchmark accuracy. We apply MCB to TOPSIS closeness scores over clinical pipelines and resample patients rather than prompts.

Two results constrain the design. The Leaderboard Lottery reports that MCB sets become too wide on low-signal pairwise data, often including all models. A small clinical cohort may therefore yield an uninformative set, and we treat that as a reportable outcome rather than a failure. On the TOPSIS side, the orthogonality assumption of Euclidean distance and the rank reversals caused by moving ideal anchors are known weaknesses. CRITIC-TOPSIS handles correlated criteria only through reweighting. The MIMIC studies of Ye et al. and Fang et al. show VIF screening on structured variables. Neither touched note-derived features.

Research Program

The build has three layers. The first is an extraction cache. For each candidate configuration, we run extraction once per patient and store the outputs. The configurations are single-pass few-shot extraction, extraction plus the four self-verification steps, and a SNOW-style agent pipeline, each at two model sizes. Label-free per-note extraction does not depend on which patients are resampled, so caching is exact for these steps. SNOW's proposal and alignment agents read the corpus, so they are rerun inside a smaller number of resamples (B around 50). We quantify how much this coarser loop costs in precision of the optimism estimate.

The second layer is the in-loop decision procedure. Each bootstrap draw resamples patients, never notes, to respect clustering of notes within a patient. On that draw it recomputes VIF on the extracted feature matrix and prunes iteratively above a threshold. It fits a penalized logistic model for each configuration and scores every configuration on four criteria: optimism-corrected AUC, calibration slope, token cost per patient, and feature-set stability (overlap of retained features across resamples). It then picks a winner by TOPSIS. The same recorded decisions, applied to the original data, give the optimism for that draw.

The third layer is inference. We obtain the paired bootstrap distribution of TOPSIS closeness differences between configurations and run MCB with Holm correction to report the set of configurations not distinguishable from the best. We also report how often each extracted feature survives VIF pruning. This turns the "which of two collinear text features is kept" ambiguity into an explicit frequency rather than a silent choice.

The criteria themselves are correlated: AUC and calibration slope move together. We therefore run TOPSIS both with Euclidean distance and with criteria first decorrelated by whitening the criteria matrix. The VIF of each criterion is reported alongside, so we can see whether double counting changes the selected pipeline.

Baselines

The naive reference point is apparent performance: fit everything on the full development cohort and report its AUC, which is what most extraction papers effectively publish. The second baseline is current best clinical practice, the fixed-table bootstrap of the nomogram literature exemplified by Cheng et al.. Extraction and pipeline choice are frozen, and only VIF screening plus model fitting are resampled with B=1,000. This is the strongest existing competitor, because it is what a careful clinical statistician would do today. The third baseline is nested cross-validation with the full pipeline inside the inner loop, which is the main methodological rival. It gets the same cached extractions, the same configuration grid and the same compute budget measured in model refits.

For downstream strength, the reference is SNOW's reported 30-day mortality AUC of 0.851 on its 2,084-patient MIMIC-IV HFpEF cohort (SNOW). For extraction quality, it is self-verification's MIMIC-IV ICD-10 F1 of 0.533 (Gero et al.). For a structured-only comparator on sepsis-AKI mortality, it is the 0.796 AUC of Ye et al.. No reported result found on Lacuna for optimism or confidence intervals of any LLM-derived clinical model, which is the gap itself.

"Beating" a baseline here does not mean higher AUC. It means a smaller absolute error between the estimated and the true held-out AUC, with confidence intervals whose coverage of the held-out value is at least nominal. Two ablations isolate the key ingredient. One moves VIF screening out of the loop while keeping selection inside. The other does the reverse. Together they attribute the optimism to pruning versus selection.

Why not just…?

Why not just hold out a test split? For cohorts the size of MIMIC-IV HFpEF this is a serious alternative, and we use it as ground truth. The proposal targets the regime where splitting is wasteful, such as the 147-patient prostate cohort in SNOW. The decisive experiment subsamples the large cohort down to sizes of 150 and 500 patients and asks which internal estimate tracks the held-out remainder. If a single 70/30 split is as accurate as our bootstrap at n=150, the proposal loses its main justification, and we will say so.

Why not just use ridge or LASSO on all extracted features and skip VIF? Penalization may well predict as well, and we expect VIF screening to add little or nothing to AUC. We keep it for a different reason. Clinical nomograms are read coefficient by coefficient, and collinear text features cause sign flips. The in-loop ablation reports coefficient sign stability and feature-survival frequency with and without VIF, under matched penalization. If penalization alone gives equally stable coefficients, VIF is dropped from the recommended pipeline.

Why not just pick the pipeline by best AUC, or show a Pareto front? If cost and stability do not change the choice, TOPSIS adds nothing, and the experiments can show this directly. We compare selection by scalar AUC, by Euclidean TOPSIS and by whitened TOPSIS on three outcomes: the held-out utility of the chosen pipeline, its token cost, and selection stability across resamples. A Pareto front avoids weighting but does not produce a single deployable choice whose selection optimism can be measured. It is retained as a descriptive output. If scalar-AUC selection matches TOPSIS on held-out AUC at similar cost, we report TOPSIS as unnecessary for this use.

Why not just use nested cross-validation? It is the most legitimate rival and may be equally accurate. The comparison is run at equal compute. The bootstrap's advantages, if any, are the MCB confidence set over configurations and feature-survival frequencies, which nested CV does not provide without extra machinery.

Proposed Experiments

The primary experiment uses MIMIC-IV notes for the HFpEF 30-day and 1-year mortality tasks, reconstructed following SNOW's cohort definition. It also uses MIMIC-III sepsis-AKI late mortality, defined following Ye et al., with note-derived features added to the structured ones. From each cohort we draw 200 development subsamples at n=150, 300 and 500. On each subsample we compute apparent AUC, fixed-table bootstrap AUC, nested-CV AUC and whole-pipeline bootstrap AUC. Each is compared with the selected pipeline's AUC on the untouched remainder.

The decisive checks are four. First, the mean absolute estimation error and the 95% interval coverage for each method. Second, whether the excess optimism of fixed-table over whole-pipeline estimates shrinks with n. Third, the empirical coverage of the MCB set, meaning how often it contains the configuration that is truly best on the held-out remainder. Fourth, the median MCB set size, to see whether small cohorts make it uninformative, as the Leaderboard Lottery found for pairwise data.

A secondary check uses CASI and the MIMIC-IV ICD-10 extraction setting from Gero et al. It verifies that cached extraction outputs reproduce the published extraction F1 before they are used downstream. We will call the proposal successful if three things hold at n≤300. The whole-pipeline bootstrap must cut absolute AUC estimation error relative to fixed-table bootstrapping by a clinically meaningful margin, with coverage near nominal. It must match nested CV at equal compute. The MCB set must exclude a nontrivial share of configurations.