Skip to content

uts58/DiabVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decentralized and Secure Collaborative Framework for Personalized Diabetes Prediction

Overview

logo

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

Features

  • 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

Components

1. Blockchain Smart Contracts

  • HealthDataAccessControl (blockchainV2.sol): Manages patient data access permissions
  • FederatedLearning (fedL.sol): Implements the federated learning protocol on blockchain

2. Machine Learning Models

  • Neural Network implementation using TensorFlow
  • XGBoost implementation for gradient boosting
  • Model aggregation for federated learning

3. Dataset

  • Diabetes prediction dataset with features including gender, age, hypertension, heart disease, BMI, HbA1c level, and blood glucose level

Installation

Prerequisites

  • Node.js and npm
  • Truffle framework for Ethereum development
  • Python 3.7+
  • Jupyter Notebook
  • Ethereum wallet (MetaMask recommended)

Setup

  1. Clone the repository:

    https://github.com/uts58/DiabVault.git
    cd DiabVault
    
  2. Install Python dependencies:

    pip install -r requirements.txt
    
  3. Install Truffle and deploy smart contracts:

    npm install -g truffle
    truffle compile
    truffle migrate
    

Usage

1. Blockchain Component

  1. Deploy the smart contracts to an Ethereum network (local, testnet, or mainnet)
  2. Register patients and healthcare providers
  3. Manage data access permissions

2. Machine Learning Component

  1. Run the Jupyter notebook to train models:
    jupyter notebook new.ipynb
    
  2. The notebook demonstrates:
    • Data preprocessing
    • Splitting data among clients (simulating federated learning)
    • Training local models
    • Aggregating models for final prediction

File Descriptions

  • 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

Technologies Used

  • Blockchain: Solidity, Ethereum
  • Machine Learning: TensorFlow, XGBoost, scikit-learn
  • Data Processing: Pandas, NumPy
  • Development: Python, Jupyter Notebook

Citation

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}
}

About

Federated Diabetes Detection with Blockchain Security

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published