Hierarchical long short term memory recurrent neural network for goats behaviour prediction from accelerometer data

Gastrointestinal parasitism is a major challenge in small grazing ruminants, affecting animal welfare and farmers' income. In this regard, monitoring individual animal behaviour could help to develop new selection schemes that favor animals with a lower risk of larval infestation, but also support the targeted use of anthelmintic by focusing only on infested animals. Accelerometer sensors are widely used in combination with statistical models to predict the behaviour of grazing ruminants, but the lack of generalization of the models and the limited range of well-predicted behaviours are still challenging. In our study, we introduce an innovative methodology based on hierarchical long short term memory (LSTM) recurrent neural networks to predict the main behaviours of goats on pasture. For that purpose, we collected accelerometer data from the horns of 59 Creole goats and annotated the behaviour over 144 hours of data. We defined 13 moving features that are mathematical combinations of the raw data to get more information while preserving the temporal structure of the accelerometer time-series. A data augmentation technique involving the addition of random noise was applied to sequences from the minority behaviour labels. A hierarchical LSTM model was then built to derive behaviours from a given accelerometer signal, by sequentially combining several models that first tackle simple classification tasks (e.g., grazing or non-grazing segments), then increasingly complex ones (e.g., displacement or other activities), progressively withdrawing segments that have already been identified. The hierarchical LSTM model was validated using a testing set consisting of goats not seen during model training, and carefully selected to maximize behavioural labels heterogeneity. Performance of the hierarchical LSTM model was also compared to those of a regular LSTM model which directly classified the raw signal into the 5 behaviours, used as the baseline. Highest performance was obtained with the hierarchical LSTM model, reaching a Fscore of 87.84%, a precision of 89.44% and a recall of 86.3%. Best performance was obtained for grazing prediction (recall: 99.5%; precision: 99.4%), following by resting (recall: 98.0%; precision: 98.4%) and ruminating (recall: 95.2%; precision: 89%). Most confusions occurred with the displacement (recall: 51.2%; precision: 67.8%), likely due to the low number of sequences in the dataset (0.42% of the dataset). While other avenues remain to be explored for improving the prediction of such rare behaviours, our approach introduces key innovations that not only address the methodological limitations identified in the literature, but also facilitate further exploration of the role of goat behaviour in managing gastrointestinal parasitism on pasture.

Authors

Institutions

Publication Details

Journal
Smart Agricultural Technology
Published
2025-05-27
DOI
https://doi.org/10.1016/j.atech.2025.101045
Citations
2
Primary Topic
Animal Behavior and Welfare Studies
Type
article
Field-Weighted Citation Impact
4.71

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Hierarchical long short term memory recurrent neural network for goats behaviour prediction from accelerometer data

Lucile Riaboff, Willy Troupe, Mathieu Bonneau, Laura Faillot
2 citations
Smart Agricultural Technology
Animal Behavior and Welfare Studies
4.71
article

Hierarchical long short term memory recurrent neural network for goats behaviour prediction from accelerometer data

Lucile Riaboff, Willy Troupe, Mathieu Bonneau, Laura Faillot
article en
2 citations

Abstract

Gastrointestinal parasitism is a major challenge in small grazing ruminants, affecting animal welfare and farmers' income. In this regard, monitoring individual animal behaviour could help to develop new selection schemes that favor animals with a lower risk of larval infestation, but also support the targeted use of anthelmintic by focusing only on infested animals. Accelerometer sensors are widely used in combination with statistical models to predict the behaviour of grazing ruminants, but the lack of generalization of the models and the limited range of well-predicted behaviours are still challenging. In our study, we introduce an innovative methodology based on hierarchical long short term memory (LSTM) recurrent neural networks to predict the main behaviours of goats on pasture. For that purpose, we collected accelerometer data from the horns of 59 Creole goats and annotated the behaviour over 144 hours of data. We defined 13 moving features that are mathematical combinations of the raw data to get more information while preserving the temporal structure of the accelerometer time-series. A data augmentation technique involving the addition of random noise was applied to sequences from the minority behaviour labels. A hierarchical LSTM model was then built to derive behaviours from a given accelerometer signal, by sequentially combining several models that first tackle simple classification tasks (e.g., grazing or non-grazing segments), then increasingly complex ones (e.g., displacement or other activities), progressively withdrawing segments that have already been identified. The hierarchical LSTM model was validated using a testing set consisting of goats not seen during model training, and carefully selected to maximize behavioural labels heterogeneity. Performance of the hierarchical LSTM model was also compared to those of a regular LSTM model which directly classified the raw signal into the 5 behaviours, used as the baseline. Highest performance was obtained with the hierarchical LSTM model, reaching a Fscore of 87.84%, a precision of 89.44% and a recall of 86.3%. Best performance was obtained for grazing prediction (recall: 99.5%; precision: 99.4%), following by resting (recall: 98.0%; precision: 98.4%) and ruminating (recall: 95.2%; precision: 89%). Most confusions occurred with the displacement (recall: 51.2%; precision: 67.8%), likely due to the low number of sequences in the dataset (0.42% of the dataset). While other avenues remain to be explored for improving the prediction of such rare behaviours, our approach introduces key innovations that not only address the methodological limitations identified in the literature, but also facilitate further exploration of the role of goat behaviour in managing gastrointestinal parasitism on pasture.

Smart Agricultural TechnologyVol. 11
University College Dublin (IE), École Nationale Vétérinaire de Toulouse (FR), Université Fédérale de Toulouse Midi-Pyrénées (FR), Institut National de Recherche pour l'Agriculture, l'Alimentation et l'Environnement (FR), Agrosystèmes tropicaux (GP), Institut Pasteur de la Guadeloupe (GP), Génétique Physiologie et Systèmes d'Elevage (FR)
Science Foundation Ireland, Agence Nationale de la Recherche
Openalex Percentile: Top 7%
Animal Behavior and Welfare Studies
4.71
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.