Formalized Federated Runtime (FFR) is a high-performance, theorem-guided federated learning (FL) substrate. It bridges the gap between theoretical privacy/security proofs and production-grade execution by integrating Lean formal verification, Byzantine resilience, and Post-Quantum Cryptography (PQC).
The FFR architecture is designed to handle up to 10M nodes with hardened trust roots at every layer.
graph TD
subgraph "Edge Layer (Untrusted)"
N1[Client Node A] --> |Update + LDP| R1
N2[Client Node B] --> |Update + LDP| R1
N3[Client Node C] --> |Update + LDP| R2
end
subgraph "Regional Layer (Byzantine Filtering)"
R1[Shard Router East] --> |Filtered Batch| AG1[Aggregator]
R2[Shard Router West] --> |Filtered Batch| AG1
end
subgraph "Global Layer (Theorem Validation)"
AG1 --> |Model Update| FV[Formal Verifier]
FV --> |ZK-SNARK Proof| BC[Global Ledger]
BC --> |State Finality| G[Global Model State]
end
%% Security Enforcements
TPM{{TPM Attestation}} -.-> N1
TPM -.-> N2
PQC{{PQC Hybrid KEX}} ==> R1
PQC ==> R2
FFR implements the following formal primitives to ensure convergence and privacy.
The global model
Where
To defend against malicious updates, we employ the Krum selection rule. For
Privacy loss is tracked using
Key exchange is secured using a hybrid x25519-mlkem768 construction, ensuring resistance against both classical and Shor-class quantum attacks.
FFR provides a Python SDK that integrates seamlessly with existing workflows.
pip install formalized-federated-runtimeLaunch a full 3-node federated stack with one command:
./genesis-launch.sh --all-nodesfrom mohawk import MohawkNode
node = MohawkNode()
node.start(config_path="capabilities.json")
# Submit a privacy-preserved update
node.aggregate([{
"node_id": "edge-01",
"gradient": [0.01, -0.05, 0.12],
"dp_noise": "laplacian"
}])Our runtime properties are machine-checked using Lean 4.
| Property | Theorem | Lean Source | Status |
|---|---|---|---|
| Byzantine Resilience | Honest Majority ( |
proofs/Theorem1BFT.lean |
✅ Passed |
| Convergence |
|
proofs/Theorem2Conv.lean |
✅ Passed |
| Privacy | RDP Budget Bound | proofs/Theorem3Privacy.lean |
✅ Passed |
| Liveness | Straggler Tolerance | proofs/Theorem4Liveness.lean |
✅ Passed |
- Transport:
libp2pwith Noise (PQC Hybrid) - Identity: TPM 2.0 XMSS Attestation
- Runtime: WASM (Hot-reloadable modules)
- Metrics: Prometheus + Grafana (Pre-configured)
Apache License 2.0. See LICENSE.md for details.
Built with ❤️ for a Sovereign Federated Future.