agenticSeg Β· data-efficiency study Β· 2026-07-13

LLM segmentation skills vs trained nets, at a handful of labels

A frozen perception model traces the target; numpy-only skills β€” a genome, a shape-prior, a vesselness decoder β€” refine it. No neural net is trained. The question: at N = 5–100 labels, can these skills match a net trained on the same images? Tested against the strongest matched-N baseline (multi-seed SegFormer / U-Net / nnU-Net β€” SegFormer & U-Net use ImageNet-pretrained encoders; only nnU-Net is from-scratch), the honest answer is a modest-but-real low-label lead on most domains β€” and a decisive win where nets need the most data.

4 / 7
domains where the LLM beats the strongest matched-N net @ N=10 (+ 2 ties: CXR, DRIVE)
+0.11
Prostate β€” largest matched-N=10 lead over the best net (0.792 vs 0.679)
Β±0.21
NN seed-noise at N=10 (Spleen); the skill paths are near-deterministic
0.002β†’0.643
isodense CT: shape-prior vs GrabCut β€” a NEW GT-free texture prior lifts it 0.52β†’0.643 (drift zeros 5β†’1)
Full technical report β†’
head-to-head

Dice at N = 10 labels β€” skill vs the strongest net

Each domain: the best LLM-skill path (teal) against the strongest matched-N neural net found across seeds and architectures (clay). Ordered by margin. Bars start at 0.50 Dice.

LLM skill (best path) strongest matched-N net Ξ” label = skill βˆ’ net
Read it honestly (matched first-N, @ N=10): the LLM leads on 4/7 (ISIC +0.054, Prostate +0.113, Kvasir +0.082, Spleen +0.027 mean / .929 median), ties CXR (βˆ’0.001) and DRIVE (+0.001), and loses FetalHead at N=10 (0.767 vs 0.923) β€” where the strongest net is nnU-Net, though the deployed SegGPT drawer reaches 0.967 at its full K=8 support budget (see the crossover). Earlier single-seed / nnU-Net-excluded baselines inflated these margins; against the strongest matched net (SegFormer/U-Net ImageNet-pretrained + nnU-Net from-scratch) the lead is modest but real in the scarce regime. Matched-N protocol: at each budget both net and skill calibrate on the identical first-N images (verified bit-for-bit); numbers here = scratch_fusion/baselines_dataeff.json (llm / strongest). CI seeds still filling.
by modality & contrast

Where the skills win is set by the target's visual cue

The GPU-free classical decoder wins exactly where the target has an exploitable appearance cue, and needs a different decode skill where it doesn't (isodense CT β†’ shape-prior; filaments β†’ vesselness).

DomainModalityTarget contrast cue best net @10LLM skill @10 Ξ”skill path
Spleen β€” a marginal win, and the net is seed-unstable: the skill's mean (0.660) beats the strongest matched-N=10 net (0.633), and its median is 0.929. The net is also wildly seed-unstable at N=10 here (spread up to Β±0.21 across seeds β€” a lucky seed can reach ~0.71, an unlucky one ~0.55); the skill paths are near-deterministic. (@10 numbers = the matched strongest field; deployed Spleen reaches 0.920 at N=100.)
data-efficiency Β· N = 5 / 10 / 25 / 50

Skill flat, net climbing β€” the crossover budget is the whole story

Two lines per domain across N=5/10/25/50/100: the deployed LLM / assembly (teal) and the strongest matched first-N net (clay) = max over best-of-breed SegFormer-b2 / U-Net-r34 and first-N nnU-Net, on the identical first-N images. Same numbers as the table and dataeff_new.png above (scratch_fusion/baselines_dataeff.json). Where the LLM leads, the gap is shaded. A net point is dropped where its matched baseline is deferred/absent (N=5 for Kvasir/Spleen/CXR/FetalHead; Prostate N=5 net = a degenerate single-volume first-N subset, omitted).

deployed LLM / assembly, N=5β†’100 strongest matched first-N net shaded = LLM leads
Crossover per domain (matched first-N, N=5β†’100): ISIC β€” LLM leads at every budget (Ξ” +.075 β†’ +.012 at N=100). Prostate β€” LLM leads at every budget (fusion .801 vs .786 at N=100, +.015; the biggest low-N gap is nominal since the net's N=5 first-N subset is a single degenerate volume). Kvasir β€” LLM leads N≀50, net crosses by N=100 (.889 > .865). Spleen β€” mixed: LLM leads N=10 and N=100 (.920 vs .907, +.013), net leads N=25/50. FetalHead β€” net leads N=10–50, LLM ties/edges at N=100 (.967 vs .964, +.003). CXR β€” near-tie throughout, net barely ahead (βˆ’.003 at N=100). At N=100 the LLM leads or ties 5/6 (Prostate/Spleen/ISIC lead, FetalHead tie; only Kvasir βˆ’.024). Honest: matched first-N is verified bit-for-bit; a shuffle-subset nnU-Net bug was found and fixed; the two deferred cells (CXR N=5 net; Prostate N=5 degenerate) are dropped, not faked.
final Β· matched first-N Β· 2026-07-14

Strongest matched-N net vs the deployed LLM/assembly β€” the full grid

Every cell trains the net on the identical first-N sorted images the assembly uses. A subset bug was found and fixed: nnunet_lowdata._subset used a seeded shuffle, not first-N β€” now patched to first-N (GT-filtered, bit-for-bit verified, ids persisted per JSON). The strongest-NN per cell = max(best-of-breed matched SegFormer-b2 / U-Net-r34, first-N nnU-Net); LLM = the deployed assembly at that budget (fewshot_matched + N=100 deploy/fusion). Ξ” = LLM βˆ’ strongest-NN. Methods note: the trained-NN baselines are NOT from-scratch β€” SegFormer (mit_b2) and U-Net (resnet34) use ImageNet-pretrained encoders; only nnU-Net is trained from scratch. So the LLM's scarce-N wins are against ImageNet-pretrained nets.

Domain N=5N=10 N=25N=50 N=100
ISIC .863 / .787 +.075 .869 / .815 +.054 .870 / .829 +.041 .872 / .832 +.040 .880 / .868 +.012
Prostate .787 / .437* +.350 .792 / .679 +.113 .759 / .720 +.039 .782 / .772 +.010 .801 / .786 +.015
Kvasir β€” / β€” .838 / .756 +.082 .848 / .824 +.024 .861 / .833 +.028 .865 / .889 βˆ’.024
Spleen .757 / β€” .660 / .633 +.027 .660 / .802 βˆ’.143 .826 / .859 βˆ’.033 .920 / .907 +.013
FetalHead .842 / β€” .767 / .923 βˆ’.156 .893 / .958 βˆ’.065 .883 / .965 βˆ’.082 .967 / .964 +.003
CXR .936 / —† .937 / .938 βˆ’.001 .938 / .948 βˆ’.010 .948 / .952 βˆ’.004 .950 / .953 βˆ’.003
LLM/assembly (first number) strongest matched-N net (second) Ξ” > 0 = LLM leads
At N=100 the LLM leads or ties 5/6: Prostate +.015 (fusion .801 vs .786), Spleen +.013, ISIC +.012, FetalHead +.003; CXR βˆ’.003 (near-tie), Kvasir βˆ’.024. In the scarce regime the LLM leads the strongest matched net on ISIC (every N), Prostate (every N), Kvasir (N≀50). *Prostate N=5 = .437 is a degenerate single-volume subset β€” first-N of the slice-ordered pool is 5 consecutive slices of ONE volume; the matched-first-N net is legitimately weak there (fairer to the LLM, which already led). †CXR N=5 SegFormer/U-Net is a deferred cell (per-image matched baselines empty for CXR); other CXR cells use the matched best_nn. Honesty: matched first-N verified bit-for-bit; the shuffle-subset nnU-Net bug is fixed; the Prostate fusion result is leak-free (support/test volumes disjoint, n=30). Machine-readable grid: scratch_fusion/baselines_dataeff.json β€” the same numbers drive the crossover figure and interactive chart below.
new Β· 2026-07-14

Two ways to push the keep-best loop: fusion, and a trained net in the family

gate-free FUSION > keep-best

Prostate STAPLE .7877 β†’ .8011

+.0134 no gate

op_sam and SegGPT over-segment the isodense gland in complementary directions, so their per-pixel intersection = STAPLE is tighter than either β€” and than the deployed edge-gated keep-best β€” with no gate, no val, no threshold. Union HURTS (.719) β†’ the win is complementary-error (variance) reduction, not shared bias. Deployed as seggpt_ensemble.fuse:intersection; leak-free (support/test volumes disjoint, n=30).

βœ“ beats the shipped keep-best, training-free
WITH vs WITHOUT a trained net

The NN adds nothing without complementarity

0 / 100 FetalHead

A fresh N=100 few-shot decoder (leak-free, trained this session) scores .873 but beats the SegGPT base (.967) on 0 of 100 images β†’ the family ORACLE stays exactly at the base. A stronger-but-similar member manufactures no headroom. Fusion needs error complementarity, not member strength β€” which is why the training-free fusion wins on Prostate (a genuinely different drawer) and the trained net is unnecessary.

βœ— NN does not earn its keep β€” a clean negative
the skills

Four transferable decode skills β€” and where each deploys

Every skill is data / numpy, LLM-agnostic, and SkillOpt-developed (rollout β†’ reflect β†’ strict-improve validation gate β†’ converge). They deploy exactly where a valid GT-free signal exists.

GPU-free feedback loop

Draw β†’ GrabCut β†’ genome β†’ judge

0.93 ISIC Β· FetalHead

Claude draws (GT-free), classical GrabCut + numpy genome decodes, a visual judge sends verbal feedback back to the skills. Wins the appearance-cue domains at low N.

βœ“ deployed Β· beats net at every N≀50 on wins
isodense shape-prior

Template placed by a spatial prior

0.002 β†’ 0.643

On isodense CT the boundary is invisible β€” GrabCut carves noise (0.002). A mean-mask template placed by a GT-free localizer recovers it (~250Γ—). A NEW GT-free texture-homogeneity prior then separates the smooth spleen from more-textured wrong blobs, recovering the drift zeros (5β†’1, 0.52β†’0.643, median 0.61β†’0.70); the residual is the caudal-volume location wall, not the prior (oracle @GT-box 0.84 > net).

β—‘ localization-bound below net
vesselness Β· learnable

Frangi β†’ shallow RF decode

0.773 ~tie vs nnU-Net

Thin retinal vessels can't be boxed. A ridge-filter stack feeds a shallow RandomForest (≀10 labels, CPU). Beats the ImageNet-pretrained nets (SegFormer 0.535 / U-Net 0.585) but TIES the strongest net, nnU-Net (~0.772) β€” which is built for thin structures. Honest tie, not the old +0.15 (which excluded nnU-Net). OOD domain, reported separately.

β—‘ ties the strongest net (nnU-Net) on OOD vessels
decode-router

Route by a GT-free cue

isodense β†’ prior

A two-scalar cue (saturation + within-box Otsu separation) routes appearance targets β†’ GrabCut and isodense CT β†’ the shape-prior. Integrates the isodense skill automatically (Spleen 0.002 β†’ 0.438 from routing alone).

βœ“ deployed Β· correct on every domain
The recurring lesson β€” and the honest negatives. Three "push the limit" experiments were run: multiscale (gate-bound, no valid keep-best proxy), mask-refine (mixed β€” snake grow lifts Prostate +0.028, guided lifts ISIC, but Kvasir/CXR gate-bound), and multi-ROI for CXR's two lungs (fixes the bilateral bookkeeping but +0.003 on test β€” doesn't close the soft-diaphragm wall). Across all of them: the bottleneck is the GT-free gate / perception, not the fix. A skill deploys iff a valid signal exists.
rigor & status

Caveats kept in view, and what's still running

  • Corrected margins. The dramatic single-seed leads were an artifact; every number here is vs the strongest matched-N net (SegFormer/U-Net ImageNet-pretrained + nnU-Net from-scratch). At N=10 the net now wins FetalHead (nnU-Net 0.923 > 0.767) β€” the deployed SegGPT drawer still reaches 0.967 at its full K=8 support budget (βˆ’0.004 vs NN); and DRIVE is a tie (nnU-Net 0.772). The scarce-N LLM lead holds on ISIC / Prostate / Kvasir / Spleen.
  • Nets are seed-noisy at low N (Spleen N=10: 0.547 Β± 0.206), and no architecture dominates β€” mit_b3 wins FetalHead, UNet++ wins Kvasir/Spleen, unet-resnet34 wins Prostate. The skill paths are near-deterministic.
  • Subset caveat. Feedback-loop & isodense numbers are on fixed 15–28-image test subsets (medians reported); net & deployed-pipeline numbers are full test.
  • Running now: full-default nnU-Net (1000-epoch, @224, all 6 domains, ~25 h) to make the gold-standard comparison airtight β€” its reduced run already shows nnU-Net@10 weak on Kvasir (0.559) and only a tie on CXR; SegFormer N=100 fill; and the Synapse multi-organ CT run applying the shape-prior + bilateral-kidney multi-ROI to a fresh abdominal dataset.
gpu-free lane

GPU-free feedback loop β€” per-stage SkillOpt & the walls

The classical loop (Claude box β†’ GrabCut / shape-prior / vesselness + numpy genome + judge β€” no SAM, no GPU) was pushed stage-by-stage on all six domains. It beats the net where a geometric/appearance cue exists; elsewhere every stage moved (+0.05–0.09) but hit a GT-box-oracle-proven wall that only the deployed GPU frozen-model lane clears.

Domainbefore [cls]after [cls] Ξ”stage pushedverdict Β· wall
ISIC.923.946 +.023faint-periphery grow (refine) WIN all N β€” beats net (NN .835/.847/.825); worst-case grow 0019910 .836β†’.916
FetalHead.921.940 +.019robust ellipse + gated ring-snap (refine) WIN all N β€” beats net (NN .583/.800/.883); worst-3 fixed 2/3
Kvasir.678.844 +.166drawer per-image re-box worst-3 fixed 3/3 (.17β†’.86) β€” drawer localizes by shape, not colour
Prostate.703.763 +.060cross-slice volume gate WIN N=50 (.763>NN .756) β€” cross-slice gate rescues apex/base 3/3
CXR.842.881 +.039soft-border wall LOSS β€” deployable static-box 0.8817 (= GT-oracle-box decode exactly; box near-constant); worst-3 trim valid but wrong geometry; soft-border wall β†’ [gpu]
Spleen.50.643 +.14texture-homogeneity prior (preprocess→localize) NEW GT-free feature — texture separates the smooth spleen from textured wrong blobs; drift zeros 5→1, median .61→.70; residual caudal-volume location wall → [gpu]
Every stage moved β€” but perception is the wall. The GPU-free classical loop cleanly beats the net at N=25/50 on ISIC & FetalHead (geometric/appearance cue); on the other 4 every stage was pushed (+0.05–0.09) but each hit a GT-box-oracle-proven wall needing the deployed GPU frozen-model lane. The decisive lever differs per domain β€” drawer re-box (Kvasir), cross-slice volume gate (Prostate), faint-periphery grow (ISIC), robust-ellipse refine (FetalHead); a NEW GT-free texture-homogeneity prior then lifted Spleen 0.52β†’0.643 (drift zeros 5β†’1), leaving CXR the one clean perception wall.
Worst-case fixes β€” 4 wins, 2 walls. Six agents each attacked the worst-3 of one domain. 4/6 fixed, and every win landed at a different pipeline stage: the drawer (Kvasir per-image re-box, 3/3, .17β†’.86), a cross-slice volume gate (Prostate apex/base collapse, 3/3, now beats NN at N=50), and two refines (ISIC geodesic faint-periphery grow 1/3; FetalHead gradient-weighted robust ellipse 2/3) β€” all GT-free, near-zero regression. The other 2 are perception walls: CXR’s worst-3 over-extension is at lung intensity (a valid trim, wrong geometry) and Spleen’s spleen_40 is caudal, outside the train location atlas (two-walls). Montages below.
The loop is now a reusable meta-harness. The worst-case-driven SkillOpt loop is packaged as worstcase_loop.py: eval β†’ rank worst-3 β†’ an agent diagnoses {failure_mode, responsible_stage, proposed_fix} β†’ apply-and-gate (VAL strict-improve + non-regression) β†’ loop until the two-walls stop (gate-wall: can't separate at the decision boundary; headroom-wall: no better candidate in the family). An ISIC dry-run correctly REJECTED a non-improving edit (grow_frac 0.05β†’0.12, VAL 0.9443β†’0.9416) without mutating the deployed config β€” reproducing the documented two-walls finding. It frames the whole project's method as an automatable loop over the non-NN classical pipeline.
Domain-agnostic router. One GT-free router β€” zero domain names β€” routes 7/7 domains to their winning decode skill, non-regression PASS (|Ξ”|≀0.003), with honest [cls] / [gpu] labels. Routing among the frozen GPU drawers is the open problem.
frozen-nn lane

Pipeline WITH frozen NN β€” the deployed [gpu] backends

The SAME LLM-agnostic pipeline, but the drawer/decoder seam is a frozen neural backend (op_sam / SegGPT / SAM) β€” no gradient training on the target task (one few-shot alt lane, noted). Frozen models + a few labeled support images = the same few-label budget as the genome fit. This lane closes the perception-wall domains the classical [cls] lane can't reach, to β‰ˆNN β€” training-free. The [cls] deployed column is carried alongside so the two lanes read as a pair.

Domain[cls] deployed[gpu] frozen-NN drawer / decoderbest-NNvs best-NN
ISIC.9458.880 genome + SAM-forced.866 +.014
FetalHead.9400.9667 SegGPT in-context, K=8 query-retrieval training-free Β· few-shot alt .9328.9703 βˆ’.004
Kvasir.8440.8646 op_sam DINOv2-corr localizer β†’ frozen SAM Β· median .9484.889 βˆ’.025
Prostate.7633.8011 SegGPTβŠ•op_sam gate-free intersection fusion Β· 0.760β†’0.7877 keep-bestβ†’0.8011 fusion Β· median .8476.816 βˆ’.015
CXR.8817.9497 SegGPT in-context, K=8 training-free Β· few-shot alt .9488.9546 βˆ’.005
Spleen.6432.920 frozen SAM + within-volume prior + pyramid keep-best Β· median .926.907 +.019
Within ≀0.005 of best-NN on 4/6 domains, LEADS on ISIC (+0.014) & Spleen (+0.019), and all 6 deployed paths are TRAINING-FREE β€” frozen models + a few labeled support images (the same few-label budget as the genome fit), zero gradient training on the target task. FetalHead and CXR each also have a few-shot-tuned decoder ALT lane (.9328 / .9488), but the deployed path on both is the training-free SegGPT in-context drawer. FetalHead βˆ’0.004 and CXR βˆ’0.005 are near-ties; Kvasir (βˆ’0.025) and Prostate (βˆ’0.028) are the two residual perception gaps.
The two tables are a pair. β€œPipeline WITHOUT NN” [cls] (classical, GPU-free, CPU β€” Claude box β†’ GrabCut / shape-prior / vesselness + numpy genome) vs β€œPipeline WITH frozen NN” [gpu] (frozen SAM / SegGPT / op_sam, GPU). The [cls] lane wins the scarce-label regime on the appearance / geometry domains (ISIC, FetalHead); the [gpu] lane closes the perception-wall domains (Spleen, CXR, Kvasir) to β‰ˆNN, training-free. Both lanes are LLM-agnostic and label-scarce β€” only the drawer/decoder seam swaps.
Failure analysis

Worst-case fixes β€” 4 wins at 4 stages, a texture-perception recovery, 1 residual wall

Six feedback-loop agents each targeted the three lowest-Dice test images of one domain. Four were fixed and land at a different pipeline stage each — the drawer (Kvasir re-box), a cross-slice volume gate (Prostate), and two mask refines (ISIC grow, FetalHead robust ellipse). For those four the montage is before→after: green = GT, red = pre-fix prediction, blue = post-fix. A fifth — Spleen — was then recovered by a NEW GT-free texture-homogeneity discriminant (drift zeros 5→1); only CXR remains a clean perception wall (worst-3 GT-vs-prediction overlay).

Kvasir worst-3 before to after: GT (green) with pre-fix prediction (red) beside post-fix prediction (blue)
Kvasir Β· Endoscopy worst-3 fixed 3/3 0.771β†’0.844 Β· drawer per-image re-box
green GT Β· red pre-fix Β· blue post-fix. polyp β‰ˆ mucosa mislocalization. The LLM drawer re-places the box on the visible smooth, vessel-free polyp using shape/texture cues the colour GMM can’t use β€” recovering all three near the GT-box oracle (0.17β†’0.86). Boxes are per-image, so the 12 good frames are bit-identical (zero regression).
Prostate worst-3 before to after: GT (green) with pre-fix prediction (red) beside post-fix prediction (blue)
Prostate Β· T2 MRI worst-3 fixed 3/3 0.751β†’0.763 Β· cross-slice volume gate
green GT Β· red pre-fix Β· blue post-fix. isodense apex/base collapse. A GT-free CROSS-SLICE (volume) area/centroid gate flags the collapsed slices and re-selects the family candidate on the volume trajectory; good slices are untouched (zero regression). The loop now beats matched-NN at N=50 (0.763 > 0.756).
ISIC worst-3 before to after: GT (green) with pre-fix prediction (red) beside post-fix prediction (blue)
ISIC Β· Dermoscopy worst-3 fixed 1/3 0.940β†’0.9458 Β· geodesic faint-periphery grow (refine)
green GT Β· red pre-fix Β· blue post-fix. faint diffuse periphery. A colour-distance geodesic GROW keyed to the inner-boundary LAB colour follows the fade outward, gated GT-free (osim + box_fill). It fires on the one growable case (0019910 0.836β†’0.916); the other two are genuinely un-growable (a precision case / no colour-coherent extent) β€” zero regression.
FetalHead worst-3 before to after: GT (green) with pre-fix prediction (red) beside post-fix prediction (blue)
FetalHead Β· Ultrasound worst-3 fixed 2/3 0.9357β†’0.9400 Β· gradient-weighted robust ellipse + gated ring-snap (refine)
green GT Β· red pre-fix Β· blue post-fix. acoustically-dropped skull walls. A Sobel-gradient-weighted ellipse fit is dominated by the true bright ring and EXTRAPOLATES the missing wall (673 0.889β†’0.899, 108 0.898β†’0.911). The very worst case (154) β€” a strongly-tilted GT whose inferior wall is genuinely absent β€” stays a residual.
CXR three worst cases: input with GT contour (green) and prediction (red)
CXR Β· Chest X-ray perception wall β€” no GT-free fix worst-3 Dice 0.73 Β· 0.78 Β· 0.81
green GT Β· red prediction. soft-border wall. The addressable bright-abdomen diaphragm bleed IS trimmable (VAL +0.001, recovers 0.79β†’0.85), but the TEST worst-3 over-extension is a lateral/medial box-corner fill at LUNG intensity (0.44–0.55), a wide block β€” indistinguishable from lung by any CPU brightness cue. Trim valid but wrong geometry: no worst-3 recovery. CXR's deployed number is a GT-free static per-lung box (mean of N=25 train GT boxes), 0.8817 β€” NOT a GT-oracle ceiling: the static box reproduces the GT-oracle-box decode exactly (0.8812 static = 0.8812 oracle) because CXR anatomy makes the box near-constant, so box localization was never the CXR gap. Confirmed a clean perception wall from both sides β€” a preprocess/localize perception push (bilateral+unsharp +0.0005 TEST; homomorphic/rib-suppression rejected) AND a boundary-refine shape-prior push (lung shape atlas, all 14 configs regressed VAL) both failed to beat the soft diaphragm/costophrenic wall.
Spleen three worst cases: input with GT contour (green) and prediction (red)
Spleen Β· CT (isodense) texture-perception recovery 0.52β†’0.643 Β· median 0.61β†’0.70 Β· drift zeros 5β†’1
green GT Β· red pre-fix Β· blue post-fix. A NEW GT-free texture-homogeneity discriminant (a local-std map computed in preprocessβ†’localize) separates the smooth isodense spleen from more-textured wrong blobs, flipping blob selection on the drift zeros: spleen_21_z041 0.00β†’0.72 (fully recovered), spleen_40 caudal 0.00β†’0.21–0.37 (partial). This relocates the two-walls story β€” the drift zeros were a MISSING feature, not an absent one β€” while the caudal-volume location wall (spleen_40 sits outside the train location atlas 108–143) remains, quantified. A decode-stage locate-and-trim skill (homogeneity_organ_constraint) then constrains the mask to the homogeneous organ region and trims the non-organ bleed β†’ 0.639β†’0.6432, zero-regression; the worst over-extension spleen_44_z066 0.335β†’0.795 (a 5Γ— bleed trimmed). Gate-bound (only absolute kept-area separates over-extension from mislocalization), so modest but real.
4 stage-wins, a texture recovery, 1 residual wall. The fixable tails were fixed by whichever stage owned the error: drawer (Kvasir per-image re-box, 3/3, 0.17β†’0.86), cross-slice gate (Prostate volume-consistency, 3/3, now beats NN at N=50), and refine Γ—2 (ISIC geodesic grow 1/3; FetalHead gradient-weighted ellipse 2/3) β€” all GT-free and (bar FetalHead’s tilted residual) zero-regression. Perception push (preprocess+localize): a NEW GT-free texture-homogeneity discriminant then recovered Spleen’s drift zeros (5β†’1, 0.52β†’0.643, median 0.61β†’0.70) β€” relocating the two-walls story: those zeros were a MISSING feature, not an absent one; the caudal-volume location wall remains, quantified. Only CXR stays a clean wall: its worst-3 over-extension is at lung intensity (a valid trim, wrong geometry). Perception, or its GT-free proxy, remains the lever β€” not iteration.
structured failure attribution

Where each lane fails β€” one structured decomposition, run on both lanes

The same 6 domains, attributed with an identical structured failure decomposition (an S sub-skill breakdown β†’ a Linker that names the responsible sub-skill β†’ a two-walls verdict), run on both deployed lanes: the NN-free classical drawer [cls] and the frozen-NN backend [gpu] (op_sam / SegGPT / SAM). This is the evidence map β€” where and why each lane fails, and what the gap between them reveals.

Domain NN-free [cls] β€” responsible / wall frozen-NN [gpu] β€” responsible / wall cross-lane verdict
ISIC S_prompting / S_refinement β€” no_gt_free_gate S_refinement β€” no_family_headroom (genomeβ‰ˆNN) PERSISTS
refinement gate; frozen-NN can't beat the genome (SegGPT +0.11 measured, not deployed)
FetalHead S_refinement (ellipse over-seg) β€” gate S_model_selection (support-dependence: 3/22 β†’ dice 0.0) FLIPS
refine β†’ model_selection; a NEW failure mode absent classically
Kvasir S_prompting / S_segmentation β€” no_gt_free_gate (polypβ‰ˆmucosa) S_model_selection / S_prompting (mislocalization tail) PARTLY DISSOLVES
op_sam localizes (0.865), but the grow/boundary gate persists
Prostate S_prompting / S_refinement β€” gate / no_family_headroom S_model_selection (SegGPTβŠ•op_sam) β€” residual no_family_headroom PARTLY DISSOLVES
complementary drawer drops the gate wall (+0.0277); isodense residual persists (βˆ’0.028 to NN)
CXR S_segmentation / S_prompting (soft-border bleed) β€” no_gt_free_gate S_segmentation β€” low-severity boundary noise (held-out 0.9512) DISSOLVES
the SegGPT backend swap kills the soft-border wall
Spleen S_prompting / mislocalize (isodense location) β€” no_gt_free_gate (isodense β†’ SAM + volume) boundary_drift DEPLOYS (edges = anatomy) DISSOLVES
SAM + within-volume prior (0.920, beats NN)
  • S_model_selection is the frozen-NN lane's signature sub-skill β€” the Linker's top cause on 4/6 domains β€” and it does not exist on the classical single-drawer lane (never the argmax there). Choosing the frozen backend (op_sam vs SegGPT vs SAM vs few-shot) IS a procedural skill, and it is where the frozen lane's residual failures concentrate β€” FetalHead SegGPT support-dependence: the in-context drawer draws NOTHING on 3/22 held-out β†’ dice 0.0, unrecoverable by any refine/QC edit.
  • Backend swap dissolves ~half the classical walls; the other half persist. CXR (soft-border), Spleen (isodense location) and Kvasir-localization DISSOLVE (the NN-free escape grabcutβ†’SegGPT / β†’op_sam was correct); ISIC-refinement, Kvasir-grow (polypβ‰ˆmucosa) and Prostate-isodense-residual PERSIST across BOTH lanes. The NN-free lane's cross_lane_escape field predicted which would dissolve.
  • failure_type ↔ wall is a DOMAIN property, not a type property. boundary_drift DEPLOYS on Spleen (edges are anatomy, +0.027) yet is gate-bound on Kvasir/CXR; the same F row resolves oppositely by domain. So the two-walls law is read off the domain, not the failure label.
Provenance, kept honest. NN-free: all 6 freshly measured test-blind (held-out opt splits). Frozen-NN: FetalHead + CXR freshly measured test-blind (held-out Training, GPU); ISIC / Kvasir / Spleen / Prostate doc-grounded from the deployed path + documented residual (worst-case ids marked (repr)), because the full op_sam+SAM+3D stack on held-out was out of scope in one foreground GPU pass.
Does it push the limit? (rigor). Under strict test-blind discipline (held-out select β†’ one-shot test), the classical lane is at its perception ceiling: the all-6 worstcase_loop run moved only FetalHead (+0.0014, the gated ring-snap ellipse β€” the ONE edit that survived across all six domains). The structured F shows 15/18 residuals are no_gt_free_gate with every escape out-of-lane. Both advanced levers β€” a few-shot learned gate and a per-image drawer-swap router β€” confirmed the two-walls law rather than broke it. What DOES push numbers is the domain-level drawer swap (S_model_selection), already deployed per-domain: CXRβ†’SegGPT 0.95, Spleenβ†’SAM 0.92, Kvasirβ†’op_sam 0.86. The loop's contribution is auditable diagnosis + routing to that swap β€” not squeezing post-processing. And the gate-walls are now confound-free β€” re-tested with Claude-drawn held-out boxes (regime-matched to the deployed test), the residual headroom still does not transfer: genuine perception walls, not a GT-box artifact (the de-confounding did correct two prior framings β€” Kvasir’s β€œsignal” was the box regime; ISIC post_grow is neutral, not negative).
out-of-distribution Β· 2026-07-15

DRIVE retinal vessels β€” the honest TIE (reported separately)

DRIVE (12 train / 6 test) is the OOD domain β€” a thin whole-image vessel tree, a hard fit for every method. 3-seed, first-N, 224 Dice, same protocol as the 6 domains but reported separately.

methodN=5N=10note
SegFormer-b2 (ImageNet-pretrained)0.5350.548representation-mismatch for filaments
U-Net-r34 (ImageNet-pretrained)0.5850.606
nnU-Net (from scratch)0.772fillingfar stronger on vessels β€” built for it
pipeline few-shot vessel skill~0.773~0.773Frangi + learnable RF decode
The honest read: the strongest-NN baseline on DRIVE is nnU-Net (~0.772 at N=5), not SegFormer/U-Net (0.53–0.61) β€” nnU-Net is built for exactly this thin-structure task. The pipeline's few-shot vessel skill (~0.773) therefore TIES nnU-Net, it does not beat it by +0.15. That old +0.15 framing compared only against the (weaker) SegFormer/U-Net and excluded nnU-Net β€” corrected here. The full 3-seed nnU-Net DRIVE CI is filling via the detached sweep.
the NN-free lane

Fully GPU-free: LLM polygon + numpy genome + crop-zoom

The most label- and compute-lean lane touches no GPU and no neural net at all: Claude traces a polygon, a numpy genome refines it, and an optional crop-zoom re-draws small targets. nβ‰ˆ20/domain.

domainbase (GPU-free)+ crop-zoomΞ”deployed-NN (ref)
Spleen0.3400.383+0.0430.920
ISIC0.8380.840+0.0020.880
Prostate0.5880.589+0.0010.801
Kvasir / CXR / FetalHead~no-op (crop-zoom)~00.865 / 0.950 / 0.967
Crop-zoom is a real but NARROW lever: it helps only small + localizable targets (Spleen +0.043 β€” tiny tip slices) and is a no-op on frame-filling targets (SIZE law again). ISIC's genome path IS this GPU-free lane (0.840, near its deployed 0.880). The point of the lane is not to top the table but to show a fully NN-free path exists and is competitive where the target has an appearance cue; elsewhere the deployed frozen-NN lane (SAM / SegGPT / op_sam, right column) carries it β€” still training-free.
with-NN control Β· 2026-07-15

Few-shot fine-tuning the pipeline's OWN SAM-HQ backbone loses to training-free

The fair "does a trained net help?" control: few-shot fine-tune the ACTUAL frozen backbone the pipeline uses β€” SAM-HQ vit_l β€” on N labels (mask_decoder only, encoder+prompt frozen, leak-free), then deploy it (decode from the deployed localizer box, NOT the GT box). Compare to the training-free deployed pipeline.

domainSAM-HQ few-shot (deployable)training-free deployedΞ”
Prostate0.76 (N5–25 flat)0.8011βˆ’0.04
Kvasir0.8530.865βˆ’0.012
ISIC0.8580.880βˆ’0.022
FetalHead0.810.967βˆ’0.16
A strong "with-NN doesn't help" result: fine-tuning the pipeline's own SAM-HQ vit_l backbone few-shot is BELOW the training-free pipeline on every domain tested (N=10). The deployable decode is bounded by the localizer box (the GT-box oracle in fewshot_decoder_dataeff.json is the upper bound), and the training-free assembly still wins. The full N∈{5..100} Γ— 3-seed grid + Spleen/CXR (deployed-box caches) are filling; DRIVE is a box-SAM poor-fit (filaments, flagged). SegGPT fine-tune was NOT built (kept frozen/in-context by design).