Document type: scientific article available prior to publication in Journal of Dairy Science
Authors: Chuanyi Guo, Emma Ternman, Xinjie Zhao, Kai Liu, Mutian Niu
Abstract in French (translation): Classification, using deep learning, of wakefulness, sleep, and rumination states in dairy cows based on polysomnography and RumiWatch data
Sleep is essential to the health and well-being of dairy cows, but accurately monitoring it remains challenging. While polysomnography (PSG) is the gold standard for sleep assessment, the fact that it relies on manual analysis of physiological signals—a highly labor-intensive process—limits its application on farms, highlighting the need for accessible sensor systems, such as the RumiWatch System (RWS). This study proposed DairySleepNet, a deep learning framework based on a selective state-space model, for the automated classification of wakefulness, sleep, and rumination states using PSG and RWS data, with the aim of facilitating large-scale annotation and on-farm deployment. The proposed framework adopted a two-stage encoding architecture that effectively processed time-frequency representations converted from raw multichannel signals using the short-time Fourier transform, capturing both intra-channel temporal features and inter-channel interactions. The method was evaluated using 77.13 hours of usable PSG and RWS recordings from 7 cows, with approximately a 12-hour segment retained for each cow. Cross-validation at the animal level and a flexible weighted sampling strategy were implemented to ensure a robust evaluation. The experimental results demonstrated that DairySleepNet achieved a macro-F1 score of 86.37% and an accuracy of 90.80% when using PSG data, significantly outperforming Transformer-based and machine learning-based baseline models. These results confirmed the feasibility of automated sleep annotation from PSG recordings. Although combining PSG and RWS data reduced inter-bed variability, it did not improve the system’s overall performance. In contrast, classification based solely on RWS data remained unsatisfactory, highlighting the need for further methodological development before reliable sleep monitoring can be implemented in clinical practice. Future work should prioritize a detailed classification of sleep stages—currently limited by the lack of stage-specific labeled data—as well as broader data collection across various operational environments to enable a robust and practical application in real-world settings.
Preview: Sleep is essential for the health and welfare of dairy cattle, yet accurate monitoring remains challenging. While Polysomnography (PSG) serves as the gold standard for sleep assessment, its reliance on labor-intensive manual scoring of physiological signals constrains on-farm application, underscoring the need for accessible sensor systems such as the RumiWatch System (RWS). This study proposed DairySleepNet, a deep learning framework based on a selective state space model, for automated classification of wakefulness, sleep, and rumination states using PSG and RWS data, with the aim of supporting scalable annotations and on-farm deployment. The proposed framework adopted a 2-stage encoding architecture that effectively processed time-frequency representations converted from raw multichannel signals through the short-time Fourier transform, capturing both within-channel temporal features and cross-channel interactions. The method was evaluated using 77.13 h of usable PSG and RWS recordings from 7 cows, with approximately one 12-h segment retained for each cow. Animal-level cross-validation and a soft weighted sampling strategy were implemented to ensure robust evaluation. Experimental results demonstrated that DairySleepNet achieved a macro F1 of 86.37% and an accuracy of 90.80% when using PSG data, markedly outperforming both Transformer-based and machine learning baselines. These results supported the feasibility of automated sleep annotation from PSG recordings. Although combining PSG and RWS data reduced cross-fold variability, it did not improve the overall system performance. By contrast, classification based solely on RWS data remained unsatisfactory, underscoring the need for further methodological development before reliable on-farm sleep monitoring can be achieved. Future work should prioritize fine-grained sleep staging, currently limited by scarce stage-specific labeled data, and broader data collection across diverse farm environments to enable robust and practical on-farm application.


