Entropy Minimization without Model Collapse: Mitigating Prediction Bias in Medical Imaging

Tim Nielen, Sameer Ambekar, Daniel M. Lang, Julia SchnabelNeurIPS 2026

TL;DR

When neural networks adapt on the fly to new environments—like a tumor detector moved to a hospital with a different scanner—they often rely on "entropy minimization" to boost their confidence, only to catastrophically collapse and predict the exact same class for every patient. This paper uncovers the geometric root cause of that collapse: distribution shifts push distinct feature clusters together before adaptation even begins, creating a prediction bias that entropy minimization blindly amplifies. By introducing a simple, test-time reweighting trick called DSBR that gives underrepresented classes an equal voice in the gradient updates, the authors prevent model collapse and outperform complex state-of-the-art methods.

What Problem Does This Paper Address?

Imagine training a pathology model at Hospital A and deploying it at Hospital B, where the tissue staining is slightly pinker. You have no labels at Hospital B and no access to Hospital A’s original data for privacy reasons. Your model must adapt online as new images stream in—a paradigm called Test-Time Adaptation (TTA).

The go-to strategy for TTA is Entropy Minimization (EM). Intuitively, EM nudges the model’s normalization layers so its predictions become sharper and more confident (lower Shannon entropy). Under mild shifts, this works wonders. Under trickier shifts, however, EM triggers model collapse: the network becomes 100% confident that every single scan is "Normal" (or "Geyser," if you're looking at foggy ImageNet photos).

In clinical settings, silent collapse is dangerous, and medical shifts—driven by subtle hardware, protocol, or demographic differences—behave very differently than synthetic image corruptions. Previously, why EM sometimes succeeds and sometimes self-destructs remained an "Entropy Enigma," forcing researchers to rely on wasteful sample-filtering heuristics or heavy auxiliary teacher models.

Figure 1: Feature space clusters merge under distribution shift, inducing severe prediction bias, which is prone to failure for Entropy Minimization (EM). We show the 2-dimensional t-SNE embeddings from WILDSCamelyon [42] dataset featurized by ResNet50-GN. The background colors indicate the area of the feature space the model classifies as each class which we obtain by fitting a k-nearest neighbors classifier on the 2D embeddings and corresponding model predictions. Entropy minimization [46, 82] is prone to model collapse. In contrast, DSBR (ours) mitigates model collapse and prevents cluster merging across multiple iterations.

Methods

While standard TTA methods try to stabilize EM by throwing out high-entropy ("uncertain") samples, adding domain-specific image augmentations, or maintaining slow-moving teacher networks, the authors strip all of that away to target one thing: prediction bias (a skew in predicted class frequencies).

They propose Distribution Shift Bias Reduction (DSBR), a lightweight importance-reweighting modification to standard EM:

  1. Equalizing the Gradient Signal: In standard EM, if 85% of a shifted batch is initially predicted as Class A, Class A dominates the gradient updates. DSBR reweights each sample's entropy loss inversely proportional to how frequently its predicted class currently appears ($1 / (K \cdot p_{\hat{Y}})$, where $K$ is the number of classes). Overrepresented clusters get turned down; suppressed clusters get amplified.
  2. Tracking Frequencies Online: Since true target class probabilities aren't known at test time, DSBR estimates them on the fly. Because a single small batch might miss many classes (especially when $B \ll K$, like batch size 64 on 1,000-class ImageNet), DSBR maintains an Exponential Moving Average (EMA) of predicted class frequencies across batches, initialized to a uniform $1/K$ prior.

That’s it: one hyperparameter (the EMA decay $\alpha$), zero discarded data, no augmentations, operating purely at test time.

Datasets

To test clinical realities alongside natural vision, the authors designed single-source and leave-one-domain-out adaptation setups across five multi-domain benchmarks:

  • WILDSCamelyon: 455,954 2D breast histopathology patches across five hospitals (scanner and staining shifts).
  • Histopantum: Binary tumor histopathology across four cancer types (colorectal, ovarian, stomach, uterine), testing biological rather than hardware shifts.
  • MammoBench: 14,529 2D mammograms unified across five clinical datasets (Normal vs. Abnormal).
  • GliomaMRI: 1,146 3D brain MRI volumes across three institutions for three-class glioma subtyping.
  • ImageNet-C: Standard natural-image benchmark with 15 corruption types (75 domains, $K=1000$) to stress-test high-class-count regimes, mixed shifts, label shifts, and batch size 1.

Key Insights and Ideas

  • Collapse is seeded before adaptation starts: EM doesn't invent prediction bias out of thin air. When input statistics shift, feature clusters drift while the linear classifier boundary stays frozen. One cluster partially crosses the boundary and merges into another—for instance, foggy weather makes everyday objects statistically resemble geysers, causing a ResNet to predict "Geyser" on 25.5% of foggy ImageNet images before any TTA occurs.
  • EM is a blind cluster-tightener: Because EM only updates normalization parameters against a fixed decision boundary, nearby features get similar gradients. When two true classes overlap on one side of the boundary, EM treats the merged blob as a single cluster and squeezes it tighter, creating a runaway feedback loop that ends in single-class collapse.
  • Fixing bias alone fixes EM: You don't need to throw away uncertain data—which is particularly painful in data-scarce medical tasks—or build complex ensembles. Simply stopping dominant clusters from hijacking the gradient allows merged clusters to naturally pull apart again.

Key Results

  • Medical Imaging: Averaged across all four medical benchmarks (evaluated on held-out 20% target splits to catch late-stage collapse), DSBR achieved the highest balanced accuracy gains over unadapted baselines: +4.2% on ResNet and +2.6% on ViT, comfortably beating the runner-up ROID (+1.7% and +2.3%).
  • Eliminating Collapse: On WILDSCamelyon hospital-to-hospital pairs, standard Tent frequently collapsed to ~50% chance accuracy, reaching 87.9% on average (ResNet). DSBR eliminated every single collapse, pushing average accuracy to 96.5%. Similarly, on a severe shift (Hospital 2 $\to$ 5) where EM drove "Normal" predictions to 100%, DSBR kept clusters separated.
  • Natural Images & Wild Settings: On ImageNet-C (severity 5), DSBR ($\alpha=0.99$) achieved top overall improvements across default and wild settings (+13.9% on ResNet50-GN, +20.2% on ViT-B/16). Thanks to the EMA tracker, DSBR remained stable even at batch size 1, where batch-dependent baselines like ROID collapsed to 0.1% accuracy.

Limitations and Future Work

DSBR’s Achilles' heel is its assumption that the target domain’s true class distribution is roughly balanced, and its reliance on an accurate running estimate of predicted classes. The authors note that this estimate can degrade under extreme online label shifts (e.g., when test batches genuinely contain only one class for long stretches) or when batch sizes are tiny relative to thousands of classes—requiring a higher EMA decay ($\alpha=0.99$ vs. $0.9$) to smooth things out. Additionally, when the unadapted source model performs poorly to begin with (as seen on the small 3D GliomaMRI dataset), neither DSBR nor existing baselines yield large accuracy gains. Future work isn't explicitly mapped out, though the authors emphasize using mechanistic insights into feature geometry to build safer TTA methods.

Summary updated

Abstract

Entropy minimization (EM) is the dominant objective for test-time adaptation, yet its failure mode, model collapse, remains poorly understood. In this work, we show that distribution shifts can cause feature clusters corresponding to distinct classes in the model’s representation space to merge, while the decision boundary remains fixed. This induces a systematic skew in the predicted class distribution, referred to as prediction bias. Prediction bias refers to a shift in the predicted class distribution, with some classes overrepresented and others suppressed. We show that entropy minimization amplifies this prediction bias by tightening the existing clusters, reinforcing the incorrect groupings until all predictions collapse to a trivial solution. Next, to demonstrate the significance of prediction bias and mitigate it, we further propose Distribution Shift Bias Reduction (DSBR), a bias-correcting objective that specifically targets this failure mode by equalizing the contribution of each predicted class to the unsupervised entropy minimization loss. To study this failure mode, we design suitable adaptation settings using four medical‑imaging datasets and additionally evaluate on ImageNet‑C. We find that DSBR consistently stabilizes test‑time adaptation, prevents model collapse, and matches or outperforms the state‑of‑the‑art methods. Moreover, DSBR operates solely at test-time. Our code is available at https://entropy-minimization-dsbr.github.io/
BibTeX
@inproceedings{nielen2026entropy,
  author = {Tim Nielen and Sameer Ambekar and Daniel M. Lang and Julia Schnabel},
  title = {{Entropy Minimization without Model Collapse: Mitigating Prediction Bias in Medical Imaging}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=n0LfI4MJNe},
}
Figure