Training-free LLM segmentation vs trained networks

A frozen LLM traces the target GT-free and a tiny numpy post-process refines it — no neural network is trained. Here it is compared against a U-Net trained at matched label budgets (N = 10, 25, 50, 100) across four modalities. The LLM line is flat (it never trains); the NN line climbs with labels. Where they cross is the whole story.

Data-efficiency at matched label budget

Training-free LLM+SAM (red dashed; red dot = its actual fitting N) vs a trained U-Net (blue) at matched N. The whole pipeline is fit on ≤40 labels (ISIC 40, spleen 14, chest X-ray 10, polyp 7 — drawing is GT-free; only the genome/preprocess/SAM-pad params touch labels). At those matched budgets the LLM beats the U-Net on ISIC (+0.06), polyp (+0.15) and spleen (+0.04), and is within 0.012 on chest X-ray. Small fitting sets carry sampling noise — the direction (LLM competitive in the scarce-label regime) is the claim, not the exact per-domain Δ.

Summary — new pipeline (LLM + frozen SAM) vs trained NN

DatasetLLM pipeline (training-free)LLM old→newNN N=10N=25N=50N=100Crossover
ISIC 2018draw → numpy genome (pigment cue); SAM gated OFF0.882→0.892 (+0.01)0.7490.8300.8280.858never (≤100)
Kvasir-SEGdraw → frozen SAM decoder (no GT-free cue)0.580→0.783 (+0.20)0.6280.7770.8080.845N≈50
Chest X-rayCLAHE → draw 2 lungs → SAM per-component + box-pad → darkness-grow0.788→0.913 (+0.12)0.9250.9430.9500.956N≈10
SpleenCT contrast (soft-tissue window+CLAHE) → relocate → SAM → SHRINK genome0.420→0.632 (+0.21)0.5370.6860.8380.885N≈25
All pipelines are training-free (frozen LLM draws + frozen SAM + numpy, ≤8 genome params fit on a few labels — no target-task NN trained). The router picks each domain's path GT-free: cue-rich → numpy genome (ISIC); no boundary cue → frozen SAM decoder (polyp/lung/spleen); SAM never touches a cue-rich genome boundary. Red cells = the training-free LLM matches/beats the trained net at that budget. NN = U-Net/resnet34, ImageNet-pretrained.

ISIC 2018 (dermoscopy)

Dermoscopy

NLLMNN
100.8920.749
250.8920.830
500.8920.828
1000.8920.858
Cue-rich pigment boundary → the numpy genome recovers it (0.892), beating the trained net at every N≤100. SAM is gated OFF here (it would regress an already-good boundary: 0.887→0.817). The standout positive case.
GTLLMNN @N
✓ Good cases
isic · ISIC_0036159
raw image
ground truth
LLM
0.99
NN N=10
0.91
NN N=25
0.91
NN N=50
0.95
NN N=100
0.94
isic · ISIC_0023694
raw image
ground truth
LLM
0.95
NN N=10
0.77
NN N=25
0.92
NN N=50
0.93
NN N=100
0.95
isic · ISIC_0023836
raw image
ground truth
LLM
0.97
NN N=10
0.86
NN N=25
0.96
NN N=50
0.96
NN N=100
0.97
✗ Bad cases
isic · ISIC_0023306
raw image
ground truth
LLM
0.17
NN N=10
0.54
NN N=25
0.30
NN N=50
0.15
NN N=100
0.04
isic · ISIC_0022313
raw image
ground truth
LLM
0.06
NN N=10
0.36
NN N=25
0.35
NN N=50
0.71
NN N=100
0.52
isic · ISIC_0022007
raw image
ground truth
LLM
0.06
NN N=10
0.04
NN N=25
0.13
NN N=50
0.10
NN N=100
0.15

Kvasir-SEG (polyp / endoscopy)

Polyp / endoscopy

NLLMNN
100.7830.628
250.7830.777
500.7830.808
1000.7830.845
No GT-free boundary cue (polyp ≈ mucosa) → a FROZEN SAM decoder, box-prompted by the LLM draw, recovers the boundary the polygon can't: 0.58 → 0.783, now BEATING the NN @N=25 (0.750), with zero target-task labels.
GTLLMNN @N
✓ Good cases
kvasir · cju7fq7mm2pw508176uk5ugtx
raw image
ground truth
LLM
0.97
NN N=10
0.79
NN N=25
0.82
NN N=50
0.94
NN N=100
0.92
kvasir · cju5o1vu9gz8a0818eyy92bns
raw image
ground truth
LLM
0.98
NN N=10
0.72
NN N=25
0.95
NN N=50
0.93
NN N=100
0.96
kvasir · cju7amjna1ly40871ugiokehb
raw image
ground truth
LLM
0.94
NN N=10
0.69
NN N=25
0.91
NN N=50
0.96
NN N=100
0.96
✗ Bad cases
kvasir · cju3xl264ingx0850rcf0rshj
raw image
ground truth
LLM
0.18
NN N=10
0.72
NN N=25
0.70
NN N=50
0.96
NN N=100
0.95
kvasir · cju5u8gz4kj5b07552e2wpkwp
raw image
ground truth
LLM
0.46
NN N=10
0.13
NN N=25
0.56
NN N=50
0.01
NN N=100
0.42
kvasir · cju884985nlmx0817vzpax3y4
raw image
ground truth
LLM
0.07
NN N=10
0.26
NN N=25
0.55
NN N=50
0.88
NN N=100
0.85

Chest X-ray (lung fields)

Chest X-ray

NLLMNN
100.9130.925
250.9130.943
500.9130.950
1000.9130.956
Two lung fields → SAM PER-COMPONENT (one box per lung) recovers the precise boundary, then a darkness-grow recovers under-segmentation: 0.79 → 0.913 (box-padding recovers the costophrenic recesses the LLM oval misses), near the trained NN (0.925), GT-free. The per-component prompt was essential (single-box hurts: 0.72).
GTLLMNN @N
✓ Good cases
lungseg · MCUCXR_0150_1
raw image
ground truth
LLM
0.84
NN N=10
0.89
NN N=25
0.91
NN N=50
0.91
NN N=100
0.93
lungseg · CHNCXR_0330_1
raw image
ground truth
LLM
0.96
NN N=10
0.96
NN N=25
0.97
NN N=50
0.98
NN N=100
0.98
lungseg · CHNCXR_0421_1
raw image
ground truth
LLM
0.89
NN N=10
0.94
NN N=25
0.95
NN N=50
0.96
NN N=100
0.95
✗ Bad cases
lungseg · CHNCXR_0229_0
raw image
ground truth
LLM
0.86
NN N=10
0.91
NN N=25
0.94
NN N=50
0.94
NN N=100
0.94
lungseg · MCUCXR_0055_0
raw image
ground truth
LLM
0.90
NN N=10
0.96
NN N=25
0.97
NN N=50
0.97
NN N=100
0.98
lungseg · CHNCXR_0027_0
raw image
ground truth
LLM
0.91
NN N=10
0.94
NN N=25
0.95
NN N=50
0.95
NN N=100
0.96

Spleen (abdominal CT)

Abdominal CT

NLLMNN
100.6320.537
250.6320.686
500.6320.838
1000.6320.885
Small invisible-boundary organ → a soft-tissue window relocates the mislocated draw, then SAM decodes: 0.22 → 0.42 → 0.63 (CT-contrast preprocess before SAM + a genome FIT on the SAM masks — they slightly OVER-cover, so a shrink trims them; a chest-X-ray grow had wrecked it). Still below the NN (0.70@25) — the residual bottleneck is LOCALIZATION (SAM is prompted by a weak 0.42 draw), not the boundary.
GTLLMNN @N
✓ Good cases
spleen · spleen_8_z024
raw image
ground truth
LLM
0.86
NN N=10
0.68
NN N=25
0.49
NN N=50
0.91
NN N=100
0.96
spleen · spleen_33_z057
raw image
ground truth
LLM
0.94
NN N=10
0.72
NN N=25
0.70
NN N=50
0.81
NN N=100
0.96
spleen · spleen_6_z098
raw image
ground truth
LLM
0.95
NN N=10
0.71
NN N=25
0.90
NN N=50
0.86
NN N=100
0.96
✗ Bad cases
spleen · spleen_21_z058
raw image
ground truth
LLM
0.78
NN N=10
0.55
NN N=25
0.94
NN N=50
0.85
NN N=100
0.87
spleen · spleen_21_z041
raw image
ground truth
LLM
0.00
NN N=10
0.36
NN N=25
0.52
NN N=50
0.65
NN N=100
0.59
spleen · spleen_40_z068
raw image
ground truth
LLM
0.69
NN N=10
0.70
NN N=25
0.75
NN N=50
0.95
NN N=100
0.96