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.
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).
| Domain | Modality | Target contrast cue | best net @10 | LLM skill @10 | Ξ | skill path |
|---|
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).
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=5 | N=10 | N=25 | N=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 |
Two ways to push the keep-best loop: fusion, and a trained net in the family
Prostate STAPLE .7877 β .8011
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).
The NN adds nothing without complementarity
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.
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.
Draw β GrabCut β genome β judge
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.
Template placed by a spatial prior
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).
Frangi β shallow RF decode
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.
Route by a GT-free cue
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).
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 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.
| Domain | before [cls] | after [cls] | Ξ | stage pushed | verdict Β· wall |
|---|---|---|---|---|---|
| ISIC | .923 | .946 | +.023 | faint-periphery grow (refine) | WIN all N β beats net (NN .835/.847/.825); worst-case grow 0019910 .836β.916 |
| FetalHead | .921 | .940 | +.019 | robust ellipse + gated ring-snap (refine) | WIN all N β beats net (NN .583/.800/.883); worst-3 fixed 2/3 |
| Kvasir | .678 | .844 | +.166 | drawer per-image re-box | worst-3 fixed 3/3 (.17β.86) β drawer localizes by shape, not colour |
| Prostate | .703 | .763 | +.060 | cross-slice volume gate | WIN N=50 (.763>NN .756) β cross-slice gate rescues apex/base 3/3 |
| CXR | .842 | .881 | +.039 | soft-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 | +.14 | texture-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] |
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 / decoder | best-NN | vs 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 |
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).
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).
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).
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.
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.
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.
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.
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.
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.
| method | N=5 | N=10 | note |
|---|---|---|---|
| SegFormer-b2 (ImageNet-pretrained) | 0.535 | 0.548 | representation-mismatch for filaments |
| U-Net-r34 (ImageNet-pretrained) | 0.585 | 0.606 | |
| nnU-Net (from scratch) | 0.772 | filling | far stronger on vessels β built for it |
| pipeline few-shot vessel skill | ~0.773 | ~0.773 | Frangi + learnable RF decode |
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.
| domain | base (GPU-free) | + crop-zoom | Ξ | deployed-NN (ref) |
|---|---|---|---|---|
| Spleen | 0.340 | 0.383 | +0.043 | 0.920 |
| ISIC | 0.838 | 0.840 | +0.002 | 0.880 |
| Prostate | 0.588 | 0.589 | +0.001 | 0.801 |
| Kvasir / CXR / FetalHead | ~no-op (crop-zoom) | ~0 | 0.865 / 0.950 / 0.967 | |
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.
| domain | SAM-HQ few-shot (deployable) | training-free deployed | Ξ |
|---|---|---|---|
| Prostate | 0.76 (N5β25 flat) | 0.8011 | β0.04 |
| Kvasir | 0.853 | 0.865 | β0.012 |
| ISIC | 0.858 | 0.880 | β0.022 |
| FetalHead | 0.81 | 0.967 | β0.16 |