bioRxiv Science⌕ Search

bioRxiv · 10.1101/2023.06.29.546989

Hierarchical Classification of Insects with Multitask Learning and Anomaly Detection

Abstract

Cameras and computer vision are revolutionising the study of insects, creating new research opportunities within agriculture, epidemiology, evolution, ecology and monitoring of biodiversity. However, a major challenge is the diversity of insects and close resemblances of many species combined with computer vision are often not sufficient to classify large numbers of insect species, which sometimes cannot be identified at the species level. Here, we present an algorithm to hierarchically classify insects from images, leveraging a simple taxonomy to (1) classify specimens across multiple taxonomic ranks simultaneously, and (2) highlight the lowest rank at which a reliable classification can be reached. Specifically, we propose multitask learning, a loss function incorporating class dependency at each taxonomic rank, and anomaly detection based on outlier analysis for quantification of uncertainty. First, we compile a dataset of 41,731 images of insects, combining images from time-lapse monitoring of floral scenes with images from the Global Biodiversity Information Facility (GBIF). Second, we adapt state-of-the-art convolutional neural networks, ResNet and EfficientNet, for the hierarchical classification of insects belonging to three orders, five families and nine species. Third, we assess model generalization for 11 species unseen by the trained models. Here, anomaly detection is used to predict the higher rank of the species not present in the training set. We found that incorporating a simple taxonomy into our model increased accuracy at higher taxonomic ranks. As expected, our algorithm correctly classified new insect species at higher taxonomic ranks, while classification was uncertain at lower taxonomic ranks. Anomaly detection can effectively flag novel taxa that are visually distinct from species in the training data. However, five novel taxa were consistently mistaken for visually similar species in the training data. Above all, we have demonstrated a practical approach to hierarchical classification based on species taxonomy and uncertainty during automated in situ monitoring of live insects. Our method is simple and versatile and could be implemented to classify a wide range of insects as well as other organisms.

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Bjerge, K., Geissmann, Q., Alison, J., Mann, H. M. R., Hoye, T. T., Dyrmann, M., Karstoft, H.. 2023-06-30. Hierarchical Classification of Insects with Multitask Learning and Anomaly Detection. https://doi.org/10.1101/2023.06.29.546989

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

A leaf-carbon economy model to explain the adaptive value of low vs. high leaf mass per area as a function of habitat productivity

Plant traits interact with environmental conditions to determine plant fitness. In particular, plant species with low leaf mass per area (LMA) are more common in high fertility soils and forest gaps, while plant species with high LMA are more common in low fertility soils and in shaded forest understories. It is not yet known why the adaptive value of LMA changes as a function of environmental productivity. We present a model for plant growth as a function of LMA and productivity. Our model relies on an empirically derived relationship between LMA and leaf lifespan. We are able to explain why species with lower LMA are successful in high productivity environments including environments with high availability of either light or soil nutrients, by showing that the LMA which maximizes growth rate decreases with increasing rate of carbon assimilation. We show that low LMA species are better at taking advantage of the 'high interest' environment of high productivity habitats by reinvesting assimilated carbon in new leaves and earning compound interest, while high LMA species grow more efficiently in the 'low interest' environment of low productivity habitats. This tradeoff sheds light on the adaptive value of LMA as it relates to environmental productivity.

ecology↗

Species differentiate water uptake depths within a narrow vertical zone in temperate grasslands

Whether and under which conditions coexisting species in temperate grasslands differentiate their water uptake within the shallow soil layer they share is central to understanding hydrological niche differentiation in these ecosystems. In this field study, we quantified water uptake depth of 28 coexisting herbaceous species across 74 temperate grassland plots in three regions of Germany using oxygen stable isotopes and soil water content measured at multiple depths. Species consistently differed in water uptake depth across all regions, consistent with hydrological niche differentiation. This differentiation was largely confined to the upper 30 cm of soil and became stronger as overall soil moisture declined, with plants accessing water at greater depths in drier plots. In contrast, the vertical distribution of soil moisture was unrelated to either uptake depth or species differentiation. Despite pronounced species level variation, broad herbaceous functional classifications, including grasses versus forbs and fibrous versus taprooted species, showed substantial overlap in water uptake depth. Together, our results show that hydrological niche differentiation in temperate grasslands is expressed through fine scale differences among species within a shared shallow soil domain, becomes more pronounced under drier conditions, and is poorly captured by broad herbaceous functional classifications.

ecology↗

Fungal-bacterial interactions enhance bacterial but constrain fungal resistance and recovery to extreme heat across soil moisture levels

Soil fungi and bacteria are key drivers of nutrient cycling and plant productivity in terrestrial ecosystems, yet their responses to climate extremes are rarely studied as interacting partners rather than in isolation. Moreover, it remains largely unknown how fungal-bacterial interactions regulate fungal and bacterial stability under climate extremes, particularly resistance (immediate responses to climate extremes) and recovery (responses after climate extremes cease). Here, we conducted a soil microcosm experiment with a bacterial species (Pseudomonas putida KT2440) paired with one of four Trichoderma species (T. hamatum, T. atroviride, T. koningiopsis, and T. harzianum). These fungal-bacterial pairs were then exposed to a 5-day heat event (40 {degrees}C/32 {degrees}C, day/night) followed by a 14-day recovery period (25 {degrees}C/17 {degrees}C, day/night), at two soil moisture levels (30% and 5% gravimetric water content). Our results show that fungal-bacterial interactions asymmetrically affect fungal and bacterial responses to extreme heat. Trichoderma species facilitated the resistance and recovery of P. putida density (CFUs) to extreme heat, whereas P. putida constrained the resistance and recovery of fungal biomass (ergosterol) to extreme heat, regardless of soil moisture conditions. Moreover, faster-growing Trichoderma species were associated with greater facilitation of bacterial resistance and recovery. Bacterial density also covaried positively with fungal biomass during heat stress under both soil moisture conditions, suggesting that net fungal facilitation enhances bacterial persistence under extreme heat. Together, our findings reveal that fungal-bacterial interactions can stabilize one microbial partner while increasing the vulnerability of the other, highlighting the contrasting consequences of biotic interactions under climate extremes.

ecology↗