Digital healthcare insurance systems generate vast amounts of demographic, behavioral, biometric, and claims-related data across geographically distributed institutions. Centralizing this data for machine learning introduces significant privacy, regulatory (HIPAA), and data-governance risks.
This project implements a Federated Learning (FL) framework using the Flower library that trains:
- Premium prediction models — personalized actuarial modeling from distributed data
- Fraud detection models — proactive identification of anomalous claims
Models are trained across 5 simulated distributed nodes without any raw data ever leaving a local node.
| Metric | Centralized | Federated (5 nodes) | Privacy Cost |
|---|---|---|---|
| Premium RMSE | ~$4,800 | ~$4,950 | +2–3% |
| Fraud AUC-ROC | ~0.921 | ~0.897 | −2–3% |
| Raw data shared | 100% | 0% | Gradient updates only |
Finding: Federated models achieve within 3–4% of centralized performance while sharing zero raw patient records — making this approach directly applicable to HIPAA-regulated workers' compensation and healthcare insurance environments.
Global Model (Server — FedAvg)
│
├── Distribute weights ──► Node 1 (Region: North)
├── Distribute weights ──► Node 2 (Region: South)
├── Distribute weights ──► Node 3 (Region: East)
├── Distribute weights ──► Node 4 (Region: West)
└── Distribute weights ──► Node 5 (Region: Central)
│
◄──────────────────┘
Aggregate gradient updates (NO raw data transmitted)
Each node receives a non-IID partition — different demographic distributions per region — which is the realistic challenge in federated healthcare settings.
We implement Differential Privacy (DP-FedAvg) with the Gaussian mechanism:
where C is the L2 sensitivity (gradient clipping norm) and σ controls the privacy-accuracy tradeoff. The notebook evaluates σ ∈ {0.1, 0.3, 0.5, 1.0} and plots the resulting privacy budget vs. accuracy curve.
Federated/
├── FEDERATED.ipynb # Main research notebook (run this)
├── requirements.txt # Pinned dependencies
├── README.md # This file
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guide
├── LICENSE # MIT License
├── DATA/
│ ├── Medical_insurance.csv # Original dataset
│ └── insurance_federated.csv # Generated synthetic dataset (by notebook)
└── outputs/ # Generated plots and results
├── 01_eda.png
├── 02_comparison.png
├── 03_dp_tradeoff.png
└── 04_final_summary.png
| Section | Description |
|---|---|
| 1. Environment Setup | Dependencies, imports, version checks |
| 2. Dataset Generation | Synthetic 5,000-record insurance dataset with realistic distributions |
| 3. EDA | Distribution plots, correlation heatmap, fraud rate by region |
| 4. Centralized Baseline | GBM models trained on pooled data (performance ceiling) |
| 5. FL Architecture | Non-IID partitioning, FedAvg implementation |
| 6. Federated Premium | 20-round federated training for premium regression |
| 7. Federated Fraud | 20-round federated training for fraud classification |
| 8. Comparison | Convergence curves, per-node evaluation, summary charts |
| 9. Differential Privacy | DP-FedAvg, privacy-accuracy tradeoff analysis |
| 10. Results | Final metrics summary, key findings |
| 11. References | Academic citations |
git clone https://github.com/ramkalapala/Federated.git
cd Federated
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
jupyter notebook FEDERATED.ipynbSee requirements.txt. Core dependencies:
flwr>=1.5.0
scikit-learn>=1.3.0
numpy>=1.24.0
pandas>=2.0.0
matplotlib>=3.7.0
seaborn>=0.12.0
jupyter>=1.0.0
nbformat>=5.9.0
This research was motivated by the operational challenges in workers' compensation claims processing — specifically the tension between:
- The need for accurate predictive models across distributed provider/insurer networks
- Strict data privacy requirements (HIPAA, California CMIA, workers' comp regulations)
- The impracticality of centralizing PHI across organizational boundaries
The federated approach demonstrated here directly addresses this gap. The architecture — distributed training with FedAvg aggregation, DP noise injection at the gradient level, and human-in-the-loop routing at confidence boundaries — maps directly onto the multi-node structure of real insurance data ecosystems.
If you use this work, please cite:
@software{kalapala2024federated,
author = {Kalapala, Ramprakash},
title = {Federated Learning for Healthcare Insurance: Privacy-Preserving Premium Modeling and Fraud Detection},
year = {2024},
publisher = {GitHub},
url = {https://github.com/ramkalapala/Federated}
}- McMahan et al. (2017). Communication-Efficient Learning of Deep Networks from Decentralized Data. AISTATS 2017. arXiv:1602.05629
- Dwork & Roth (2014). The Algorithmic Foundations of Differential Privacy.
- Beutel et al. (2020). Flower: A Friendly Federated Learning Research Framework. arXiv:2007.14390
- Rieke et al. (2020). The Future of Digital Health with Federated Learning. npj Digital Medicine.
- Kairouz et al. (2021). Advances and Open Problems in Federated Learning. Foundations and Trends in ML.
MIT License — see LICENSE
Ramprakash Kalapala — Senior Cloud Solution Architect
Focus: AI/ML systems for regulated healthcare and insurance environments