A Translator with a Pocket Dictionary: Teaching a Neural Network with Just a Few Masks ✛

Original: "Exemplar: Classical Priors Complement Frozen Features for Few-Shot Microscopy Segmentation at Native Resolution"
arXiv:2609.03080v1 · 2026-09-02 · CC BY 4.0 · 3 min
A lightweight classifier on frozen features and classical filters segments eleven biomedical datasets from a handful of annotated masks.

A translator who checks both years of experience and a pocket dictionary translates more accurately than one who relies on either alone. In microscopy image segmentation, the role of experience is played by frozen features from a large neural network, while the dictionary is a set of classical filters computed directly from the image. When annotation is scarce, combining them in a single lightweight head yields results that are unattainable separately.

A biologist wanting to segment structures in a new set of images is usually offered two paths. Specialized tools like Cellpose or StarDist recognize cells well but are not suitable for vessels or membranes, and retraining them requires new annotations. Promptable models from the Segment Anything family are more versatile, but they must be controlled at inference time rather than tuned to the task with a small number of examples. The Exemplar method takes a third path: it takes a pretrained DINOv3 network, freezes its weights, and adds a small trainable head on top. The head looks at two scales: a coarse grid over the whole frame and a fine grid obtained by windowing. Both scales are projected to 32 channels and upsampled to the original resolution using a guided filter that learns to deviate from bilinear interpolation only along edges.

In parallel, a fixed bank of 35 classical filters is computed from the grayscale image: Frangi vesselness with polar splitting, Laplacian of Gaussian responses, Sauvola adaptive thresholds, structure tensor eigenvalues, gradient magnitude, and normalized intensity. All 99 channels (32+32+35) are combined with a 1×1 convolution, then a GELU nonlinearity, and another convolution that yields the foreground map.

Experiments on eleven biomedical datasets show that with eight support masks, Exemplar achieves a mean of 0.782 on the assigned metrics. Against five direct-pass methods, it leads in 54 of 55 comparisons, of which 52 remain significant after Holm correction. With one support mask, Exemplar scores 0.703 across all eleven datasets, whereas the best direct method with sixteen masks reaches only 0.519. Compared with nnU-Net trained from scratch on the same masks, with eight masks nnU-Net is ahead (0.803 vs. 0.782), but with one mask Exemplar wins (0.703 vs. 0.682), and its training time is 16–77 times shorter.

Ablation reveals why both sources are needed. The classical prior bank alone gives 0.693, frozen features give 0.672, and together they give 0.782. The bank is stronger on thin structures, such as retinal vessels, where it adds 0.225 to the centreline Dice metric. Frozen features handle spheroids better. Before this work, it was unclear which source is stronger when few dense masks are available and whether they can be combined profitably. Now it is clear: they complement each other rather than compete.

The head contains 358,068 parameters, which is 0.12% of the frozen backbone. Training takes from 29 to 550 seconds per set of support masks.

A translator with a pocket dictionary is already useful in the lab. The method can be applied to quickly annotate new microscopy datasets when only a few annotated images are available, especially if the structures are thin or heterogeneous. The next step is to replace gradient-based optimization of the head with a closed-form or incremental update, so the model can be retrained in seconds as each new mask is added. Then the translator will not only translate but also suggest which image to annotate next.

The classical filter bank, which is frozen and not trained in this work, originally served as a standalone segmenter in a previous paper by the same authors. Now it acts as a 'prior' providing structural information, and its contribution is especially noticeable on retinal vessels, where it adds 0.225 to the centreline Dice metric.

The idea of combining 'frozen' knowledge from a large model with simple, interpretable rules echoes the approach in Ted Chiang's story 'The Lifecycle of Software Objects', where digital beings learn from few examples by combining innate instincts and acquired experience.