Degree
Bachelor of Science (Computer Science)
Department
Department of Computer Science
School
School of Mathematics and Computer Science (SMCS)
Advisor
Dr. Faisal Iradat, Associate Professor Department of Computer Science
Co-Advisor
Raja Abraheem Rashid Ejaz
Keywords
ederated Learning, Blockchain, Byzantine Robustness, Backdoor Attacks, Diffusion Models, Clinical IoT, Arrhythmia Classification, Proof-of-Contribution
Abstract
Federated learning (FL) is a natural fit for clinical electrocardiography: hospital data never leaves the hospital, while the shared model still benefits from every site. A clinical deployment must cope with two difficulties simultaneously: hospital data is highly non-independent and identically distributed (non-IID), and adversaries that gain a foothold preferentially target the rare, clinically dangerous arrhythmia classes. This paper presents Active-Ledger, a blockchainorchestrated federated learning system whose defence relies on behavioural client history rather than per-round weight geometry. The system introduces a Proof-of-Contribution (PoC) score; an exponential moving average of each client’s challenge-set accuracy, evaluated server-side on a hidden, class-balanced, per-round rotating challenge set, scaled by its participation fraction. This design removes the most obvious way to game the score: the accuracy term is computed by the server on uploaded weights, not reported by the client. The PoC score gates both model aggregation and a class-conditional latent diffusion generator that repairs rare-class data deficits, closing a second attack surface; the augmentation stealth channel; that sits upstream of the aggregator where no geometric rule reaches. All aggregation and augmentation decisions are recorded as tamper-evident events on a local Ethereum chain, making the entire training history auditable after the fact. Active-Ledger is evaluated on MIT-BIH arrhythmia data under three attacks (Gaussian weight poisoning, static label-flip, and a sleeper backdoor-critical-layer flip) and compared against six baselines: FedAvg, Krum, Multi-Krum, Median, Trimmed-Mean, and Bulyan; over multiple seeds with a stratified, class-balanced evaluation. PoC attains the highest atrial-premature-beat (APB, Class 3) F1 under Gaussian poisoning (0.946±0.012) and static label-flip (0.951±0.015), is competitive under the stealthier sleeper (0.867±0.106), and matches or exceeds every baseline on macro-F1. Crucially, under a class-balanced evaluation at 20% Byzantine ratio, no method collapses on the rare class; every rule lands between APB-F1 0.77 and 0.95; a methodological finding that a minority-imbalanced test set would conceal. The paper further provides a formal account of why the challenge-set design resists adaptive adversaries (metric fabrication, proxy overfitting, constrain-and-scale stealth), and specifies the consortium threat model under which the permissioned ledger, rather than a plain append-only log, is the appropriate trust anchor.
Tools and Technologies Used
Python, PyTorch, Flower (Federated Learning), HuggingFace Diffusers, Solidity, Web3.py, Ethereum (Ganache), NumPy, Scikit-learn, SciPy, WFDB, Pandas, Matplotlib, Seaborn, Git, CUDA
Methodology
We adopt an experimental research methodology centered on a federated learning simulation framework. The MIT-BIH Arrhythmia Database is preprocessed into 360-sample ECG windows, labeled into 5 AAMI classes, and partitioned across 10 simulated clients using a Dirichlet-based non-IID distribution to replicate real-world clinical data heterogeneity. A CNN-LSTM classifier serves as the shared global model, trained via Flower-based federated rounds with class-weighted cross-entropy loss to handle extreme class imbalance (82:1 ratio). We implement and benchmark 9 aggregation strategies — FedAvg, Krum, Multi-Krum, Coordinate-Wise Median, Trimmed Mean, Bulyan, Proof-of-Contribution (PoC), Multi-Krum with Blind Latent Diffusion, and the full ActiveLedger system, under three Byzantine attack scenarios (Gaussian noise, label-flip, and sleeper attacks with 20% adversary ratio). Blockchain integration uses an Ethereum smart contract (Solidity) deployed on Ganache for immutable audit logging and EMA-weighted PoC scoring. A class-conditioned 1D DDPM UNet generates synthetic ECG signals for minority class augmentation, authorized via on-chain trust gating. All experiments use fixed seeds for reproducibility, with sequential method execution and isolated GPU environments to prevent cross-experiment data leakage
Document Type
Restricted Access
Submission Type
BSCS Final Year Project
Recommended Citation
Farid, M., Siddiqui, M., & Iqbal, M. (2026). Active-Ledger: Trust-Gated Diffusion and Behavioural Contribution Scoring for Adversarially Robust Federated Learning on Clinical IoT non-IID Data. Retrieved from https://ir.iba.edu.pk/fyp-bscs/58
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-Share Alike 4.0 International License.
COinS
