When a medical segmentation model moves to a new hospital, practitioners often adapt it using a handful of labeled scans from that site, sometimes only five. Many different adapted models fit those five scans equally well. They can still behave very differently on the rest of that hospital's patients. Some draw clean organ boundaries. Others hallucinate disconnected "phantom" blobs or leak across edges. Standard training lands on one of these models more or less by chance. This proposal treats few-shot adaptation as a search problem instead. We build a population of adapters that all fit the labeled shots but disagree as much as possible on the unlabeled target images. We then pick one member using cheap label-free checks. The intuition comes from multimodal optimization, the study of search methods that keep several distinct good solutions alive rather than collapsing onto one.
The motivating evidence is that this hidden spread is real and large. Underspecification Presents Challenges for Credibility in Modern Machine Learning showed that models differing only by random seed, with indistinguishable validation scores, diverge sharply under cross-hospital shift. On ImageNet-C, the seed-to-seed spread under corruption was an order of magnitude larger than the in-distribution spread. That paper only sampled the set of equally good models passively through seeds, and it called this a conservative exploration. The question we ask is narrow and testable. In the small adapter spaces used for few-shot medical adaptation, does deliberately searching for disagreeing solutions find better target-domain models than random restarts? And can we identify those models without target labels?
Core Claim
We claim two things for 5–20-shot cross-site segmentation with a frozen backbone and a small trainable adapter.
The first claim is about the search. Pushing members apart in prediction space on unlabeled target images produces a population whose best member is measurably better than the best of an equal-compute set of random restarts. "Better" here means higher Dice and lower boundary error (HD95) on held-out target patients.
The second claim is about selection. A label-free selector recovers most of that gain. The selector combines leave-one-shot-out fit with generic topological plausibility, such as the number of connected components and holes in each predicted mask.
The novelty lies in where diversity is enforced and in how much of the problem we assign to selection. Repulsion acts on the masks predicted for unlabeled target images, not on parameters. Selection is scored separately as "regret": the gap between the member we pick and the best member in hindsight.
Formally, let $\theta$ be the adapter parameters, $L_S(\theta)$ the supervised loss on the $n$ labeled target shots, and $U$ a pool of unlabeled target images. The few-shot Rashomon set is
$$R_\epsilon = \{\theta : L_S(\theta) \le \min_{\theta'} L_S(\theta') + \epsilon\},$$
the set of adapters whose loss on the shots is within $\epsilon$ of the best. We train a population $\theta_1,\dots,\theta_M$ jointly. Each member minimizes
$$L_S(\theta_i) - \lambda \cdot \frac{1}{M-1}\sum_{j\ne i} D\big(f_{\theta_i}(U), f_{\theta_j}(U)\big),$$
where $f_\theta(U)$ are the predicted soft masks on the unlabeled pool, $D$ is a soft-Dice disagreement between two members' masks, and $\lambda$ sets the strength of repulsion. $\lambda$ is annealed so that every member ends inside $R_\epsilon$. Members that leave $R_\epsilon$ are discarded and do not count as successes.
Research Program
The method draws on several prior lines of work, each in a specific role.
Few-Shot Domain Adaptation with Polymorphic Transformers supplies the adapter. It freezes a segmentation network and fine-tunes only the Key projection of an inserted attention block. With 5 RIM-One shots it reaches 0.835 Dice, and the authors observe phantom segments. We reuse its adapter unchanged and change only how the adapter is optimized and chosen.
Divergence-Guided Particle Swarm Optimization supplies the repulsion idea. It pushes swarm members away from the global best using a similarity kernel. It gains 2x–8x on multimodal benchmarks but loses precision on unimodal ones. That trade-off constrains our design. If the adapter landscape is effectively unimodal, repulsion should cost accuracy, and we will measure whether it does.
We move repulsion from parameter space into output space because of a structural fact about adapter weights: very different weight matrices can produce identical masks, so distance between weights says little about whether two members actually behave differently. Parameter-space repulsion is kept as an ablation.
We also borrow from the runtime theory. Doerr et al. show that local search slows exponentially with the width of the low-scoring "valley" between good solutions. Runtime Analysis for the NSGA-II: Provable Speed-Ups from Crossover shows that recombining solutions from different peaks can cross such valleys. These results motivate an optional recombination step. In it, two members' adapters are linearly interpolated, which is meaningful because all members start from the same source weights. The interpolated adapter is kept if it stays in $R_\epsilon$. We treat this as a secondary hypothesis, since neither theory result was derived for neural loss landscapes.
A Large Scale Benchmark for Test Time Adaptation Methods in Medical Image Segmentation constrains the selector in two ways. It reports that anatomical shape-template priors cause negative transfer when pathology distorts anatomy, so our plausibility score uses only weak topological counts and no template. It also reports that Dice and HD95 disagree, so we report both and count phantom components directly.
The deliverables are three. First, an adapter-population trainer that works for both Polyformer-style and normalization-parameter adapters. Second, a measurement of the target-Dice spread inside $R_\epsilon$ under passive versus active search, which no prior medical study has quantified. Third, a selection-regret analysis showing how much of any oracle gain survives without labels.
Baselines
The naive reference point is the source-only model applied to the target site. We also run standard supervised fine-tuning of the full decoder on the shots. On REFUGE→RIM-One 5-shot, Polyformer reports 0.752 Dice for source-only and 0.776 for fine-tuning (Few-Shot Domain Adaptation with Polymorphic Transformers).
The strongest existing method on the exact question is Polyformer itself, at 0.835 average Dice in the same setting. We rerun it from the released configuration so that our numbers share preprocessing and splits. Beating it requires the selected population member, not the oracle, to exceed our reproduced Polyformer Dice. The margin must be at least the run-to-run standard deviation across five shot-sampling draws, and HD95 must not get worse.
The competitor most likely to match us is M independent random restarts of the Polyformer adapter. This is the passive Rashomon sampling studied in the underspecification paper. We use the identical selector and the identical total number of gradient steps, with the same learning-rate grid tuned once on a held-out source-like split. If restarts plus our selector match the repulsive population, the search ingredient is unnecessary.
We also include a naive ensemble that averages the restarts' predictions. The underspecification paper argues that averaging dilutes but retains failure modes; our experiment tests that argument on segmentation.
Three ablations isolate the key ingredient: repulsion in parameter space instead of output space, no repulsion with recombination only, and the full method with each selector component removed. Finally, GraTa (Gradient Alignment Improves Test-Time Adaptation for Medical Image Segmentation) serves as the strongest label-free adaptation method. On the five-domain optic disc/cup benchmark it reports an average gain of 5.87% Dice over no adaptation, and 12.77% on domain D. We run it on top of the source model, and also stacked on Polyformer, using the same unlabeled pool.
Why not just…?
Why not just delete phantom segments by keeping the largest connected component? This is a real threat to any claim about phantom segments, and it costs nothing. We apply the filter to every method, ours included, and report results both with and without it. If our gains disappear once the filter is applied, our method was only removing islands. In that case we will say so, and any remaining claim must rest on boundary quality (HD95) of the main structure. We expect only partial overlap with the filter, because the filter cannot fix boundary leakage. It also wrongly deletes true secondary structures, such as multiple polyps in one image.
Why not just average several restarts (a deep ensemble)? Underspecification Presents Challenges for Credibility in Modern Machine Learning argues that averaging retains the failure modes of its members. For segmentation, averaging soft masks can also smear boundaries. This is still an empirical question, and the ensemble is a baseline at matched compute. If it matches the selected member, the honest conclusion is that diversity helps but selection does not.
Why not just run more random restarts? Restarts are the passive version of our search. The decisive comparison is the oracle-best member under each scheme at equal compute. Prior work gives no evidence either way for adapter spaces this small. If the spreads come out equal, we abandon repulsion and focus the paper on selection regret alone.
Why not just use test-time adaptation like GraTa? GraTa uses no target labels, and its step size shrinks when its two objectives disagree. It is complementary rather than competing, so we test it alone and stacked. If GraTa plus Polyformer beats our selected member, the few-shot labels plus population search add nothing beyond local label-free refinement.
Proposed Experiments
The primary benchmark is REFUGE→RIM-One optic disc/cup segmentation at 5, 10, 15 and 20 shots, the setting where Polyformer reports its 0.835. The second benchmark is the CVC-612/Kvasir→CVC-300 polyp transfer from the same paper; for that transfer, no reported Polyformer number was found on Lacuna, so we will reproduce it. The third is a harder stress test chosen because AMOS: A Large-Scale Abdominal Multi-Organ Benchmark for Versatile Medical Image Segmentation reports drops of more than 20% mDice for MRI across scanners: we adapt a model trained on one AMOS MRI scanner to another using 5 labeled volumes. For GraTa comparisons we also use the optic disc/cup domains A–E.
Every configuration is run over five independent shot draws. Metrics are Dice, HD95, phantom-component count per image, the target-Dice spread within $R_\epsilon$, and selection regret, defined as oracle Dice minus selected Dice.
Three checks decide the outcome. First, does the oracle-best member under output-space repulsion beat the oracle-best restart at equal compute, beyond shot-draw variance? If not, active exploration is unjustified. Second, is selection regret smaller than that oracle gap, so that the gain survives without labels? Third, does the advantage persist after the connected-component filter and appear in HD95? If not, the method is a roundabout island remover.
A secondary analysis follows the tension in the file between CNN and Transformer results. We repeat the spread measurement for a convolutional adapter and an attention adapter, to test whether attention adapters have wider Rashomon sets under few shots. If they do, the larger spread in the attention adapter's Rashomon set would be a candidate explanation for why simple 3D-UNets beat Swin-UNetr on AMOS CT (89.04% vs 86.32% mDice).
References
- Underspecification Presents Challenges for Credibility in Modern Machine Learning
- Few-Shot Domain Adaptation with Polymorphic Transformers
- Divergence-Guided Particle Swarm Optimization
- Theoretical Analyses of Multi-Objective Evolutionary Algorithms on Multi-Modal Objectives
- Runtime Analysis for the NSGA-II: Provable Speed-Ups from Crossover
- A Large Scale Benchmark for Test Time Adaptation Methods in Medical Image Segmentation
- Gradient Alignment Improves Test-Time Adaptation for Medical Image Segmentation
- AMOS: A Large-Scale Abdominal Multi-Organ Benchmark for Versatile Medical Image Segmentation