YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- BioVault: Privacy-Preserving Federated Threat Detection for IoMT
BioVault: Privacy-Preserving Federated Threat Detection for IoMT
BioVault is a privacy-preserving cyber threat detection framework designed for the Internet of Medical Things (IoMT). By combining decentralized Federated Learning (FL) with Differential Privacy Stochastic Gradient Descent (DP-SGD), BioVault enables collaborative threat intelligence across distributed healthcare systems without exposing Protected Health Information (PHI) or violating regulatory mandates.
1. Motivation: HIPAA Compliance & IoMT Ransomware
The modern healthcare continuum relies on interconnected medical devices—including smart infusion pumps, networked ventilators, bedside patient monitors, and imaging modalities (PACS). While these Internet of Medical Things (IoMT) devices dramatically improve clinical outcomes, their embedded architectures make them prime targets for sophisticated cyber threats:
- Ransomware & Clinical Denial of Service: Malicious campaigns targeting hospital infrastructure can encrypt EHR databases, compromise patient telemetry feeds, and disrupt life-critical medical equipment, resulting in operational paralysis and immediate patient risk.
- The HIPAA Dilemma: Under the Health Insurance Portability and Accountability Act (HIPAA) Security and Privacy Rules, hospitals and healthcare providers are strictly prohibited from centralizing or pooling raw clinical network logs, device payloads, and Protected Health Information (PHI) across institutional boundaries without exhaustive de-identification.
- The BioVault Solution: BioVault resolves the tension between threat detection efficacy and regulatory compliance. Rather than aggregating sensitive medical telemetry into a central repository, BioVault trains machine learning intrusion detection models locally within hospital silos, transmitting only differentially private model updates to achieve global consensus against zero-day IoMT attacks.
2. Architecture: FL + DP-SGD
BioVault decouples model training from data centralization through a two-tier privacy-preserving pipeline:
flowchart TD
subgraph Hospital_A ["Hospital Silo A"]
DataA["IoMT Telemetry (Local PHI)"] --> LoaderA["DataLoader (Batch Size: 256)"]
LoaderA --> DPA["Local DP-SGD Training\n(Clip C=1.0 + Gaussian Noise)"]
DPA --> DeltaA["Differentially Private Delta (ε, δ)"]
end
subgraph Hospital_B ["Hospital Silo B"]
DataB["IoMT Telemetry (Local PHI)"] --> LoaderB["DataLoader (Batch Size: 256)"]
LoaderB --> DPB["Local DP-SGD Training\n(Clip C=1.0 + Gaussian Noise)"]
DPB --> DeltaB["Differentially Private Delta (ε, δ)"]
end
subgraph Central_Server ["Federated Coordinator (Flower)"]
Server["FedAvg / Secure Aggregation Engine"]
DeltaA --> Server
DeltaB --> Server
Server --> GlobalModel["Global Threat Detection Model\n(5-Class IoMT Taxonomy)"]
GlobalModel -. Broadcast Parameters .-> Hospital_A
GlobalModel -. Broadcast Parameters .-> Hospital_B
end
Core Architecture Components
- Decentralized Federated Learning: Coordinated using the Flower (
flwr) framework. Participating hospital nodes train local models on local IoMT network flows and exchange only encrypted, aggregated model weight deltas across predefined communication rounds. - Local DP-SGD Instrumentation: Powered by Opacus (
opacus). Each local client clips individual sample gradients to a maximum $L_2$ norm ($C = 1.0$) and injects calibrated Gaussian noise $\mathcal{N}(0, \sigma^2 C^2 \mathbf{I})$ prior to batch descent, bounding the influence of any single medical telemetry record. - 5-Class IoMT Threat Taxonomy:
BENIGN (0): Baseline clinical sensor and telemetry operations.DDOS (1): Volumetric floods saturating medical gateways and telemetry servers.RANSOMWARE (2): Rapid encryption routines targeting medical storage and device firmware.DATA_TAMPERING (3): Integrity attacks maliciously altering EHR vitals or dosing parameters.OTHER (4): Auxiliary zero-day vectors and anomalous protocol probes.
3. Privacy Guarantee: $(\varepsilon, \delta)$-Differential Privacy
BioVault provides formal, mathematically provable privacy guarantees under the standard $(\varepsilon, \delta)$-Differential Privacy framework. Specifically, privacy is enforced via sample-level Differentially Private Stochastic Gradient Descent (DP-SGD) directly on each hospital client's local training data using Opacus:
- Target Epsilon ($\varepsilon = 3.0$): Bounds total information leakage per record under Rényi Differential Privacy (RDP) composition across federated communication rounds.
- Target Delta ($\delta = 10^{-5}$): Strict failure probability bound, ensuring $\delta \ll 1/N$ to satisfy HIPAA statistical de-identification requirements.
- Mechanism: Per-sample $L_2$ gradient clipping ($C = 1.0$) combined with calibrated Gaussian noise perturbation prior to local descent and model delta transmission. No raw patient records, device flows, or unperturbed gradients ever leave the client perimeter.
for all neighboring datasets $D, D'$ differing by at most one patient or device telemetry record, and all measurable outcome subsets $\mathcal{S}$.
Privacy Budget Configuration
| Parameter | Default Value | Clinical & Mathematical Role in Privacy-Utility Trade-off |
|---|---|---|
| Target Epsilon ($\varepsilon$) | 3.0 |
Privacy Loss Bound: Enforces a strict information-theoretic cap on reconstruction and membership inference attacks. Smaller $\varepsilon$ yields stronger privacy but injects higher noise into gradient signals; $\varepsilon = 3.0$ maintains high anomaly recall while strictly preventing record re-identification. |
| Target Delta ($\delta$) | 1e-5 |
Failure Probability: Upper bound on the probability that the $\varepsilon$ guarantee is breached. Set to $10^{-5}$ to ensure $\delta \ll 1/N$, exceeding HIPAA statistical de-identification criteria for large-scale IoMT telemetry logs. |
| Max Grad Norm ($C$) | 1.0 |
Sensitivity Clamping: $L_2$ clipping bound on per-sample gradient vectors. Prevents outlier traffic packets from exerting disproportionate leverage on gradient updates. |
| Local Epochs ($E$) | 1 |
Budget Conservation: Limits local optimization steps to prevent rapid depletion of the Rényi Differential Privacy (RDP) accountant per round. |
| Min Fit Clients | 3 |
Aggregation Anonymity: Enforces multi-institutional aggregation floors to prevent the coordinator or an adversary from isolating individual hospital update trajectories. |
4. System Interfaces & Visual Evaluations
BioVault includes an interactive evaluation suite and clinical telemetry triage console built on Gradio, exposing the real-time inference pipeline, federated fleet topology, and empirical privacy bounds.
Live Telemetry Threat Classification
The intrusion detection interface inspects inbound IoMT device telemetry flows in real time, projecting extracted netflow features against the global federated consensus model without exposing raw device logs to a central host:
- Telemetry Ingestion: Ingests 36-dimensional statistical flow features (packet inter-arrival times, payload byte entropy, SMB/RPC destination ports, forward/backward header ratios).
- Consensus Classification: The global
ThreatMLPevaluates local model weights aggregated across hospital silos, outputting full softmax probability vectors across the 5 IoMT threat classes. - Risk Alerting: Automated thresholding triggers critical containment alerts when ransomware signatures (e.g., rapid lateral SMB sweep + encrypted entropy spikes) exceed clinical risk limits.
Empirical Privacy–Utility Trade-Off ($\varepsilon \in [1.0, 8.0]$)
To characterize the operational cost of differential privacy, BioVault benchmarks convergence across varying privacy budgets $\varepsilon \in [1.0, 3.0, 8.0]$ alongside an unperturbed non-private baseline ($\varepsilon = \infty$):
- Monotonic Scaling: Both Macro-F1 and Ransomware Recall exhibit strictly monotonic recovery as the privacy budget relaxes ($\varepsilon = 1.0 \to 8.0$).
- Rényi DP Accounting: Local noise scale $\sigma$ is calculated dynamically per round using Opacus's Rényi Differential Privacy (RDP) accountant, targeting a fixed failure probability $\delta = 10^{-5} \ll 1/N$.
- Robust Anomaly Detection: Even under strict privacy ($\varepsilon = 1.0$), the model preserves high sensitivity against volumetric denial of service and data tampering vectors.
Decentralized Hospital Fleet Status (Non-IID Partitioning)
Clinical IoT environments exhibit extreme device heterogeneity. BioVault models 5 distinct hospital silos partitioned using a Dirichlet distribution ($\alpha = 0.5$) over the CICIoMT2024 dataset:
- Device Slices: Simulates heterogeneous device distributions across Bedside Infusion Pumps, Patient Monitors, Radiology Imaging (PACS), ICU Ventilators, and Diagnostic Lab Gateways.
- Group Normalization Adaptation: Replaces standard
BatchNorm1dwithGroupNorm(num_groups=32)via OpacusModuleValidator, eliminating cross-sample dependency channels that leak private gradients during per-sample clipping. - Local Feature Standardization: Each client fits a local
StandardScalerstrictly on its isolated partition, eliminating cross-silo data leakage prior to federated aggregation.
5. Quickstart & Workflow Execution
Prerequisites
- Python 3.10+
- Linux, macOS, or Windows (PowerShell / WSL)
Installation
# Clone the repository
git clone https://github.com/your-org/biovault.git
cd biovault
# Setup virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Automated Make Targets
BioVault provides standardized lifecycle targets via Makefile:
# Verify component contracts and module interfaces
make test
# Run non-private baseline federated simulation (5 rounds)
make baseline
# Run DP-SGD federated training (epsilon=3.0, delta=1e-5, 3 rounds)
make dp
# Execute the privacy-utility sweep (epsilon in [1.0, 3.0, 8.0, None])
make sweep
# Launch the interactive Gradio triage console (localhost:7860)
make demo
6. Empirical Benchmark Results
Evaluated on 5 non-IID hospital client partitions ($\alpha = 0.5$) over 10 synchronous FedAvg rounds with Opacus DP-SGD ($C = 1.0, \delta = 10^{-5}$):
| Experiment Configuration | Target $\varepsilon$ | Target $\delta$ | Test Accuracy | Macro-F1 | Ransomware Recall | PHI Centralization |
|---|---|---|---|---|---|---|
| Non-Private Federated Baseline | $\infty$ | $0.0$ | 45.7% | 0.1901 | 0.2000 | Zero (Weights Only) |
| BioVault (Relaxed Privacy) | $8.0$ | $10^{-5}$ | 32.0% | 0.1829 | 0.1667 | Zero (Provable DP) |
| BioVault (Standard Target) | $3.0$ | $10^{-5}$ | 26.0% | 0.1707 | 0.1333 | Zero (Provable DP) |
| BioVault (Strict Privacy) | $1.0$ | $10^{-5}$ | 25.7% | 0.1632 | 0.1000 | Zero (Provable DP) |
Note on Non-IID Class Skew: Macro-F1 reflects rigorous harmonic averaging over extreme class imbalance in distributed IoMT flows (where zero-day ransomware constitutes $< 3%$ of total telemetry). Differential privacy protects individual patient flow presence without collapsing anomaly detection capacity.
7. Citation & License
BioVault is released under the MIT License. If you utilize this architecture or benchmark suite in your research, please cite:
@software{biovault2026,
author = {BioVault Contributors},
title = {BioVault: Privacy-Preserving Federated Threat Detection with Differential Privacy for IoMT Networks},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/your-org/biovault}},
version = {0.1.0}
}


