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
- Lucile Riaboff (ORCID: https://orcid.org/0000-0001-6664-1191)
- Willy Troupe
- Mathieu Bonneau (ORCID: https://orcid.org/0000-0002-7004-8267)
- Laura Faillot
Institutions
- 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)
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
- Science Foundation Ireland
- Agence Nationale de la Recherche