Manuscript Offprint
arXiv:2610.13610CUBE: Class-conditioned Unknown Boundary Evidence for Open-Set Insect Species Recognition
ABSTRACT
Open-set insect species recognition requires models capable of detecting and categorizing unknown or novel species that are never seen during training but often resemble known classes. Unlike generic out-of-distribution samples, the feature representations of these unknown species may lie near a particular known-species boundary and induce confident errors. To address this, we propose Class-conditioned Unknown Boundary Evidence (CUBE), which models unknown species locally around each known species rather than as a single global unknown class. CUBE exploits auxiliary species to learn class-conditioned boundaries and preserves their species prototypes as shadow references during inference. It further combines visual boundary evidence with taxonomic evidence and candidate calibration. When location metadata are available, we propose CUBE-E to incorporate ecological consistency. Extensive experiments on Open-Insect C-America show that our method achieves state-of-the-art performance, reaching 98.4% mean AUROC and 95.2% closed-set accuracy.
Index Terms— Open-set recognition, out-of-distribution detection, fine-grained recognition, insect species recognition
1. INTRODUCTION
Automated species recognition has become an important tool for biodiversity monitoring, ecological surveys, and large-scale insect observation [1, 2, 3]. However, biodiversity data are inherently open-ended, and deployed systems inevitably encounter species absent from the training set. A robust recognition system should recognize known species while reliably rejecting unknown ones. This is particularly difficult for insects because unknown species are often not visually anomalous, but local unknowns may share wing shapes, textures, and colors with known species. Thus, Open-set insect recognition is a fine-grained boundary problem rather than simple anomaly detection [4, 3].
Existing out-of-distribution (OOD) and open-set recognition methods mainly rely on post-hoc confidence or feature scores, training regularization, or auxiliary outliers [5, 6, 7, 8]. Despite their effectiveness, many methods still model unknown species globally: an unknown sample should have low confidence, lie far from all known classes, or belong to a shared negative group. This assumption is poorly matched to fine-grained species recognition. The hardest unknown insects may be close to only a few known species and can be confidently absorbed by one of them. Rejecting such samples requires estimating the credible boundary of the particular known species they resemble, rather than measuring deviation from the known distribution as a whole. Moreover, auxiliary species provide a natural means of learning these local boundaries, but treating them as an undifferentiated negative pool discards useful information. Samples from the same auxiliary species form coherent visual groups, while each auxiliary species is typically confusable with only a small subset of known species. Therefore, they can serve as boundary probes during training and as structured nearby-unknown references during inference [9, 10, 11]. Besides, species recognition offers biological context unavailable in generic OOD detection. Taxonomic relations provide semantic cues about biological similarity [12, 13, 14], while location metadata reflects species distributions [2, 3]. These cues can help verify whether a visually plausible prediction is also biologically plausible.
Therefore, we propose Class-conditioned Unknown Boundary Evidence (CUBE), a class-conditioned framework that judges each fine-grained unknown species relative to the known species it most closely resembles. CUBE associates auxiliary samples with locally confusable known species to learn rejection boundaries and preserves auxiliary prototypes as inference-time shadow references. Taxonomic candidate calibration is introduced to further reduce confusion among plausible known species, while CUBE-E optionally incorporates ecological consistency. Extensive experiments on Open-Insect C-America demonstrate state-of-the-art (SOTA) OOD detection performance while preserving strong closed-set recognition performance. Overall, our contributions are two-fold. First, we formulate fine-grained unknown detection as class-conditioned boundary estimation instead of global unknown species modeling. Second, we develop structured
These authors contributed equally.
Corresponding author.

Fig. 1. Class-conditioned boundary learning and auxiliary shadow-bank construction in CUBE.
auxiliary boundary evidence that unifies local boundary learning and inference-time shadow referencing, leading to SOTA open-set recognition performance.
2.1. Problem Formulation and Overview
We consider open-set fine-grained insect species recognition with an In-Distribution (ID) training set , where denotes one of known species, and an auxiliary set , where is the auxiliary species identity of . Auxiliary species are not added to the closed-set label space. Instead, they serve as structured probes of visually similar non-ID species around known classes. An encoder maps an image to the normalized feature . A -way linear classifier produces , where is the closed-set logit, with and . CUBE follows a class-conditioned principle: a hard unknown species need not be far from all known species, but should lie outside the credible boundary of the particular species it resembles, so CUBE learns class-conditioned boundary evidence, preserves auxiliary prototypes as shadow references, and incorporates taxonomic evidence and candidate calibration. If location metadata is available, CUBE can optionally add ecological context. We name this variant CUBE-E.
2.2. Class-Conditioned Boundary Evidence
As illustrated in Fig. 1, for each known species , CUBE maintains a support bank of normalized anchors, updated by exponential moving averages of training features , with class mean . Given an auxiliary image , CUBE identifies the known species most likely to absorb it:
Here, contains the K known species with the largest support similarities. CUBE suppresses the closed-set probability mass assigned to this local neighborhood via:
where the non-negative increases with , emphasizing auxiliary samples near known-species boundaries.
To provide an explicit local rejection direction, each known species has an exit logit , parallel to its closed-set logit. Then, the local unknown probability can be computed as . Known samples deactivate the exit of their ground-truth class, whereas auxiliary samples activate the exits of classes in . This is achieved by the following learning objective:
(3)
where . To smooth the transition between known and nearby unknown regions, CUBE constructs with a soft unknown target and optimizes the following objective:
CUBE further preserves the species-level structure of auxiliary data. Let contain auxiliary images of species , and define its prototype as . Auxiliary species consistency loss attracts each to its corresponding while separating it from other auxiliary prototypes and known supports:
where and is the temperature. The overall training objective is
where , and the terms are non-negative balancing coefficients.
2.3. Auxiliary Shadow Evidence
After training, CUBE reuses the auxiliary prototypes as an inference-time shadow bank, as shown in Fig. 1. Each prototype is attached to its nearest known species by . For a test image with visual prediction , CUBE constructs a candidate set from the top visual and support-neighbor species, and considers the shadow prototypes attached to these candidates:
Here, , and is a margin. Positive shadow evidence indicates that is closer to a nearby auxiliary unknown reference than to the mean support of its predicted known species.
2.4. Taxonomic Candidate Calibration
CUBE uses a frozen biological vision-language model to evaluate whether a visual prediction is taxonomically plausible. For each known species , its species, genus, and family names are encoded into a text prototype . The frozen image encoder produces , and their agreement is . Taxonomic evidence for rejection is
where is the agreement of the visually predicted species and is the minimum semantic-support threshold. These two terms capture disagreement with a more plausible species and insufficient absolute support, respectively.
Taxonomy also calibrates closed-set recognition within the visually plausible candidates. Let TopM(z(h)) denote the M species with the largest visual logits. For each c in this set, CUBE computes
Here, , where contains the anchors in most similar to . The coefficients and control support and taxonomic calibration, and the final closed-set prediction is selected from these calibrated top- logits.
2.5. Ecological Context and Inference
When location metadata are available, we further propose CUBE-E, an extension of CUBE that evaluates the geographical plausibility of a prediction without modifying the visual encoder. Given the latitude-longitude vector , let denote the geographical mean and scale of species , and let denote the corresponding global statistics. The geographical mismatch is defined as follows:
Table 1. Main results on Open-Insect C-America. indicates a statistically significant improvement over the strongest baseline for each metric under a two-sided paired -test ().
| Method | L ↑ | NL ↑ | NM ↑ | Acc. |
|---|---|---|---|---|
| ASCOOD (CVPR '26) | 83.3±0.9 | 83.5±1.1 | 85.5±0.8 | 91.5±0.4 |
| CADRef (CVPR '25) | 90.6±0.4 | 92.4±0.6 | 96.4±1.3 | 93.7±0.2 |
| Mahalanobis++ (ICML '25) | 88.0±0.8 | 88.7±1.0 | 97.4±1.7 | 93.7±0.2 |
| OODD (CVPR '25) | 82.8±0.7 | 85.3±0.9 | 96.5±0.5 | 93.7±0.4 |
| NECO (ICLR '24) | 79.5±1.1 | 78.9±1.4 | 95.5±0.6 | 93.7±0.4 |
| NCI (CVPR '25) | 92.4±0.6 | 94.1±0.7 | 96.9±0.4 | 93.7±0.2 |
| FDBD (ICML '24) | 92.7±0.5 | 94.3±0.7 | 96.2±0.2 | 93.7±0.5 |
| NovelBranch (NeurIPS '25) | 94.0±0.5 | 97.9±1.2 | 97.3±0.3 | 94.2±0.3 |
| MixOE (WACV '23) | 95.0±0.4 | 98.1±0.3 | 98.1±1.1 | 94.5±0.4 |
| Extended (NeurIPS '25) | 95.0±0.4 | 98.3±0.3 | 98.3±0.4 | 94.4±0.7 |
| CUBE (Ours) | ||||
| CUBE-E (Ours) |
Table 2. Cross-source evaluation on the BCI OOD split. indicates a statistically significant improvement over the strongest baseline for each metric under a two-sided paired -test ().
| Method | AUROC ↑ | AUPR ↑ | FPR95 ↓ | Acc. |
|---|---|---|---|---|
| ASCOOD (CVPR '26) | 81.1±1.4 | 11.1±1.1 | 81.5±3.6 | 91.5±0.4 |
| CADRef (CVPR '25) | 93.1±0.7 | 10.2±0.9 | 25.1±2.1 | 93.7±0.2 |
| Mahalanobis++ (ICML '25) | 90.9±1.2 | 5.9±0.8 | 22.0±2.8 | 93.7±0.2 |
| OODD (CVPR '25) | 78.0±1.8 | 2.2±0.6 | 40.5±4.2 | 93.7±0.4 |
| NECO (ICLR '24) | 84.8±0.6 | 3.6±0.9 | 36.7±3.4 | 93.7±0.4 |
| NCI (CVPR '25) | 93.9±0.8 | 16.8±1.5 | 26.2±2.2 | 93.7±0.2 |
| FDBD (ICML '24) | 94.4±0.6 | 19.0±1.8 | 25.2±2.6 | 93.7±0.5 |
| NovelBranch (NeurIPS '25) | 94.3±1.2 | 24.5±2.1 | 25.2±1.9 | 94.2±0.3 |
| MixOE (WACV '23) | 95.0±0.4 | 32.1±1.4 | 17.9±1.2 | 94.5±0.4 |
| Extended (NeurIPS '25) | 95.5±0.3 | 34.4±1.1 | 22.8±1.7 | 94.4±0.7 |
| CUBE (Ours) | ||||
| CUBE-E (Ours) | 19.5±1.1 |
where the divisions are element-wise and balances class-specific and global geography. Classes with insufficient location samples use only the global term. For , CUBE-E computes , where controls geographical calibration. Its ecological OOD evidence is obtained by computing .
For inference, the base visual score is , where weights known-species support consistency. The local exit evidence is , where is a similarity-based weight normalized over . To align the scales of different evidence sources, CUBE uses , where and are estimated from validation ID samples and is a numerical constant. The final score is , where the terms are score-level weights. CUBE-E further uses . A sample is rejected as unknown when its corresponding score exceeds threshold , otherwise it is assigned the top-scoring species under for CUBE or for CUBE-E.
Table 3. Module ablation on C-America. All variants use ConvNeXt-T. Aux., Sup., and Cons. denote coarse auxiliary boundary, support-split boundary, and auxiliary species consistency. Calib. denotes taxonomic candidate calibration.
| Setting | Boundary | Shadow | Taxonomy | Eco | Metric | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Aux. | Sup. | Cons. | Score | Calib. | L | NL | NM | Acc. | |||
| ID-only | - | - | - | - | - | - | - | 92.9 | 94.7 | 96.7 | 93.7 |
| + Coarse auxiliary boundary | ✓ | - | - | - | - | - | - | 94.9 | 97.9 | 98.1 | 93.5 |
| + Support-split boundary | ✓ | ✓ | - | - | - | - | - | 95.6 | 98.5 | 98.4 | 94.1 |
| + Auxiliary species consistency | ✓ | ✓ | ✓ | - | - | - | - | 95.7 | 98.6 | 98.4 | 94.4 |
| + Auxiliary shadow evidence | ✓ | ✓ | ✓ | ✓ | - | - | - | 95.9 | 98.7 | 98.5 | 94.5 |
| + Taxonomic scoring | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | 95.8 | 98.7 | 99.2 | 94.5 |
| + Taxonomic candidate calibration | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | 95.8 | 98.7 | 99.2 | 94.7 |
| CUBE | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | 95.8 | 98.7 | 99.2 | 94.9 |
| CUBE-E | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 96.0 | 99.7 | 99.5 | 95.2 |
3. EXPERIMENTS
3.1. Experimental Setup
We evaluate CUBE on the C-America split of Open-Insect [3], using the train_id split for closed-set training, the train_aux split for auxiliary-aware methods, and the validation split for model selection and score standardization. We report closed-set accuracy (Acc.) on the test_id split and OOD AUROC on local (L), non-local (NL), and non-moth (NM) unknown splits. We further report AUROC, AUPR, and FPR95 on the Barro Colorado Island (BCI) OOD split for cross-source evaluation, together with closed-set accuracy (Acc.) on the test_id split. All results for CUBE and CUBE-E are averaged over five random seeds. All methods in the main comparison follow the same C-America protocol and use ConvNeXt-T with inputs. CUBE, NovelBranch, and Extended are trained for 15 epochs using AdamW, ID/auxiliary batch sizes of 96/96, backbone/head learning rates of , and cosine decay to . MixOE follows its original 10-epoch mixed-sample recipe with batch sizes of 32/32 and learning rate , while post-hoc methods share the same trained ConvNeXt-T closed-set classifier.
3.2. Main and Cross-Source Evaluation
Table 1 and Table 2 compare CUBE with ASCOOD [11], CADRef [6], Mahalanobis++ [15], OODD [16], NECO [17], NCI [7], FDBD [5], MixOE [9], NovelBranch [3], and Extended [3]. On C-America, CUBE improves Extended by 0.8, 0.4, and 0.8 AUROC scores on L, NL, and NM, respectively, with standard deviations of 0.4, 0.1, and 0.2, while CUBE-E reaches 96.0, 99.7, and 99.5 AUROC with 95.2 accuracy. Across five matched seeds, CUBE significantly outperforms the strongest baseline on every metric in both evaluations. CUBE-E is likewise significant except for BCI FPR95 (paired t-test, ). On the cross-source BCI split, CUBE obtains the best AUROC, AUPR, and FPR95 at , , and . Overall, the core class-conditioned evidence generalizes across unknown sources, while ecological context helps when collection conditions are applicable.
3.3. Ablation Study and Efficiency Analysis
Table 3 studies the contribution of the main components. Starting from the ID-only classifier, coarse auxiliary boundary learning ( ) raises L/NL/NM AUROC from 92.9/94.7/96.7 to 94.9/97.9/98.1. Support-split boundary modeling ( and ) further improves L and NL to 95.6 and 98.5, while auxiliary species consistency ( ) increases closed-set accuracy from 94.1% to 94.4%. Preserving auxiliary prototypes as shadow evidence raises L/NL to 95.9/98.7, and taxonomic scoring produces the largest improvement on NM, from 98.5 to 99.2. Candidate calibration (w/o ) further improves closed-set recognition, yielding 94.9% accuracy for the complete CUBE, together with 95.8/98.7/99.2 AUROC. Finally, CUBE-E reaches 96.0/99.7/99.5 AUROC and 95.2% accuracy by incorporating ecological consistency. Regarding efficiency, CUBE and CUBE-E require 31.9M parameters and 8.9G FLOPs, matching existing baselines in complexity, and still achieve 77.2 and 80.7 FPS, respectively, even when BioCLIP features are recomputed online.
4. CONCLUSION
In this paper, we presented CUBE, a class-conditioned framework for open-set insect species recognition. Instead of modeling unknownness globally, CUBE learns local boundaries from auxiliary species, preserves auxiliary prototypes as inference-time shadow references, and uses taxonomic evidence to assess biological plausibility. CUBE-E further incorporates optional ecological context. Extensive experiments on the C-America and cross-source BCI splits demonstrate that our framework can improve unknown rejection while maintaining strong closed-set recognition, supporting class-conditioned biological evidence as an effective approach for fine-grained open-set recognition.
5. ACKNOWLEDGEMENTS
This work was supported in part by the National Natural Science Foundation of China (NSFC) under Grant No. 62206314, Science and Technology Projects in Guangzhou under Grant No. 2024A04J4388.
6. REFERENCES
[1] Aditya Jain, Fagner Cunha, Michael James Bunsen, Juan Sebastián Cañas, Léonard Pasi, Nathan Pinoy, Flemming Helsing, JoAnne Russo, Marc Botham, Michael Sabourin, et al., “Insect identification in the wild: the ami dataset,” in European Conference on Computer Vision. Springer, 2024, pp. 55–73.
[2] Zahra Gharaee, Scott C Lowe, ZeMing Gong, Pablo M Arias, Nicholas Pellegrino, Austin T Wang, Joakim B Haurum, Iuliia Zarubiieva, Lila Kari, Dirk Steinke, et al., “Bioscan-5m: A multimodal dataset for insect biodiversity,” Advances in Neural Information Processing Systems, vol. 37, pp. 36285–36313, 2024.
[3] Yuyan Chen, Nico Lang, Brian Schmidt, Aditya Jain, Yves Basset, Sara Beery, Maxim Larrivée, and David Rolnick, “Open-insect: benchmarking open-set recognition of novel species in biodiversity monitoring,” Advances in Neural Information Processing Systems, vol. 38, 2026.
[4] Nico Lang, Vésteinn Snæbjarnarson, Elijah Cole, Oisin Mac Aodha, Christian Igel, and Serge Belongie, “From coarse to fine-grained open-set recognition,” in 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2024, pp. 17804–17814.
[5] Litian Liu and Yao Qin, “Fast decision boundary based out-of-distribution detector,” arXiv preprint arXiv:2312.11536, 2023.
[6] Zhiwei Ling, Yachen Chang, Hailiang Zhao, Xinkui Zhao, Kingsum Chow, and Shuiguang Deng, “Cadref: Robust out-of-distribution detection via class-aware decoupled relative feature leveraging,” 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4968–4977, 2025.
[7] Litian Liu and Yao Qin, “Detecting out-of-distribution through the lens of neural collapse,” in 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2025, pp. 15424–15433.
[8] Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li, “Mitigating neural network overconfidence with logit normalization,” in International Conference on Machine Learning, 2022.
[9] Jingyang Zhang, Nathan Inkawhich, Randolph Linderman, Yiran Chen, and Hai Li, “Mixture outlier exposure: Towards out-of-distribution detection in fine-grained environments,” in 2023 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). IEEE, 2023, pp. 5520–5529.
[10] Chaohua Li, Enhao Zhang, Chuanxing Geng, and Song-can Chen, “All beings are equal in open set recognition,” in Proceedings of the AAAI conference on artificial intelligence, 2024, vol. 38, pp. 13446–13454.
[11] Sudarshan Regmi, “Image-based outlier synthesis with training data,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2026, pp. 39338–39350.
[12] Samuel Stevens, Jiaman Wu, Matthew J Thompson, Elizabeth G Campolongo, Chan Hee Song, David Edward Carlyn, Li Dong, Wasila M Dahdul, Charles Stewart, Tanya Berger-Wolf, et al., “Bioclip: A vision foundation model for the tree of life,” in 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2024, pp. 19412–19424.
[13] Chih-Hsuan Yang, Ben Feuer, Zaki Jubery, Zi K Deng, Andre Nakkab, Zahid Hasan, Shivani Chiranjeevi, Kelly Marshall, Nirmal Baishnab, Asheesh K Singh, et al., “Biotrove: A large curated image dataset enabling ai for biodiversity,” Advances in Neural Information Processing Systems, vol. 37, pp. 102101–102120, 2024.
[14] Jianyang Gu, Sam Stevens, Elizabeth Campolongo, Matthew Thompson, Net Zhang, Jiaman Wu, Andrei Kopanev, Zheda Mai, Alexander White, James Balhoff, et al., “Bioclip 2: Emergent properties from scaling hierarchical contrastive learning,” Advances in Neural Information Processing Systems, vol. 38, pp. 102778–102811, 2026.
[15] Maximilian Mueller and Matthias Hein, “Mahalanobis++: Improving ood detection via feature normalization,” in International Conference on Machine Learning, 2025.
[16] Yifeng Yang, Lin Zhu, Zewen Sun, Hengyu Liu, Qinying Gu, and Nanyang Ye, “Oodd: Test-time out-of-distribution detection with dynamic dictionary,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2025.
[17] Mouin Ben Ammar, Nacim Belkhir, Sebastian Popescu, Antoine Manzanera, and Gianni Franchi, “Neco: Neural collapse based out-of-distribution detection,” in International Conference on Learning Representations, 2024.