Blockchained On-Device Federated Learning

Hyesung Kim, Jihong Park, Mehdi Bennis, Seong-Lyun KimarXiv 2018

TL;DR

This paper proposes BlockFL, a decentralized architecture that replaces the central server in Federated Learning (FL) with a blockchain network. By utilizing a distributed ledger and Proof-of-Work (PoW) consensus, BlockFL eliminates single points of failure, provides built-in rewards for data contributors, and optimizes end-to-end latency by balancing block generation rates against the risk of network forking.

What Problem Does This Paper Address?

Standard "vanilla" Federated Learning relies on a central server to aggregate local model updates from edge devices. This architecture has two major drawbacks:

  1. Single Point of Failure: If the central server malfunctions or is compromised, the entire global model training process is derailed.
  2. Lack of Incentives: Devices with large, high-quality datasets contribute more to the global model but receive no specific compensation, discouraging participation in untrustworthy public networks.

The authors aim to create a robust, decentralized training environment where devices can exchange and verify updates without a middleman, while receiving rewards proportional to their contribution.

Methods

The authors introduce the BlockFL architecture, which separates the logical structure into devices (which train models) and miners (which manage the blockchain). Miners can be standalone nodes like base stations or a subset of the devices themselves.

The operational flow consists of a seven-step loop:

  1. Local Update: Devices train on local data using a stochastic variance reduced gradient algorithm.
  2. Upload: Updates are sent to an associated miner.
  3. Cross-verification: Miners exchange and verify updates from different devices.
  4. Block Generation: Miners run a PoW consensus mechanism.
  5. Block Propagation: The winning miner broadcasts the new block to the network.
  6. Download: Devices download the verified updates from the new block.
  7. Global Update: Each device locally computes the new global model update.
Fig. 1. An illustration of (a) the vanilla federated learning (FL) [4], [5] and (b) the proposed blockchained FL (BlockFL) architectures.

A core contribution of the paper is a mathematical analysis of end-to-end latency. The authors model the trade-off between the block generation rate ($\lambda$) and the probability of "forking"—a state where two miners generate blocks simultaneously, causing network confusion and requiring a restart of the epoch.

Datasets

The paper evaluates the architecture using a simulated environment focused on a regression problem.

  • Device Data: Sample sizes ($N_i$) were drawn from a uniform distribution between 10 and 50.
  • Network Parameters: Simulations followed 3GPP LTE Cat. M1 specifications (300 KHz bandwidth).
  • Benchmarks: BlockFL was compared against "Vanilla FL" (centralized) and "Standalone" learning (no federation).

Key Insights and Ideas

  • Local Aggregation: Unlike vanilla FL, where the server does the math, BlockFL devices compute the global model update locally using the aggregate data stored in the blockchain. This makes the system resilient to individual miner malfunctions.
  • The Latency "Sweet Spot": Latency is convex with respect to the block generation rate. If $\lambda$ is too low, the PoW process takes too long. If $\lambda$ is too high, the frequency of forking increases, forcing frequent re-runs of the training epoch.
  • Incentive Alignment: The system incorporates "data rewards" for devices and "mining rewards" for miners. To prevent cheating, miners verify that a device's reported sample size matches its reported computation time.
  • Robustness to Malfunction: In BlockFL, a malfunctioning miner only affects its immediate associates. The rest of the network can "restore" the global model accuracy by federating with honest miners.
Fig. 2. The one-epoch operation of BlockFL with and without forking.

Key Results

  • Accuracy: BlockFL achieves nearly identical test accuracy to vanilla FL, significantly outperforming standalone learning as the number of iterations increases.
  • Optimal Latency: The authors derived a closed-form approximation for the optimal block generation rate ($\lambda^*$). As shown in the results, the latency follows a clear U-shaped curve, with the minimum shifting based on the Signal-to-Noise Ratio (SNR).
  • Scalability: BlockFL can actually achieve lower latency than vanilla FL in scenarios involving high device counts or server malfunctions, as the decentralized nature prevents a single bottleneck from slowing down the entire fleet.

Learning completion latency vs. block generation rate Test accuracy comparison between BlockFL, Vanilla FL, and Standalone

Limitations and Future Work

  • PoW Efficiency: While PoW provides robustness, it is computationally expensive. The authors suggest that future work could explore more energy-efficient consensus algorithms like Proof-of-Stake (PoS) or Byzantine Fault Tolerance (BFT).
  • Reward Metrics: Currently, rewards are based on the quantity of data. The authors acknowledge that rewarding based on data quality would be a significant improvement but would require more complex verification methods.
  • Verification Security: The verification process currently relies on comparing computation time to sample size. While the authors suggest using hardware-level security like Intel SGX to guarantee this, a purely algorithmic way to verify update "truthfulness" remains an open challenge.

Summary updated

BibTeX
@misc{kim2018blockchained,
  author = {Hyesung Kim and Jihong Park and Mehdi Bennis and Seong-Lyun Kim},
  title = {{Blockchained On-Device Federated Learning}},
  year = {2018},
  eprint = {1808.03949},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.03949},
}
Figure