1. Introduction
Over 80% of the global population lives in areas that are at risk from at least one major vector-borne disease [
1], with vector-borne diseases accounting for more than 17% of all human infectious diseases [
2]. Globally, mosquito-borne diseases such as dengue are increasing in intensity and in geographic distribution driven by urbanisation, global trade and travel, climate change, and ineffective vector control, with the latter being partly the result of insecticide resistance [
3]. Insecticide-based methods are essential to virtually all vector control programmes and, as such, insecticide resistance is a major threat to the control or prevention of all vector-borne diseases. Perhaps most importantly, the control of malaria vectors in Africa has stalled as insecticide resistance may explain recent losses in the effectiveness of insecticide-treated bed nets, which were until now the most effective method for protecting vulnerable communities from malaria infection in Africa [
4]. The increase in insecticide resistance among mosquito species is threatening the efficacy of insecticide-based control strategies and behavioural studies are needed to refine the current approaches and develop new interventions [
5,
6,
7,
8].
Control approaches for mosquito-transmitted diseases include genetic-based strategies aimed at reducing mosquito densities or replacing wild populations with individual’s refractory to diseases’ infection [
4]. This is achieved by releasing mass-produced mosquitoes, usually males, bearing the desired trait(s), aimed at sterilising wild females or spreading the desired genes into the field populations. Mating becomes, therefore, the crucial event for ensuring the success of these strategies, with manipulated males needing to compete with their wild counterparts to inseminate females. Lab-produced males often show a competitive mating disadvantage which can make the mosquito line not suitable for field release [
7,
8,
9]. Therefore, improving the reproductive fitness of lab-produced mosquitoes bearing the desired traits and intended for field release becomes a powerful tool for the success of these genetic approaches.
Mosquito mating is one of the least understood behaviours of the mosquito life cycle [
10], and by gaining more knowledge of this process, it may be possible to identify new opportunities for mosquito control and interventions [
4]. Mosquitoes, like many other flying insects, are able to mate in flight. In
Anopheles gambiae sl., the most important malaria vector worldwide, mating occurs in swarms where 5 to 500 male mosquitoes fly usually above a landmark (a region of high contrast) at dusk [
10,
11]. Female mosquitoes will fly into the swarm and mate with a particular male, then leave the swarm and usually seek a blood meal.
Aedes aegypti and
Aedes albopictus, major arbovirus vectors in tropical and temperate regions, mate in small swarms present in the cooler hours of the day on top of dark landmarks and water containers. Often, males fly around the host waiting for females in host-seeking behaviour and inseminate them while approaching the host for a blood meal [
7,
8]. Recent studies on mating revolve around the acoustic signals produced in mate selection as a result of the wing beat frequency [
4,
12]. However, tracking the flight of mosquitoes is still in its infancy, with Butail et al. being one of the first to quantify the interactions within wild mating swarms of male
Anopheles gambiae [
13]. The data gathered through these experiments are used in this paper to further understand and model mosquito behaviour.
There are few studies that have applied machine learning to insect trajectories. One example of a research paper that resembles the work presented here is the automatic identification of phlebotomine sand flies, in which Machraoui et al. attempted to identify sand flies among other insects [
14]. An artificial neural network (ANN) was used to classify the two classes of insect flight and obtained performance close to 88% for both accuracy and F1 score when using an optimised set of trajectory features. The approach consisted of ensuring track lengths contained between 14 to 56 positions, with features later extracted that are used in the classification of the trajectories. These track lengths span a large range that may impact the values produced by curvature-based features, as longer tracks have more opportunity for deviations within flight than shorter tracks. There has been little exploration into the classification of mosquito trajectories, which can reveal new insights into mosquito behaviour that may be utilised to reduce the spread of disease.
In this paper, we propose a novel methodology that can classify and identify behavioural differences between male and non-male mosquitoes. The novelty of this approach lies in splitting tracks into track segments and later combining them using a voting method, as well as the use of unique features of flight that have yet to be applied to mosquito trajectories. Furthermore, we use an anomaly approach where we define a one-class method (i.e., we consider a male class against any known or unknown class of non-males) instead of a fixed number of classes and use explainable artificial intelligence (AI) techniques to extract scientific insights into the behavioural differences between these classes. Overall, the methodology standardises the track duration, extracts kinematic and shape-descriptor features, and uses a Support Vector Machine (SVM) classifier alongside a voting method that overall separates the male and non-male classes of mosquito tracks. Using this system, biologically relevant conclusions on the differences between mosquito behaviours of separate classes are obtained, which are supported by data and experts’ knowledge, rather than only expert opinions. The system is tested on 3D tracks generated from natural mating swarms of the malaria vector mosquito Anopheles gambiae in the field in West Africa. Through the development of this system, the differences between different male and non-male classes of mosquitoes are quantified and interpreted from a biological perspective. We believe such work will add to the ongoing research into mosquito behaviour.
4. Discussion
With experiments using mosquito mating swarms, the scores displayed a good performance to discriminate between the male and non-male classes despite the variability in the dataset. The data used to validate the proposed method were generated in the field using stereo-cameras. Such a method introduces noise where environmental factors can influence the mosquito flight, including weather, odours, and animal activity. Such variability would not be observed in tracks generated in a more controlled setting. An inherent limitation from the use of stereo-cameras is that the depth positional values (with respect to the cameras, x-coordinates) are less accurate than values in the other axes. On the other hand, there is a possibility of other mosquito species or other flying insects participating within the swarm without the knowledge of the investigators. The dataset mostly contains male and couple tracks, alongside a few female and focal-male tracks. As the couples themselves contain both a male and female mosquito, it is plausible that couples may display some male-like flight behaviour. A significant difference for a couple is its increased inertia compared to a male mosquito while the combined aerodynamic forces available from the male and the female are also increased. These factors combined result in a dataset that may be hard to classify and hence it is considered that the proposed method returns a strong performance. The highest average accuracy obtained is for the female group at 100% throughout all folds, while it is recognised that there are only 6 tracks of this type. Similarly, the focal-male group obtained an accuracy of 83.3% throughout all folds where there were only 5 tracks available.
From
Table 3 and
Figure 3, it can be seen that the balanced accuracy and ROC AUC scores are fairly strong where the SVM model is able to distinguish between male and non-male classes. Through the confusion matrix,
Figure 3, it is shown that the model can identify true males and true non-males.
The anomaly classification model adopted is particularly appropriate for the available data where the different track groups (male, female, focal male and couple) exhibit a large contrast in population, as shown in
Table 2. The model also gives the flexibility to test several anomalies against the single (male) class. A more balanced dataset would enable binary classification models to be evaluated. However, as within mating swarms, there are fewer female mosquitoes, so a single-class approach was appropriate.
The methodology described allows for the exploration of acute differences in the flight rather than general swarming behaviours. Mosquito behaviour can easily be described using whole tracks rather than segments, as whole tracks contain an important behavioural difference—the time of flight. It has been shown that using whole track duration and distance travelled features out-perform the current methodology with a balanced accuracy of 80.1% and a ROC AUC of 84.3% (for full results see
Table S5). Naturally, within mating swarms, female mosquitoes and couples are visible for a short time because of their expected biological mating behaviours; in contrast, males fly in orbits generating longer duration tracks. Furthermore, the stereo imaging system has a spatially fixed and finite field-of-view; hence, the intrinsic limitations of the imaging system would also lead to female tracks being shorter than males—an artefact that is unrelated to flight behaviour. This provides additional motivation to examine detailed flight behaviour using metrics based on limited duration segments, in this case 1.6 s, rather than building the best classifier.
To date, the application of machine learning techniques on mosquito trajectories has received little attention. A similar previous study focused on classifying phlebotomine sand flies [
14] and reported high accuracy rates using machine learning models. However, it is important to note that these studies classified distinctly different species as well as a further study on sandflies before and after exposure to a large amount of repellent. In contrast, our research aims to differentiate between subtle differences in the movements of male and non-male mosquitoes within mating swarms, which presents a greater challenge due to the complex nature of swarm behaviour and background noise in field recordings. Despite the lower performance of our model, the results indicate that there are indeed distinguishable differences between these classes, highlighting the potential for further exploration of machine learning methods in analysing mosquito behaviour.
Mention should be made of the large confidence intervals for the male test set. Upon inspection, it was found that a few similar trials, one conducted on 6 October 2011 (named trial 8) and two trials conducted on 7 October 2011 (named trials 9 and 11), performed strangely during the model evaluation using cross validation. These three trials were the only trials in the test set that were of the Mopti form rather than the Savannah form, as well as the only trials where the swarm formed over a bundle of wood rather than bare ground. When these tracks were included in the test set, generally, those male test results were quite poor. However, when they were included in the training set, the male test performance improved. The couple performance was generally consistent through all folds. The top 5 performing male test folds mostly contained these trials (8, 9 and 11) in the training set and trial 2 in the test set. As trials 8, 9, and 11 are of a different form and swarming over a different marker, some variability in their flight is expected. The variability in particular features in these trials can significantly impact the performance of a model. Including such variability in the training set helps the model fit well across the range of values and helps classify all males. However, in some cases, the model may overfit to this variability resulting in highly accurate classifications of males but leaving less room for non-males to be classified as anomalies. Furthermore, trial two′s features are likely to have much less variability and, thus, fit well within the decision boundary created by the large variation in these other trials.
Although there may be slight variations in the behaviour of the mosquitoes in different trials, incorporating them into the model provides a more generalised representation of mosquito swarming behaviour. Nevertheless, from
Figures S5 and S6, there are very few tracks/segments in these trials, and, as such, their removal would not significantly affect the model’s performance (as seen in
Table S6). Despite this, it was ultimately decided to retain these trials in the model as they may still contribute to the overall understanding of mosquito behaviour. Through the inclusion of these trials, we can observe how different mosquito forms and environmental factors influence the model’s performance, highlighting the importance of accounting for such factors.
The PR curves for the male set display unusual results. The curves look as if they start at (0,0); however, they do start at (0,1) but drop towards the origin instantly at the first few threshold. Usually, the points with highest probability are classified correctly (true positive), so the precision should be around one. However, in this case, there is a very small number of points with the highest probabilities that are actually false positives and lead to a precision of zero. This is observed in some of the other folds too, where the worst folds are those that contain the trials 8, 9, and 11 in the test set. The performance in these folds may be caused by the different mosquito form and swarming marker, but the other folds may display this performance due to the variability generated from experiments in the field.
From the SHAP plots, it is possible to extract behavioural insights. Generally, there is noise in these plots, possibly as a result of using the data gathered in the field. Due to this noise and some anomalous feature values, the colour scale representing the magnitude of the feature values might be slightly skewed. Nevertheless, to ensure the robustness of our interpretations of the model, the SHAP summary plots were used in conjunction with scatter plots to assess the feature value distributions (an example scatter plot can be found at
Figure S13 which contains mostly red data points; however, this is due to the influence of extreme negative values—hence, examining the distribution of colours in the SHAP summary plots alone can be misleading). The summary and scatter plots reveal that the positive SHAP values display only slight positive values, while the negative SHAP values are largely negative. This is likely due to the proximity of feature values for the normal instances in the dataset to the decision boundary defined by the one-class SVM model. As a result, features with positive SHAP values contribute very little to the classification decision, while anomalous features that are further away from the decision boundary contribute much more and are assigned very negative SHAP values. The bar plots show that all features contribute roughly equally, which indicates that the model uses the complex interactions between the selected features rather than a contribution from a select few. The ranked lists of mean absolute SHAP values (bar plots) for the best and worst folds show significant differences, but there are similarities in the feature value contributions (summary plots). The fold that performed the best included trials zero and two, which displayed velocities that were comparable to many other trials and well within their velocity distributions, as shown in
Figure S2. On the other hand, the worst-performing fold included trials seven and eight, where trial eight was previously noted to contain a different mosquito form and swarming marker. Trial seven does contain mosquitoes of the Savannah form; however, the swarming marker is also different (grass patch rather than a bundle of wood). As such, much of the discussion draws insights from the SHAP plots generated from the best-performing fold.
Upon initial examination, it is evident that extreme values across most features contribute towards a non-male classification, particularly in kinematic features. In the case of radial acceleration and jerk-based features (radial velocity was not selected from our feature selection process) that capture all 3D components (unlike the axial-based features), larger or extreme features values tend to contribute more toward a non-male classification. This is observed in the first and third quartiles of radial acceleration, where the largest and the smallest values tend to lead to a non-male classification, for each feature, respectively. The same trend is displayed in the first and third quartiles of radial jerk, as shown in
Figure 8, which overall shows that extreme values tend to lead to a non-male classification. The pattern observed in the best-performing fold can be explained by the fact that non-male mosquitoes, which include mosquito mating couples and females, are generally larger and require more energy to maintain flight than a single swarming male, resulting in more erratic flight and more changes in velocity. As mating couples contain two bodies, issues may arise when they attempt to coordinate flight which is, mechanically, a much more complex process. Some kinematic features are also described using the number of zero crossings and the number of local minima and maxima, but they are difficult to interpret as they contain a lot of noise. Nevertheless, these features rank lower and contain much smaller absolute SHAP values in comparison to those describing the first and third quartiles, and thus contribute less to the model.
The axial kinematic features, including the x, y, and z components of velocity and acceleration, show very similar trends, where larger or extreme values contribute to a non-male classification. Non-male mosquitoes tend to display larger values of acceleration and velocity in the x and y components, which continues to follow the previous trend and may be explained by non-males struggling to maintain stability in flight while trying to stay together. The z components (height above ground) of velocity and acceleration show that extreme values tend to lead to a non-male classification. This can be attributed to the fact that male mosquitoes fly with relative stability when swarming in circular motions with little change in their vertical direction, whereas couples may experience chaotic flight during mating, leading to extreme values in both velocity and acceleration in the z-axis.
Some of the highest contributing features were orthogonal components of velocity that describe the mosquito’s tendency to move in a specific direction. Inclination velocity measures the degree to which a mosquito is inclined to move up or down as it moves forward. Notably, non-males exhibit extreme values in inclination velocity, again, describing males as being relatively stable in the z-axis. While persistence velocity was also selected through the feature selection, its contributions were much lower and more challenging to interpret.
The SHAP plots indicate that angle-based features do vary between males and non-males in mating swarms, possibly reflecting the distinct roles each group plays in the mating process. Specifically, non-males exhibit much lower angles of flight values than males, or, in other words, lower changes in direction. However, the non-males have much larger values in angular acceleration and angular velocity. Combined, this describes non-male trajectories as rapidly changing and unstable, but with smaller angle changes in comparison to males. This is consistent with the chaotic nature of mosquito mating couples, as well as reflects the large angle changes observed in males whilst flying in circular motions within a mating swarm.
Meanwhile, shape descriptors provide insight into the shape of mosquito tracks. Although most shape descriptor features have little impact on model predictions, their contributions offer expected outcomes. For instance, straightness and fractal dimension features reveal that non-male mosquitoes tend to have extreme values, indicating both high and low amounts of curvature in flight, which is in line with expectations. Similarly, male trajectories also exhibit smaller ranges of curvature than non-males, as described by the SHAP plots where the standard deviation of curvature in all projections are lower.
Overall, the SHAP values validate our prior expectations regarding flight within mosquito mating swarms that male mosquitoes have much more stable flights than non-male mosquitoes. Due to the nature of mating swarms, male mosquitoes fly relatively stable while waiting for a female. On the other hand, female mosquitoes will search for a mosquito mating swarm, and once in a swarm, will couple with a male fairly quickly. During the mating process, mosquitoes have been observed to engage in brief and intense periods of copulation while in flight, during which their flight becomes erratic. This behaviour is likely due to their need to maintain a close proximity to one another in order to successfully mate. Nevertheless, the signal within the SHAP plots is noisy due to the variability of natural mosquito populations and experimental conditions.
It was noted that the most contributing features are velocity- and acceleration-based, and few shape descriptors were selected in the feature selection process. Similarly, those few shape descriptors that were chosen had little contribution to the model classification. It was expected that some shape descriptors may display some variability that would enable the model to separate the classes; nevertheless, the results show that on the level of individual track segments, shape descriptors struggle to separate sexes. Shape descriptors may be expected to have a greater influence for larger segment durations. Whilst the optimum segment duration was found to be 1.6 s, in hyperparameter tuning, segment durations were explored up to 10 s but were not selected due to the poorer performance of the model, in terms of balanced accuracy. Further exploration of the dataset would be needed at larger segment durations to understand the role of trajectory shape descriptors as a means of distinguishing sex.