FecalFed: Privacy-Preserving Poultry Disease Detection via Federated Learning

Tien-Yu Chi · 2026

Read FecalFed: Privacy-Preserving Poultry Disease Detection via Federated Learning by Tien-Yu Chi (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-00559.txt.

Introduction

Chi introduces FecalFed, a federated-learning framework for poultry disease detection that guards farm data privacy. Early detection of highly pathogenic avian influenza and endemic poultry diseases matters for global food security. Computer vision can classify disease from fecal images, but farm privacy worries and data silos block large-scale use. Public farm datasets also often hide severe, undocumented contamination. Chi curates and releases a deduplicated set of 8,770 images across four disease classes. The set exposes a 46.89 percent duplication rate in popular public repositories.

Catalog record

CREATORTien-Yu Chi
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE22663
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.00559

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

FecalFed: Privacy-Preserving Poultry Disease Detection via Federated Learning Tien-Yu Chi Abstract Early detection of highly pathogenic avian influenza (HPAI) and endemic poultry diseases is critical for global food security. While computer vision models excel at classifying diseases from fecal imaging, deploying these systems at scale is bottlenecked by farm data privacy concerns and institutional data silos. Furthermore, existing open-source agricultural datasets frequently suffer from severe, undocumented data contamination. In this paper, we introduce FecalFed , a privacy-preserving federated learning framework for poultry disease classification. We first curate and release poultry-fecal-fl , a rigorously deduplicated dataset of 8,770 unique images across four disease classes, revealing and eliminating a 46.89% duplication rate in popular public repositories. To simulate realistic agricultural environments, we evaluate FecalFed under highly heterogeneous, non-IID conditions (Dirichlet α = 0.5 \alpha=0.5 ). While isolated single-farm training collapses under this data heterogeneity, yielding only 64.86% accuracy, our federated approach recovers performance without centralizing sensitive data. Specifically, utilizing server-side adaptive optimization (FedAdam) with a Swin-Small architecture achieves 90.31% accuracy, closely approaching the centralized upper bound of 95.10%. Furthermore, we demonstrate that an edge-optimized Swin-Tiny model maintains highly competitive performance at 89.74%, establishing a highly efficient, privacy-first blueprint for on-farm avian disease monitoring. 1 Introduction Central Server Adaptive Aggregation Farm 2 Edge Swin-Tiny Local Data Farm 1 Edge Swin-Tiny Local Data Farm 10 Edge Swin-Tiny Local Data Global Weights Local Updates Figure 1 : Left: The FecalFed cross-silo federated learning architecture. Raw images remain isolated on-farm, while only Swin-Tiny model weights are communicated to the central server for FedAdam aggregation. Right: Test accuracy across the 10 isolated farm partitions (gray) demonstrating extreme variance and collapse under non-IID conditions, compared to the stable performance recovery achieved by FecalFed (orange). Highly pathogenic avian influenza (HPAI) continues to cause repeated global outbreaks, posing severe risks to agricultural economies, global food security, and public health 11 ; 10 ; 2 . Alongside HPAI, endemic infections such as Coccidiosis, Newcastle Disease (NCD), and Salmonella routinely threaten poultry flock health and lower industry productivity 1 ; 12 ; 25 . Early detection is critical for preventing widespread outbreaks; however, traditional disease surveillance relies heavily on time-consuming, expensive laboratory procedures such as polymerase chain reaction (PCR) testing 3 . In recent years, deep learning and computer vision have emerged as powerful, non-invasive diagnostic alternatives 5 ; 26 ; 18 . Fecal characteristics analysis is a proven visual inspection method, as gastrointestinal diseases drastically alter the shape, texture, and color of poultry droppings 21 . Modern vision transformers have demonstrated high accuracy in classifying these diseases directly from fecal images, allowing for rapid, automated intervention without relying on expensive veterinary expertise 17 ; 7 . Despite these algorithmic advances, deploying these systems at a global scale is severely bottlenecked by a dual challenge: institutional data silos and severe on-farm hardware limitations 6 . Training robust artificial intelligence models typically requires aggregating massive datasets, but centralized training requires farms to upload raw images to a central server. Consequently, farms are reluctant to share sensitive health data due to biosecurity risks, commercial interests, and the fear of negative reputation impacts 8 . Furthermore, even if data privacy were not a concern, rural agricultural facilities frequently lack the enterprise-grade compute infrastructure and high-bandwidth internet required to support massive centralized models. As our experiments demonstrate, relying on isolated, single-farm models to bypass these data-sharing and hardware constraints is highly ineffective; under realistic heterogeneous data distributions, single-farm models collapse to a mean accuracy of 64.86% from 95.1%. Furthermore, relying on existing open-source agricultural datasets to circumvent privacy restrictions introduces a hidden crisis: severe data contamination. Through rigorous perceptual hashing, we discovered that public repositories for poultry fecal images are heavily fragmented and overlapping. Our analysis of over 16,000 publicly available images revealed an alarming 46.89% deduplication rate, with 77.4% of images in popular synthetic datasets being mere resized duplicates of original field data 27 ; 9 ; 19 . Training on such contaminated data leads to severe train/test leakage and artificially inflated performance metrics. To overcome these dual challenges of data privacy and dataset quality, we introduce FecalFed (illustrated in Figure 1 ), a privacy-preserving federated learning (FL) framework for poultry disease monitoring, implemented using the open-source Flower ( flwr ) framework 4 . In this work, we make the following core contributions: • Curated Benchmark Dataset: We release poultry-fecal-fl , a rigorously deduplicated, 4-class dataset comprising 8,770 unique images, establishing a clean, leak-free baseline for the agricultural AI community. • Realistic Non-IID Evaluation: We demonstrate that isolated single-farm training fails to generalize under natural data heterogeneity, proving the absolute necessity of collaborative federated frameworks for robust disease detection. • Comprehensive Federated Benchmarking: We systematically evaluate federated learning algorithms across different vision transformer architectures under non-IID conditions. We demonstrate that standard federated averaging (FedAvg) establishes a highly competitive baseline, while adaptive server-side optimization (FedAdam) provides further stability for larger models, achieving 90.31% accuracy with a Swin-Small architecture. 2 Related Work Recent advancements in computer vision have facilitated automated poultry disease diagnostics through the analysis of fecal characteristics. Degu et al. 5 demonstrated the feasibility of smartphone-based convolutional neural networks (CNNs) for farm-level deployment, while Tasdelen et al. 26 utilized transfer learning to improve CNN classification of high-risk diseases. Further pushing the boundaries of accuracy, Luong et al. 18 applied Vision Transformers combined with Integrated Gradients to provide explainable diagnostic outputs. However, these state-of-the-art approaches fundamentally rely on centralized data pools, entirely neglecting the restrictive data-sharing realities and privacy constraints of the modern agricultural sector. The reluctance of farmers to share sensitive operational data due to biosecurity, competitive, and cybersecurity concerns is a well-documented barrier to centralized AI development 15 ; 24 ; 28 . Federated learning directly addresses this by enabling decentralized model training 20 , a paradigm increasingly recognized for its potential to facilitate cross-silo collaboration in the agri-food sector 8 ; 6 . While standard aggregation algorithms like FedAvg 20 perform well under independent and identically distributed (IID) conditions, heterogeneous farm networks often require regularization techniques such as FedProx 16 to restrict local model drift. However, because proximal terms can disrupt the fine-tuning of large pre-trained vision models, adaptive server-side optimizers like FedAdam 23 present a crucial but currently underexplored alternative for stabilizing non-IID agricultural edge deployments. Raw Aggregation 16,513 Images (Zenodo + Roboflow) Dual-Hash Pipeline D_{aHash}\leq 5 D_{pHash}\leq 5 poultry-fecal-fl 8,770 Unique Images (Leak-free Benchmark) -46.89% -7,743 Figure 2 : The FecalFed data curation pipeline. (Top) The dual-hash deduplication process eliminated 46.89% of the raw aggregated dataset. (Bottom) A visual example of severe cross-source contamination, where original field data was found repeatedly down-sampled and duplicated in synthetic open-source repositories. Finally, the transition from centralized to federated agricultural AI is complicated by a growing reproducibility crisis driven by data leakage in public repositories 14 . In computer vision, unchecked cross-source duplication artificially inflates performance metrics and severely undermines the reliability of visual datasets 22 . To combat this, automated near-duplicate image detection utilizing perceptual hashing and deep learning has become an essential prerequisite for dataset sanitization 13 . Because existing poultry disease repositories lack these rigorous deduplication protocols, establishing a sanitized, farm-split benchmark is a necessary foundation for evaluating federated agricultural frameworks. 3

Read the complete text