Abstract
Monitoring phytoplankton health is critical for understanding aquatic ecosystems, yet identifying rare parasitic infections in massive image datasets remains a significant challenge. This study presents an unsupervised anomaly detection framework utilizing Vector-Quantized Variational Autoencoders (VQ-VAEs). By training exclusively on healthy samples, the model identifies parasites as reconstruction failures. Our approach achieves an F1 score of up to 0.94 for specific species, demonstrating a scalable alternative to supervised methods that require extensive expert labeling.
Introduction
Phytoplankton form the base of aquatic food webs, but their populations are frequently impacted by "mortal losses" from viruses, bacteria, and fungi. Automated imaging tools like the Imaging FlowCytobot (IFCB) generate millions of images, but detecting parasites within them is a "needle in a haystack" problem. Traditional supervised deep learning is hindered by the rarity of infections and the difficulty of obtaining expert-labeled datasets. This research reframes parasite detection as an unsupervised anomaly detection task, identifying anything that deviates from the "healthy" baseline.
Methodology
The core of the proposed system is an unsupervised pipeline centered on a Vector-Quantized Variational Autoencoder (VQ-VAE). The model is trained to compress and reconstruct images of healthy phytoplankton. Because the model never encounters parasites during training, it fails to reconstruct these anomalous features accurately.
As shown in the pipeline above, the process involves:
- Reconstruction: The VQ-VAE generates a reconstructed version of the input.
- Difference Mapping: A "difference image" is calculated by subtracting the reconstruction from the original input.
- Feature Extraction: Robust features are extracted from the difference image using HardNet.
- Classification: A Local Outlier Factor (LOF) classifier determines if the reconstruction error signifies a parasite.
Visualizing Anomaly Detection
The effectiveness of the autoencoder approach lies in its "vocabulary" limitation. Figure 3 illustrates how the model handles an infected cell.
The "failure" to reconstruct the parasite (c) results in a high-intensity region in the difference image (d), effectively isolating the infection site.
Results and Discussion
The VQ-VAE pipeline achieved an overall F1 score of 0.75 across nine phytoplankton species, with performance peaking at 0.94 for Nodularia. In comparison, a supervised Faster R-CNN benchmark achieved an F1 score of 0.86. While the supervised model is more accurate for known parasites, the unsupervised VQ-VAE offers superior flexibility for detecting novel or rare infections without requiring pre-labeled data.
A key finding was the necessity of species-specific tuning. Morphological baselines vary significantly across phytoplankton species, meaning a global threshold for anomalies is less effective than one tailored to individual species' characteristics.
Conclusion
Unsupervised anomaly detection via VQ-VAEs provides a robust and scalable solution for ecological monitoring. By leveraging reconstruction errors, researchers can identify parasites in vast datasets where expert labels are scarce. Future work will explore clustering methods to categorize detected anomalies and validation through independent methods like eDNA analysis.
Summary updated