Skip to main content

Privacy-Preserving Federated Learning

Nawal uses the Flower (flwr) framework for distributed training across national institutions (e.g., hospitals, schools, and government offices).

How It Works

  • No Centralized Data: Nawal does not collect central data. Models are trained on local devices where the data lives.
  • Differential Privacy: Per-example gradient clipping plus Gaussian noise, implemented in Nawal's own security/differential_privacy.py (the guide's default target is ε=1.0). Opacus is declared as a dependency but not yet wired in — the module itself notes migrating to it for production.
  • Byzantine Fault Tolerance: ByzantineDetector offers six aggregation methods — FedAvg, Krum, Multi-Krum, Trimmed Mean, Median, and PHOCAS. Krum rejects the updates farthest from the consensus point; it is one option, not the default.
  • Blockchain Integration: Validators acting as federated learning nodes submit Proof of Useful Work (PoUW) to the staking pallet. The on-chain payout weights are timeliness 20% + honesty 20% + a 5% stake bonus — there is no quality term on chain. blockchain/rewards.py still computes a 40/30/30 quality/timeliness/honesty score client-side; that number does not reach the pallet.