Machine Learning Challenges of Biological Factors in Insect Image Data

Nicholas Pellegrino, Zahra Gharaee, Paul W. Fieguth · DOI

Abstract

The BIOSCAN project aims to monitor global biodiversity by processing millions of insect specimens annually, a task that far exceeds the capacity of human experts. This paper identifies the unique biological hurdles—such as extreme class imbalance, metamorphosis, and sexual dimorphism—that prevent off-the-shelf computer vision models from accurately classifying species and estimating biomass. By formalizing these challenges, the authors provide a roadmap for future machine learning research in entomology, emphasizing the need for specialized loss functions and multi-modal data integration.

Introduction

We are currently witnessing a catastrophic decline in global biodiversity. Monitoring this decline is essential for conservation, yet it presents a massive logistical challenge. The BIOSCAN project seeks to address this by collecting over 1.5 million high-resolution insect images every year to study species interactions and ecosystem dynamics.

The primary bottleneck in this pipeline is not data collection, but labeling. Relying solely on expert taxonomists to identify millions of specimens is unscalable. While Artificial Intelligence (AI) and Computer Vision (CV) offer a potential solution, biological data presents unique difficulties. Standard datasets like ImageNet do not account for the fine-grained classification challenges inherent in entomology, where models often fail to generalize or over-predict common species.

Machine Learning Tasks in Entomology

The authors identify four critical areas where machine learning can transform biodiversity monitoring. These tasks move beyond simple identification to provide a holistic view of ecosystem health.

Key machine learning tasks for biological image data, including taxonomic classification and biomass estimation.
  1. Taxonomic Classification: Automating the identification of species from images to replace manual expert review.
  2. Biomass Estimation: Estimating insect weight directly from image data, eliminating the need for tedious manual weighing.
  3. DNA Error Correction: Using image-based taxonomic assignments to cross-reference and correct errors in genetic sequencing (metabarcoding).
  4. Species Interaction Mapping: Inferring how species interact within micro-ecosystems, such as analyzing the gut contents of predators via genetic markers.

The Challenge of Class Imbalance

One of the most significant hurdles in biological ML is the "long-tail" distribution of species. In the BIOSCAN dataset, the order Diptera (flies) accounts for approximately 70% of all samples. This creates what the authors call the "Diptera Trap": a naive model could achieve 70% accuracy simply by predicting "fly" for every input, without learning any meaningful biological features.

Relative frequency of insect orders showing a significant 'long-tail' distribution.

As shown in the log-scaled frequency distribution, many taxonomic orders have almost zero training data. Standard deep learning models struggle with this extreme imbalance, often ignoring rare but ecologically important species. To combat this, the authors suggest implementing Focal Loss, which forces models to prioritize "hard" examples (rare species) over "easy" common ones.

Biological Complexity and Data Scarcity

Beyond class imbalance, biological factors like metamorphosis and mimicry complicate visual recognition:

  • Metamorphosis: Insects undergo radical physical changes. A larva and an adult of the same species look entirely different (high intra-class variance), while larvae of different species may appear nearly identical (high inter-class similarity).
  • Symmetry Breaking: While insects are bilaterally symmetrical, this symmetry is often broken in 2D images due to the specimen's pose or orientation in a vial. This makes standard data augmentation techniques, like simple horizontal flipping, less effective.
  • Visual Mimicry: Evolution often drives distinct species to look identical to avoid predators. Distinguishing between a harmless fly and the stinging wasp it mimics requires the model to detect extremely subtle, localized differences.

Furthermore, while millions of images are collected, the "vetted" training set is much smaller. The Barcode of Life Data (BOLD) system contains roughly 1 million images, but only about 200,000 are currently usable for training due to contamination and processing issues. This scarcity necessitates the use of semi-supervised or self-supervised learning approaches.

Future Directions

Current computer vision methods are not yet "plug-and-play" for large-scale entomology. Future research must focus on implementing Focal Loss to handle imbalance and exploring Transfer Learning from general animal datasets to specific insect morphologies. The ultimate goal is a multi-modal system that combines image data with DNA metabarcoding to create a robust, error-tolerant pipeline for global biodiversity tracking.

Summary updated

BibTeX
@misc{pellegrino2022machine,
  author = {Nicholas Pellegrino and Zahra Gharaee and Paul W. Fieguth},
  title = {{Machine Learning Challenges of Biological Factors in Insect Image Data}},
  year = {2022},
  eprint = {2211.02537},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.02537},
}
Figure