Full text
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 166 A Federated Learning Approach for Diabetic Retinopathy Detection Using FedAvg and FedProx Manepalli Pavan Naga Sai PG Student, Department of Computer Science and Systems Engineering, Andhra University College of Engineering(A), Visakhapatnam, AP, India-530003 I. INTRODUCTION The escalating global prevalence of diabetes has heightened the demand for effective screening tools to detect complications such as Diabetic Retinopathy (DR), a primary cause of preventable blindness as shown in fig 1. Traditional deep learning approaches for DR detection depend on large, centralized datasets of retinal images, posing significant privacy risks due to data-sharing requirements. Federated Learning (FL) offers a compelling solution by enabling collaborative model training across multiple institutions or devices while keeping data localized. In this study, we explore FL-based strategies for automated DR detection, focusing on binary classification (DR vs. No DR). We implement FedAvg, a foundational FL algorithm that aggregates local model updates via simple averaging, and introduce FedProx to better manage non-independent and identically distributed (non-IID) data, a frequent challenge in medical imaging due to institutional data variations. Our work compares the performance of FedAvg and FedProx in a simulated FL environment using the Flower framework, evaluates them on a real-world dataset of preprocessed retinal images, and demonstrates FedProx’s enhanced stability and accuracy. By leveraging a custom convolutional InternationalJournalof ComputerApplication https://rspublication.com/ijca/ijca_index.htm ISSN 2250-1797 ARTICLE INFO ABSTRACT ©2025 RS Publication Paper ID: IJCA6900A4DDB046A Received: 2025-09-29 Published: 2025-10-29 DOI: https://dx.doi.org /10.5281/zenodo.17 472355 Page No: 166-172 Diabetic Retinopathy (DR) poses a significant global health challenge, often leading to vision impairment if not detected early. Traditional centralized machine learning approaches for DR screening rely on collecting sensitive medical data in one place, which often raises serious privacy concerns. To address this, we explore Federated Learning (FL) paradigms that enable collaborative model training across distributed devices without sharing raw data. This study implements and compares two FL algorithms: Federated Averaging (FedAvg) and Federated Proximal (FedProx), tailored for binary DR classification using retinal fundus images. Our approach utilizes a convolutional neural network (CNN) backbone in a simulated FL environment with five clients.These findings highlight FedProx's robustness in handling client heterogeneity, offering a privacypreserving solution for scalable DR detection in healthcare settings. Keywords — Federated Learning, Diabetic Retinopathy, FedAvg, FedProx, PrivacyPreserving AI, Deep Learning in Healthcare. Cite This Paper: Manepalli Pavan Naga Sai (2025). "A Federated Learning Approach for Diabetic Retinopathy Detection Using FedAvg and FedProx". INTERNATIONAL JOURNAL OF COMPUTER APPLICATION (IJCA), vol. 15, no. 5, 2025, pp. 166-172. DOI: https://dx.doi.org/10.5281/zenodo.17472355
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 167 neural network tailored for retinal image analysis, our approach achieves robust performance in privacy-preserving settings. Furthermore, FedProx’s proximal term mitigates client drift, ensuring more consistent model updates across heterogeneous datasets. This research underscores the potential of FL to transform medical diagnostics by balancing high accuracy with stringent privacy requirements. Fig 1: Comparison of a Healthy Eye and a Diabetic Eye II. RELATED WORK A. Detection of DR with Deep Learning Techniques The rising global prevalence of diabetes has fueled research into automated Diabetic Retinopathy (DR) detection, with deep learning techniques, particularly convolutional neural networks (CNNs), playing a pivotal role. Early developments have explored the use of federated deep learning frameworks for automated DR detection, demonstrating promising accuracy while addressing data privacy concerns [1]. Deep learning algorithms have also been applied to predict DR progression in individual patients, enabling early intervention and improved disease management [2]. Earlier computer-aided diagnosis (CAD) systems achieved around 80% sensitivity in DR identification, emphasizing their potential to reduce ophthalmologists workload [3]. A comprehensive review of deep learning approaches to DR detection has highlighted the steady improvement of CNN architectures for accurate feature extraction and classification [4]. Simple CNN models have also proven effective for binary classification between DR-effected and healthy retinas [5], while studies focusing on the retinal nerve fiber layer (RNFL) have achieved accuracies around 77.5% and specificities near 88.7%, although noisy images still challenge reliable diagnosis [6]. Further, advanced deep neural networks have demonstrated strong diagnostic performance in detecting DR from retinal images [7], and Inception-V3-based architectures have excelled in DR grading using large annotated datasets [8], [9]. B. Federated Learning Techniques To overcome the limitations of centralized deep learning systems, Federated Learning (FL) has emerged as a privacypreserving decentralized training paradigm for medical image analysis. The integration of FL into DR detection systems has enabled efficient binary and multi-level classification using transformer-based models while maintaining data locality [10]. Recent studies have applied FL and differential privacy to medical imaging, showcasing effective model aggregation and improved convergence in heterogeneous data environments. FL allows collaborative model
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 168 training across multiple sites without sharing sensitive data [11]. Personalized FL strategies and secure aggregation methods have also contributed to tasks such as microvasculature segmentation and referable DR identification. [12] Multi - Institutional healthcare collaborations have been successfully realized through FL, proving its capability to operate without direct data exchange. III. METHODOLOGY Federated Learning (FL) is implemented using the Flower framework to facilitate privacy-preserving detection of Diabetic Retinopathy (DR) without the need to share sensitive patient data among institutions as shown in fig 2. The FL setup involves five virtual clients, each holding a local subset of the dataset comprising 3,662 preprocessed retinal fundus images (1,805 No DR and 1,857 DR). All images are filtered using a Gaussian filter to reduce noise and resized to 224×224×3 pixels to align with the AlexNet model’s input requirements. The AlexNet architecture is adapted for binary classification to differentiate between DR and No DR cases. Fig 2: Federated Learning Framework 1. FedAvg Algorithm: In FedAvg, each client trains the shared global model on its local dataset for a few epochs and then sends the updated model weights to a central server. The server aggregates these local updates by computing their weighted average to form a new global model. This updated global model is then redistributed to all clients for the next training round. 2. FedProx Algorithm:
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 169 FedProx is an extension of FedAvg designed to handle the statistical heterogeneity commonly present in non-IID data environments. It introduces a proximal term into the local optimization objective, which helps constrain local model updates to remain closer to the global model parameters. A. Dataset Preparation Fig 3: Few retinal images from dataset In this, the dataset comprising 3,662 retinal fundus images collected from a real-world medical imaging repository to ensure the authenticity and clinical relevance of the data. The dataset includes 1,805 images labeled as No Diabetic Retinopathy (No DR) and 1,857 images labeled as Diabetic Retinopathy (DR), maintaining a nearly balanced class distribution as shown in the table 1 dataset distribution and shown in the fig 3. Prior to model training, all images underwent a series of preprocessing steps to enhance their quality and uniformity. Gaussian filtering was applied to smooth the images and reduce high-frequency noise, which helps in improving the clarity of fine retinal structures such as blood vessels and microaneurysms that are crucial for accurate DR detection. Subsequently, each image was resized to 224×224×3 pixels to meet the input requirements of the AlexNet architecture and ensure computational consistency during training. Table 1: Dataset Distribution Class No. of Samples Percent (%) No DR 1,805 49.3% DR 1,857 50.7% Total 3,662 100% Furthermore, to simulate a real-world federated learning environment, the dataset was distributed across five virtual clients using a non-IID (non-identically independently distributed) partitioning strategy. Each client received approximately 732 images, with data distribution intentionally varied to mimic institutional heterogeneity often found in medical imaging scenarios. This non-IID setup reflects practical conditions where hospitals or clinics possess datasets with differing patient demographics, imaging conditions, and disease prevalence, thereby enabling a more realistic evaluation of the model’s generalization capability in decentralized healthcare environments. B. Model Architecture The global model is based on AlexNet, a pretrained convolutional neural network adapted for binary DR classification. The architecture includes five convolutional layers with filter sizes increasing from 96 to 256, followed by max
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 170 pooling and three fully connected layers. The final layer is modified to output two classes (DR vs. No DR) with a softmax activation. The model is initialized with pretrained weights from ImageNet and fine-tuned during FL training. C. Federated Learning Algorithm: 1. Initialize global model w 0 Start with some base weights 2. For each communication round t = 1 to 5 Server sends the global model wt to all clients. 3. On each client k (k = 1 to 5) Local model is initialized with wt. Client optimizes its local objective. FedProx local objective function () + ∥ − ∥ where: ()= local loss on client k = current global model parameters μ = FedProx regularization parameter 4. Aggregate updates on server: Clients send back updated weights. Server aggregates them (weighted by client data sizes n FedAvg Global Aggregation Equation = ∑ () where: K= total number of clients n = number of data samples at client k. n = ∑ n = total number of data samples across all clients w () = updated model weights from client k after local training w = global model weights after aggregation
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 171 IV. RESULTS AND DISCUSSION The experimental results demonstrate that both Federated Averaging (FedAvg) and Federated Proximal (FedProx) achieve high diagnostic accuracy in detecting Diabetic Retinopathy (DR) within a federated learning framework while preserving data privacy. However, FedProx consistently outperforms FedAvg in terms of stability, convergence, and overall accuracy due to its proximal term, which effectively mitigates client drift and handles non-IID data more efficiently. The inclusion of this regularization mechanism ensures smoother global model updates across heterogeneous clients, leading to improved generalization performance. The AlexNet-based CNN architecture, combined with preprocessing techniques such as Gaussian filtering and image resizing, further enhances feature extraction and classification accuracy. Overall, these findings confirm the potential of Federated Learning, particularly FedProx, as a robust, scalable, and privacy-preserving solution for collaborative medical image analysis across multiple institutions. Table 2: Comparison of FedAvg and FedProx performance across training rounds in terms of global accuracy (%) and global loss. Criteria FedAvg FedProx Global Loss (Round 1) 0.0269 0.0244 Global Accuracy (Round 1) 92.38% 94.26% Global Loss (Round 2) 0.0228 0.0192 Global Accuracy (Round 2) 94.27% 95.23% Global Loss (Round 3) 0.0223 0.0185 Global Accuracy (Round 3) 94.14% 95.91% Global Loss (Round 4) 0.0260 0.0174 Global Accuracy (Round 4) 93.60% 96.18% Global Loss (Round 5) 0.0217 0.0187 Global Accuracy (Round 5) 94.27% 95.22% V CONCLUSION This study Demonstrates the efficacy of Federated Learning (FL) for privacy-preserving automated detection of Diabetic Retinopathy (DR) using retinal fundus images distributed across multiple clients. By implementing and evaluating FedAvg and FedProx algorithms within a simulated FL environment, the results reveal that both methods achieve high diagnostic accuracy while ensuring data confidentiality. However, FedProx consistently outperforms FedAvg by mitigating the adverse effects of non-IID data distributions through its proximal optimization term, achieving superior stability and convergence. These findings underscore the potential of FL-based frameworks, particularly FedProx, to enable scalable and secure medical image analysis across institutions without compromising patient privacy. Future work will focus on extending this approach to multi-class DR grading and deploying realworld federated healthcare networks to validate the model’s clinical applicability and robustness.
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Issue 15 Volume 5 2025 DOI: 10.5281/zenodo.17472355 Original Article ©2025 RS Publication, rsp[email protected]m 172 REFERENCES [1] N. Z. Abidin and A. Ritahani Ismail, “Federated Deep Learning for Automated Detection of Diabetic Retinopathy,” Proc. IEEE 8th Int. Conf. Computing, Engineering and Design (ICCED), Sukabumi, Indonesia, 2022, pp. 1–5, doi: https://doi.org/10.1109/ICCED56140.2022.10010636 [2] F. Arcadu, F. Benmansour, A. Maunz, J. Willis, Z. Haskova, and M. Prunotto, “Deep learning algorithm predicts diabetic retinopathy progression in individual patients,” NPJ Digital Medicine, vol. 2, p. 92, Sep. 2019, doi: https://doi.org/10.1038/s41746-019-0172-3. [3] C. Valverde, M. Garcia, R. Hornero, and M. I. Lopez-Galvez, “Automated detection of diabetic retinopathy in retinal images,” Indian J. Ophthalmol., vol. 64, no. 1, pp. 26–32, Jan. 2016, doi: https://10.4103/0301-4738.178140 . [4] S. Shekar, N. Satpute, and A. Gupta, “Review on diabetic retinopathy with deep learning methods,” J. Med. Imaging (Bellingham), vol. 8, no. 6, pp. 060901, Nov. 2021, doi: https://doi.org/10.1117/1.JMI.8.6.060901. [5] N. Chakrabarty, “A Deep Learning Method for the Detection of Diabetic Retinopathy,” Proc. IEEE UPCON, 2019, doi: https://doi.org/10.1109/UPCON.2018.8596839. [6] Y. Kumaran and C. M. Patil, “A brief review of the detection of diabetic retinopathy in human eyes using preprocessing and segmentation techniques,” International Journal of Recent Technology and Engineering (IJRTE), ISSN: 2277-3878 (Online), vol. 7, pp. 310–320, 2019. [7] Z. Gao, J. Li, J. Guo, Y. Chen, Z. Yi, and J. Zhong, “Diagnosis of Diabetic Retinopathy Using Deep Neural Networks,” IEEE Access, vol. 7, pp. 3360–3370, 2019, doi: https://doi.org/10.1109/ACCESS.2018.2888639. [8] M. Adnan, S. Kalra, J. C. Cresswell, G. W. Taylor, and H. R. Tizhoosh, “Federated learning and differential privacy for medical image analysis,” Sci. Rep., vol. 12, no. 1, p. 1953, Feb. 2022, doi: https://doi.org/10.1038/s41598022-05539-7. [9] V. Gulshan, L. Peng, M. Coram, M. C. Stumpe, D. Wu, A. Narayanaswamy, S. Venugopalan, K. Widner, T. Madams, J. Cuadros, R. Kim, R. Raman, P. C. Nelson, J. L. Mega, and D. R. Webster, “Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs,” JAMA, vol. 316, no. 22, pp. 2402–2410, Dec. 2016, doi: https://doi.org/10.1001/jama.2016.17216. [10] G. A. Kaissis, M. R. Makowski, D. Rückert, and R. et al., “Secure, privacy-preserving and federated machine learning in medical imaging,” Nat. Mach. Intell., vol. 2, pp. 305–311, 2020, doi: https://doi.org/10.1038/s42256-0200186-1. [11] N. Rieke et al., “The future of digital health with federated learning,” NPJ Digit. Med., vol. 3, p. 119, Sep. 2020, doi: https://doi.org/10.1038/s41746-020-00323-1. [12] M. J. Sheller et al., “Federated learning in medicine: facilitating multi-institutional collaborations without sharing patient data,” Sci. Rep., vol. 10, no. 1, p. 12598, Jul. 2020, doi: https://doi.org/10.1038/s41598-020-69250-1