# L9 Same-slide reference gallery

Status: tiny oracle-label replay ready for review. [Result page](../results/l9/). This is a construction check, not a timing study.

R7's fixed gallery contains 12 UDE examples from four source-slide filename groups, four examples per genus. Three separate labeled UDE cutouts were subsequently selected from the same source-slide group as R7's final three query cutouts, one for each genus. Their dataset-provided labels stand in for prior expert confirmations. The three earlier references and three queries have distinct annotation IDs. The within-slide order is synthetic, and sample-level independence from the original gallery is not proven.

Use the same frozen ImageNet ResNet-18 and image preprocessing as R7. Search the three queries against the fixed gallery, then repeat after adding the three same-slide references. At the genus level the nearest neighbor is unchanged in all three: two match the dataset label and one does not. The Navicula query's nearest individual changes to the newly added same-slide reference. Top-neighbor scores can only remain equal or increase as the gallery expands, so that change by itself is not evidence of better identification. There are no measured reviewer interactions or timings.

The result is too small and selected to support estimates of classification or time savings. The value of same-slide references is still untested in the Academy's live workflow. To evaluate it, replay many independently labeled specimens in realistic stage order, reveal labels only after a simulated analyst decision, and compare fixed and growing galleries, including the first encounter of every taxon, rejected predictions, and held-out specimens. Track accuracy, review time and unfamiliar taxa.

Reproduce using `research/l9_extend.py` to obtain the three public UDE cutouts and `research/l9_gallery.py` to compute the replay. These require the UDE metadata and temporary ResNet weights described in R7. The [same-slide reference manifest](../results/l9/same-slide-reviewed.json) and [replay results](../results/l9/gallery-replay.json) preserve the exact choices. Dataset credit and license are in [R7](R7.md).

## Larger oracle replay on one cached slide · 2026-12-01

The R14 archive-prefix recovery provides 61 cutouts from one public UDE source-slide identifier, selected by archive order rather than random sampling. Restrict to the five genera with at least three images each: 50 cutouts total. Shuffle with fixed seed 20261201, seed a same-slide gallery with one public-labeled cutout per genus, and use the remaining 45 as sequential queries. Frozen ResNet-18 cosine retrieval uses either the original five-image gallery throughout, or an expanding gallery that adds each query **after** its answer is predicted, using the public label as an oracle stand-in for a reviewer. The order is random, not the actual microscope traversal, and the gallery begins with all five genera already known. [Inspect each comparison](/results/l9/prefix-gallery-replay.html) and [download the replay](/results/l9/prefix-gallery-replay.json).

Each method's top reference matched the recorded genus on 24 of 45 queries. Six matches were gained and six were lost by the growing gallery; 34 queries changed their nearest individual reference. These are paired observations sharing a single image source and gallery history, not independent trials. An image's higher nearest-neighbor similarity in a larger gallery is expected by construction and does not indicate correctness. No rejection, identification correction time, unknown genera, or cold-start performance was tested.

These data are selected from one archive prefix, not representative Academy samples; species labels and candidate boundaries are unverified for our purpose. Some cutouts can contain other specimens and distinct annotation IDs do not prove independent specimens. This experiment does not estimate time savings or demonstrate that a growing gallery is generally ineffective. It does show why a larger gallery needs taxon-balanced comparison, safeguards against early wrong confirmations, and testing across independent samples with realistic acquisition order. Reproduce with `/tmp/diatom-research-venv/bin/python research/l9_prefix_replay.py`; inputs and checksums are in the R14 prefix manifest.
