bioRxiv Science⌕ Search

bioRxiv · 10.1101/2024.12.28.630628

Leveraging machine learning and accelerometry to classify animal behaviours with uncertainty

Abstract

O_LIAnimal-worn sensors have revolutionised the study of animal behaviour and ecology. Accelerometers, which measure changes in acceleration across planes of movement, are increasingly being used in conjunction with machine learning models to classify animal behaviours across taxa and research questions. However, the widespread adoption of these methods faces challenges from imbalanced training data, unquantified uncertainties in model outputs, shifts in model performance across contexts, and noisy classifications in continuous data streams, where predicted behaviours change abruptly within a sequence. C_LIO_LITo address these challenges, we introduce an open-source approach for classifying animal behaviour from raw acceleration data. Our approach integrates machine learning and statistical inference techniques to evaluate and mitigate class imbalances, changes in model performance across ecological settings, and noisy classifications. Importantly, we extend predictions from single behaviour classifications to prediction sets: sets of behaviour labels guaranteed to contain the true behaviour with a pre-specified probability, in a framework analogous to the use of prediction intervals in statistical analyses. C_LIO_LIWe evaluate our approach via simulation and highlight its utility using data collected from a free-ranging large carnivore, African wild dogs (Lycaon pictus), in the Okavango Delta, Botswana. We demonstrate significantly improved predictions along with associated uncertainty metrics in African wild dog behaviour classification, particularly for rare and ecologically important behaviours such as feeding, where correct classifications more than doubled following quality checks and data rebalancing introduced in our pipeline. C_LIO_LIOur approach is applicable across taxa and represents a key step towards advancing the burgeoning use of machine learning to remotely observe around-the-clock behaviours of free-ranging animals. Future work could include the integration of multiple data streams, such as accelerometer, audio, and GPS data, for model training and could be incorporated directly into our pipeline. C_LI

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Agarwal, M., Rafiq, K., Mehta, R., Abrahms, B., Harchaoui, Z.. 2024-12-29. Leveraging machine learning and accelerometry to classify animal behaviours with uncertainty. https://doi.org/10.1101/2024.12.28.630628

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Host availability, climate and pupal-stage ecology shape the predicted environmental suitability of the New World screwworm across Central and South America

Background: The New World screwworm, Cochliomyia hominivorax, causes primary myiasis in warm-blooded vertebrates. Its recent resurgence in Central America has renewed the need for spatial tools that identify environmentally suitable areas and surveillance gaps. Most previous distribution models have emphasized climate and livestock, whereas ecological constraints acting during the free-living pupal stage have rarely been incorporated. Methods: We compiled 2,461 georeferenced occurrence reports from the literature across Central and South America and linked them to climate, livestock density, forest cover and superficial soil predictors. Four sequential (nested) logistic models quantified the incremental contribution of predictor blocks, compared using likelihood-ratio tests, AIC and discrimination metrics. Logistic regression and Random Forest were then compared using five-fold spatial block cross-validation, which we treat as the primary measure of generalisation, and an independent municipality-level 70:30 train-test split. Variable importance was assessed using Random Forest Mean Decrease Accuracy together with partial-dependence profiles. Because presence and pseudo-absence classes were balanced before fitting, model outputs are interpreted as relative environmental suitability rather than absolute probability of occurrence. Results: The literature database represented 2,589 infected hosts, dominated by cattle, pigs, dogs and humans. Across the sequential models, AUC increased from 0.780 for climate alone to 0.898 with livestock density, 0.908 with forest cover and 0.918 with superficial soil properties; the increment attributable to the soil block ({Delta}AUC = 0.010) was smaller than the between-fold variability observed under spatial cross-validation (SD 0.049) and is therefore reported as suggestive rather than established. Sheep and horse density and cold-quarter soil temperature showed the highest Mean Decrease Accuracy values, while silt texture ranked above cattle density and forest cover. Under spatial block cross-validation Random Forest was markedly more stable than the GLM (mean AUC 0.926 {+/-} 0.049 versus 0.814 {+/-} 0.157) and was retained as the final model. On the independent municipality-level test set it achieved AUC 0.981, TSS 0.824, sensitivity 0.850 and specificity 0.972, values we regard as optimistic relative to the spatially blocked estimates. Predicted suitability was highest across Central America and parts of northern and tropical South America. Conclusions: C. hominivorax occurrence was associated with interacting climatic, host and landscape conditions. Superficial soil variables added a small, biologically interpretable signal consistent with constraints acting during pupation, but one that lies within the uncertainty of our spatial validation and requires confirmation with independent data. The maps estimate relative environmental suitability rather than infection incidence, and are intended to identify areas where surveillance could be strengthened rather than to guide control operations directly.

ecology↗

Phenotypic variation in divergent mitochondrial haplotypes in migratory three-spined stickleback

Mitochondria are essential components in life-sustaining organismal processes. The mitochondrial genome can be influenced by selection, and divergent mitochondrial haplotypes have substantial potential to affect interspecies variation in life-history and physiology, yet little is known about whole organism phenotypic changes that might accompany mitochondrial genomic divergence. Three-spined stickleback on the Scottish island of North Uist provide a model to study this as their populations exhibit a well-mixed nuclear genome, yet two highly diverged mitochondrial haplotypes ( trans-Atlantic and European). Three-spined stickleback were sampled from six lochs to investigate associations between mitochondrial haplotype and phenotypic traits including organ size, body size, and ovule volume/clutch size, as well as citrate synthase enzyme activity. Results showed that mitochondrial haplotype has an influence on male gonadosomatic index (GSI) and potentially citrate synthase (CS) enzyme activity. Differences in male GSI may be explained by the timing of male spermatogenesis or potentially a need for larger testes in European haplotype fish. While no other phenotypic trait showed differences between mitochondrial haplotypes, there were many differences between sexes and populations e.g. in body size and organ/muscle size.

ecology↗

Gregariousness can promote invasion success of pest insects while higher environmental heterogeneity decreases it

Climate change and environmental homogenization are expected to facilitate the expansion of many forest pest insect species and increase the vulnerability of forest ecosystems to insect outbreaks. At present, we lack empirical data on how the antipredator defence traits of pest insects interact with the local environmental conditions and shape outbreak risk. Here we study this and ask 1) how the antipredator defence strategy of pest insects shapes survival under naturally varying predator community, and 2) how is predation risk shaped by the diversity and structure of forests? We tested these questions by conducting a field predation experiment with artificial prey system (prey items made from edible dough) where we manipulated the gregariousness, unpalatability and defensive colouration of prey and tested their effects on prey survival. Additionally, we measured environmental variables and invertebrate predator community structure along the prey transects to analyse how they shape overall predation risk. Our results show that the predation risk was always lowest for gregarious prey irrespective of other defence strategies. Furthermore, our results indicate that predation pressure was lower in more homogenously structured forest areas or areas with a weak quality deadwood continuum in comparison to locations with more natural state forests and good quality deadwood continuum. Altogether, our results suggest that gregariousness can facilitate pest insects to form outbreaks by increasing their survival against generalist predators. However, by maintaining higher heterogeneity in forests, it is possible to ensure higher predation pressure to regulate their population growth.

ecology↗