Graph-Attention Federated Analytics for Non-IID Dairy Farm Monitoring and Compliance Prediction
Main article
Abstract
Dairy farm monitoring across distributed smallholder operations presents a fundamental statistical challenge: the heterogeneous distributions of sensor readings, cattle breeds, climatic conditions, and management practices generate persistently non-IID (non-independent and identically distributed) data that degrade the performance of standard federated learning aggregation schemes. This paper proposes a Graph-Attention Federated Analytics (GA-FA) framework designed to address the non-IID problem in dairy compliance prediction. GA-FA integrates a Graph Attention Network (GAT) module that dynamically clusters participating farms based on context-feature similarity, a DBSCAN-based outlier filter that provides Byzantine-resilient aggregation by excluding anomalous local updates, and a cluster-stratified FedAvg aggregation protocol that maintains personalization while converging toward a globally consistent compliance model. The framework operates on lightweight edge devices using a quantized inference runtime and does not require raw sensor data to leave the farm, preserving operational privacy. Validated on a dataset derived from the Shahhet28121 cattle health benchmark extended to 16 farm-level parameters across five heterogeneous farm environments, the GA-FA framework achieves a global classification accuracy of 96.94%, an F1 score of 0.967, and a communication payload of 4.25 KB per federated round—representing a 97.7% reduction relative to standard FL baselines. Ablation experiments confirm that the GAT clustering module contributes the largest single-component accuracy gain of 4.63 percentage points. The framework is evaluated under Gaussian sensor noise up to 20% standard deviation, maintaining accuracy above 90%, and demonstrates stable convergence within 18 federated rounds. Results establish GA-FA as a robust, resource-efficient, and privacy-preserving approach for distributed dairy compliance analytics.
