A Conformer-Based Time–Frequency Decoupling Network for Pig Vocalization Behavior Classification
Continuous monitoring of pig behavior is essential for timely health management and welfare assessment in commercial production systems. Although vision-based methods have been widely studied, their practical application in commercial barns is often limited by variable lighting, frequent occlusion, and high stocking density. Acoustic sensing offers a non-contact alternative that is independent of lighting conditions; however, reliable behavior classification from pig vocalizations remains challenging in commercial environments because of background noise and temporal variability in sound patterns. In this study, an attention-guided acoustic framework, termed ATF-Conformer, was developed for pig vocalization classification under farm conditions. A five-class vocalization dataset was collected from finishing Landrace pigs and multiparous sows on a commercial farm, including cough, scream, estrus, feeding, and normal behavior sounds. The proposed framework combined spectrogram denoising with interactive attention to enhance behavior-related acoustic information, while a time-frequency-decoupled Conformer encoder was introduced to improve feature representation under noisy conditions. Final classification was performed using mask-based temporal pooling with an additive angular margin Softmax objective. In five-fold grouped cross-validation, ATF-Conformer achieved an accuracy of 97.34% ± 0.42 and outperformed several existing acoustic models across multiple evaluation metrics. A similar accuracy of 97.38% was obtained on an independent test set, indicating stable performance across datasets. These results suggest that the proposed method can support continuous, non-invasive pig vocalization-based behavior monitoring and may assist farm owners or workers in pen-level screening of frequent cough or abnormal vocal events, thereby supporting targeted on-site inspection in precision livestock farming.
Authors
- J B Wang
- Yuzhen Song
- Feng Wei (ORCID: https://orcid.org/0009-0002-7326-7534)
- Haoyu Wu
- Yingying Lv
- Shugang Li
- Siao Geng
- Qian Li
- Yuqing Liu
Institutions
- Jiaxing Vocational Technical College (CN)
- Henan Institute of Technology (CN)
- Henan Institute of Science and Technology (CN)
- Xinxiang University (CN)
- Henan Agricultural University (CN)
Publication Details
- Journal
- Animals
- Published
- 2026-04-27
- DOI
- https://doi.org/10.3390/ani16091337
- Primary Topic
- Animal Behavior and Welfare Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00