1.
anamoly detection
Deploy the final global federated CAE model back to devices.
Detect anomalies using Reconstruction Error (MSE) thresholding:
Anomaly if MSE>μ+3σ\text{Anomaly if } MSE > \mu + 3\sigmaAnomaly if MSE>μ+3σ
Use a sliding window majority vote approach to minimize false positives.
2. Hierarchical Federated Learning
Step 1: Local devices train and send compressed model updates to the regional
aggregator.
Step 2: Regional aggregator aggregates local updates using an Adaptive Heuristic
Aggregation Function:
Wagg=αiWlocal+(1−αi)∑j∈LinjmiWjW_{agg} = \alpha_i W_{local} + (1 - \alpha_i)\sum_{j \in
L_i}\frac{n_j}{m_i}W_{j}Wagg=αiWlocal+(1−αi)j∈Li∑minjWj
where αi\alpha_iαi is the adaptive coefficient.
Step 3: The global blockchain aggregates regional updates and records model hashes for
integrity verification.
BLOCKCHAIN IMPLEMENTATION
Anomaly if MSE>μ+3σ
🔹 Summary
Aspect Base Paper Implementation
Blockchain Role Theoretical layer for model exchange, authentication, and integrity.
Model/Platform
None (assumed “permissioned blockchain service”).
Used
Consensus
Not implemented — described conceptually (could be PBFT or Proof-of-Authority).
Mechanism
Smart Contracts Mentioned as a future direction, not implemented.
Aspect Base Paper Implementation
Future Work Implement and evaluate blockchain overhead, latency, and scalability.
Reference model
Blockchain Model Type Why Use It Tools
Supports identity management (for
Hyperledger Docker + Fabric SDK
Permissioned IoT device authentication) and
Fabric (Python/NodeJS)
efficient consensus (PBFT).
To implement smart contracts for
Ethereum (Private
Public/Private model updates; flexible integration Ganache + Truffle
Network)
with FL via [Link].
High throughput, lightweight
Tendermint / Tendermint node +
Permissioned consensus (BFT), suitable for edge
Cosmos SDK Python RPC
environments.
Quorum
For enterprise-grade permissioned
(Enterprise Permissioned Quorum + web3
blockchain with privacy.
Ethereum)
Blockchain Integration Model for HBFL (Hierarchical BFL)
Smart contract / chaincode functions (pseudocode):
function registerDevice(deviceID, pubKey, cert) {
require()
DeviceRegistry[deviceID] = {pubKey, cert, trustScore: default}
function submitModel(deviceID, CID, round, metrics, commitmentCoeff, sig) {
require([Link](deviceID))
require(verifySignature([Link], sig, CID||round||metrics))
ModelEntryID = hash(deviceID||CID||round||timestamp)
ModelEntries[ModelEntryID] = {deviceID,CID,round,metrics,commitmentCoeff}
emit NewModel(ModelEntryID)
function submitRegionalModel(regionID, aggCID, round, contributors[], validatorSigs) {
require(verifyValidators(validatorSigs))
RegionalEntries[regionID||round] = {aggCID,contributors}
emit NewRegionalModel(regionID, aggCID)
function updateTrust(deviceID, delta) onlyValidator {
DeviceRegistry[deviceID].trustScore += delta