Estimating Sibling-Species Mix Under Imaging Shift with Ensembles

Some disease-carrying mosquitoes come in "cryptic" sibling species: lineages that are genetically distinct and differ in insecticide resistance, but look the same under a microscope. A recent line of work shows that the thin-film colors on a mosquito's transparent wing, called wing interference patterns, carry enough signal for small image classifiers to tell such siblings apart. In the lab, these classifiers score 100% on Anopheles gambiae and An. arabiensis and 88% on An. coluzzii. Those numbers come from slides photographed under one fixed lighting setup. A surveillance network faces two changes at once. The images change, because of different cameras, lighting angles and specimen age. And the sibling mix changes from site to site. The quantity that matters for vector control is usually that mix: what fraction of the catch at this site is coluzzii.

This note proposes treating deployment as a site-level estimation problem restricted to the confusable siblings. A diverse ensemble of small classifiers supplies calibrated probabilities within each species complex. From those probabilities we estimate each site's sibling proportions without labels. We update per-species reference features (prototypes) only from specimens on which all ensemble members agree. Disagreement among members decides which few specimens go to a DNA or PCR test. The central claim is that standard test-time adaptation, which minimizes prediction entropy over the full label set, is the wrong objective in this setting. A classifier becomes confident most cheaply by collapsing onto whichever sibling dominates locally, which erases exactly the minority species that surveillance needs to detect.

Core Claim

Under deployment shift, cryptic-species classifiers make two kinds of errors. Coarse errors (genus or complex) stay rare, since genus-level accuracy exceeds 99% in the Anopheles wing-pattern study. Fine errors concentrate inside complexes, where the margin between siblings is small and the sibling mix shifts. We hypothesize four things. First, full-label entropy minimization of the kind used by Tent and even its ensemble version DEnEM will measurably reduce recall on the site-minority sibling as that sibling becomes rarer. Second, conditioning adaptation on the complex, and estimating within-complex proportions rather than sharpening predictions, avoids this failure. Third, an ensemble matters here mainly because proportion estimation needs calibrated probabilities under imaging shift. Fourth, ensemble disagreement is a better rule than single-model entropy for spending a small molecular-testing budget.

The site-level estimate uses the classical expectation-maximization correction for label shift, applied inside one complex. Let $\bar p_k(x)$ be the ensemble-averaged probability that specimen $x$ is sibling $k$, given that it belongs to the complex. Let $\pi^{src}_k$ be the training proportion of sibling $k$ and $\hat\pi_k$ the current site estimate. Over the $N$ complex-member specimens at a site, we iterate

$$\hat\pi_k \leftarrow \frac{1}{N}\sum_{i=1}^{N} \frac{(\hat\pi_k/\pi^{src}_k)\,\bar p_k(x_i)}{\sum_j (\hat\pi_j/\pi^{src}_j)\,\bar p_j(x_i)}.$$

This update is only as good as the calibration of $\bar p$. That dependence is the lever: it turns the known calibration benefit of ensembles, and its known fragility under shift, into a testable prediction.

Relation to Prior Work

Two papers motivate the gap and supply the base models. The Anopheles wing-pattern study and the Culex wing-pattern study train single compact networks (DarkNet-9, ResNet18, MobileNet) on standardized slides. They report sharp failures on rare species: below 50% accuracy with fewer than 10 training images, and 0% for Cx. thalassius. Neither tests any shift in imaging or site. We reuse their architectures and imaging modality, and add the shift they leave out.

Three papers supply methods that we adapt and also treat as competitors. DEnEM trains diverse ResNet10 ensembles with a mutual-information penalty. It minimizes the entropy of the averaged ensemble prediction at test time and uses group normalization for small batches. We keep its diversity training and normalization choice but reject its objective for the reason stated in the Core Claim. DEnEM was built for a binary task, cancer versus benign, where collapse onto a locally dominant class is less of a threat. Test-Time Ensemble maintains a weight-averaged ensemble during adaptation. It reports only +0.1 to +1.0% on the natural shift ImageNet-V2, far below its gains on synthetic corruptions. That result constrains us: weight-space tricks may not help subtle real shifts, so we treat them as a baseline rather than a component. T3A updates class prototypes from entropy-filtered test samples without backpropagation. We keep the prototype mechanism but replace its entropy filter with unanimous ensemble agreement. Among near-identical siblings, a confident single model is often wrong.

Two further papers constrain the design. Extending WILDS finds that self-training adaptation depends on label-preserving augmentations. WILDS finds that invariance methods such as CORAL and IRM rarely beat plain training on real shifts. Hue and color jitter would corrupt thin-film colors, so we rule out augmentation-driven self-training and do not build on invariance losses.

Research Program

We build three things. The first is a shift benchmark for cryptic complexes, built along two paths.

On the wing-pattern side, the plan is to obtain, working with the authors of the Anopheles and Culex studies, whose data release status the file does not state, a subset of mounted slides of the Gambiae complex and of confusable Culex. We would re-image them under controlled perturbations: illumination angles away from the standard 10°, a second camera and objective, and aged versus fresh specimens. We would also form synthetic "sites" by resampling sibling proportions from balanced to 95:5 skews.

On the BIOSCAN side, we use BIOSCAN-5M to define cryptic groups at scale. These are sets of congeneric species that DNA separates (species-level clustering above 90%) but images do not (21%). Labels come from the DNA barcodes, which also addresses the dataset's roughly 9% species-label coverage. Splits follow collection geography, giving natural site shifts in both appearance and species mix.

The second is the method. We train an ensemble of M compact networks (M around 4–5) with DEnEM-style diversity training and group normalization, plus a complex-level head. At test time we compute the ensemble's complex-conditional probabilities and fit a per-bin temperature on source validation data. We run the site-level EM update above and update prototypes for each sibling from unanimous-agreement specimens. Specimens are ranked for molecular confirmation by the spread of ensemble member predictions within the complex. The confirmed labels feed back as anchors for both the proportion estimate and the prototypes.

The third is an analysis of when the ensemble is actually necessary. We measure calibration error of single versus ensemble probabilities as imaging shift grows, and relate it to proportion-estimation error.

Baselines

The naive reference is a single compact CNN trained with standard empirical risk minimization, as in the wing-pattern studies, applied unchanged at each site. On lab data it reports 100%, 100% and 88% for the three Gambiae siblings (Anopheles study). No reported result was found on Lacuna for wing-pattern classifiers under imaging or site shift, so our first measurement is this baseline's drop.

The strongest existing test-time method is DEnEM (paper). On multi-center micro-ultrasound it reports 80.9% AUROC, against 77.3% for Tent and 75.2% for an unadapted ResNet10. It is the closest competitor because it already combines diverse ensembles with test-time adaptation under real acquisition shift. We run it with the same members, the same diversity training and the same normalization as our method. The only difference is the objective: its full-label marginal entropy versus our complex-conditioned proportion estimation. We also run Tent, T3A and Test-Time Ensemble on the same base networks, with hyperparameters tuned on a held-out source-only split with simulated shift, under an equal tuning budget per method.

Two ablations isolate what is new. The first is a single network, temperature-calibrated on source data, running the same EM and prototype procedure; it tests whether the ensemble is needed at all. The second is our ensemble with T3A's entropy filter in place of agreement; it isolates the support-selection rule. We count ourselves as beating DEnEM only if we cut per-site proportion error and raise minority-sibling recall at matched overall accuracy, across both benchmarks, beyond seed variance.

Why not just…?

Why not just calibrate one model and run the EM correction, with no ensemble? This is the real threat. If temperature scaling on source data keeps a single network calibrated under imaging shift, the ensemble adds only cost. The single-model ablation settles it directly. We expect single-model calibration to degrade as illumination angle departs from training, a trend reported in general by the adaptive calibrator ensemble work. If the single-model variant matches ours, we will report the simpler pipeline as the recommendation, and the ensemble's only remaining role would be ranking specimens for molecular tests.

Why not just use DEnEM or Tent as is? Our prediction is that their entropy objective rewards collapse onto the site-majority sibling. The proportion-sweep experiment below tests this: if minority recall under DEnEM stays flat as the skew grows, the objection wins.

Why not just barcode or PCR every ambiguous specimen? For a single site this is the gold standard, and it is our upper bound. The question is cost. The budget curve reports how many assays each ranking rule needs to reach a target proportion error; agreement-based ranking must beat random and entropy-based ranking to justify itself.

Why not just augment training images to cover the shift? Color and hue augmentations alter the thin-film colors that carry the species signal, and Extending WILDS shows that augmentation-dependent adaptation fails when label-preserving augmentations are unavailable. We still include a physically motivated variant (brightness and blur only) as a training-time baseline.

Proposed Experiments

The first decisive check is the proportion sweep. At fixed imaging shift, we vary a site's coluzzii share from 50% to 5%. We plot minority recall and absolute proportion error for DEnEM, Tent and our method. The proposal predicts that the entropy-based methods fall off at high skew while our method stays flat.

The second check crosses imaging shift with calibration. Across illumination angles and cameras, we measure expected calibration error of single and ensemble probabilities within each complex. We then check whether EM proportion error tracks that calibration error, which tests the stated mechanism.

The third check is the molecular-testing budget curve on the geographic splits of BIOSCAN-5M, where DNA labels are available for every specimen. We compare agreement-based, entropy-based and random selection by the proportion error and within-complex macro accuracy reached per assay.

On all three, we report genus- and complex-level accuracy to confirm that errors are indeed concentrated within complexes. If coarse errors turn out to dominate, the complex-conditioned design loses its premise and we would say so.