Self-distillation means training a model on its own softened predictions. In the simplest form, you train a network, then train an identical fresh copy to match the first network's output probabilities, and you can repeat this for several rounds. It reliably improves accuracy on large benchmarks. It is also attractive when data is scarce, because it needs no extra labels and no bigger teacher model. Small clinical datasets, however, have a well-documented failure: with fewer than about a hundred patients, networks learn "shortcuts". These are cues such as scanner noise, hospital-specific markers, or brightness differences that predict the label in the training set but have nothing to do with the disease. A model that learned a shortcut will produce confident soft targets built on that shortcut. Distilling from it again and again could therefore either wash the shortcut out or lock it in, and nobody has checked which.
This note proposes that the answer can be predicted, not just observed. The prediction comes from linear theory. In linear regression on fixed features, repeated self-distillation acts as an automatic spectral filter. It shrinks weak, low-variance directions in the data and keeps strong, dominant ones (Understanding the Gains from Repeated Self-Distillation). Many clinical shortcuts, such as global brightness, scanner texture, or site identity, are high-variance directions in the features. Our central claim is that repeated self-distillation in small cohorts preserves or amplifies a shortcut when the shortcut lies in a strong direction of the feature spectrum, and suppresses it when it lies in a weak one. If that holds, there is a simple fix: remove the part of the teacher's targets that can be predicted from acquisition metadata before each distillation round. We test both the prediction and the fix on chest X-ray shortcut benchmarks, using cohorts subsampled to between 25 and 200 patients.
Core Claim
The setting starts with the most common small-sample recipe: a frozen pretrained encoder with a trained linear head. Here the training problem is exactly the fixed-design linear regime in which the spectral-filter result is proven. Let $X$ be the $N \times d$ matrix of frozen features for $N$ patients, and $y$ the labels. Step $i$ of $k$-step self-distillation fits
$$\theta_i = \arg\min_\theta \; \lVert \xi_i\, y + (1-\xi_i)\, X\theta_{i-1} - X\theta \rVert^2 + \lambda \lVert \theta \rVert^2 ,$$
where $\theta_i$ is the head after step $i$, $\xi_i \in [0,1]$ is how much weight step $i$ puts on the true labels versus the previous model's predictions, and $\lambda$ is the usual weight decay. The cited result shows that the whole sequence equals one linear estimator. That estimator applies a different amount of shrinkage to each singular direction of $X$, while ordinary weight decay shrinks every direction by the same rule. The cited analysis assumes benign Gaussian label noise. Our extension asks what happens when one direction $s$ of $X$ encodes a spurious cue that is correlated with $y$ in the training cohort but not at test time.
We write the shortcut's alignment with the top singular directions of $X$ as its spectral rank. The concrete hypothesis is directional. When $s$ is better aligned with the top singular directions than the disease signal is, the shrinkage profile that $k$-step self-distillation learns will keep $s$ and attenuate the signal. Counter-shortcut accuracy then falls with $k$. When the alignment is reversed, accuracy rises with $k$. This comparison is the decisive one. A single-round study could not see the effect, because it only appears in how results change across rounds. This is also a different question from the one asked in Knowledge Distillation Performs Partial Variance Reduction, which shows that distillation cancels correlated gradient noise. Cancelling noise speeds convergence toward whichever solution the teacher favors, including a shortcut solution.
Research Program
The work has three parts.
Part 1: a controlled linear study. Using frozen ImageNet-pretrained and chest-X-ray-pretrained encoders, we inject shortcuts into images from PneumoniaMNIST, following the spatial-marker and spectral-noise protocol of SilverLining. We vary shortcut strength so that the shortcut's spectral rank in feature space can be measured and moved. We then run $k$-step self-distillation for $k$ from 0 to 5, at cohort sizes $N \in \{25, 50, 100, 200\}$, and measure counter-shortcut accuracy. Spectral rank is computed before any training. The test is therefore a real prediction: rank is computed first, outcome is measured after.
Part 2: end-to-end networks. We ask whether the prediction carries over to fully fine-tuned ResNet-18 networks trained in multiple generations, as in Born-Again Neural Networks. In that setting the feature spectrum moves during training, so we measure spectral rank on the generation-0 penultimate features. ResNet-18 is chosen because Unveiling COVID-19 from Chest X-ray found that deeper networks overfit badly in this regime.
Part 3: the remedy, site-residualized distillation. Before each round, we regress the teacher's logits on whatever acquisition metadata exists, such as hospital, scanner, or view. We then distill only the residual added back to the label term. This needs no clean labeled source set, unlike the trust probes in Trust Functions. It needs no programmatic verifier, unlike A Task-centric Theory for Iterative Self-Improvement. It relies only on metadata that hospitals already record. The method has a clear limit: it cannot help with shortcuts that are uncorrelated with recorded metadata. We will report that case explicitly using the synthetic shortcuts, whose "metadata" we can choose to withhold.
Relation to prior bridging work. The closest bridging papers differ in regime and in what they test. Self-supervised Knowledge Distillation for Few-shot Learning runs one distillation round on natural images, after pretraining on tens of thousands of labeled base images. It never looks at shortcuts or at more than one round. Data-Efficient Language-Supervised Zero-Shot Learning With Self-Distillation uses a slowly updated averaged teacher on three million image–caption pairs to clean up random mismatches between images and captions, not systematic confounders. We borrow the multi-view account of Towards Understanding Ensemble, Knowledge Distillation and Self-Distillation as the optimistic hypothesis: soft targets push the student to learn more features. Our study asks whether, below a hundred patients, the "extra views" the student picks up are disease features or acquisition artifacts.
Baselines
Plain training. The naive reference is a linear head or fine-tuned ResNet-18 trained on hard labels, with weight decay tuned by nested cross-validation inside the training cohort. This is the "do nothing" option, and in the linear setting it is the Ridge estimator that the theory compares against. On UCI Air Quality, 2-step self-distillation cut mean squared error by 47.2% relative to the best Ridge model (Understanding the Gains from Repeated Self-Distillation). No reported result on Lacuna covers small-cohort medical images with shortcuts. A sound comparison must give Ridge the same hyperparameter search budget as the $k$ distillation weights $\xi_i$.
Born-again multi-generation training. This is the strongest competitor that uses distillation, and our remedy is a modification of it. We run Born-Again Neural Networks training with the same architecture, the same augmentation, and the same number of generations as our method. Its reported gains, such as CIFAR-100 error falling from 16.87% to 16.00%, come from large data. No reported result was found on Lacuna for this method on small medical cohorts.
Shortcut-removal preprocessing. This is the strongest method for the shortcut question itself. We use SilverLining preprocessing and, on CORDA, the U-Net lung masking of Unveiling COVID-19 from Chest X-ray. SilverLining reports 0.93 AUC (spatial) and 0.97 AUC (spectral) on counter-shortcut PneumoniaMNIST, and an improvement in cross-hospital AUC from 0.72 to 0.77 from MIMIC-CXR to CheXpert. The CORDA paper reports sensitivity 0.54 and specificity 0.80. All of these figures were obtained with much more training data than our cohorts. We therefore rerun both methods on our subsampled cohorts rather than quoting them. Beating this baseline means higher counter-shortcut AUC at matched $N$. Matching it while being stacked on top of it also counts as a positive result.
Matched-compute ensemble. We average $k+1$ independently seeded models. This uses the same training compute as $k$ rounds of distillation.
Ablations that isolate the key ingredient. Two ablations separate the effect of residualization from the effect of distillation. The first applies the same metadata projection to a hard-label model with no distillation. The second residualizes on randomly permuted metadata.
What counts as success. The remedy succeeds if it beats plain born-again training and both ablations on counter-shortcut AUC at $N \le 100$, with confidence intervals computed over at least 20 cohort resamples.
Why not just…?
Why not just ensemble? At $N \le 100$, training five models is cheap, so the usual compute objection does not apply. The remaining argument is cost at deployment, which matters for mobile and real-time clinical use as noted in Towards AI-driven Next Generation Personalized Healthcare. The more substantive point is that seeds trained on the same confounded cohort may all latch onto the same strong shortcut, so averaging them would not remove it. This alternative is a real threat. The matched-compute ensemble baseline settles it directly. If ensembles match the remedy on counter-shortcut AUC, we will say so, and the contribution narrows to the predictive spectral claim.
Why not just use label smoothing or tuned weight decay? Label smoothing also provides soft targets, but they are spread uniformly and carry nothing specific to each image. Weight decay shrinks all directions by the same rule. The linear theory says neither can reshape the spectrum unevenly, and that uneven reshaping is exactly the mechanism that either keeps or removes the shortcut. Both are included at equal tuning budget. If they track distillation's behavior across shortcut spectral ranks, the spectral account is wrong.
Why not just preprocess the shortcut away? Masking and SilverLining remove artifacts that are known and spatially or spectrally localized. Masks can leak at diseased boundaries, as reported in Unveiling COVID-19 from Chest X-ray. We expect preprocessing to win on the artifacts it was designed for. We test whether residualized distillation adds benefit on top of it, especially for scanner effects that survive masking.
Why not just augment, with AugMix or generated images? Limitations of Synthetic Data Generation found that generative augmentation did not reliably beat AugMix and tended to produce idealized, easy cases. We therefore use AugMix inside every method rather than as a competitor. Augmentation leaves the supervision targets unchanged, so it cannot answer the question asked here.
Proposed Experiments and Decisive Checks
Datasets are shortcut-injected PneumoniaMNIST and the synthetic Animals set (both from SilverLining), MIMIC-CXR training with CheXpert testing for real cross-site shift, and CORDA, all subsampled to $N \in \{25, 50, 100, 200\}$. Metrics are counter-shortcut AUC, cross-site AUC, and, on CORDA, sensitivity at matched specificity. We also track a shortcut-reliance score: the AUC of a probe that predicts site from the model's logits.
The first decisive check is the sign test in the linear regime. We sort shortcuts by measured spectral rank and plot the slope of counter-shortcut AUC against $k$. The claim fails if the slope's sign does not follow spectral rank. The second check repeats the test in the end-to-end setting, where it would show whether the linear account carries over to networks whose features change during training. The third check asks whether site-residualized distillation turns negative slopes positive while the permuted-metadata ablation does not.
A negative outcome would also be useful to practitioners. One example is repeated distillation entrenching shortcuts regardless of spectral rank. That would be a concrete warning against running born-again training on small clinical cohorts.
References
- Understanding the Gains from Repeated Self-Distillation
- Knowledge Distillation Performs Partial Variance Reduction
- SilverLining: Data-First Mitigation of Spatial and Spectral Shortcuts Without Introducing New Confounders
- Born-Again Neural Networks
- Unveiling COVID-19 from CHEST X-Ray with Deep Learning: A Hurdles Race with Small Data
- Trust Functions: Near-Lossless Weak-to-Strong Generalization by Learning When to Trust the Weak Teacher
- A Task-centric Theory for Iterative Self-Improvement with Easy-to-Hard Curricula
- Self-supervised Knowledge Distillation for Few-shot Learning
- Data-Efficient Language-Supervised Zero-Shot Learning With Self-Distillation
- Towards Understanding Ensemble, Knowledge Distillation and Self-Distillation in Deep Learning
- Towards AI-driven Next Generation Personalized Healthcare and Well-being
- Limitations of Synthetic Data Generation in Specialized Data-Scarce Domains