NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Creating interpretable deep learning models to identify species using environmental DNA sequences

Samuel Waggoner, Jon Donnelly, Rajendra Gurung, Laura Jackson, Chaofan ChenScientific 2025

Abstract

Monitoring species' presence in an ecosystem is crucial for conservation and understanding habitat diversity, but can be expensive and time consuming. As a result, ecologists have begun using the DNA that animals naturally leave behind in water or soil (called environmental DNA, or eDNA) to identify the species present in an environment. Recent work has shown that when used to identify species, convolutional neural networks (CNNs) can be as much as 150 times faster than ObiTools, a traditional method that does not use deep learning. However, CNNs are black boxes, meaning it is impossible to "fact check" why they predict that a given sequence belongs to a particular species. In this work, we introduce an interpretable, prototype-based CNN using the ProtoPNet framework that surpasses previous accuracy on a challenging eDNA dataset. The network is able to visualize the sequences of bases that are most distinctive for each species in the dataset, and introduces a novel skip connection that improves the interpretability of the original ProtoPNet. Our results show that reducing reliance on the convolutional output increases both interpretability and accuracy.

Introduction

Monitoring biodiversity is critical for conservation, but traditional methods like physical observation or trawling are invasive and expensive. Ecologists have turned to eDNA metabarcoding—sequencing the genetic material animals naturally shed into water or soil.

While traditional bioinformatics tools (like ObiTools) are accurate, they are incredibly slow when processing millions of DNA reads. Convolutional Neural Networks (CNNs) can be 150 times faster, but they are "black boxes." If a CNN identifies a rare invasive species, a scientist has no way of knowing why the model made that call. This lack of transparency hinders the adoption of AI in high-stakes ecological decision-making.

Methodology: Interpretable ProtoPNet with Skip Connections

The authors adapted the Prototypical Part Network (ProtoPNet)—originally designed for image recognition—to handle 1D DNA sequences. The core mechanism involves "prototypes": representative snippets of DNA that the model learns are distinctive for a particular species. When the model sees a new sequence, it compares it to these prototypes. If it finds a strong match, it increases the score for that species.

Standard ProtoPNets compare prototypes to "latent features" (mathematical abstractions created by the neural network), which are still hard for humans to interpret. The authors introduced a skip connection that forces the model to compare prototypes directly to the raw DNA sequence as well. They used a weighted average (controlled by a hyperparameter $\kappa$) to balance these two comparisons, ensuring the model stays grounded in biological reality while still benefiting from the pattern-recognition power of deep learning.

The model architecture compares raw DNA sequences (left) and latent features (right) to learned prototypes to ensure both accuracy and biological interpretability.

Experimental Setup

The study used a challenging real-world dataset of 12S ribosomal fish DNA collected from the Maroni and Oyapock rivers in French Guiana.

  • Refined Scope: 156 species (after filtering for species with at least two available sequences).
  • Sequence Length: Average of 64–70 base pairs.
  • Noise Simulation: The team added synthetic "noise" (mutations, insertions, and deletions) to the training and test sets to simulate the errors that naturally occur during PCR amplification and sequencing.

Results and Discussion

The model achieved over 95% test accuracy when trained with moderate noise, outperforming both the previous state-of-the-art CNNs and traditional machine learning baselines like SVMs and Random Forests. Key insights from the study include:

  • The Interpretability Bonus: Contrary to the common belief that making a model interpretable sacrifices performance, this model actually surpassed the accuracy of previous black-box CNNs.
  • Context vs. Fidelity: The researchers found that a "latent weight" ($\kappa$) of 0.7 was the sweet spot. This means the model performs best when it uses a mix of abstract context (latent features) and literal base-pair matching (raw input).
  • Short Prototypes are Better: The most effective prototypes were only 3 to 5 base pairs long. Longer prototypes tended to overfit, meaning they became too specific to the training samples and failed to generalize to new, slightly different sequences from the same species.
  • CNNs > Transformers: While Transformers are the current state-of-the-art for many tasks, they struggled here. The authors suggest that because DNA identification relies on short-to-medium range patterns, the local focus of a CNN is more effective than the global "attention" of a Transformer.

Conclusion and Future Work

While the prototype-based approach successfully visualized "evidence" for its predictions, several challenges remain. The model is currently a "closed set" system, meaning it can only identify species it was trained on. Future work will need to integrate "Out-of-Distribution" detection to handle unseen species. Additionally, while eDNA can identify presence, determining abundance (biomass) remains a separate challenge. Scaling this interpretable approach to thousands of species across global ecosystems will be the next frontier for AI-driven conservation.

Summary updated

BibTeX
@inproceedings{waggoner2025creating,
  author = {Samuel Waggoner and Jon Donnelly and Rajendra Gurung and Laura Jackson and Chaofan Chen},
  title = {{Creating interpretable deep learning models to identify species using environmental DNA sequences}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-09846-7},
}
Figure