Learning From Your Own Mistakes When Patients Are Few

Many clinical prediction problems produce a sequence, not a single label. Examples include the list of diagnosis codes that follows a set of procedures, or the next hour of a glucose trace. The standard way to train such sequence models is teacher forcing: at every step the model sees the true history and learns to predict the next item. At deployment it has no true history. It must build on its own earlier guesses, and a single wrong guess can push it into situations it never saw in training. This mismatch is called exposure bias. We argue that the mismatch should be much worse when a hospital has only a few dozen patients to train on. A model fit to 36 or 70 patient trajectories has seen almost none of the imperfect histories its own errors will create.

The proposal is to treat the model's own errors as the data augmentation that small cohorts lack. During training, part of each history is replaced by the model's own predictions, blended continuously with the truth. The strength of the blend is set by a signal computed on the training patients alone. The central claim is testable. Under scarce data, corrupting histories with the model's own error distribution should beat corrupting them with random noise, masking, or synthetic patients from a generative model. The advantage should grow as the number of patients shrinks. If random corruption matches it, we will have answered an open question the other way: in small cohorts, exposure-bias methods are just regularizers.

Core Claim and Why It Is Not Already Done

Four papers sit closest to this question, and none of them does this. Neural machine translation of clinical procedure codes for medical diagnosis and uncertainty quantification translates ICD-9 procedure-code sequences into diagnosis-code sequences using plain teacher forcing. It trains on 155,933 MIMIC-IV admissions, never measures drift during free generation, and never tests small cohorts. That paper motivates the question and supplies our discrete task.

Generalized Teacher Forcing for Learning Chaotic Dynamics supplies the mechanism. It mixes the model's latent state with a data-inferred state, $\tilde z_t=(1-\alpha)z_t+\alpha\bar z_t$, and anneals $\alpha$ during training. The paper works only on continuous signals such as EEG and ECG, requires an observation-to-latent map, and does not examine sample size.

Mitigating Exposure Bias in Risk-Aware Time Series Forecasting with Soft Tokens (SoTra) feeds expected "soft" embeddings back through rollouts of univariate glucose and blood-pressure forecasts. It does not test discrete codes or few-shot cohorts. R-TeaFor adds random target masking plus a symmetric KL consistency penalty for news summarization. Whether that masking helps or destroys signal at fewer than 100 examples is untested.

Our work differs from all four in two ways. First, sample size is the independent variable. Second, the corruption distribution is itself the object of study, compared head to head at matched corruption rates.

Concretely, we move the generalized-teacher-forcing blend from latent states to input embeddings, so that it works for discrete codes. The input at step $t$ is

$$\tilde e_t=\alpha\,E[x_t]+(1-\alpha)\sum_{v}p_\theta(v\mid \tilde e_{<t})\,E[v],$$

where $E[\cdot]$ is the embedding table, $x_t$ is the true token, $p_\theta$ is the model's predictive distribution, and $\alpha\in[0,1]$ is the forcing strength. The model is trained to predict the true $x_{t+1}$ from this mixed history. We also keep the standard teacher-forced loss.

In small cohorts there is too little validation data to tune an annealing schedule. We therefore set $\alpha$ adaptively from the training-set exposure gap $g=\mathcal L_{\text{free}}-\mathcal L_{\text{TF}}$. This is the difference between loss under free generation and loss under teacher forcing, both measured on training patients, and computing it needs no held-out data. Forcing is relaxed only while $g$ stays below a bound. This is our analogue of the adaptive scheme in the generalized-teacher-forcing paper.

Research Program

The program has three parts.

The first is measurement. On subsampled cohorts we train standard teacher-forced models and record the exposure gap on held-out patients as a function of cohort size $N$. The sizes are 16, 36, 70, 224, 1,000, and full. They deliberately mirror the regimes reported by Record2Vec (16 samples), GraphCare (36 patients), and CEHR-GAN-BERT (about 70 and 224 patients). A key control compares models at matched teacher-forced validation loss. This separates "more exposure bias" from "more overfitting."

The second part is the corruption comparison. Holding the architecture and the corruption rate fixed, we vary only where corrupted history tokens come from. The candidates are the model's own blended predictions, uniform random replacement, R-TeaFor-style masking with KL consistency, and prefixes sampled from a separate generative sequence model trained on the same cohort.

The third part is analysis. We test the mechanism behind the claim: the model's errors in small cohorts should be concentrated on clinically confusable codes and co-occurring conditions, which random noise rarely produces. We quantify this by measuring the overlap between each corruption distribution and the model's actual free-running error distribution.

The architecture follows the finding by Chung et al. that one layer beats deeper models. We use a one-layer attention sequence-to-sequence model for codes. For glucose, we use a small Transformer matched to the SoTra backbone and trained on the same number of patients.

Baselines

The naive reference point is plain teacher forcing with the one-layer sequence-to-sequence model of Chung et al., decoded greedily. At full MIMIC-IV scale that paper reports First-N-Accuracy of 0.288 for $N=1$. We will first reproduce roughly this number on the full cohort to validate our pipeline. For any subsampled cohort, no reported result was found on Lacuna for this task below full scale, so we will establish those references ourselves.

The strongest regularization competitor is the same model with dropout, weight decay, and early stopping tuned per cohort size. This is what a skeptic would try first. It will get exactly the same tuning budget as our method: an equal number of configurations, chosen by the same small-cohort cross-validation.

The strongest existing exposure-bias method for the continuous task is SoTra. That paper reports an 18% reduction in zone-based clinical risk for glucose forecasting relative to DLinear, iTransformer, and Chronos, but at full dataset scale. For the discrete task the strongest existing method is R-TeaFor adapted to codes. Its reported gains are in summarization (ROUGE-1 of 45.52 against 44.16 for BART on CNN/DailyMail), so no reported result was found on Lacuna for R-TeaFor on clinical codes or small cohorts.

The generative-augmentation baseline trains a small autoregressive generator on the cohort and adds its samples. This mirrors the approach of DiffMDD on EEG cohorts of 42 to 64 subjects.

The key ablation replaces the model's own predictions with uniform random tokens at the same per-step corruption rate. A second ablation fixes $\alpha$ on a schedule instead of the gap-driven rule.

To count as beating these baselines, our method must do three things across five random subsamples per size. It must improve free-running First-N-Accuracy and code-set F1 over tuned regularization at $N\le 70$. It must beat random corruption with non-overlapping confidence intervals. And its advantage must shrink as $N$ grows, which is the fingerprint of a small-sample effect rather than a generic gain.

Why not just…?

Why not just regularize harder, since a one-layer model already won? This is the most serious alternative. If the exposure gap in small cohorts is really just overfitting, tuned dropout and early stopping will close it and our method will add nothing. The matched-validation-loss control settles this. If the free-running gap persists among models with equal teacher-forced loss, the gap is a separate failure that regularization does not reach. If it vanishes, we report that exposure bias is not the bottleneck at small $N$.

Why not just corrupt inputs randomly, AugMix-style? Limitations of Synthetic Data Generation in Specialized Data-Scarce Domains shows that simple stochastic augmentation matches or beats diffusion models on scarce image data, so random corruption is a real threat. That evidence comes from static images, however, where there is no train-versus-deployment history mismatch to target. Our main ablation is exactly this comparison at matched rates. If random corruption ties, the paper's conclusion becomes that exposure-bias training in small cohorts works only as noise injection. That is a useful negative result for Gap 1 of the research file.

Why not just augment with synthetic patients from a generative model? The same paper finds that generative models produce "canonical" samples that classifiers find 11% to 45% easier to classify than real cases. Such samples cannot reproduce a particular model's own failure modes, whereas a model's own rollouts are hard for that model by construction. The generative baseline, together with our error-overlap analysis, tests this directly.

Why not just use frozen foundation-model embeddings? Record2Vec reaches strong few-shot performance with 16 samples. However, it produces a static embedding for classification, not multi-step generation. It also depends on LLM summarization, whose latency and data-sovereignty problems that paper itself acknowledges. We therefore see it as complementary rather than competing, and we do not include it as a generation baseline.

Proposed Experiments

The discrete task is procedure-to-diagnosis code translation on MIMIC-IV, using the preprocessing of An Extensive Data Processing Pipeline for MIMIC-IV. We subsample training admissions at the sizes above and use a fixed held-out test set. A secondary transfer setting pretrains on the full cohort minus a rare-diagnosis subgroup, then adapts on 16 to 70 subgroup admissions.

The continuous task is multi-step glucose forecasting on DCLP3 and PEDAP with 5 to 50 training patients. Here we add Multiple Shooting as a baseline, because Burghi et al. found it beat teacher forcing on voltage prediction (0.80 against 0.73 cosine similarity).

The metrics are the following. For codes, we report free-running First-N-Accuracy, code-set F1, and the per-step entropy measure defined by Chung et al. For glucose, we report Clarke-grid zone risk and mean squared error. For both tasks, we report the held-out exposure gap.

Three checks are decisive. First, the exposure gap must rise as $N$ falls even at matched teacher-forced loss. Second, self-generated corruption must beat random corruption and masking specifically at $N\le 70$. Third, the gap-driven $\alpha$ rule must match or beat a validation-tuned schedule, since that would show it removes the need for held-out data. Failing the first check refutes the premise. Failing the second means the proposed ingredient is only noise injection.