Prediction fragmentation guides safe test-time adaptation in medical imaging

Should This Case Be Adapted? Prediction Fragmentation Controls Test-Time Adaptation

Computer Vision and Pattern Recognition

Summary

When AI models adapt themselves during testing, sometimes the adaptation helps but sometimes it harms the results, especially in medical scans from different machines or sites. The authors found a new way to tell, without extra data labels or heavy computation, whether adapting on a particular case will be harmful. Their method measures how much the new prediction disagrees with the original, called prediction fragmentation, and uses this to decide when to adapt. This approach reduces harmful changes while keeping accuracy, making test-time adaptation safer and more reliable across different medical imaging tasks.

What this means in practice

  • For medical imaging teams: Reduce harmful adaptation effects when segmenting MRI scans from new scanners by selectively adapting the model per case.
  • For autonomous vehicle developers: Apply case-specific adaptation control to segmentation models for street scenes to avoid harmful updates during deployment.

Authors

Lili Wang, Jing Li, Xiaowen Sun, Xiangyu Hu, Zhuangzhuang Gu, Jian Liu, Srihari Nelakuditi, Yan Tong

Abstract

Episodic test-time adaptation resets a frozen segmenter to source weights $M_0$ on each case and adapts for a fixed step count. A fixed horizon conflates a cohort-level question, how far to adapt, with an irreducibly per-case one, whether this case should be adapted at all. Cohort means hide that decision: on cross-vendor cardiac MRI the mean $Δ$Dice from adaptation is statistically indistinguishable from zero while 58.7% of cases are individually made worse. We quantify this harm as harmful accepted area (HA), the harmful fraction of the edited area a controller deploys. Held-out tuning gives a stronger baseline than a fixed horizon, but the budget it selects transfers on neither of the two main medical benchmarks, and no global budget can condition on the case. We show that prediction fragmentation---the disagreement geometry between $M_0$ and the adapted mask $M_k$---predicts HA with no labels or extra backward passes at decision time, comparably on three benchmarks (Spearman $ρ$ 0.50--0.60), at a quarter of gradient-norm's latency. A case-level router built on it cuts HA from 0.228 to 0.139 on a benchmark that took no part in its design, with the design frozen and only cut-points recalibrated there. On the cardiac benchmark the design was selected on, the router cuts HA from 0.129 to 0.013 at matched Dice and 1.10 deployed updates, against the retrospective-best budget found post hoc on evaluation labels, and reduces that 58.7% to 20.0%, an upper bound we quantify. Where the retained cases are not net-helped (as on prostate), the router still cuts HA but concedes accuracy, a boundary we report. Thresholds are fit once on a labeled split disjoint from evaluation; decisions use no labels or gradients. The template ports across architecture and domain (nnU-Net$\to$SegFormer, Cityscapes$\to$ACDC) with coordinate, thresholds and per-bucket actions instantiated per domain.