Source-linked AI summary

BAFFLE : Blockchain Based Aggregator Free Federated Learning

Paritosh Ramanan, Kiyoshi Nakayama

arXiv:1909.07452v3cs.LGcs.CRcs.DCstat.ML

TL;DR

BAFFLE addresses the operational constraints and centralized-aggregator requirement of federated learning by using Smart Contracts to coordinate an aggregator-free blockchain environment. It partitions model parameters into independently updateable chunks and evaluates the design through Ethereum-based experiments and a driver-revenue case study. BAFFLE matches classical FL result quality, improves driver revenues by approximately 40% over non-FL approaches, and performs better than other aggregator-free approaches.

  • Problem

    Centralized FL aggregation can be infeasible because of logistical, trust, robustness, cost, and expertise constraints, while blockchain-based FL also faces storage, computation, latency, and transaction-size limits.

  • Method

    BAFFLE uses Smart Contracts to coordinate rounds, user selection, global-model updates, and aggregation while partitioning serialized models into independently updateable chunks.

  • Results

    Approximately 40% improvement in driver revenues compared to non FL approaches, while BAFFLE’s result quality matches classical FL and exceeds other aggregator-free approaches.

  • Takeaways & Limitations

    BAFFLE provides a decentralized FL environment that delivers quality machine-learning models without requiring an aggregator investment, supporting small-scale organizations and businesses.

  • Takeaways & Limitations

    Future work identifies incorporating differential privacy and extending BAFFLE to complex paradigms such as CNNs and LSTMs.

Abstract

from arXiv · show

A key aspect of Federated Learning (FL) is the requirement of a centralized aggregator to maintain and update the global model. However, in many cases orchestrating a centralized aggregator might be infeasible due to numerous operational constraints. In this paper, we introduce BAFFLE, an aggregator free, blockchain driven, FL environment that is inherently decentralized. BAFFLE leverages Smart Contracts (SC) to coordinate the round delineation, model aggregation and update tasks in FL. BAFFLE boosts computational performance by decomposing the global parameter space into distinct chunks followed by a score and bid strategy. In order to characterize the performance of BAFFLE, we conduct experiments on a private Ethereum network and use the centralized and aggregator driven methods as our benchmark. We show that BAFFLE significantly reduces the gas costs for FL on the blockchain as compared to a direct adaptation of the aggregator based method. Our results also show that BAFFLE achieves high scalability and computational efficiency while delivering similar accuracy as the benchmark methods.

1. Introduction

BAFFLE addresses operational and computational barriers created by centralized aggregation in federated learning through a blockchain-based, aggregator-free design. Smart Contracts coordinate decentralized participation and model updates while chunking supports parallel computation and lower costs.

  • Centralized aggregation coordinates FL rounds, maintains the global model, selects devices, and updates the model from local copies.
  • Central aggregators can be infeasible because of logistical demands, trust concerns, single-point-of-failure risks, and cloud expertise requirements.
  • Blockchain decentralization can alleviate aggregator-related operational issues, but storage, computation, model size, latency, and transaction limits constrain blockchain-based FL.
  • BAFFLE uses Smart Contracts to maintain the global model and user computational state, allowing users to update the model independently and in parallel.
  • BAFFLE selects users according to the assessed worth of local updates and delineates rounds from the reported computational state of participants.
  • BAFFLE’s decentralized design removes cloud setup and operational costs and technical-expertise requirements, lowering entry barriers for small organizations while preserving local data privacy.
  • BAFFLE is evaluated through a private Ethereum implementation, theoretical equivalence analysis, and a real-world deep-neural-network case study examining user benefits, robustness, and scalability.

2. Related Work

Prior work established privacy-preserving and decentralized FL concepts, but practical system and blockchain constraints remained unresolved. BAFFLE is presented as an early production-level aggregator-free FL platform compatible with existing blockchains.

  • Earlier work studied jointly learning accurate global models from distributed private data, with agents updating random subsets of global parameters.
  • Multi-aggregator FL frameworks address scaling but retain a master coordinating the overall process.
  • Fully decentralized FL research aggregates information from neighbors, while practical system and architectural issues remain for real-world deployment.
  • Blockchain AI efforts include Smart-Contract platforms and distributed AI-computing proposals, but practical implementations have been limited.
  • Some blockchain-FL approaches require consensus-protocol modifications or publish training data on-chain, making deployment cumbersome or eliminating FL’s privacy benefits.
  • BAFFLE targets the gap by providing a practical, production-level decentralized aggregator-free FL platform compatible with existing blockchains such as Ethereum.

3. Smart FL Contract Design: Decentralizing Role of Aggregator

BAFFLE decentralizes aggregation by partitioning serialized model parameters into independently updateable chunks managed through Smart Contracts. Budgets, scores, bids, and participation levels coordinate contribution selection and round progression.

  • BAFFLE uses Smart Contracts and model partitioning to decentralize round delineation, device selection, aggregation, and updates while addressing blockchain constraints.
  • Although implemented and evaluated on Ethereum, BAFFLE’s technical principles are stated to extend to other blockchain Smart-Contract platforms.
  • An Ethereum Virtual Machine transaction-size limit of 24 kB creates a bottleneck because machine-learning models typically exceed blockchain block sizes.
  • Serialization: BAFFLE first establishes a shared partitioning scheme, then serializes chunks individually so devices can read and write chunks independently and update them in parallel.
  • Budgeted Updates: Each device sets a budget as the maximum number of chunks it will update, allowing individual cost-to-benefit decisions under blockchain computation and miner fees.
  • Scoring and Bidding: Devices score chunks by norm difference from the latest global copy, submit budget-limited bids, and the highest-scoring bidder becomes the sole updater when bids overlap.
  • Round Delineation: End-user devices delineate rounds using information maintained by the Smart Contract, upload accepted chunks, and signal round closure.
  • Round Delineation: A Participation Level specifies how many devices must submit bids before a round starts; once reached, no new devices may join that round.

4. Computational Perspectives of BAFFLE

BAFFLE’s computational design separates local device training and blockchain interaction from globally coordinated, Smart Contract-driven aggregation. It partitions models into chunks, uses scored bids for updates, and is theoretically equivalent in expectation to classical FL under a scaled learning rate.

  • Computational perspectives: BAFFLE separates computation into local device operations and a global Smart Contract-driven process for aggregator-free FL.User devices train locally and interact with the deployed Smart Contract to push model updates.
  • Local training: Each device pulls the latest blockchain model, averages it with its local copy, trains on local data, and submits the resulting estimate as a candidate update.The candidate is considered for submission in the subsequent round.
  • Model aggregation and update: Model parameters are partitioned into chunks, and devices randomly choose a budgeted subset before scoring and bidding for accepted updates.The Smart Contract determines accepted chunks and which device updates each chunk during the round.
  • Global computational perspective: The global process uses three phases: local training, bid arrival and device acceptance, and signaling completion of local steps to the Smart Contract.In the example, the participant limit is reached when A4 and A2’s bid is rejected from the round.
  • Theoretical perspective: In expectation, BAFFLE’s global computation is equivalent to classical FL with a learning rate scaled by a constant.The stated relationship is η_BFL = 2 · C · α_FL / (B · µ · L · α_BFL).

5. Case Study: Improving Taxi Driver Revenue with BAFFLE

BAFFLE applies aggregator-free federated learning to taxi revenue optimization, using batch deep reinforcement learning and blockchain-coordinated local updates. The case study uses NYC taxi data and compares decentralized learning against no-learning and aggregator-free alternatives.

  • Motivation: Aggregator-free FL addresses centralized coordination, trust, privacy, and single-point-of-failure concerns in taxi revenue optimization.The taxi industry lacks trusted coordinators and sophisticated computing platforms, while decentralized FL enables collective learning without sharing private ride data.
  • Deep Batch Reinforcement Learning: Batch DRL learns taxi Q-function values with Deep Neural Fitted Q, using pickup state, dropoff action, and time-grid representations.States combine city cells with 96 fifteen-minute intervals; actions specify dropoff locations.
  • BAFFLE Procedure: At each round, devices pull the latest blockchain model, average it locally, train on new rides, and push updates through the smart contract.The local Q-function update follows Equations (8a) and (8b), while Algorithm 2 orchestrates the BAFFLE procedure.
  • Data and Benchmarking: The evaluation uses 2 million May 2018 NYC taxi rides, restricted to lower Manhattan and split into training and testing sets.The resulting subsets contain slightly more than half a million rides each.
  • Data and Benchmarking: Aggregated Simulation Revenue sums fares across 50 benchmark trajectories of 50 rides and provides the No Learning baseline.For DRL models, taxis transition to a new location instead of idling when no ride is found, and average revenue is reported across repeated simulations.
  • Comparisons: RandomDFL provides a comparison mechanism for orchestrating a naive aggregator-free federated learning approach.The study also compares BAFFLE with Local Learning and classical aggregator-driven FL under repeated taxi-learning rounds.

6. Experiments

BAFFLE is evaluated against classical and local learning across benefits, sensitivity to chunk and budget sizes, scalability, and participation levels. The experiments report comparable model quality with lower blockchain costs and efficient decentralized operation.

  • Benefits Study: BAFFLE provides approximately 38% driver benefit, rivaling classical federated learning and improving benefit by close to 18% over local learning.The comparison uses ASR-based benefit over 50 rounds, with 16 taxis for federated methods and one taxi for local learning.
  • Sensitivity Analysis: Benefits closely mirror classical federated learning across chunk and budget combinations, indicating resilience to these parameter variations.The sensitivity experiment uses 64 taxis, approximately 70 rides per round, and 125 rounds.
  • Sensitivity Analysis: Training time is marginal compared with push time, making push-time reduction central to computational efficiency on the blockchain.Figure 3 examines gas costs and push time, while Table 4 reports average training time and standard deviation.
  • Sensitivity Analysis: Gas-cost variation is smaller for 2 kB chunks, while larger chunks increase variation but can reduce costs through stronger competition among devices.For budget size 32, gas cost shows an initial uptick followed by a more pronounced downward trend at higher chunk sizes.
  • Scalability Analysis: Increasing active devices improves model quality until the improvement saturates, while gas costs decrease and push time varies little.The scalability experiment evaluates 16, 32, 64, and 128 taxis.
  • Participation Level (PL) Analysis: Lower participation levels accelerate convergence and reduce gas cost and push time; at 5% participation, BAFFLE outperforms RandomDFL by more than a factor of 2 on both costs.BAFFLE generally incurs about half the gas cost and push time of RandomDFL in the reported experiment.

7. Conclusion and Future Work

BAFFLE eliminates the centralized aggregator in federated learning by decentralizing round delineation and related operations through blockchain. In a ride-sharing case study, it improves driver revenue while matching classical FL result quality and outperforming other aggregator-free approaches.

  • BAFFLE decentralizes round delineation and eliminates the centralized aggregator in its blockchain-based federated-learning framework.
  • In the ride-sharing case study, BAFFLE uses federated learning to collectively augment a driver-revenue deep reinforcement-learning model.
  • Approximately 40% improvement in driver revenues was achieved versus non-FL approaches.
  • BAFFLE matched the result quality of classical FL schemes requiring an aggregator and outperformed other aggregator-free approaches.
  • Future work targets additional machine-learning paradigms, differential privacy, CNNs, and LSTMs within BAFFLE.

1. Centralized Deep Batch Q Learning

The centralized deep batch Q-learning procedure updates a model from newly observed ride sets and trains a neural network using discounted future rewards. Its algorithmic steps include retrieving the latest blockchain model, averaging it, and locally updating the model across iterations.

  • The procedure observes a new ride set at every epoch before updating Q-value estimates for each ride.
  • Each Q-value update combines the fare collected for a ride with a discounted future reward.
  • The discounted future reward uses the action with the highest Q value from the destination state.
  • The algorithm pulls the latest available model Q from the blockchain and performs averaging before local training.
  • Local model Q_j is trained through Equation (8b) after averaging Q_k through Equation (8a).

2. Random Decentralized FL (RandomDFL)

RandomDFL uses a naive smart contract in which devices independently select model chunks to update within their budgets. Because concurrent updates can overwrite one another before being read, some chunk updates may be wasted.

  • Randomized Decentralized Deep Neural Fitted Q retrieves the latest blockchain model and averages it before local training.
  • After local training, each device pushes a random subset of model chunks C_k, with |C_k| = B.
  • The naive smart contract allows devices to update any chunks subject to their individual budget values.
  • Some chunk updates are wasted when another device overwrites them before other agents can read the earlier contribution.
Loading 1909.07452v3…