Classification of freshwater snails of the genus Radomaniola with multimodal triplet networks

Dennis Vetter, Muhammad Ahsan, Diana Delicado, Thomas A. Neubauer, Thomas Wilke, Gemma Roig · DOI

Abstract

Identifying freshwater snails of the genus Radomaniola is a significant challenge in taxonomy due to their minute size and nearly identical shell morphology. This study presents a multimodal deep learning system that combines shell imagery, physical measurements, and genetic distances within a multi-task triplet network. The resulting model achieves over 98.5% accuracy, matching the performance of expert malacologists and offering a scalable solution for ecological monitoring.

Introduction

Taxonomy—the science of naming and classifying organisms—is often a bottleneck in conservation and ecology. For the genus Radomaniola, the challenge is extreme. These snails are tiny (2–4 mm) and possess "featureless" shells that look nearly identical across different species. Currently, identifying them requires labor-intensive laboratory work, including specimen dissection and DNA sequencing. Furthermore, there is a shortage of human experts capable of making these distinctions. From a machine learning perspective, this presents a "fine-grained classification" problem characterized by high visual similarity between classes and a small, highly imbalanced dataset.

Examples of Radomaniola shells demonstrating the high visual similarity between species that complicates manual classification.

Methods

The authors propose a multimodal triplet network architecture that learns a joint representation from different types of data:

  1. Image Feature Extraction: A MobileNetV3-small (pre-trained on ImageNet) processes high-quality photographs of the shells, mapping them to a 32-dimensional feature vector.
  2. Multimodal Integration: Raw physical measurements (such as shell length, width, and aperture size) are concatenated with the image features.
  3. Triplet Learning: Instead of just training a standard classifier, the model uses a triplet loss function. This trains the network to map similar specimens (same species) close together in a high-dimensional "embedding space" while pushing different species far apart.
  4. Dynamic Margin (Bio-Informed): Standard triplet networks use a fixed distance (margin) to separate classes. Here, the authors used genetic distances between species to create a dynamic margin. If two species are genetically similar, the model is allowed a smaller margin; if they are evolutionarily distant, the model is forced to separate them further.
  5. Multi-Task Loss: The system simultaneously optimizes for the triplet loss (similarity) and a standard cross-entropy loss (classification), using an automated weighting method to balance the two.

Datasets and Feature Engineering

The study uses a specialized dataset of 706 specimens belonging to the genus Radomaniola, distributed across 21 species. The data is heavily skewed; the most common species has 88 samples, while the rarest has only 5. Each entry includes a high-resolution image, 12 specific shell/site measurements, and a pairwise genetic distance matrix.

To avoid "shortcut learning," the researchers found that including specific geographic coordinates allowed the model to achieve 100% accuracy simply by memorizing which species lived at which latitude/longitude. To ensure the model learned biological features rather than just GPS coordinates, they stripped the data down to 12 core morphological and environmental features.

Results

The performance improved steadily as more modalities and complex loss functions were added:

  • Images only: ~93% accuracy.
  • Images + Measurements: ~96% accuracy.
  • Full Multimodal Triplet Network: >98.5% accuracy.

The system proved to be robust against the "untrained eye" problem, successfully detecting minute morphological differences that humans typically miss without a microscope and years of training.

Discussion and Future Work

While the model is highly accurate, it remains a "black box." Future work involves incorporating explainability techniques to visualize which shell regions the AI prioritizes. Additionally, while genetic information is required during training to set dynamic margins, the final model can classify new snails using only images and measurements. The ultimate goal is to package this into a tool for ecologists, enabling field identification with a low-cost USB microscope and a laptop, reducing wait times from weeks to seconds.

Summary updated

BibTeX
@inproceedings{vetter2024classification,
  author = {Dennis Vetter and Muhammad Ahsan and Diana Delicado and Thomas A. Neubauer and Thomas Wilke and Gemma Roig},
  title = {{Classification of freshwater snails of the genus Radomaniola with multimodal triplet networks}},
  booktitle = {AI4Science @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=9d2ryK6BOz},
}
Figure