Artificial Intelligence and Circadian Thresholds for Stress Detection in Dairy Cattle
This study investigates stress detection in dairy cattle by integrating circadian rhythm analysis and deep learning. Behavioral biomarkers, including feeding, resting, and rumination, were continuously monitored using Nedap CowControl sensors over a 12-month period to capture seasonal variability. Circadian features were extracted using the Fast Fourier Transform (FFT), and deviations from expected 24 h patterns were quantified using Euclidean distance. These features were used to train a Long Short-Term Memory (LSTM) neural network to classify stress into three levels: normal, mild, and high. Expert veterinary observations of anomalous behaviors and environmental records were used to validate stress labeling. We continuously monitored 10 lactating Holstein cows for 365 days, yielding 87,600 raw hours and 3650 cow-days (one day per cow as the analytical unit). The Short-Time Fourier Transform (STFT, 36 h window, 1 h step) was used solely to derive daily circadian characteristics (amplitude, phase, coherence); STFT windows are not statistical samples. A 60 min window prior to stress onset was incorporated to anticipate stress conditions triggered by management practices and environmental stressors, such as vaccination, animal handling, and cold stress. The proposed LSTM model achieved an accuracy of 82.3% and an AUC of 0.847, outperforming a benchmark logistic regression model (65% accuracy). This predictive capability, with a one-hour lead time, provides a critical window for preventive interventions and represents a practical tool for precision livestock farming and animal welfare monitoring.
Authors
- Hernán Rigoberto Benavides Rosales (ORCID: https://orcid.org/0000-0001-9236-3076)
- Luis Rivera (ORCID: https://orcid.org/0000-0002-5029-2561)
- Samuel Lascano Rivera (ORCID: https://orcid.org/0000-0001-5967-6441)
- Yasmany Fernández-Fernández (ORCID: https://orcid.org/0000-0002-9530-4028)
Institutions
- National University of San Marcos (PE)
- State University of Norte Fluminense (BR)
- Universidad Politécnica Estatal del Carchi (EC)
Publication Details
- Journal
- Sensors
- Published
- 2025-10-24
- DOI
- https://doi.org/10.3390/s25216544
- Primary Topic
- Effects of Environmental Stressors on Livestock
- Type
- article
- Field-Weighted Citation Impact
- 0.00