KDD 2027In preparationFirst author

HEXAPOD: Heads, Encoders, X-Dataset Transfer, Adaptation, Prompts, and Out-of-Lab Diagnosis for Insect Identification from Museum Specimens to Field Images

S M Rayeed et al.

In preparation for the KDD 2027 AI for Sciences Track

What heads read besides the insect: (a) accuracy lost when labels, rulers and color charts are blurred at test time, (b) accuracy with the whole insect painted out. Vial and field datasets are shaded.
What heads read besides the insect: (a) accuracy lost when labels, rulers and color charts are blurred at test time, (b) accuracy with the whole insect painted out. Vial and field datasets are shaded.

Museum collections hold millions of expertly identified insect images, but models trained on them break on field photographs. HEXAPOD separates why: specimen size in the frame is the clearest cause, and heads trained on museum photos read the labels and surroundings as well as the insect. Cropping, compositing and re-centering recover much of the loss.

Natural history collections are the largest source of identified insect images, photographed pinned in drawers, in vials or as spread wings. Field photographs show living insects at any size, angle and background. Whether collections can train models for the field decides how useful they are to ecology.

HEXAPOD studies two groups with different collection practices, ground beetles (Carabidae) and Lepidoptera, across 15 datasets. It compares encoders and heads within each dataset, measures transfer between every pair, annotates each image with detection and mask models to separate the causes of the lab to field drop, and tests the fixes those causes suggest.

Study design

  1. 15 datasets7 ground beetle and 8 Lepidoptera sets, lab and field, audited against BioCLIP 2's training data
  2. Encoders and headsCLIP, SigLIP, DINOv2, DINOv3 and BioCLIP 2, frozen; prototype, 1-NN, linear and MLP heads
  3. TransferEvery source and target pair with shared species, with 0, 1, 2 or 5 target images per species
  4. CausesSpecimen size, labels and rulers, viewpoint and resolution, from detection and mask annotations
  5. FixesCrop, composite onto field backgrounds, re-center embeddings, LoRA
Ground beetlesBioRepository, NHMC, NEON vials, Hawaii pinned and GBIF museum (lab); Insect-1M Carabidae and GBIF field (field); 153,933 images
LepidopteraCambridge Heliconius wings, GBIF museum Heliconius, AMI museum and GBIF museum (lab); AMI field, AMI light traps, GBIF field Heliconius and GBIF field (field); 29,356 images
Contamination auditEvery dataset checked against TreeOfLife-200M, BioCLIP 2's training catalog; 5 are clean and 10 overlap it
Transfer protocolAt least 5 training images per species in the source and 8 in the target; main results on pairs with at least 15 shared species; 3 seeds; splits group images of the same specimen

Which models to use

  1. A linear head on DINOv3 is enough. Among encoders not trained on TreeOfLife, DINOv3 is best in both groups, at 89.0% for beetles and 82.3% for Lepidoptera within each dataset. The linear head matches an MLP within 0.8 points everywhere and beats class-mean prototypes by 18 to 34 points for the general encoders (9 to 10 for BioCLIP 2), so species are linearly separable but not compact.
  2. BioCLIP 2 zero-shot follows species coverage. It names 92.5% of GBIF field beetles and 98.1% of AMI field moths, both in its training data, but 28.0% on the clean BioRepository and NHMC collections. On clean BioRepository images, it reaches 99.3% for species it covers well and 34.0% for others. CLIP names fewer than 10% of species on all but one dataset, and SigLIP at most 39.5%.
  3. Generative VLMs do not identify these species. Qwen2.5-VL-7B and Qwen3-VL-8B answer four-option questions at 26% to 32% on the beetle collections and Heliconius, where chance is 25%, and name at most 8.7% of beetles.
EncoderBeetles, protoBeetles, 1-NNBeetles, linearBeetles, MLPLepidoptera, protoLepidoptera, 1-NNLepidoptera, linearLepidoptera, MLP
CLIP ViT-L44.560.178.278.942.057.773.874.6
SigLIP SO400M55.766.383.283.453.065.179.780.5
DINOv2 ViT-L54.568.785.585.546.367.779.679.9
DINOv3 ViT-L70.677.989.088.654.270.782.383.0
BioCLIP 279.985.190.289.982.689.291.391.5

Heads on frozen embeddings, within each dataset, mean over datasets. Accuracy (%). Most datasets overlap BioCLIP 2's training data.

DatasetDomainIn BioCLIP 2 trainingZero-shot accuracy
GBIF field beetlesFieldSeen92.5
AMI field mothsFieldSeen98.1
BioRepositoryLabClean28.0
NHMCLabClean28.0
Insect-1M beetlesFieldClean36.1

BioCLIP 2 zero-shot naming with scientific names as prompts (%). Seen: the dataset overlaps TreeOfLife-200M, BioCLIP 2's training catalog.

DatasetQwen2.5-VL-7B, 4 optionsSpeciesGenusQwen3-VL-8B, 4 optionsSpeciesGenus
BioRepository30.71.226.728.61.135.0
NHMC26.32.228.226.92.533.9
Insect-1M beetles30.60.520.131.21.530.9
GBIF field beetles31.88.731.042.57.043.8
Cambridge Heliconius29.91.011.229.71.06.3
GBIF field Heliconius31.85.229.732.13.720.6
AMI museum61.514.720.759.513.619.1
AMI field61.422.432.260.513.226.0
AMI traps49.911.818.449.95.614.6

Generative VLMs naming the specimen: four options with three same-genus distractors (chance 25%), and open answers scored at species and genus level. Accuracy (%).

What transfers

  1. Crossing from lab to field costs most. With no target images, field to field transfers best for every encoder, and lab to field is among the lowest kinds of pair. DINOv3 reaches 55.7% from lab to field beetles and 23.3% for Lepidoptera, while it reaches 81% to 100% on the same species within the lab sources.
  2. Collections matter most when field images are scarce. With one field image per species, adding the collection raises accuracy by 20.4 points for beetles and 15.8 for Lepidoptera. With five, the gain falls to 6.6 and 3.1.
  3. Re-centering costs nothing and helps. Subtracting each dataset's mean embedding, with no target labels, adds 4.6 points for beetles and 8.0 for Lepidoptera on average.
Transfer with no target images (linear head), mean over pairs of each kind with at least 15 shared species. F is field and L is lab.
Transfer with no target images (linear head), mean over pairs of each kind with at least 15 shared species. F is field and L is lab.
Accuracy gained by training on the source collection in addition to k field images per species, compared with the k field images alone. Mean over pairs.
Accuracy gained by training on the source collection in addition to k field images per species, compared with the k field images alone. Mean over pairs.

Why lab to field breaks

  1. Specimen size is the clearest single cause. Mean transfer accuracy falls from 59.1% for large specimens to 33.0% for specimens under a tenth of the image in beetles, and from 26.6% to 9.1% in Lepidoptera. Placing BioRepository specimens at 35% of the frame drops DINOv3 from 86.8% to 48.5%.
  2. Heads read museum labels. Labels, rulers or color charts appear in 94% to 98% of GBIF, AMI and Cambridge museum photos and in under 13% of field photos. Blurring them costs SigLIP 18 to 42 points within dataset, and with the insect painted out, heads still name the species at 36% to 83%, against chance of 2% or less.
  3. The label shortcut inflates museum accuracy but transfers little. Blurring source labels changes lab to field accuracy by 1.3 points for beetles and 0.5 for Lepidoptera on average.
  4. Viewpoint matters for Lepidoptera; resolution does not. Within Cambridge Heliconius, training on the upper side and testing on the underside costs 36 to 38 points for general encoders. Downsampling the source to the target resolution lowers lab to field accuracy by 3.8 points for beetles and 1.0 for Lepidoptera, so it does not explain the drop.
Test setUnchangedRotated 180Scale 60%Scale 35%Occluded 20%Occluded 40%
BioRepository86.873.877.648.580.759.3
GBIF museum beetles83.553.762.437.274.339.4
Cambridge Heliconius85.257.363.326.776.053.6
GBIF museum Lepidoptera84.864.367.743.076.763.8

Factor test with DINOv3: a linear head trained on unchanged lab images, tested on changed ones. Scale places the specimen at the given share of the frame; occlusion hides the given share of the specimen. Accuracy (%).

What fixes it

  1. Crop, then composite. Cropping both sides to the specimen adds 7.6 points from lab to field for beetles and 5.7 for Lepidoptera. Adding source specimens pasted onto field backgrounds raises the gains to 10.6 and 9.8. Where specimens are small in the field, cropping alone adds about 20 points.
  2. LoRA helps general encoders on Lepidoptera, not beetles. LoRA on DINOv3 adds 3.3 to 35.8 points on every Lepidoptera pair; on beetles it changes accuracy by −12.2 to +3.5 points.
  3. BioCLIP 2 needs no edits. It gains little from any intervention and loses from most, so the recipe is for general encoders.
  4. Recipe. For a general encoder, crop specimens and blur labels, composite them onto field backgrounds, re-center each dataset, fit a linear head, and with a few field images, add them and fine-tune with LoRA. With BioCLIP 2, use the images unchanged.
Change in lab to field accuracy from each intervention, compared with the same images unchanged. Mean over pairs with at least 15 shared species. Composite: source specimens pasted onto field backgrounds.
Change in lab to field accuracy from each intervention, compared with the same images unchanged. Mean over pairs with at least 15 shared species. Composite: source specimens pasted onto field backgrounds.

Related work

  1. ICCV 2025 WorkshopFirst author

    Fine-Grained Beetle Taxonomy with Vision Models: A Benchmark on Long-Tailed and Domain-Adaptive Classification

    S M Rayeed, Alyson East, Samuel Stevens, Sydne Record, Charles V. Stewart
    ICCV 2025 Workshop on Computer Vision for Ecology (CV4E)
  2. CVPR 2025 WorkshopFirst author

    BeetleVerse: A study on taxonomic classification of ground beetles

    S M Rayeed, Alyson East, Samuel Stevens, Sydne Record, Charles V. Stewart
    CVPR 2025 Workshop on CV4Animals
  3. NeurIPS 2025 Workshop

    Mind the (Data) Gap: Evaluating Vision Systems in Small Data Applications

    Samuel Stevens, Jenna Kline, S M Rayeed
    NeurIPS 2025 Workshop on Imageomics