Deep-learning-powered data analysis in plankton ecology

The implementation of deep learning algorithms has brought new perspectives to plankton ecology. Emerging as an alternative approach to established methods, deep learning offers objective schemes to investigate plankton organisms in diverse environments. We provide an overview of deep-learning-based methods including detection and classification of phyto- and zooplankton images, foraging and swimming behaviour analysis, and finally ecological modelling. Deep learning has the potential to speed up the analysis and reduce the human experimental bias, thus enabling data acquisition at relevant temporal and spatial scales with improved reproducibility. We also discuss shortcomings and show how deep learning architectures have evolved to mitigate imprecise readouts. Finally, we suggest opportunities where deep learning is particularly likely to catalyze plankton research. The examples are accompanied by detailed tutorials and code samples that allow readers to apply the methods described in this review to their own data.


I. INTRODUCTION
The monitoring of marine organisms' composition and abundance plays a pivotal role in evaluating environmental conditions and gaining insights into ecological processes and interactions [2].One group of particular interest is marine plankton, a collection of organisms defined by their inability to swim against the oceanic currents [3].Plankton encompasses diverse organisms, from unicellular bacteria and protozoans to eumetazoans such as small crustaceans and gelatinous life forms.Given their diverse size (ranging from micrometre to metre scales), rapid turnover, and displacement with ocean currents, these organisms are challenging to study at appropriate temporal and spatial scales.While studies of microplankton have historically been performed using microscopy and chemical methods, such as pigment analysis and isotope labelling [4,5], advances in such methods, alongside new developments in molecular biology such as genetic barcoding, have increased the taxonomic resolution in plankton monitoring and revealed a previously hidden diversity in many groups.However, most methods are still too time-consuming and labour-intensive to resolve the plankton community at relevant spatial and temporal scales.Recent advances in machine learning, such as deep-learning-based methods, hold promise to improve this situation.In particular, automatic classification of organisms from in situ imaging systems allows high resolution in both time and space [6].Moreover, developments in deep learning microscopy provide single cell resolution in food web interactions, such as microzooplankton grazing and behaviour, which have previously been hard to obtain [7].In this current state review, we aim to delve into the application of deep learning methods in plankton studies, with a particular focus on utilising image data.Our objective is to shed light on the potential of these methods as tools for researchers in the field of plankton ecology, especially for those who may not be familiar with deep learning techniques.
Plankton play a pivotal role in the Earth's ecosystem and especially in its carbon cycle.Phytoplankton, for example, produce nearly half of the oxygen on Earth, performing around 40% of the world's annual carbon fixation (30-50 petagrams) [8].Together with zooplankton as primary consumers, these form the base of most marine food webs.Certain species of plankton can also pose hazards to human health, such as harmful algal bloom-forming taxa (e.g., toxin-producing diatoms and dinoflagellates [9]).In ecological terms, the composition and abundance of certain species is used to determine ecological status [2,10], or to obtain insights into past conditions (e.g., using shifts in diatom composition from sediment cores to make inferences about the climate in the past few millennia [11]).
To accomplish these goals, it is important to have reliable methods to identify, track, and quantify plankton species or groups.Unfortunately, this is complicated by the extraordinary diversity among plankton taxa.For example, just one class of phytoplankton -the diatoms -contains an estimated number of species in the tens of thousands [12], many of which are highly similar in appearance and require microscopic analysis by expert taxonomists to differentiate.Molecular methods such as metabarcoding and environmental DNA (eDNA) drastically improves the taxonomic resolution and has revealed a previously overlooked diversity in plankton communities [13,14].
Deep learning has become increasingly popular in plankton studies.This particular subset of machine learning harnesses neural networks to acquire knowledge and enhance performance in specific tasks through itera-tive learning from experience [15].Deep learning methods have been applied to many fields, such as natural language processing [16] and computer vision [17].While an in-depth explanation of these networks is outside the scope of this paper, we will provide an overview of how these networks function, and recommend other reviews on the subject (such as those by LeCun et al. [15] and Alzubaidi et al. [18]) to those readers interested in the finer details of deep learning.
As its name implies, a neural network's design is inspired by the brain, with an interconnected network of neurons.The network to be trained is fed a set of input data (training data), most often labelled (e.g., a selection of plankton images identified by a taxonomist).From these training data, the network learns to recognise certain features, and to associate these features or combinations thereof with given classifications.The network's ability to recognise these features (and by extension, to classify the images) is then tested on a subset of the input dataset that the model has never seen before (validation data) to assess the model's performance.Adjustments are made to the internal parameters of the network to minimise the error (i.e., the difference between the true results and the network predictions), and the process is repeated multiple times.Finally, the model is tested on another unseen subset of the input dataset (test data) to provide the final statistics for the model's performance.For tasks such as plankton classification and detection, the performance of the models can be evaluated using metrics such as: precision, i.e., the proportion of positive results identified that are truly positive; recall or sensitivity, i.e., the proportion of truly positive results that the model recognises as positive; F1 score, i.e., the harmonic mean of precision and recall; and specificity, i.e., the proportion of truly negative results that the model recognises as negative.
With this review, we aim to provide an overview of the key techniques used in deep learning, through the lens of their application in studies of plankton detection and classification (section II), plankton foraging and migration (section III), and plankton biomass estimation (section IV) (Fig. 1).We aim to demystify deep learning and inspire its use in future plankton projects.As many field-specific terms are used throughout this review, we define important concepts in Box 1 (terms defined this way are italicised in the text at first use).We also show example schematics for some of the deep learning architectures (Figs. 2 and 3).In addition, we provide Jupyter notebooks containing example code for three of the deep-learning-based tasks covered in this article: plankton segmentation and classification, plankton detection, and plankton trajectory linking.The necessary code and plankton video data can be found in our GitHub repository [1].We encourage the readers to go through the tutorials and apply the techniques to their own plankton microscopy data.

II. PLANKTON DETECTION AND CLASSIFICATION
Given the importance of plankton in the ecosystem, it is vital to be able to accurately detect and classify them.Such tasks are non-trivial, as images of plankton may contain non-plankton particles, as well as multiple species of plankton that may have variable and sometimes largely overlapping morphologies.Much of this work is traditionally performed manually, which constitutes a major bottleneck in analysis pipelines.Therefore, emerging technologies such as metabarcoding [19] (the se-quencing of taxon-specific DNA to identify which species are present) and deep learning methods present attractive alternatives, either individually or as complements to one another (as noted by Høye et al. for the field of entomology [20]).A major advantage of deep-learningbased approaches in this context is the potential for a more automated analysis after the initial setup.While initial labelling of training images and training of the model may take some time, later analyses of plankton images do not require the repeated laboratory steps of, for example, a barcoding-based method.
The presence of numerous plankton species, numbering in the thousands, underscores a significant factor to consider when employing deep learning methods.One such consideration is the necessity for a substantial training dataset that encompasses a wide range of categories, often referred to as classes in the context of machine learning.These would correspond to taxonomic classifications (e.g., species) in a plankton study.Several curated plankton image datasets are available, which can be used for this purpose.For example, the Woods Hole Oceanographic Institution Plankton dataset (WHOI-Plankton) contains over 3.4 million annotated plankton images belonging to 103 classes [21].In terms of more taxonspecific datasets, the Endless Forams dataset contains over 34,000 images of foraminifera classified to species level [22].
Plankton detection.In order to classify plankton, they must first be detected in images or videos.These can be obtained, for example, from a microscope in a lab context, or from imaging planktons moored in position or deployed on remotely operated vehicles such as the zooplankton-sensing autonomous glider Zooglider [23], or more integrated analysis and acquisition systems such as ZooScan [24] and the Underwater Vision Profiler 6 (UVP6) [25].Though most of these systems work favourably well, accurate plankton detection and classification can still be complicated by the issues such as motion blur in the acquired imagery data, or the presence of non-plankton objects such as aggregates and debris.Therefore, sophisticated methods are required to detect true instances of plankton while rejecting non-plankton objects, which can be achieved through deep learning (Fig. 2).(A summary of the studies in the following paragraphs are available in Table 3).
Two common approaches for object detection using deep learning are models of either the R-CNN (Regional Convolutional Neural Network) or YOLO (You Only Look Once) family.The R-CNN family of models (e.g., R-CNN, Fast R-CNN, Faster R-CNN, etc.) perform object detection and classification in a two-step process [27].In the RCNN workflow, initially, regions of interest (ROIs) are generated, involving the cropping of individual plankton, followed by the merging of similar regions; subsequently, these resultant region proposals undergo classification.The initial implementations of R-CNNs required processing of around 2,000 region proposals per image.However, this was a substantial time bottleneck.The more recent implementations are faster because this process has been significantly sped up; this improved performance means that Faster R-CNN can be used for real-time applications [28].On the other hand, in YOLO models (e.g., YOLO, YOLOv2, YOLOv3, etc.), the detection and classification are performed across the whole image in a single step instead (hence the acronym), rather than first generating region proposals as in R-CNN, which further speeds up the process [29].
Pedraza et al. [30] applied both R-CNN and YOLO to microscopy images of ten diatom species in order to compare the two methods.YOLO produced better results in this instance, with an average pixelwise recall of 0.84, versus an average of 0.68 for R-CNN.In an intuitive sense, recall indicates the ability of a model to find all relevant detections.The issues noted by Pedraza et al. [30] regarding R-CNN were, objects being missed (i.e., false negatives), and bounding boxes being much larger than objects (i.e., false positives).The latter also relates to the problem of multiple objects that are close together or overlapping being counted as a single object, which is problematic for obtaining accurate numbers.
Issues similar to those noted by Pedraza et al. [30] were also noted in a study by Kakehi et al. [31], where the authors used a different object detection model (ResNeXt-101(32 x 8d), part of Detectron2 [32]) to detect and identify Pacific oyster larvae in images taken from plankton net samples.The training dataset for this study was generated using a human-in-the-loop method, where an expert labelled a part of the dataset, which was then used by the object detection model to label further images (which were then expertly verified).The authors identified problems in the model whereby it could not easily distinguish larvae with obscured outlines, or that overlapped with other objects.Two possible solutions to the identification problem were proposed: either applying a deep learning method to improve the image quality, or training on a larger dataset that includes more images of larvae with obscured outlines or overlaps.
The issue of object overlap has been addressed by Ruiz-Santaquiteria et al. [33], who applied a Mask R-CNN approach to images of ten species of diatoms.Mask R-CNN is a development of Faster R-CNN that adds instance segmentation (i.e., it identifies individual instances of objects within regions of interest) [34].The authors compared the Mask R-CNN to a SegNet [35], which instead performs semantic segmentation (pixels are assigned to a given class, but instances of the same class are not separated).While SegNet was better on average at detecting true positives (i.e., higher average recall of 0.95, versus 0.86 for Mask R-CNN), Mask R-CNN performed much better in terms of fewer false positives (i.e., higher average specificity of 0.91, versus 0.60 for SegNet), and was better able to separate individual diatoms.
Image quality in general is a major consideration for computer vision problems.Shi et al. [36] trained a YOLOv2 model on digital holographic images of zooplankton, of varying sharpness, and noted that a training dataset composed of images with at least an intermediate sharpness assessment index (i.e., at least 0.6 on a 0-to-1 scale) produced a much better result -training images with sharpness in the 0.5 to 0.6 interval gave a precision of 0.85 and a recall of 0.70, whereas the 0.6 to 0.7 interval gave a precision of 0.94 and a recall of 0.89.
For the purposes of real-world applications of plankton detection, such as real-time monitoring using a remotely operated vehicle, speed of detection is an important consideration.Li et al. [37] applied variants of YOLOv3, as well as Faster R-CNN, to the WHOI-Plankton dataset to perform identification and classification [21].Detection times for YOLOv3 models were two orders of magnitude faster (8 to 51 ms) than the Faster R-CNN (814 to 893 ms), which makes the YOLOv3 models more suitable for real-time applications in this context.The authors integrated a DenseNet structure into the YOLOv3-dense model.DenseNet is a structure in which all layers of the network are connected to one another, such that as much information as possible is passed through the network [38].Given the small visible differences that can exist between various plankton taxa, this is particularly important.
As the field of deep learning continues to evolve, other more recent methods are being applied to the field of plankton detection, an example of which is shown in Fig. 2a-f.In this example, simulated training images bearing similar features to the plankton being studied are generated (Fig. 2a).These images are used to train a U-Net model (Fig. 2b), which outputs segmentation masks corresponding to the positions of the given species (Fig. 2c).This trained model is then applied to true experimental images (Fig. 2d), and corresponding speciesspecific segmentation masks (Fig. 2e) are used for cell counting in the experimental image (Fig. 2f).Such a workflow is employed in the digital microscopy deep learning framework DeepTrack 2.0 [39,40].We demonstrate this task using a U-Net architecture, providing training data and analysis code in the associated GitHub repository [1].
With emerging methods, it is also becoming possible to detect objects using only a single, unlabelled image to train a deep learning model.Such is the case with LodeSTAR [26], a recently developed method shown to accurately detect multiple instances of the dinoflagellate Noctiluca scintillans, after training on a single image, as demonstrated in Fig. 2g-i.This is achieved by exploiting an object's symmetry to train a neural network.In this example, a pair of N. scintillans cells (Fig. 2g) are detected by training the LodeSTAR model (Fig. 2h) on a training image of a single cell (Fig. 2i, inset).Depending on the resolution of the training image, LodeSTAR could detect either a specific feature of the cells (e.g., the tentacle attachment point in Fig. 2i, left panel) or the entire cells (Fig. 2i, right panel).We provide detailed tutorials on how to use the LodeSTAR model for detecting plankton from microscopy videos in our GitHub repository [1].
Plankton classification.After detection follows the more complex task of classifying the individual plankton to a taxonomic group.Several convolutional neural networks have been applied to plankton classification problems over the last decade [41].Summaries of the studies we mention in this section are given in Table 1.
Even when using relatively large training datasets, additional data may still be needed to train an effective model.This can be achieved through data augmentation, i.e., the generation of additional training images derived from the original training data.If a training dataset is too small, it can result in overfitting, whereby the model interprets noise in the data as a true signal, resulting in a model that has learned to work well with the training dataset, but that fails to generalise to new, unseen data.In such cases, data augmentation is used to produce more, transformed images, thus bolstering the training dataset.This augmentation can be achieved through, for example, various transformations of the existing images, such as rotation, cropping, or re-scaling, or through the addition of noise [41][42][43].In their paper on the ZooplanktoNet model, Dai et al. [42] compared the classification accuracy of several popular deep learning models on a zooplankton dataset, with and without data augmentation.The accuracy increased by an average of 9.7% when data augmentation was applied (albeit quadrupling the training time).Likewise, Correa et al. [43] noted a 17.5% increase in accuracy after application of data augmentation to a 19-class microalgal dataset.
Regardless of the size of the dataset, there are likely to be classes that are underrepresented, e.g., rare taxa that are detected less often, but whose accurate identification may be vital.For example, this can be the case in the identification of invasive species during the early stages of invasion.However, rare taxa can have a substantial impact on a model's performance.For example, Luo et al. [44] performed a classification of 75,000 images collected using the In Situ Ichthyoplankton Imaging System (IS IIS) [45].While the average precision achieved was 0.84, exclusion of the twelve rarest taxa from consideration boosted the average precision to 0.907.
As noted by Li et al. [37], data augmentation is often applied to the whole training dataset, meaning that if there is a class imbalance, the data augmentation will not address this.To augment the training data for rare taxa specifically, the authors used a Cycle Generative Adversarial Network (CycleGAN) model [46].A Cycle-GAN is made up of two pairs of components -two generators that generate realistic-looking images, and two discriminators, whose purpose is to differentiate between real and generated images.With each iteration, the generators become better at creating realistic-looking images, while the discriminators become better at detecting them.Ultimately, the goal is to generate realistic-looking images that look convincingly similar to the originals.In Li et al., two taxa were randomly selected as "rare taxa", and a lower number of true images of these taxa were included in the training dataset (around one-fifth the number of images included for non-rare taxa).The CycleGAN model was then used to generate images of these two taxa so that the total number of training images was comparable to those of the non-rare taxa.The result was that the average precision for the two rare taxa augmented with the CycleGAN model increased by 1.93% (from 0.91 to 0.93) and 6% (from 0.92 to 0.98), for the randomly-selected classes "Pennate" and "Prorocentrum", respectively, compared to when these taxa were not augmented.
The issue of class imbalance in plankton datasets has also been addressed using the technique of transfer learning.This involves training a model on one dataset (often an unrelated, general dataset, which allows the model to learn broader patterns in image data), and then finetuning parts of the model by retraining with data from the problem of interest.This can also help address the issue of long training times for new models.In a study on the WHOI-Plankton dataset, Lee et al. [47] initially trained a model on class-normalised data (i.e., any class with more than 5,000 images was randomly subsampled down to 5,000), then fine-tuned on the entire dataset to ensure that population data (the frequency of each class) were not lost.This method improved the accuracy of the smaller classes while retaining the accuracy of the five most abundant (which composed over 90% of the training and test data in the full dataset).Transfer learning has also been applied to plankton studies where class imbalance was not the main focus.The Ima-geNet dataset [48] (containing over 14 million images as of March 2023) has been used in multiple transfer learning studies (e.g., Refs.[21], [49], [50]), resulting in greater accuracy than training on the plankton dataset alone.In the case of Orenstein and Beijbom's study on multiple plankton datasets [49], the accuracy increase was around 10%.
In addition to performance improvement via the aforementioned strategies, improved performance has also been achieved in plankton classification through the inclusion of context metadata (i.e., additional data about the sample beyond just the image itself).Ellen et al. [51] incorporated into their model combinations of three different categories of metadata: Geometric (i.e., containing measurements from the original image before adjustment to be fed into the network), geotemporal (e.g., longitude, latitude, and season), and hydrographic (e.g., chlorophyll a (Chl a) fluorescence and salinity).With a baseline accuracy of up to around 0.89 (depending on the dataset), addition of all three categories of metadata gave an accuracy gain of around 1.5%, up to 0.91.With further improvements to the network, a final classification accuracy of 0.93 was achieved.Of the three categories listed above, it was noted that geotemporal and hydrographic metadata were the most informative, with addition of geometric metadata alone having minimal impact on prediction accuracy.
Detection and classification of plankton are challenging tasks, but with the continued developments in the field of deep learning, as illustrated by the above examples, we believe that such methods will continue to speed up and automate these processes.

III. PLANKTON FORAGING AND MIGRATION
Motility is a fundamental characteristic of living organisms, enabling their interaction with the surrounding environment [5].The internal cellular processes that govern an organism's motion have evolved to perform specific major tasks such as reproduction, foraging, migration, defence, and communication.For instance, terrestrial organisms such as zebras follow waves of freshly grown vegetation after winter months for active grazing.Similarly, planktonic organisms often perform diurnal vertical migration where organisms move to deeper levels of the ocean during the day to avoid predators, and come back to the uppermost layers during the night in search of food and mating opportunities.More prominently, zooplankton shelter in deeper, darker strata during the daytime to avoid visual predators, while flagellated phytoplankton sometimes do the opposite, collecting nutrients at depth during the night and surfacing to harvest light during the day [52].The behaviours associated with foraging and migration are easy to observe in larger animals, such as terrestrial ungulates and larger aquatic organisms, which can be followed by acoustic methods [53].In contrast, the behaviours of microscopic plankton are mainly inferred through video-microscopy-based methods.However, experiments with these smaller organisms are performed under simulated conditions due to limitations in microscopic system design [54], although the high-quality video imaging data still allows for successful extraction of individual cell information.In the previous section, we discussed deep-learning-based image analysis methods for detection and identification of plankton cells from microscopy videos.This section will explore how the positions of the detected plankton in multiple frames can be linked to determine swimming trajectories, and how we can extract the statistical properties of such trajectories.Furthermore, we will discuss how reinforcement learning can be used to model plankton swimming behaviours in various simulated systems.Deep-learning-based trajectory analysis.The study of microplankton motility is essential to understand how swimming patterns mediate foraging behaviours, and which optimisation strategies can be used to improve prey encounter rates while avoiding predators [55].In this view, different mathematical models have been developed to categorise the motions of various organisms.A microscopic particle whose motion is solely governed by the thermal collisions with neighbouring liquid molecules performs Brownian motion, the simplest form of random motion.Non-motile viruses and bacte-ria (when suspended in liquid) belong to this category.Mathematically, the motion of a microscopic organism is characterised by the space explored by the organism over time.This can be be inferred by measuring the relationship between the mean square displacement (MSD) of the particle with time (t), which grows linearly (MSD ∝ t) for particles and organisms following Brownian motion [56].The proportionality factor which links the MSD and t is know as the diffusion coefficient (D) of the particle trajectory (MSD = 2Dt).However, a majority of organisms are known to have an active motion mechanism, which results in a non-linear relationship between MSD and time (MSD ∝ t α ).This phenomenon is generally referred to as "anomalous diffusion".Due to a widespread occurrence of anomalous diffusion in the behaviour of various organisms, a theoretical framework has been developed to further characterise their motions based on the spatial and temporal correlations of trajectories.This has led to the development of several mathematical models, such as Lévy walks, fractional Brownian motion, continuous time random walk and scaled-Brownian motion.Various methods to determine (anomalous) diffusion properties have been recently evaluated within the "Anomalous Diffusion Challenge", concluding that deep-learning-based methods outperform more classical approaches [56].
Heterotrophic dinoflagellates, such as Oxyrrhis marina, perform helical Lévy walks to optimise random searching in environments with low prey densities [57].At a larger scale, millimeter-sized organisms, such as copepods, diffuse by multi-fractal random walks to optimise foraging [58].
The majority of studies employ conventional objectassociation approaches, such as the Hungarian algorithm and Kalman filtering, to identify moving particles across consecutive frames of a video.These methods establish links between particles based on their proximity to previous positions, and more advanced algorithms also take into account the direction and speed from the previous timestep to improve linking, e.g., when particles overlap [59][60][61].Although these techniques work well in many experimental cases, they still require manual input of parameters, can be error-prone (for instance when the cells are dense and motion is unpredictable), and are limited in their ability to accurately analyse large amounts of data.More importantly, these traditional methods often struggle to measure accurate cell trajectories during scenarios such as cell division (parent cell dividing into daughter cells) and feeding events (predator cells consuming prey cells), as the number of cells in close proximity changes during these events.
In recent years, deep-learning-based methods hold promise for analysing and modelling plankton trajectories.Although deep-learning-based trajectory analysis methods have not been extensively used in plankton studies yet, they have the potential to provide a new perspective on the behaviour of these organisms.We highlight some of the possibilities below, and show an example application (Fig. 3a-c) in our GitHub reposi-  d-f are adapted from Ref. [7], with some of the authors of this work being part of the cited reference.
tory [1].A class of deep sequence modelling methods such as recurrent neural networks (RNNs), long shortterm memory (LSTMs), and transformers, are useful in analysing sequential data [62][63][64][65].Transformers, which are built on the attention mechanism in deep learning (explained in more detail in the next paragraph), can effectively learn and infer associations between different time points in a trajectory by focusing on the most relevant information at each step of the computation [66].This technique has been applied to various domains, such as computer vision, natural language processing, speech recognition, and self-supervised image classification, with groundbreaking results [67][68][69].In deep sequence-based models as mentioned here, trajectories are considered as a sequence of time points, and the associations between the time points are learned during training.More recently, advanced geometric deep learning models such as graph neural networks (GNNs) are proving to be useful in extracting valuable information from the trajectories, including hidden patterns and behaviours [70,71].GNNs are a type of deep learning model designed to operate on graphs, which can capture both spatial and temporal dependencies between graph nodes.In the case of trajectories, each linked trajectory can be represented as a graph, where each point along the trajectory represents a node, and a connection between relevant nodes is called an edge.As a starting point, the GNN is provided with a complete graph, where all the positions of the objects (plankton) in all the frames of the video are considered as nodes, and all the possible edges within a likelihood radius connect these nodes.The likelihood radius is related to the range each particle can cover within two frames of a video.The GNN then learns to correctly classify edges that complete a single plankton trajectory, effectively treating the problem as an edge classification task.The advantage of GNNs is that, as a deep learning method, the network can be trained with species-specific trajectories to capture complex patterns of movement that are difficult to capture using traditional methods.
Lately, attention-based fingerprinting GNNs, which combine the strengths of transformers (as mentioned above) and GNNs, have shown great promise in a wide range of applications [65].These models can be used not only for trajectory linking, but also for quantifying the motion parameters of individual trajectories without the need for explicit trajectory linking.This attention-based technique can encode and predict biological events such as cell division, cell merging, and feeding events.In most applications, the ultimate aim of trajectory linking is to understand the underlying behaviours of trajectories.By treating the task as a node regression problem, this technique can predict the diffusion coefficient of a trajectory without the need for linking.Moreover, by treating the task as a graph-level classification problem, attentionbased GNNs can predict the underlying diffusion model itself (such as fractional Brownian motion or continuoustime random walk).This method could prove useful in many plankton applications, including understanding optimal swimming characteristics in predator-prey regimes and identification of changes in the diffusion model over time.
Deep-learning-based search optimisation.Apart from trajectory analysis, deep learning has also been used for search optimisation in plankton ecology.Reinforcement learning is a type of machine learning where an agent (e.g., a fictive plankton) learns how to interact with an environment to achieve a specific goal through trial and error, receiving rewards or punishments along the way.Studies in this direction have adapted deep reinforcement-learning-based algorithms to investigate how plankton search for food and optimise their search strategies, or navigate their swimming under different environmental conditions such as turbulent flows [72][73][74][75][76][77].
For instance, many plankton species migrate vertically in the turbulent ocean, using a mechanism called gyrotaxis to swim efficiently with or against gravity.While some plankton rely on passive mechanisms for gyrotactic stability, they are often sensitive to turbulence, which can upset their alignment.To address this, Qiu et al. [72] have suggested an active mechanism for gyrotactic stability, that they attempt to simulate using reinforcement learning.The proposed mechanism involves a model plankton that swims at a constant speed and actively steers in response to hydrodynamic signals encountered in simulations of a turbulent flow.By sensing its settling velocity and steering in response to hydrodynamic signals, the swimmer can maintain accurate alignment upwards, allowing for efficient upward migration in turbulent flows.This finding has provided some initial insights on the role of active mechanisms used by plankton to maintain stability in a turbulent ocean.
Although these studies provide valuable insights into the foraging behaviour of planktonic organisms, it is important to note that they are based on simplified, idealised environments that do not fully represent the complex oceanic conditions.Thus, future studies should focus on incorporating more realistic natural factors (e.g., flow regimes, predator-prey interactions) into the models to obtain a more accurate representation of the ecological dynamics of planktonic organisms.

IV. QUANTITATIVE ANALYSIS OF PLANKTON BIOMASS
Phytoplankton blooms result from the rapid accumulation of plankton biomass in a restricted water body.They can positively impact the ecosystem, as planktivorous organisms benefit from a high density of prey.However, large plankton blooms can be rather harmful to their environment, as they limit the amount of light reaching the seafloor and often cause oxygen depletion where they die and decompose.Furthermore, harmful algal blooms can produce toxins, impacting human health and aquaculture [9,78,79].As predicted global changes will affect the intensity and frequency of plankton blooms, being able to automatically analyse their biomass is a valuable tool for assessing, monitoring and evaluating the effect of phytoplankton biomass on the ecosystem.
The biomass of plankton has previously been estimated using mathematical models.Nutrient-Phytoplankton-Zooplankton (N-P-Z) models have commonly been used to model plankton dynamics [80].These models use the interactions among predator, prey, and nutrient availability to simulate the dynamics in the ecosystem.Such a model was used by Frost [81], who combined chemical (e.g., concentration of Chl a), biological (e.g., photosynthetic rate) and physical (e.g., layer depth, incident solar radiation) parameters to simulate the increase in phytoplankton biomass in the Pacific Ocean.N-P-Z models remain valuable tools for plankton biomass simulations [80] but are limited by the relevance of the parameters chosen for the modelling.
Deep-learning-based approaches have been developed over the past decades to estimate plankton biomass in the context of climate and ecosystem modelling, and to monitor harmful algal blooms.Some of these approaches, all using neural network algorithms, will be highlighted in the present section, with the goal of giving an overview of possible applications of deep learning for quantifying plankton biomass.
Deep learning can be used in plankton biomass analysis to find correlations between biological events and environmental parameters.Aoki et al. [82] analysed the longterm changes in zooplankton biomass off the northeastern coast of Japan, incorporating 39 years of zooplankton data collected by vertical hauls and environmental data gathered by the Japan Meteorological Agency.They trained several dense neural networks (i.e., multilayer perceptrons) with different numbers of layers with variable number of nodes per layer, and compared their performance.A traditional back-propagation algorithm as discussed before is used to train the networks.The most efficient model to generalise the data was a simple one-hidden-layer model with few hidden units.The long-term variation in zooplankton biomass could be predicted by generating mapping functions between environmental variables and zooplankton biomass.Nevertheless, the range of their training dataset did not fit their data properly; hence, they highlighted the importance of the range of the training dataset when performing such analyses.A similar approach was undertaken by Woodd-Walker et al. [83], who collected plankton samples and recorded environmental and seasonal parameters (latitude, temperature, salinity, density, total incoming radiation, Chl a, and diel time) along a transect in the Atlantic.They used environmental parameters to estimate surface plankton biomass using linear regression and a two-layer feed-forward network.As in Aoki et al. [82], the network was able to predict the changes in biomass, but the range of the training dataset limited the accuracy of biomass estimates.The optimal neural network showed an average prediction over the test dataset with a determination coefficient r 2 of 0.47, lower than the r 2 obtained with the training dataset (0.77).
Other learning algorithms have also been used in the context of ecosystem modelling.To analyse the impacts of similar environmental conditions on the biomass of various phytoplankton groups, Pan et al. [84] used a multi-layer feedforward network to explore the effects of glacial meltwater on phytoplankton communities.They found that different environmental variables were responsible for the changes in the abundance of different taxonomic groups.Chlorophyll a concentrations of flagellates, prasinophytes and diatoms were best predicted by H2O deep-learning models, with respective r 2 values of 0.91, 0.9 and 0.89.H2O models are multi-layer feedforward artificial neural networks trained with stochastic gradient descent (SGD) using back-propagation.Cryptophyte Chl a concentration was best predicted by a gradient boosting model (r 2 0.97).These models permitted the identification of the most important variables for phytoplankton abundance, such as temperature for cryptophytes and flagellates, and nitrate availability for diatoms and prasinophytes.
In the study by Pan et al. [84], in situ data collection was feasible.However, this may not always be the case, so that remote imaging techniques are often favoured to study plankton biomass.For example, Chase et al. [85] assessed the reliability of satellite imaging to accurately quantify diatom biomass in the western North Atlantic using a two-layer feedforward network to find a relationship between Chl a, environmental information (salinity and temperature) and concentration of diatom-bound carbon.Their methodology seems promising for climate modelling, but it remains preliminary, as the average uncertainty of the diatom carbon estimated using the neural network was relatively high (65%).
Besides satellite imaging, aerial imaging from drones can provide valuable data to monitor planktonic activity.This tool can be used as the foundation of ecosystem modelling studies based on deep learning techniques.Pyo et al. [86] developed a one-dimensional convolutional neural network, capable of quantitatively and qualitatively assessing algal blooms when applied to hyperspectral images captured by drones.The network predicted the trends of Chl a, phycocyanin, lutein, fucoxanthin, and zeaxanthin with respective r 2 values of 0.87, 0.71, 0.76, 0.78, and 0.74, in comparison to observed data.The method remains to be perfected, as image borders have distorted information which might bias the interpretation of the signal.Still, ex situ data collected using drone or satellite imaging is a promising tool for studying the composition of algal blooms.Such data can even inform on the vertical distribution of phytoplankton.For example, Sammartino et al. [87] used an error back-propagation neural network (BPN) trained using Chl a profiles, geographical data, depth and temperature obtained from in situ data and satellite observations to study the vertical profile of Chl a.The prediction performance of the BPN was assessed using observed data.For both in situ and satellite datasets, the BPN had a fairly good predicting performance with respective r 2 values of 0.69 and 0.63.In conjunction with spatial scales, deep learning approaches can also estimate plankton biomass at temporal scales.Martinez et al. [88] found that a multi-layer perceptron (MLP, a neural network with dense layers) performed better than a support vector regression (SVR) approach to reconstruct the long-term phytoplankton variability by estimating surface Chl a (r 2 > 0.6 vs. r 2 < 0.5).Even though this deep learning algorithm underestimated the amount of Chl a, this model is still considered a promising tool for monitoring phytoplankton activity.
As phytoplankton blooms often occur at a large scale, photographing these events has been a favoured method to grasp their extent.With the improvement of the reliability and availability of imaging technologies, the image capture of phytoplankton blooms has become easier, and neural networks have become the preferred tool to analyse such datasets.More complex networks were recently used to quantify the plankton biomass to predict harmful algal blooms.For example, Liu et al. [89] used a combination of a long short-term memory network (LSTM) and time-frequency wavelength analysis (WA), a model named WLSTM, to estimate algal blooms.This model performed better than other neural networks and LSTM alone for predicting biomass variations at different time scales.This was particularly noticeable for longer time scales.At the daily and monthly scale, the hybrid network predicted the data with respective r 2 values of 0.878 and 0.814, while the performance of the other methods was lower, with r 2 < 0.63.The hybrid WLSTM model was even able to predict extreme algal bloom events.
Another LSTM was used to identify the most reliable Chl a proxy for predicting changes in algal biomass.Wenxiang et al. [90] found that the change rate and the relative change rate of Chl a were more accurate outputs for predicting the changes in biomass than the absolute concentration of Chl a, especially in winter and spring.Indeed, the correlation coefficient indicating the relationship between the forecasted and the observed concentration of Chl a exceeds 0.84 for all-year-round predictions when using the change rate and the relative change rate of Chl a, while it dropped below 0.6 when using the absolute concentration of Chl in winter and spring.This information can help direct future studies aimed at predicting algal blooms.
At a much smaller scale, deep learning algorithms can also be used to estimate the dry mass of individual plankton cells.Bachimanchi et al. [7] used a combination of a regression U-Net (RU-Net) and a weighted-average convolutional neural network (WAC-Net) to analyse holograms of plankton.The RU-Net is a modified convolutional neural network, that segments the image into several heatmaps.This output can be processed by the WAC-Net to predict the dry mass and radius.The dry mass estimations obtained by WAC-Net and by the "volume-to-carbon" method for several species zooplankton and phytoplankton have a correlation coefficient of 0.988.Thanks to this network combination, it becomes feasible to follow the growth of a single cell, something that is impossible with classical methods (Fig. 3d-f).
Through these examples, we can see that deep learning has revolutionised the field of plankton biomass estimation.Even though these networks have different levels of complexity, they have eased the study of plankton at various temporal and spatial scales, thanks to non-invasive imaging techniques, providing endless opportunities to model climate and ecosystems, and monitor harmful algal blooms.

V. OPPORTUNITIES
In the following section, we explore the most recent advancements in deep learning in light of their their potential applications in the field of plankton ecology.These developments offer new opportunities to overcome challenges and pave the way for innovative solutions.
One of the biggest hurdles in many deep-learning applications is the acquisition of labelled data.However, recent advances in unsupervised and self-supervised deep learning algorithms have shown promise in addressing this problem.For instance, CycleGANs, which are part of the generative adversarial network family, can, in ad-dition to their use in generating new data, be utilised for segmentation tasks in plankton images even when there is a limited amount of manually annotated data.Since synthetically-generated masks with similar morphologies can be used as ground truth data for real plankton images, CycleGANs can be trained on unpaired images and ground truth data to produce accurate segmentations.
Moreover, microscopy imaging data of plankton can be synthetically generated through either GANs or by simulating plankton-like objects.This method allows for ground-truth data to be known beforehand and controlled, which can help overcome the challenges associated with manual annotation of data.As an example, the segmentations of plankton species shown in Fig. 2 were obtained by a U-Net model trained on simulated plankton data.This approach also offers cell classification based on morphological properties, in addition to segmentation.
Self-supervised deep learning algorithms, such as vision transformers (ViTs), have also demonstrated promising results in object segmentation and detection tasks.Unlike supervised algorithms, which rely on labelled examples, self-supervised algorithms use transformed versions of input images themselves as labels.DINO (distillation with no labels), a self-supervised vision transformer belonging to the ViT family, was able to accurately segment objects from images without any labelled data.Given the diverse morphologies of plankton, self-supervised vision transformers can be used for segmentation and classification of complex taxa.
In conclusion, the field of AI-driven microscopy is advancing quickly, offering new opportunities for identifying, segmenting, and tracking individual plankton organisms.These developments are expected to revolutionise our understanding of the lower aquatic food web, providing insights that were previously unattainable.With the help of modern microscopy methods and deep learning algorithms, it will soon be possible to observe large numbers of organisms at high spatial and temporal resolutions, enabling us to better understand their interactions and ecology.These breakthroughs are poised to catalyse further progress in plankton ecology in the years to come.

VI. GUIDELINES FOR USING DEEP LEARNING IN PLANKTON ECOLOGY
To ensure the effective use of deep learning in plankton ecology research, we propose the following specific guidelines, on top om more general guidelines that can be found for example in Ref. [91]: 1. Model selection and development: During experimental design, it is important to choose an appropriate model for the task being performed.For example: • Regression models: where a value or quantity needs to be predicted from the given data (e.g., dry mass prediction in section III).
• Classification models: where the given data (e.g., images of planktons) need to be classified into a particular class (such as species).
• Generative models: when the data is insufficient, and additional data is needed to train models.
• Image-to-image transformation models: where an image from one modality is converted to a different modality for easier analysis (e.g., a microscopy image to a binary map (segmentation map) for classification and detection purposes (see Fig. 2)).
In the GitHub repository accompanying this article, we provide an example model using Deep-Track 2.0.Other open-source models are also readily available, and we believe the studies mentioned in this article will help direct readers towards models suitable for addressing their own research questions.

Data Preparation and Annotation:
Once the task and appropriate model have been defined, one needs to prepare the input data in the right way.For instance, for classification tasks, high quality plankton image data, classified by an expert taxonomist, is required.For regression tasks, such as predicting the physical parameters of a plankton (size, aspect ratios, dry mass, etc.), ground truth data can be obtained by standard methods as a representative set.Additionally, for segmentation tasks, simulating plankton images (as shown in Fig. 2) has its own advantages, as ground truth masks are already known.

Training and Validation:
Once the data and the model are prepared, the next step is to train the model to maximise its accuracy and minimise its error rate.The data obtained in the previous step must be divided into training, validation, and test data, each representative of the dataset as a whole.
The training is the step where the algorithm learns from the data.During training, the performance of the model should be evaluated regularly using metrics like those described earlier in this review.
If required, data augmentation can be applied to improve the model's capacity to generalise across variations in the plankton's appearance.The validation dataset is used to evaluate the performance of the model.The model does not learn from the validation dataset, but the results are used to tune the model parameters.Lastly, the test dataset is used to get the final evaluation of the model's performance.

Interpretation and Validation of Results:
Once the trained model has been applied to the data, it is important to interpret the data in the context of plankton ecology.Understanding how the model makes its decisions, and assessing any uncertainties, is vital.At least part of the model's predictions should also be compared to results obtained from traditional methods, to ensure the accuracy and reliability of the model.For example, manual identification of species by taxonomists in the classifications tasks, and estimation of biomass by elemental analysis methods for the biomass estimation tasks.
5. Reproducibility and Open Science: Given the ongoing reproducibility crisis across scientific fields [92], we strongly recommend the sharing of analysis code, models, and datasets used in studies, along with detailed documentation on their use.Platforms such as GitHub can be used for this purpose, and sharing data in this way facilitates collaboration and scientific progress.
By adhering to these guidelines, researchers can ensure the effective and responsible use of deep learning in plankton ecology, leading to robust and insightful outcomes in the field.The guidelines highlight the importance of proper data preparation, model selection, training and validation, result interpretation, and promoting reproducibility and open science.
the code examples and established the GitHub repository.HB, CR and ES analysed the data, and generated the figures.PDW, JH, AK, DM, ES and GV provided feedback on the manuscript.ES and GV provided project oversight, and supervised the project.

Figure 1 .
Figure 1.Workflow of a deep learning analysis applied to plankton studies.a Different sampling strategies for in situ and ex situ data.Plankton can be cultivated in the laboratory or collected from the field.Remote-sensing data can also be collected via drones or satellites.b Images and data are obtained using microscopic analyses or satellite imaging.c Data is processed using a deep learning network.d The output of a deep learning analysis can be used for a wide range of applications.

Figure 2 .
Figure 2. Deep learning methods for cell counting, segmentation and classification.a-f Example of a supervised method to detect, classify, and count plankton species Noctiluca scintillans and Dunaliella tertiolecta: a Synthetic training images are generated by simulating plankton-like objects that carry similar spatial features to the original organisms.b A U-Net model is trained to perform an image-to-image translation task to output c two segmentation masks that correspond to the species N. scinitillans (left) and D. tertiolecta (right).d The pre-trained U-Net model is tested on experimental images to generate e the specific segmentation masks of N. scintillans (left) and D. tertiolecta (right).f The segmentation masks are then analysed to predict the number of cells (cell counting) for each species in the experimental image.g-i Example of a self-supervised method to detect and count plankton.g The experimental image of N. scintillans is analysed h through a self-supervised object detection model, LodeSTAR [26], to automatically detect the objects without any labelled training data.i By controlling the spatial resolution of the input image, object centroids are controlled in the cell detection step.Figuresg-iare adapted from Ref.[26], with some of the authors of this work being part of the cited reference.

Figure 4 .
Figure 4. Quantitative analysis of plankton behaviours.a-c Plankton trajectory analysis.a Snapshots of plankton species Oxyrrhis marina taken with a bright-field microscope at 10× magnification are analysed to extract the plankton trajectories.b Techniques for trajectory linking.Standard approaches (top) include the Hungarian algorithm and linear sum assignment.Deep learning approaches (bottom) include recurrent neural networks (RNNs), long short-term memory networks (LSTMs) (left), and graph neural networks (GNNs) (right).c Reconstructed plankton trajectories.d-f Plankton biomass estimation.The biomass of plankton cells can be estimated by imaging them under quantitative phase microscopy methods such as holography [7] d Plankton species O. marina (orange) and D. tertiolecta (blue) are tracked under a holographic microscope.e Image crops of size 64 px × 64 px along the trajectories of respective species are analysed through a deep learning model called WAC-Net [7].f Dry mass values (in picograms) of an exemplar of O. marina (orange) and one of D. tertiolecta (blue) over time.Figuresd-fare adapted from Ref.[7], with some of the authors of this work being part of the cited reference.