Diabetes mellitus is among the top chronic metabolic diseases affecting humanity and poses a major public health issue as it keeps growing, with its long-term effects and the huge costs of treating patients1,2. According to a report, there are currently over 537 million adults living with diabetes worldwide, and the figure is expected to rise significantly over the next few decades3. If high blood sugar levels are not controlled, the person will suffer from the worst complications, such as coronary heart disease4, kidney damage5, nerve damage6, eyesight loss7, and brain stroke8. Thus, recognizing the disease at the earliest stage, regularly monitoring the patient's condition, and providing him or her training through advanced medical approaches are necessary steps to help patients live healthier lives and, in doing so, reduce the expenses of the State's healthcare system9,10.
Nowadays, the use of electronic health records (EHRs), wearable devices, continuous glucose monitoring (CGM) systems, retinal imaging technologies, and mobile health applications is spreading rapidly, generating large volumes of heterogeneous healthcare data that can be analyzed11. These various data-collecting tools can provide diverse information about the human body, its ability to function at different stages of a disease, how the patient responds to different types of treatment, and how he or she behaves in real life12. Artificial intelligence (AI) has proven to be the best solution for processing highly complex data, predicting diabetes, monitoring the disease, and assisting doctors with clinical decisions13. Furthermore, machine learning algorithms, including random forests, support vector machines, and gradient boosting methods, have given excellent results in assessing diabetes risk14. More recently, deep learning architectures have enabled automatic feature extraction and improved predictive performance across diverse healthcare applications15.
Using multimodal learning methods, diabetes intelligence has been greatly enhanced by merging structured clinical records, physiological measurements, retinal images, and behavioral indicators into a single predictive framework16. Using multiple sources of information, multimodal models can identify patterns that are not visible when each modality is examined separately17. Transformer-based models have recently learned long-range dependencies and contextual relationships from diverse types of healthcare data very effectively18. However, problems such as unbalanced classes, missing data, data heterogeneity, and limited generalizability still prevent the widespread use of multimodal AI systems in clinical settings19.
Even with these developments, many existing diabetes intelligence systems still rely on centralized learning frameworks that inherently require patient data from different institutions to be consolidated into a single repository20. Methods like these are already leading to disputes over patient privacy, data custody, cybersecurity, and regulatory compliance21. In fact, due to legal and ethical considerations, healthcare providers are often constrained in their ability to share sensitive patient data22. In this context, federated learning is becoming a viable solution, as it enables training a collaborative model without sharing the actual patient data23. Through decentralized optimization and secure parameter aggregation, federated learning enables privacy-protected health analysis by leveraging knowledge from geographically distributed datasets24. Nevertheless, communication overhead, client heterogeneity, and convergence stability still represent major issues in federated healthcare scenarios25.
One more drawback of the diabetes intelligence systems presently in use is the lack of transparency and support for personalized therapy. Many deep learning models behave like black boxes, which is a problem for clinicians who want to understand the reasoning behind predictions and recommendations26. Explainable artificial intelligence (XAI) methods such as SHAP, Integrated Gradients, attention visualization, and counterfactual reasoning are proving to have great potential to enhance model transparency and clinician trust27. On top of that, graph neural networks (GNNs) have become the most advanced tools for capturing patient-drug and drug-drug interactions, resulting in personalized drug recommendations and medication safety evaluation28. New diffusion models have also introduced solutions for generating authentic synthetic healthcare data and addressing class imbalance29.
Transformers, federated learning, diffusion-based synthetic data generation, graph neural networks, and explainable artificial intelligence have each demonstrated promising results in healthcare applications; however, their integration within a single reproducible diabetes intelligence framework remains limited. Existing approaches commonly address these components independently, focusing on privacy-preserving learning without personalized treatment recommendation, multimodal prediction without decentralized training, or explainability without graph-based clinical decision support. Although diffusion models can support class balancing and transformer architectures can learn relationships across heterogeneous healthcare modalities, standardized protocols for integrating these complementary technologies remain limited. Therefore, this work presents a unified methodological protocol that combines multimodal prediction, diffusion-based augmentation, federated optimization, graph-based personalized drug recommendation, and explainable artificial intelligence within a reproducible workflow, while providing a foundation for future clinical validation and translation.
Unlike studies that assume the availability of patient-level multimodal datasets, this protocol integrates heterogeneous public datasets without performing direct patient matching. Independent modality-specific models are trained for each data source, and latent feature embeddings are combined through a cross-modal attention mechanism. This design preserves methodological rigor while enabling multimodal knowledge integration across diverse healthcare repositories.
The proposed protocol is intended primarily for methodological development and distributed healthcare AI settings in which heterogeneous data sources are available across separate repositories or institutions and direct data centralization is restricted. In the current implementation, the modality-specific datasets are independent and are not patient-matched; therefore, multimodal integration is performed at the learned representation level rather than through direct patient-level correspondence. Practical application would require appropriately linked multimodal patient data, consistent preprocessing and outcome definitions across participating sites, suitable computational infrastructure, and compliance with applicable ethical, privacy, and regulatory requirements.
This paper introduces FedMediFormer-XAI, a federated multimodal transformer framework that enables privacy-preserving diabetes intelligence through prediction, recommendation, and explainability features under one roof. This framework integrates diffusion-based data augmentation to address class imbalance, multimodal transformer learning for diabetes prediction, federated learning for collaborative model development, graph neural network-based personalized drug recommendation, and explainable artificial intelligence methods to support clinical decisions in a transparent manner. The overall architecture and workflow of the proposed FedMediFormer-XAI framework are illustrated in Figure 1.
The major contributions of the proposed FedMediFormer-XAI framework are summarized as follows: (1) A unified protocol is presented that integrates federated learning, multimodal transformers, diffusion-based data augmentation, graph neural network-based personalized drug recommendation, and explainable artificial intelligence within a single reproducible workflow for diabetes intelligence. (2) A privacy-preserving federated learning strategy is developed to enable collaborative model training across simulated distributed healthcare clients without sharing raw patient data. (3) A multimodal transformer architecture is introduced to jointly learn complementary representations from structured clinical records, continuous glucose monitoring data, retinal fundus images, and population health indicators. (4) Diffusion-based synthetic data generation is incorporated to reduce class imbalance and improve model robustness while preserving the statistical characteristics of the original training data. (5) A GraphSAGE-based heterogeneous graph learning module is employed to model patient-drug and drug-drug relationships for personalized medication recommendation and interaction-aware treatment ranking. (6) Multiple explainable artificial intelligence techniques, including SHapley Additive exPlanations (SHAP), Integrated Gradients, attention visualization, and counterfactual explanations, are integrated to improve model transparency and provide interpretable prediction and recommendation output. (7) A comprehensive validation protocol is provided, including predictive evaluation, federated learning assessment, recommendation evaluation, explainability analysis, clinician-centered evaluation, external validation, and reproducibility assessment.