Privacy-preserving machine learning with homomorphic encryption for diabetes mellitus detection
Jun Chen Ng, Xiang Wu, Pauline Shan Qing Yeoh, Nien Shoon Teng, Lee-Ling Lim, Lik Voon Kiew, Tengku Ain Kamalden, Khin Wee Lai
Diabetes mellitus (DM) is a chronic metabolic disorder with severe complications, including blindness, lower limb amputation, and cardiovascular diseases, and its global prevalence continues to rise. While machine learning (ML) has shown strong potential for improving disease prediction, the use of sensitive medical data raises significant privacy concerns. The core problem is that modern cryptographic or decentralized privacy solutions often introduce prohibitive computational overhead, hindering routine clinical deployment. To address this, the objective of this study is to propose a privacy-preserving ML framework for Type 2 diabetes risk prediction by integrating multiple ML models with homomorphic encryption (HE). Using the PIMA Indian Diabetes (PID) dataset, nine ML models and a stacking ensemble were developed and optimized under a unified evaluation framework. The stacking ensemble achieved the best performance (accuracy: 0.84, F1-score: 0.87, recall: 0.96, and precision: 0.79). HE was incorporated to protect data during transmission and storage without modifying the model training process. The results demonstrate that the encryption-decryption workflow does not affect predictive performance while ensuring data confidentiality. Overall, this study highlights the feasibility of combining ML with cryptographic techniques for privacy-aware medical prediction.