Trustworthy Blockchain-based Federated Learning for Electronic Health Records: Identity-Gated Participation against Sybil Attacks
Organizations: Federal Institute of Education, Science, and Technology of Rio Grande do Norte (IFRN), Natal, RN, Brazil.
Abstract
Federated learning allows hospitals to train a shared clinical model without exchanging patient records, but its aggregation assumes that each participant is a distinct institution. In an open federation, an adversary can register many fake identities (a Sybil attack) and outweigh honest hospitals. Byzantine-robust aggregation mitigates such attacks only while the adversary is a minority. We ask whether binding participation to accountable institutional identity closes that gap, and at what cost. We present TBFL, a framework in which an accountable authority issues Verifiable Credentials to the Decentralized Identifiers of hospitals, and a smart-contract registry on a peer-to-peer ledger admits model updates only from credentialed senders. We evaluated a prototype on in-hospital mortality prediction with MIMIC-IV records split across simulated hospitals, comparing the identity gate with federated averaging, three robust aggregators, norm clipping, and a similarity-based defense. Robust aggregators held against a Sybil minority, and norm clipping only against random vectors; all failed when half the participants were Sybils trained on real records with flipped labels. The similarity-based defense stopped mutually similar Sybils but yielded to perturbed ones. The gate rejected all unauthorized submissions and maintained attack-free performance for every strategy up to 60% Sybils. It did not stop credentialed hospitals that flipped their own labels, whereas the gate followed by the coordinate-wise median withstood both. On a local node, on-chain checks added about 1% to training time; fees made training impractical on a public mainnet but affordable on a rollup. Identity gating complements robust aggregation rather than replacing it.
Figures & tables
| Technologies | Evaluation | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Study | Year | SSI | FL | Blockchain | Robust agg. | E1 | E2 | E3 | E4 |
| Houtan et al. [ 17 ] | 2020 | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ |
| Cocco and Tonelli [ 18 ] | 2024 | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ |
| López Martínez et al. [ 19 ] | 2026 | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✗ | ✓ |
| Kim et al. [ 11 ] | 2020 | ✗ | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Fung et al. [ 6 ] | 2020 | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✓ | ✗ |
| Symbol | Meaning | Symbol | Meaning |
|---|---|---|---|
| number of honest clients (hospitals) | number of Sybil identities | ||
| global model after round | local model of client in round | ||
| training samples of client | local empirical loss of client | ||
| FedProx proximal weight | local epochs, batch size | ||
| trusted issuer | set of authorized addresses | ||
| ledger address (DID) of client | commitment |
| Component | Status | Evaluated in |
|---|---|---|
| Issuer allowlist ( FLRegistry ) | Implemented | all FL runs |
| Allowlist with audit events ( FLRegistryEvents ) | Implemented | registry benchmark |
| EIP-712 credentials, expiry, revocation ( FLRegistryZK ) | Implemented | registry benchmark |
| SHA-256 commitments; aggregation of admitted updates | Implemented | all FL runs |
| Aggregator check of update against commitment (G4) | Implemented | benchmark; 41 FL runs a |
| Gate followed by a robust rule (median) | Implemented | Exp. 2 and 5 |
| Tools | Environment | Deployment | Tests | Metrics |
| PyTorch 2.15 scikit-learn 1.9 imbalanced-learn 0.14 web3.py 8.0 Hardhat 2.22 Solidity 0.8.24 | 10-core 64-bit ARM CPU 16 GB RAM no GPU Python 3.13 | local Hardhat node (EVM, automine) Ethereum Sepolia Arbitrum Sepolia (rollup) 3 registry variants up to 10 concurrent runs | FL Experiments 1–5 (3–5 seeds) registry benchmark (10 clients, 20 rounds) testnet benchmark (5 clients, 10 rounds per registry) | AUC-ROC, AUPRC Brier score precision, recall accepted / attempted gas, latency, US$ |
| Measure | Value |
|---|---|
| Admissions (adult patients) | 546,028 |
| Distinct patients | 223,452 |
| In-hospital deaths | 11,801 (2.16%) |
| Raw variables / encoded inputs | 7 / 32 |
| Clients and partition | 10, label-wise Dirichlet ( ) |
| Admissions per client (min–max) | 8,653–105,576 |
| Component | Parameter | Value |
| Model | architecture | MLP 32–64–32–1, ReLU, dropout 0.2 (4,225 parameters) |
| loss | binary cross-entropy + proximal term, | |
| optimizer | SGD, learning rate 0.01, momentum 0.9, weight decay | |
| local training | epochs, batch size | |
| Federation | clients | , all participate in every round |
| rounds | (Exp. 1 and early stopping), (Exp. 2–5) |
| Model | AUC-ROC | AUPRC | Brier | Precision | Recall |
|---|---|---|---|---|---|
| TBFL (federated) | |||||
| Centralized, same data | |||||
| Local only a | – | ||||
| Centralized, sensitivity to repeated patients b | |||||
| Admission split | |||||
| Patient split | |||||
| Configuration | AUC-ROC | AUPRC | AUC-ROC | AUPRC |
|---|---|---|---|---|
| TBFL (gate + FedAvg) | ||||
| TBFL + median | ||||
| Adaptive, | Label flipping | |||
|---|---|---|---|---|
| Defense | (33%) | (50%) | ||
| FedAvg (unprotected) | – | – | ||
| Coordinate-wise median | ||||
| Trimmed mean | – | – | ||
| Krum | ||||
| Norm clipping | – | – | ||
| Attempt | Goal | Registry | Accepted |
| Self-authorization by a non-issuer | G1 | both allowlists | 0 / 2 |
| Commitment from an unauthorized address | G1 | all three variants | 0 / 60 |
| Credential signed by a key other than | G2 | signed credential | 0 / 1 |
| Valid credential of another subject (replay) | G2 | signed credential | 0 / 1 |
| Expired credential | G2 | signed credential | 0 / 1 |
| Commitment after revocation | G2 | signed credential | 0 / 1 |
| Network | Registry | Contract address |
|---|---|---|
| Ethereum Sepolia | Allowlist ( FLRegistry ) | 0x54e698E73F26e18B17071BA471Cc6a11B6d5D57f |
| Ethereum Sepolia | Signed credential ( FLRegistryZK ) | 0x2730b56bc97560D342a2032F6C4239c56eB5667F |
| Arbitrum Sepolia | Allowlist ( FLRegistry ) | 0xc4Ed367EEA1a699435F8351039b21e154b728476 |
| Arbitrum Sepolia | Signed credential ( FLRegistryZK ) | 0x759F85E519Cb6ABcFCe14A4833ef8C071490857E |
| Local node | Arbitrum Sepolia | Ethereum Sepolia | |
|---|---|---|---|
| Gas schedule | pre-Glamsterdam | Arbitrum | Glamsterdam |
| Deployment gas, A / S | 723,368 / 1,935,532 | 723,368 / 1,935,532 | 4,964,532 / 13,611,116 |
| Authorization gas, A / S | 46,333 / 80,134 | 46,333 / 80,134 | 128,353 / 250,062 |
| Commitment gas, A / S | 46,873 / 48,869 | 46,873 / 48,869 | 62,273 / 64,269 |
| One-transaction confirmation | 0.05 s | 1.2 s (1.0–1.6) | 10.6 s (6.8–22.5) |
| Five-client round, A / S | – | / s | / s |
| Allowlist | + events | Signed VC | |
| Deployment | 723,368 | 759,286 | 1,935,532 |
| Authorization, once per client | 46,333 | 47,494 | 80,134 |
| Commitment, per client and round | 46,873 | 47,256 | 48,869 |
| Revocation | – | – | 52,724 |
| Commitments per round, 10 clients | 468,730 | 472,560 | 488,690 |
| L1, 20 gwei: per round / 100 rounds | 2,812 | 2,835 | 2,932 |
| Property | PKI and mutual TLS | Ledger registry (TBFL) |
|---|---|---|
| Excludes uncredentialed identities | yes, under (A1) | yes, under (A1) |
| Enforced by | aggregator operator | contract, run by every node |
| Record of admissions | operator logs | tamper-evident, public to members |
| Revocation visible to | relying party (CRL, OCSP) | every member (contract state) |
| Several aggregators | separate trust stores | shared admission state |
| Update–sender binding | needs a separate signed log | commitments on the ledger |