# A Cattle Behavior Recognition Method Based on Graph Neural Network Compression on the Edge

**Authors:** Hongbo Liu, Ping Song, Xiaoping Xin, Yuping Rong, Junyao Gao, Zhuoming Wang, Yinglong Zhang

PMC · DOI: 10.3390/ani16030430 · Animals : an Open Access Journal from MDPI · 2026-01-29

## TL;DR

This paper introduces a low-power wearable device using compressed graph neural networks to recognize cattle behavior in real-time on edge devices, improving livestock management efficiency.

## Contribution

A novel edge-based cattle behavior recognition method using GNN compression and a lightweight model for wearable devices is proposed.

## Key findings

- The compressed model achieves 93.20% accuracy with 46.8% lower power consumption compared to cloud inference.
- The proposed method enables real-time cattle behavior classification on edge devices with limited resources.
- The wearable device supports long-term automated monitoring in large-scale grazing environments.

## Abstract

Behavior recognition is essential techniques in modern livestock and poultry farming, supporting precision agriculture and improving production efficiency. This study proposes an edge-based cattle behavior recognition method based on Graph Neural Network (GNN) compression. A Sequence Residual Network (S-ResNet) tailored for single-frame inputs is developed, and a lightweight model is obtained via GNN compression. The resulting model is successfully deployed on a wearable device with edge inference capability. Experimental results show that the compressed model achieves an accuracy of 93.20%, while its power consumption is only 46.8% of that required by cloud inference. The proposed method enables edge-side cattle behavior recognition and effectively extends device endurance, making it suitable for automated monitoring in large-scale free-grazing scenarios.

Cattle behavior is closely related to their health status, and monitoring cattle behavior using intelligent devices can assist herders in achieving precise and scientific livestock management. Current behavior recognition algorithms are typically executed on server platforms, resulting in increased power consumption due to data transmission from edge devices and hindering real-time computation. An edge-based cattle behavior recognition method via Graph Neural Network (GNN) compression is proposed in this paper. Firstly, this paper proposes a wearable device that integrates data acquisition and model inference. This device achieves low-power edge inference function through a high-performance embedded microcontroller. Secondly, a sequential residual model tailored for single-frame data based on Inertial Measurement Unit (IMU) and displacement information is proposed. The model incrementally extracts deep features through two Residual Blocks (Resblocks), enabling effective cattle behavior classification. Finally, a compression method based on GNNs is introduced to adapt edge devices’ limited storage and computational resources. The method adopts GNNs as the backbone of the Actor–Critic model to autonomously search for an optimal pruning strategy under Floating-Point Operations (FLOPs) constraints. The experimental results demonstrate the effectiveness of the proposed method in cattle behavior classification. Moreover, enabling real-time inference on edge devices significantly reduces computational latency and power consumption, thereby highlighting the proposed method’s advantages for low-power, long-term operation.

## Full-text entities

- **Species:** Bos taurus (bovine, species) [taxon 9913]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12896826/full.md

## Figures

8 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12896826/full.md

## References

50 references — full list in the complete paper: https://tomesphere.com/paper/PMC12896826/full.md

---
Source: https://tomesphere.com/paper/PMC12896826