TL;DR
Classifying minute freshwater snails of the Balkan genus Radomaniola typically requires hours of tedious laboratory dissection and genetic analysis due to near-identical shell morphology. This paper presents an end-to-end multimodal triplet network that combines shell photography, anatomical measurements, and coarse geographic metadata—guided during training by evolutionary genetic distances—to achieve over 98.5% classification accuracy on a small, highly imbalanced dataset.
What Problem Does This Paper Address?
Radomaniola freshwater snails are microscopic (2–4 mm long) gastropods native to Balkan spring systems. Distinguishing between species based solely on shell morphology is notoriously difficult even for experienced malacologists, traditionally requiring specimen transport, microscopic dissection, and molecular sequencing.
Applying computer vision to this problem poses severe machine learning hurdles:
- Data Scarcity and Imbalance: Only 706 total specimens exist across 21 species, with several species having fewer than 10 recorded samples.
- Extreme Visual Similarity: Subtle shell curvature and aperture variations are difficult to separate from intra-species noise.
- Shortcut Learning Risks: Because each collection site often contains only one species, feeding precise environmental or GPS coordinates leads standard models to memorize sites rather than morphological features.
Methods
The authors build a multimodal deep metric learning pipeline trained under a multi-task objective:
- Feature Extraction & Multimodal Fusion: Input photographs are processed through a pre-trained
MobileNetV3-smallbackbone to generate a 32-dimensional visual embedding. This vector is directly concatenated with 12 physical and environmental measurements (e.g., shell/aperture dimensions, whorl widths, country, elevation) and projected into a shared 32D joint embedding. - Triplet Loss with Dynamic Genetic Margins: The model uses triplet metric learning with offline hard-positive and semi-hard negative mining. Instead of enforcing an arbitrary fixed margin between classes, the authors introduce a dynamic margin proportional to the phylogenetic divergence time between species pairs, derived from DNA mutation coalescence models.
- Multi-Task Objective: The network jointly optimizes the dynamic triplet loss and a standard cross-entropy classification head. Task weights ($s_1, s_2$) are tuned dynamically during training via homoscedastic uncertainty weighting rather than manual hyperparameter grid searches.
- Domain-Specific Augmentations: The authors avoid common horizontal image flips: flipping a snail shell image alters its chirality (converting naturally dextral shells into pseudo-sinistral forms), which is biologically invalid.
Image ──► [Pretrained MobileNetV3] ──► 32D Visual Feats ┐
├─► [Concat] ──► [32D Embedding] ──► [Classifier Head]
Measurements ───────────────────────────────────────────────────┘ │
▼
Dynamic Triplet Loss (via Genetic Distance Matrix)
Datasets
- Radomaniola Dataset: 706 specimens across 21 species, heavily skewed (ranging from 88 specimens for R. mostarensis to just 5 for R. albanica).
- Modalities per Specimen:
- Standardized microscopic photographs ($224 \times 224$ pixels).
- 12 vetted tabular features: shell length/width, aperture dimensions, body/penultimate whorl widths, country, IUCN habitat category, elevation, and broad geological context.
- A pairwise genetic distance matrix derived from Bayesian coalescence trees published by Delicado & Hauffe (2022).
Key Insights and Ideas
- Pruning to Prevent Shortcut Learning: Original records contained 19 measurements including fine-grained coordinates and local temperature ranges. A simple random forest achieved 100% accuracy by trivially reverse-engineering collection sites. Pruning geographic coordinates down to 12 general features reduced random forest accuracy below 90%, forcing the neural network to learn real morphological and broad biogeographical indicators.
- Phylogenetically Structured Embeddings: Weighting the triplet separation margin by evolutionary divergence teaches the latent space to respect biological taxonomy rather than treating all misclassifications as equally distant.
- Genetic Data at Train Time, Zero Overhead at Test Time: DNA sequencing is only required during offline model training to shape the embedding manifold. Inference relies strictly on shell images and simple physical measurements.
Key Results
Evaluated using 5-fold stratified cross-validation, every layer of multimodal and metric complexity yielded consistent improvements:
- Images Only: ~94.0% accuracy.
- Images + Measurements: ~96.5% accuracy.
- Images + Measurements + Triplet Loss: ~98.0% accuracy.
- Full System (Dynamic Genetic Margin Triplet Loss + Classification): >98.5% mean accuracy.
Because the image backbone is lightweight (MobileNetV3), the pipeline runs in seconds on consumer CPUs without GPU acceleration, reducing identification time from hours of lab work to minutes in the field.
Limitations and Future Work
- Statistical Significance of Dynamic Margins: While biologically motivated and yielding the highest absolute accuracy, dynamic margins showed only minor statistical significance ($p > 0.6$) over standard fixed-margin triplet loss on this benchmark size.
- Interpretability: The authors note that the system acts largely as a black box. Future work will center on Explainable AI (XAI) to verify whether the visual regions highlighted by attention maps correspond to taxonomically valid shell structures recognized by malacologists.
Summary updated