Revolutionizing Disease Diagnosis A Microservices
Revolutionizing Disease Diagnosis A Microservices
Revolutionizing Disease Diagnosis A Microservices
1
RIADI Laboratory, University of Manouba, Manouba, Tunisia
2
Security Engineering Lab, CCIS, Prince Sultan University, Riyadh, Saudi Arabia
The rapid emergence and evolution of the Internet of Things (IoT) have
facilitated the advancement of Machine Learning (ML) and Deep Learning (DL)
techniques for healthcare data analytics [1]. Recent DL and image processing
breakthroughs have enabled the development of state-of-the-art computer-aided
diagnosis systems, which assist pathologists in obtaining highly accurate and
reliable diagnosis results [2]. These cutting-edge systems harness the power of
DL and image processing to augment the diagnostic capabilities of healthcare
professionals, leading to improved patient care and outcomes [3].
In this context, we introduce a novel approach based on microservices and
Federated Learning (FL), which can potentially enhance disease detection accu-
racy while significantly safeguarding data privacy. Microservices are designed to
2 S. Ben Atitallah et al.
be autonomous and decoupled from each other, allowing for flexibility in terms
of development, deployment, and updates [4,5]. In addition, they are highly
responsive to user demands as they can be designed to be lightweight and opti-
mized for specific tasks [6,7]. This means that the system can quickly respond
to user requests, providing real-time or near-real-time results, which is crucial
in healthcare data analytics, where timely insights are often required. Moreover,
microservices can be deployed across multiple edge computing nodes, allowing
for distributed processing and reducing the need to transfer large amounts of
data to a central location. This can result in lower latency, reduced network
overhead, and improved overall system performance.
With FL, collaborative model training is conducted across multiple dis-
tributed devices or institutions without sharing raw data [8]. Instead, only model
updates are exchanged, ensuring the confidentiality of sensitive information [9].
The proposed approach harnesses the collective intelligence of multiple experts,
resulting in a robust and accurate disease detection model. FL effectively ad-
dresses privacy concerns by keeping data localized and minimizing data transfer,
ensuring patient data remains secure and protected.
Besides, Transfer Learning (TL) plays an important role in the healthcare
domain to improve the effectiveness and efficiency of various tasks [10]. TL lever-
ages pre-trained models trained on large-scale datasets, such as ImageNet, and
applies them to healthcare-specific tasks.
By leveraging the pre-trained model’s knowledge through TL and allowing
local fine-tuning on specific target domains, Federated Transfer Learning (FTL)
aims to improve the learning performance and generalization capability of models
trained in a federated setting [11]. It allows for the transfer of learning represen-
tations, which can capture relevant features and patterns while preserving local
data’s privacy.
Our proposed approach embodies a remarkable stride in disease detection,
harnessing the exceptional scalability and swift response time of microservices,
the invaluable privacy-preserving advantages of FL, and the augmentation of
model performance, generalization, and prediction accuracy through TL.
The paper outlines several key contributions, which can be summarized as
follows:
1 Related Works
which allowed for effective far-end pneumonia diagnosis. Through rigorous sim-
ulations, the suggested technique achieved a pneumonia detection accuracy of
96.48% even when only 30% of the samples were communicated. These results
demonstrated the effectiveness of the suggested strategy in detecting pneumonia,
even with limited information. This study addressed the challenge of applying
DL models to a restricted amount of data; it did not address important issues
related to the proposed approach’s privacy, scalability, and reusability.
A DL architecture based on EfficientNetB7 was proposed in [16] to clas-
sify medical X-ray and Computed Tomography (CT) images of lungs into three
categories: common pneumonia, coronavirus pneumonia, and normal cases. Re-
cent pneumonia detection methods were compared to the proposed architecture
in terms of accuracy. The proposed approach provided robust and consistent
pneumonia detection features with an accuracy rate of 99.81% for radiography
and 99.88% for CT. This study’s approach was confined to a single DL model,
EfficientNetB7. Furthermore, the suggested architecture was assessed without
using distributed or FL approaches, utilizing a traditional training and testing
methodology for applying DL models.
To overcome the abovementioned limitations, this work offers a unique mi-
croservices and FTL-based approach that utilizes the learned knowledge, re-
sulting in a robust and effective disease diagnosis model. The paper includes
several contributions, such as proposing a microservices-based approach for dis-
ease diagnosis, improving privacy through FL, utilizing TL to improve model
generalization,and application in a real-world healthcare case study.
from the various edge FL clients, creating a comprehensive and refined global
model that benefits from the collective intelligence of the distributed network.
Fig. 1. The proposed distributed approach architecture for an efficient and secure
disease detection process.
2.1.2 Distributed Local Training and Updates After the model manager
has set up the learning parameters and chosen the suitable models, the cloud FL
server initiates the global models. It sends them to the FL clients to commence
the learning process. Each client, labeled as k, trains its own local models us-
ing its own data, denoted as Dk , and calculates an update, denoted as wk , by
minimizing the loss function F (wk ):
Afterward, each client k sends its computed update wk to the FL server for
aggregation. The FL clients only exchange the model updates with the FL server
throughout the training process, ensuring that data privacy is preserved.
Title Suppressed Due to Excessive Length 7
2.3.1 Data Preprocessing Stage The initial stage in data analysis is data
preprocessing, which involves the following components:
- Data integration: This component merges and arranges data from different
sources to achieve a uniform format.
- Data scaling/transformation: This component standardizes and modifies
the collected data to a predefined range, aiming to improve data consistency.
This step ensures that the data is reliable and suitable for subsequent analysis.
2.3.3 Interpretation Stage In our approach, the last step in data analytics
involves utilizing the learned models to make predictions or decisions using new
data.
- Application microservice: This microservice utilizes the trained models to
make predictions or classifications when provided with new input data.
This section provides information about the dataset used for conducting the
experiments. We also define the evaluation metrics employed to assess the per-
formance of the proposed approach. Lastly, we present the results obtained from
the experiments and conduct a detailed analysis of the findings in the last sub-
section.
Title Suppressed Due to Excessive Length 9
3.1 Dataset
The dataset utilized for the experiments is named Pneumonia Chest X-ray Im-
ages and is publicly available [22]. It was collected by the Guangzhou Women and
Children’s Medical Center in China and can be found on Kaggle. The dataset
contains a total of 5855 images, which are organized into three folders: train,
validation, and test. The dataset is imbalanced, with a class distribution of ap-
proximately 30% normal images and 70% pneumonia images.
3.1.1 Experimental Setup The suggested solution was designed and vali-
dated using publicly accessible open-source components. It adopts a microservices-
based architectural style along with FL and TL approaches, ensuring scalability
and reliability. Docker containerization was used to create distributed images
across three virtual machines, where each virtual machine hosted microservices
of each data analytics stage using Docker instances [23]. Swarm orchestration
managed the container cluster, providing high availability for applications [24].
TensorFlow Federated (TFF) [25] and Keras [26], open-source libraries, are used
in the implementation of the models. These libraries offer powerful functionalities
and tools for developing and training ML/DL models with the FL setting.
Tf = TP re + TInter (6)
Title Suppressed Due to Excessive Length 11
Model//
VGG16 Xception ResNet50 InceptionV3 DenseNet201
Metric
Accuracy 95.6 97.2 95.1 96.4 98.1
Precision 95.4 97.4 94.6 96.8 97.9
Recall 96.2 97.9 95.3 96.5 98.3
F1-score 95.8 97.6 94.9 96.6 98.1
Fig. 3. The execution time of the data preprocessing and application microservices in
addition to the end-to-end response time for the pneumonia detection process.
3.4 Discussion
To ensure accurate pneumonia diagnosis, it is essential to identify all relevant
features present in the chest X-ray images. The hybrid TL approach in FL offers
12 S. Ben Atitallah et al.
Table 2. Comparison of the proposed approach results with our previously published
study
4 Conclusion
This research aims to provide a novel approach for high-performing disease di-
agnosis models while ensuring privacy compliance. In detecting pneumonia us-
ing X-ray images, this solution uses TL for model development, FL for privacy
preservation, and microservices architecture for scalability and response time
optimization.
Our approach’s experimental findings show that it can give accurate predic-
tions, preserve patient privacy, and facilitate efficient and scalable data analytics
in a healthcare setting.
In the future, we aim to examine our approach’s performance on various
datasets to confirm its wide applicability and robustness in real-world case
studies. In addition, we intend to develop and test fusion techniques, such as
Dempster-Shafer-based fusion, weighted averaging, and attention-based strate-
gies. These strategies can potentially improve the accuracy and robustness of
the fusion process, and their effectiveness will be evaluated in the context of our
Title Suppressed Due to Excessive Length 13
References
1. A. Qayyum, J. Qadir, M. Bilal, and A. Al-Fuqaha, “Secure and robust machine
learning for healthcare: A survey,” IEEE Reviews in Biomedical Engineering,
vol. 14, pp. 156–180, 2020.
2. S. B. Atitallah, M. Driss, W. Boulila, and H. B. Ghézala, “Leveraging deep learning
and iot big data analytics to support the smart cities development: Review and
future directions,” Computer Science Review, vol. 38, p. 100303, 2020.
3. S. Ben Atitallah, M. Driss, W. Boulila, and H. Ben Ghezala, “Randomly initialized
convolutional neural network for the recognition of covid-19 using x-ray images,”
International journal of imaging systems and technology, vol. 32, no. 1, pp. 55–73,
2022.
4. S. B. Atitallah, M. Driss, and H. B. Ghzela, “Microservices for data analytics in iot
applications: Current solutions, open challenges, and future research directions,”
Procedia Computer Science, vol. 207, pp. 3938–3947, 2022.
5. M. Driss, S. Ben Atitallah, A. Albalawi, and W. Boulila, “Req-wscomposer: a novel
platform for requirements-driven composition of semantic web services,” Journal
of Ambient Intelligence and Humanized Computing, pp. 1–17, 2022.
6. D. Hasan and M. Driss, “Sublµme: Secure blockchain as a service and
microservices-based framework for iot environments,” in 2021 IEEE/ACS 18th In-
ternational Conference on Computer Systems and Applications (AICCSA). IEEE,
2021, pp. 1–9.
7. M. Driss, A. Aljehani, W. Boulila, H. Ghandorh, and M. Al-Sarem, “Servicing your
requirements: An fca and rca-driven approach for semantic web services composi-
tion,” IEEE Access, vol. 8, pp. 59 326–59 339, 2020.
8. J. Xu, B. S. Glicksberg, C. Su, P. Walker, J. Bian, and F. Wang, “Federated
learning for healthcare informatics,” Journal of Healthcare Informatics Research,
vol. 5, pp. 1–19, 2021.
9. M. Driss, I. Almomani, Z. e Huma, and J. Ahmad, “A federated learning framework
for cyberattack detection in vehicular sensor networks,” Complex & Intelligent
Systems, vol. 8, no. 5, pp. 4221–4235, 2022.
10. H. Malik, M. S. Farooq, A. Khelifi, A. Abid, J. N. Qureshi, and M. Hussain,
“A comparison of transfer learning performance versus health experts in disease
diagnosis from medical imaging,” IEEE Access, vol. 8, pp. 139 367–139 386, 2020.
11. Y. Chen, X. Qin, J. Wang, C. Yu, and W. Gao, “Fedhealth: A federated transfer
learning framework for wearable healthcare,” IEEE Intelligent Systems, vol. 35,
no. 4, pp. 83–93, 2020.
12. P. Chhikara, P. Singh, P. Gupta, and T. Bhatia, “Deep convolutional neural net-
work with transfer learning for detecting pneumonia on chest x-rays,” in Advances
in Bioinformatics, Multimedia, and Electronics Circuits and Signals: Proceedings
of GUCON 2019. Springer, 2020, pp. 155–168.
13. R. Kundu, R. Das, Z. W. Geem, G.-T. Han, and R. Sarkar, “Pneumonia detection
in chest x-ray images using an ensemble of deep learning models,” PloS one, vol. 16,
no. 9, p. e0256630, 2021.
14 S. Ben Atitallah et al.
14. S. Ben Atitallah, M. Driss, W. Boulila, A. Koubaa, and H. Ben Ghezala, “Fusion
of convolutional neural networks based on dempster–shafer theory for automatic
pneumonia detection from chest x-ray images,” International Journal of Imaging
Systems and Technology, vol. 32, no. 2, pp. 658–672, 2022.
15. S. R. Islam, S. P. Maity, A. K. Ray, and M. Mandal, “Deep learning on compressed
sensing measurements in pneumonia detection,” International Journal of Imaging
Systems and Technology, vol. 32, no. 1, pp. 41–54, 2022.
16. A. Moussaid, N. Zrira, I. Benmiloud, Z. Farahat, Y. Karmoun, Y. Benzidia,
S. Mouline, B. El Abdi, J. E. Bourkadi, and N. Ngote, “On the implementation
of a post-pandemic deep learning algorithm based on a hybrid ct-scan/x-ray im-
ages classification applied to pneumonia categories,” in Healthcare, vol. 11, no. 5.
MDPI, 2023, p. 662.
17. G. Bao and P. Guo, “Federated learning in cloud-edge collaborative architec-
ture: key technologies, applications and challenges,” Journal of Cloud Computing,
vol. 11, no. 1, p. 94, 2022.
18. T. Li, A. K. Sahu, A. Talwalkar, and V. Smith, “Federated learning: Challenges,
methods, and future directions,” IEEE signal processing magazine, vol. 37, no. 3,
pp. 50–60, 2020.
19. B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas,
“Communication-efficient learning of deep networks from decentralized data,” in
Artificial intelligence and statistics. PMLR, 2017, pp. 1273–1282.
20. S. AbdulRahman, H. Tout, H. Ould-Slimane, A. Mourad, C. Talhi, and M. Guizani,
“A survey on federated learning: The journey from centralized to distributed on-
site learning and beyond,” IEEE Internet of Things Journal, vol. 8, no. 7, pp.
5476–5497, 2020.
21. Y. Liu, Y. Kang, C. Xing, T. Chen, and Q. Yang, “A secure federated transfer
learning framework,” IEEE Intelligent Systems, vol. 35, no. 4, pp. 70–82, 2020.
22. P. MOONEY, “Chest-xray pneumonia dataset,” https://www.kaggle.com/
datasets/paultimothymooney/chest-xray-pneumonia, accessed: April 19, 2023.
23. Docker, “Documentation,” https://docs.docker.com/, 2022, accessed: April 6,
2023.
24. ——, “Orchestration,” https://docs.docker.com/get-started/orchestration/, 2023,
accessed: April 19, 2023.
25. TensorFlow, “Tensorflow federated: Machine learning on decentralized data,”
https://www.tensorflow.org/federated, 2023, accessed: April 19, 2023.
26. Keras, “Keras library,” https://keras.io/, 2023, accessed: May 19, 2023.