Unsupervised Anomaly Detection with Continuous-Time Model for Pig Farm Environmental Data
Environmental air anomaly detection is crucial for ensuring the healthy growth of livestock in smart pig farming systems. This study focuses on four key environmental variables within pig housing: temperature, relative humidity, carbon dioxide concentration, and ammonia concentration. Based on these variables, it proposes a novel encoder–decoder architecture for anomaly detection based on continuous-time models. The proposed framework consists of two embedding layers: an encoder module built around a continuous-time neural network, and a decoder composed of multilayer perceptrons. The model is trained in a self-supervised manner and optimized using a reconstruction-based loss function. Extensive experiments are conducted on a multivariate multi-sequence dataset collected from real-world pig farming environments. Experimental results show that the proposed architecture significantly outperforms existing transformer-based methods, achieving 92.39% accuracy, 92.08% precision, 85.84% recall, and an F1 score of 88.19%. These findings highlight the practical value of accurate anomaly detection in smart farming systems; timely identification of environmental irregularities enables proactive intervention, reduces animal stress, minimizes disease risk, and ultimately improves the sustainability and productivity of livestock operations.
Authors
- Hyongsuk Kim (ORCID: https://orcid.org/0000-0002-3321-5695)
- Sang-Cheol Kim (ORCID: https://orcid.org/0000-0001-6849-1393)
- Seyeon Chung (ORCID: https://orcid.org/0009-0001-3355-7898)
- Arsalan Ahmad (ORCID: https://orcid.org/0000-0002-5467-7901)
- Muhammad Ilyas (ORCID: https://orcid.org/0000-0001-9357-123X)
- Malik Muhammad Waqar (ORCID: https://orcid.org/0009-0003-8138-2978)
- Heng Zhou (ORCID: https://orcid.org/0000-0002-2125-6908)
- Muhammad Ibrahim Zain Ul Abideen
Institutions
- Jeonbuk National University (KR)
Publication Details
- Journal
- Agriculture
- Published
- 2025-06-30
- DOI
- https://doi.org/10.3390/agriculture15131419
- Citations
- 1
- Primary Topic
- Food Supply Chain Traceability
- Type
- article
- Field-Weighted Citation Impact
- 1.16
Funders
- National Research Foundation
- Ministry of Agriculture, Food and Rural Affairs
- National Research Foundation of Korea
- China Scholarship Council
- Korea Institute of Planning and Evaluation for Technology in Food, Agriculture and Forestry