This repo implements the paper titled Decentralized and Secure Collaborative Framework for Personalized Diabetes Prediction. The system allows multiple healthcare providers to collaborate on training machine learning models for diabetes prediction without sharing sensitive patient data, while maintaining data privacy and security through blockchain-based access control.
This paper has been published in the biomedicines journal.
DOI: https://doi.org/10.3390/biomedicines12081916
- Blockchain-based health data access control
- Federated learning for collaborative model training without sharing raw data
- Personalized diabetes prediction using machine learning
- Secure data sharing between healthcare providers and patients
- HealthDataAccessControl (blockchainV2.sol): Manages patient data access permissions
- FederatedLearning (fedL.sol): Implements the federated learning protocol on blockchain
- Neural Network implementation using TensorFlow
- XGBoost implementation for gradient boosting
- Model aggregation for federated learning
- Diabetes prediction dataset with features including gender, age, hypertension, heart disease, BMI, HbA1c level, and blood glucose level
- Node.js and npm
- Truffle framework for Ethereum development
- Python 3.7+
- Jupyter Notebook
- Ethereum wallet (MetaMask recommended)
-
Clone the repository:
https://github.com/uts58/DiabVault.git cd DiabVault -
Install Python dependencies:
pip install -r requirements.txt -
Install Truffle and deploy smart contracts:
npm install -g truffle truffle compile truffle migrate
- Deploy the smart contracts to an Ethereum network (local, testnet, or mainnet)
- Register patients and healthcare providers
- Manage data access permissions
- Run the Jupyter notebook to train models:
jupyter notebook new.ipynb - The notebook demonstrates:
- Data preprocessing
- Splitting data among clients (simulating federated learning)
- Training local models
- Aggregating models for final prediction
- blockchainV2.sol: Smart contract for health data access control
- fedL.sol: Smart contract for federated learning implementation
- diabetes_prediction_dataset.csv: Dataset for diabetes prediction
- new.ipynb: Jupyter notebook with machine learning implementation
- Blockchain: Solidity, Ethereum
- Machine Learning: TensorFlow, XGBoost, scikit-learn
- Data Processing: Pandas, NumPy
- Development: Python, Jupyter Notebook
If you use this project in your research, please cite:
@article{hasan2024decentralized,
title={Decentralized and Secure Collaborative Framework for Personalized Diabetes Prediction},
author={Hasan, Md Rakibul and Li, Qingrui and Saha, Utsha and Li, Juan},
journal={Biomedicines},
volume={12},
number={8},
pages={1916},
year={2024},
publisher={MDPI}
}