A multi-domain data-efficiency study — frozen-foundation-model assembly (an LLM polygon drawer in the deployed path on 1/6 domains, else SAM / op_sam / SegGPT) + a numpy genome, zero gradient training on the target task.
Frozen assembly vs the strongest compatible, complete three-seed trained NN at each K, selected from U-Net, SegFormer and nnU-Net only. Filled comparator dot + whisker = exactly seeds 0/1/2 and a 95% df=2 t interval; absent dot = no eligible comparator. The tuned SAM decoder GT-box oracle is kept separate in the expanded figure below.
▬ pipeline (strict first-K curve; Spleen and Prostate updated to NN-assisted SkillOpt) · □/■ strongest trained NN
| K Training supports | K+24 adaptation labels | NN-assisted pipeline Dice [95% volume CI] | Strongest compatible trained NN Dice [95% df=2 t CI] |
|---|---|---|---|
| 5 | 29 | 0.759 [0.682, 0.828] | U-Net 0.380 [0.219, 0.541] |
| 10 | 34 | 0.828 [0.759, 0.891] | U-Net 0.577 [0.530, 0.623] |
| 25 | 49 | 0.845 [0.760, 0.911] | SegFormer 0.772 [0.687, 0.856] |
| 50 | 74 | 0.814 [0.732, 0.901] | U-Net 0.855 [0.717, 0.992] |
| 100 | 124 | 0.905 [0.860, 0.947] | U-Net 0.912 [0.864, 0.959] |
The green Spleen curve is the fresh NN-assisted pipeline at every K. It uses three training seeds and its NN-specific crop scales, routing, agreement gates, morphology, margins and selectors were independently tuned at every K; baseline intervals are across exact seeds 0/1/2. Resize-224 nnU-Net and historical cached-mask SAM scores are excluded.
| K Training supports | K+20 adaptation labels | NN-assisted pipeline Dice [95% volume CI] | Strongest compatible trained NN Dice [95% df=2 t CI] |
|---|---|---|---|
| 5 | 25 | 0.321 [0.184, 0.472] | U-Net 0.596 [0.533, 0.658] |
| 10 | 30 | 0.505 [0.341, 0.672] | U-Net 0.700 [0.599, 0.800] |
| 25 | 45 | 0.687 [0.584, 0.789] | nnU-Net 0.791 [0.783, 0.799] |
| 50 | 70 | 0.789 [0.711, 0.860] | nnU-Net 0.795 [0.780, 0.810] |
| 100 | 120 | 0.792 [0.728, 0.860] | nnU-Net 0.846 [0.834, 0.858] |
The green Prostate curve uses fresh masks from three NN seeds. Its NN-specific preprocessing, localization, crop-zoom, gates, margins and selectors were independently tuned at every K. Green intervals bootstrap the six complete Test volumes; baseline intervals use exact seeds 0/1/2.
The green Spleen pipeline curve strictly uses the first K Training supports. Its selector was calibrated with 24 separate Validation labels, so the disclosed total is K+24 adaptation labels. Green error bars are 95% complete-volume bootstrap intervals over the seven held-out Test volumes.
The green Prostate pipeline curve also strictly uses the first K Training supports. Its selector used 20 separate Validation labels, so the disclosed total is K+20 adaptation labels. Green error bars bootstrap the six held-out Test volumes.
Coverage is intentionally incomplete. No uncertainty bar is synthesized for one/two-seed cells or the single-run tuned-decoder oracle. The expanded figure below shows every cached method curve and makes the missing-seed cells explicit.
HC18 FetalHead remains withheld pending its leakage-free rerun; these updates do not restore any prior FetalHead result.
dataeff_grid.json.Strongest trained NN per cell — max of SegFormer (mit_b2), pretrained U-Net (resnet34), and nnU-Net, 2-seed means — at matched budgets N = 10 / 25 / 50 / 100, against the LLM pipeline (re-measured from scratch via eval_all_domains.py). The LLM's only label-fit module is a ~5–8-param genome; localization and SAM are GT-free/frozen — so the LLM number is ~flat in N while the NN climbs. Caveat: the N=100 column is a set of within-noise near-ties — best-NN@100 sits inside the LLM bootstrap 95% CI on 5/6 domains (stats.md), and 0/4 apparent N=100 leads survive as significant. The honest, CI-separated lead is at N≤25. Amber = within-CI near-tie; a green cell reflects the point estimate only, not significance.
| Domain | best NN N=10 | N=25 | N=50 | N=100 | training-free LLM | few-shot decoder N=100 (oracle) |
|---|---|---|---|---|---|---|
| ISIC 2018 (derm) | 0.815 | 0.829 | 0.832 | 0.868 | 0.880 | 0.911 |
| MSD Spleen (CT) | 0.633 | 0.802 | 0.859 | 0.907 | 0.920 | 0.953 |
| Kvasir-SEG (endo) | 0.756 | 0.824 | 0.833 | 0.889 | 0.8646 | 0.944 |
| ChestXray (X-ray) | 0.938 | 0.948 | 0.952 | 0.9546 | 0.9497 SegGPT in-context; fs-deploy 0.9488 | 0.9535 |
| HC18 Fetal-Head (US) ·new | 0.923 | 0.958 | 0.965 | 0.970 | 0.9667 retrieval SegGPT; was 0.9328 fs / 0.9225 tf | 0.9665 tuned-decoder oracle |
| MSD Prostate (MRI) ·new | 0.679 | 0.720 | 0.772 | 0.815 | 0.7877 SegGPT⊕op_sam ensemble; was 0.760 | 0.938 |
fewshot_matched.md); at N=100 the numbers below (ISIC 0.880 vs 0.868, Spleen 0.920 vs 0.907) are within-CI near-ties, not significant leads (stats.md) — and on Kvasir polyp a frozen-DINOv2 dense-correspondence localizer (OP-SAM CPG + peak-CC box) lifts it 0.659→0.8646 — the gap was localization (frozen GT-box oracle 0.914 > NN), and this closes 89% of it; the median 0.9484 now beats the NN mean, though the mean stays just below best-NN 0.889. On Chest X-ray the deployed training-free path is now a swapped 4th frozen drawer — the SegGPT in-context drawer (K=8 support pairs, zero gradient) — reaching 0.9497 ≈ NN 0.9546 (−0.005, a near-tie), superseding the earlier box-SAM 0.922 and the separate few-shot-tuned decoder 0.9488 lane; the old "frozen-decoder cap ~0.93" was specific to SAM, not to architecture. On HC18 fetal-head the same story now plays out training-free: a swapped retrieval-prompted SegGPT drawer (K=8 query-retrieved DINOv2-similar in-context supports, zero gradient, SAM-free) reaches 0.9667 ≈ NN 0.9703 (−0.004, a near-tie), superseding the op_sam+SAM 0.9225 and the few-shot decoder 0.9328 — so FetalHead is no longer a few-shot lane. Honest headline: at N=100 these are within-CI near-ties — 0/4 apparent leads survive bootstrap 95% CIs (stats.md), and the Spleen "+0.019" is a seed-averaging artifact (best single U-Net seed 0.9323 > LLM 0.9262). The defensible lead is at N≤25 on localizable targets (ISIC / Kvasir / Spleen / Prostate), budget-matched and CI-separated. All 6 deployed paths are gradient-free frozen-model assembly, but the LLM drawer is out of the mask-producing path on 5/6 (llm_ablation.md) — Prostate, the last domain lifted off its floor, is a complementary 2nd frozen drawer (a SegGPT⊕op_sam edge-gated keep-best ensemble). SegFormer is the strongest NN in 10 of 12 sweep cells.Per-case GT-vs-prediction overlays for the deployed pipeline on every test image (all 465, sorted worst-Dice first) — open the 6-domain gallery hub → (ISIC · Kvasir · Spleen · Prostate · CXR · FetalHead). Green = ground truth, red = deployed prediction; overlays rendered from the committed mask_cache/.
Held-out validation-set galleries (the deployed pipeline on each domain's calibration split, distinct from the test cases and the reported test numbers) — open the 5-domain validation gallery hub → (ISIC · Kvasir · Spleen · Prostate · CXR; FetalHead withheld pending the HC18 subject-level leak fix).
Is the residual to the trained NN a decoder limit or a localization limit? MedSAM (SAM fine-tuned on ~1M medical masks) beats box-prompted SAM — but it is data-leaky (its training set likely includes these test distributions), so it is really "import a trained medical net." The fair, leak-free counterpart of the same operation: init from the generic SAM (no medical data), freeze the image + prompt encoders, and fine-tune only the ~4M-param mask decoder on our own N-label train split — GT never touches test. Given a good box (the GT-box oracle, which isolates the decoder), this few-shot-tuned decoder beats the from-scratch NN at every budget on 4 of 6 domains (ISIC/Spleen/Kvasir/Prostate — Prostate by +0.12) and ties on the other two (CXR, HC18 — both near-ceiling NNs at ~0.95–0.96), and it saturates at N=10 (pretrained features + a tiny adapted head), so its curve is flat-high while the NN climbs:
| Domain (tuned decoder, oracle) | N=10 | N=25 | N=50 | N=100 | best NN N=100 |
|---|---|---|---|---|---|
| ISIC 2018 (derm) | 0.905 | 0.904 | 0.907 | 0.911 | 0.868 |
| MSD Spleen (CT) | 0.957 | 0.960 | 0.960 | 0.953 | 0.907 |
| Kvasir-SEG (endo) | 0.936 | 0.934 | 0.937 | 0.944 | 0.889 |
| ChestXray (X-ray) | 0.933 | 0.946 | 0.955 | 0.9535 | 0.9546 |
| HC18 Fetal-Head (US) ·new | 0.918 | 0.954 | 0.957 | 0.9665 | 0.970 |
| MSD Prostate (MRI) ·new | 0.906 | 0.931 | 0.932 | 0.938 | 0.815 |
MedSAM is SAM already fine-tuned on ~1M medical masks — a leaky upper reference (its training likely saw these test distributions). Arch-matched (both vit_b, GT-box oracle, N=100), few-shot tuning of the GENERIC SAM matches or beats the leaky MedSAM on 3 of 6 domains, and stays within 0.015 on the other 3 — its own pretraining distributions (derm/US/MRI). Medical pretraining buys no consistent edge once the decoder is adapted, and where generic SAM is already strong (Kvasir/Spleen) it starts above MedSAM even frozen. Bold = better of the two few-shot columns.
| Domain (N=100 oracle, vit_b) | from-scratch NN | generic frozen | generic few-shot (fair) | MedSAM frozen (leaky) | MedSAM few-shot (leaky) |
|---|---|---|---|---|---|
| ISIC 2018 (derm) | 0.868 | 0.870 | 0.915 | 0.921 | 0.943 |
| MSD Spleen (CT) | 0.907 | 0.941 | 0.956 | 0.909 | 0.946 |
| Kvasir-SEG (endo) | 0.889 | 0.917 | 0.936 | 0.888 | 0.918 |
| ChestXray (X-ray) | 0.9546 | 0.925 | 0.954 | 0.935 | 0.952 |
| HC18 Fetal-Head (US) ·new | 0.970 | 0.769 | 0.965 | 0.904 | 0.972 |
| MSD Prostate (MRI) ·new | 0.815 | 0.895 | 0.928 | 0.807 | 0.941 |
ood_medsam.md). The oracle-box column above is a leaky upper reference. Give MedSAM a fair box (learned from N GT, not the oracle) and it drops +0.16..+0.59 Dice below the deployed pipeline in-distribution; take it out-of-distribution (DRIVE retinal vessels — a distribution MedSAM never trained on) and the gap widens to +0.51 while MedSAM collapses to 0.220 even handed the ORACLE box (vs ~0.90 in-distribution). MedSAM's in-distribution edge was its decoder recognizing box-shaped targets it had trained on — memorization that does not transfer; the pipeline's few-shot-refit GT-free localization is distribution-robust.Each domain has a distinct setup — so can it be a single domain-agnostic pipeline that few-shot-fits per domain WITHOUT tuning SAM? We test the transferable skill — a frozen-SAM-feature localizer prototype fit from N labeled images — with identical code across all six domains, SAM never touched.
route.py), not SAM tuning. So onboarding a new domain is ~10 labels + a routing decision, zero gradient training. Robust localizer skill: the deployed default is now the op_sam frozen-DINOv2 dense-correspondence localizer (kvasir/HC18/prostate) — it transfers 10-shot support masks through the full patch cross-correlation, and superseded the earlier SAM+DINOv2 AMG-ranker ensemble on Kvasir (0.655→0.8646). The lesson holds and is now stronger: the polyp/fold and faint-skull walls yield to the right frozen feature space — dense correspondence, plus feature-diverse supports — not to distractor-verification tricks. The AMG-ranker ensemble (at/near the best single feature space on all three, Kvasir 0.65 / Spleen 0.64 / ISIC 0.67, never catastrophic where SAM-alone fails the isodense spleen 0.40) remains the LLM-agnostic fallback where a support set is too small for correspondence.