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 trained NN at each N, selected from U-Net, SegFormer and nnU-Net only. Filled comparator dot + whisker = exactly 3 cached seeds and a 95% t-interval; hollow dot = only 1/2 seeds, so no interval. The tuned SAM decoder GT-box oracle is kept separate in the expanded figure below.
▬ frozen assembly (deterministic) · □/■ strongest trained NN · large dot = N=100
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.
dataeff_grid.json.Strongest trained NN per cell — max of SegFormer (mit_b2), pretrained U-Net (resnet34), and nnU-Net using every currently cached seed — at matched budgets N = 10 / 25 / 50 / 100, against the frozen assembly. The point estimates below are current; seed coverage is not uniform. The data-efficiency figure above draws 95% seed intervals only for exact three-seed cells and marks one/two-seed cells as incomplete. Amber denotes a close point estimate, not a significance claim.
| Domain | best NN N=10 | N=25 | N=50 | N=100 | training-free LLM | few-shot decoder N=100 (oracle) |
|---|---|---|---|---|---|---|
| ISIC 2018 (derm) | 0.832 | 0.833 | 0.850 | 0.854 | 0.880 | 0.911 |
| MSD Spleen (CT) | 0.633 | 0.775 | 0.869 | 0.913 | 0.920 | 0.953 |
| Kvasir-SEG (endo) | 0.709 | 0.818 | 0.854 | 0.864 | 0.8646 | 0.944 |
| ChestXray (X-ray) | 0.938 | 0.948 | 0.952 | 0.9535 | 0.9497 SegGPT in-context; fs-deploy 0.9488 | 0.9556 |
| HC18 Fetal-Head (US) | 0.923 | 0.958 | 0.965 | 0.9654 | 0.9667 retrieval SegGPT; zero gradient | 0.9603 single-run GT-box oracle |
| MSD Prostate (MRI) | 0.700 | 0.791 | 0.795 | 0.8463 | 0.7877 deployed K=8 SegGPT⊕op_sam | 0.9377 |
dataeff_grid.json.These are sealed follow-up experiments, kept separate from the deployed six-domain table above. The NN-free Codex pilot uses 15 fixed slices; the frozen SegGPT⊕op_sam lane and K sweep use the 30-case prostate benchmark. Results from different protocols are not subtracted from one another.
| Protocol | n | variant | mean Dice | Δ | paired 95% CI | status |
|---|---|---|---|---|---|---|
| NN-free LLM polygon lane | 15 | frozen baseline | 0.6188 | — | — | reference |
| NN-free LLM polygon lane | 15 | Codex REPAIR + independent JUDGE | 0.6524 | +0.0336 | [+0.0097, +0.0612] | positive pilot |
| Frozen SegGPT⊕op_sam lane | 30 | sealed base cache | 0.7843 | — | — | reference |
| Frozen SegGPT⊕op_sam lane | 30 | crop-zoom SkillOpt + Codex judge | 0.7840 | −0.00027 | [−0.00080, 0.00000] | null; default-off |
| Frozen SegGPT⊕op_sam lane | 30 | full skill-family GT oracle | 0.8302 | +0.0459 | — | headroom only |
| Trained benchmark | 30 | nnU-Net, N=100 (3-seed mean) | 0.8463 | +0.0620 vs sealed base | — | current strongest NN |
We removed the implicit K=min(8,N) ceiling and reran the same full frozen pipeline on the same 30 held-out slices. K is the number of query-retrieved in-context support pairs, not gradient-training set size. Every run reads from the same pool of 100 leak-free TRAIN pairs, stored at 224×224. Raw joint inference fits through K=10 on a 12 GB TITAN Xp; raw K=12 and K=16 OOM. K>10 therefore uses a memory-safe approximation: feature-ensemble chunks of at most 8, followed by a support-count-weighted pixel vote. Two GPUs ran separate values/shards concurrently; they reduced wall time but did not combine VRAM.
| Full frozen pipeline | K | execution | mean Dice | median | Δ vs K=8 | gap to NN |
|---|---|---|---|---|---|---|
| SegGPT gate | 5 | joint | 0.7832 | 0.8433 | −0.0044 | −0.0631 |
| SegGPT gate · deployed | 8 | joint | 0.7877 | 0.8483 | reference | −0.0587 |
| Uncapped SegGPT gate | 10 | joint | 0.7856 | 0.8560 | −0.0021 | −0.0608 |
| Uncapped SegGPT gate | 25 | chunk 8 + weighted vote | 0.7845 | 0.8433 | −0.0032 | −0.0619 |
| Uncapped SegGPT gate · exploratory | 50 | chunk 8 + weighted vote | 0.7988 | 0.8499 | +0.0112 | −0.0475 |
| Uncapped SegGPT gate | 100 (all) | chunk 8 + weighted vote | 0.7798 | 0.8433 | −0.0079 | −0.0666 |
| Per-image best K · GT oracle | 5/8/10/25/50/100 | not deployable | 0.8090 | — | +0.0213 | −0.0374 |
| nnU-Net, N=100 | — | 3-seed mean | 0.8463 | — | +0.0587 | reference |
The K sweep also has a GT-isolated router experiment (seggpt_k_skillopt.py, driven by experiments/seggpt_k_feedback.py). It fits on four validation volumes using leave-one-volume-out SkillOpt, freezes the resulting GT-free router, and then opens the six-volume test labels once for scoring.
| Split / protocol | n | K=8 fallback | frozen SkillOpt | Δ | uncertainty / decisions | verdict |
|---|---|---|---|---|---|---|
| Validation · volume-LOO | 20 / 4 volumes | 0.834094 | 0.840757 | +0.006662 | enable threshold +0.005 | fit enabled |
| Frozen test · volume-cluster bootstrap | 30 / 6 volumes | 0.787672 | 0.769596 | −0.018076 | 95% CI [−0.040310, −0.003187] 2↑ / 4↓ / 24=; P(Δ≤0)=0.9988 | fails transfer |
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/.
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.9047 | 0.9044 | 0.9071 | 0.9110 | 0.8544 |
| MSD Spleen (CT) | 0.9574 | 0.9602 | 0.9599 | 0.9528 | 0.9132 |
| Kvasir-SEG (endo) | 0.9360 | 0.9340 | 0.9372 | 0.9439 | 0.8643 |
| ChestXray (X-ray) | 0.9325 | 0.9462 | 0.9545 | 0.9556 | 0.9535 |
| HC18 Fetal-Head (US) | 0.9183 | 0.9540 | 0.9566 | 0.9603 | 0.9654 |
| MSD Prostate (MRI) | 0.9065 | 0.9311 | 0.9315 | 0.9377 | 0.8463 |
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. This table preserves that experiment's arch-matched NN reference; the current strongest cached-NN grid is the data-efficiency section above.
| Domain (N=100 oracle, vit_b) | study NN reference | 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.