Preprint Article Version 1 Preserved in Portico This version is not peer-reviewed

Application of Anomaly Detection to Identifying Aggressive Pig Behaviors Using Reconstruction Loss Inversion

Version 1 : Received: 21 August 2024 / Approved: 21 August 2024 / Online: 22 August 2024 (12:18:13 CEST)

How to cite: Kim, H.; Kim, Y. S. E.; Devira, F. A.; Yi, M. Y. Application of Anomaly Detection to Identifying Aggressive Pig Behaviors Using Reconstruction Loss Inversion. Preprints 2024, 2024081574. https://doi.org/10.20944/preprints202408.1574.v1 Kim, H.; Kim, Y. S. E.; Devira, F. A.; Yi, M. Y. Application of Anomaly Detection to Identifying Aggressive Pig Behaviors Using Reconstruction Loss Inversion. Preprints 2024, 2024081574. https://doi.org/10.20944/preprints202408.1574.v1

Abstract

Increasing concerns on animal welfare in commercial pig industry include aggression between pigs as it affects their health and growth. Early detection of aggressive behaviors is essential for optimizing their living environment. A major challenge for detection is that these behaviors are observed occasionally in normal conditions. Under this circumstance, a limited amount of aggressive behavior data will lead to class imbalance issue, making it difficult to develop an effective classification model for the detection of aggressive behaviors. To overcome this problem, we approach the aggressive behavior detection problem as a case of anomaly detection rather than classification and propose a model based on anomaly detection, which can better handle unbalanced class distribution and effectively detect the infrequent, aggressive episodes of pigs. The model consists of a convolutional neural network (CNN) and a variational long short-term memory (LSTM) autoencoder. Additionally, we adopted a training method similar to weakly supervised anomaly detection and included a few aggressive behavior data in the training set for prior learning. To effectively utilize the aggressive behavior data, we created Reconstruction Loss Inversion, a novel objective function, to train the autoencoder-based model to increase the reconstruction error of aggressive behaviors by inverting the loss function. Our anomaly detection approach significantly outperforms traditional classification-based methods, effectively identifying aggressive behaviors in a natural farming environment. This method offers a robust solution for detecting aggressive animal behaviors and contributes to improving their welfare.

Keywords

Aggression detection; Unbalanced dataset; Autoencoder; Computer vision; Deep learning

Subject

Computer Science and Mathematics, Artificial Intelligence and Machine Learning

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.