Proof-of-Contribution-Based Design for Collaborative Machine Learning on Blockchain

Baturalp Buyukates, Chaoyang He, Shanshan Han, Zhiyong Fang, Yupeng Zhang, Jieyi Long, Ali Farahanchi, Salman Avestimehr

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for collaborative machine learning, allowing multiple participants to train models without sharing sensitive raw data. However, transitioning FL from controlled research environments to open, decentralized data markets introduces significant challenges. Specifically, such systems must address fair incentive distribution, the verifiability of computations performed by central aggregators, and protection against malicious "poisoning" attacks.

Existing blockchain-based FL solutions often encounter a "blockchain bottleneck," where the high cost of on-chain storage and the computational complexity of machine learning operations make direct implementation impossible. This paper proposes a novel architecture that leverages Zero-Knowledge Proofs (ZKPs) and a Randomized Leave-One-Out (RLOO) metric to create a secure, fair, and efficient decentralized marketplace for collaborative learning.

Proposed Framework

The proposed system utilizes a modular architecture that separates heavy computation from cryptographic verification. This design ensures that the blockchain serves as a source of truth without being burdened by the training process itself.

  • Decentralized Storage: To avoid the high costs of on-chain storage, large model parameters and validation datasets are stored on the InterPlanetary File System (IPFS). Only the unique Content Identifiers (CIDs) are recorded on the smart contract, ensuring data integrity while maintaining efficiency.
  • Off-Chain Aggregation and Proving: A central aggregator performs the model updates and contribution assessments off-chain. Crucially, the aggregator generates a zkSNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) for every critical operation, providing a mathematical guarantee that the results are accurate.
  • On-Chain Verification: The blockchain smart contract acts as the final arbiter. It verifies the ZKPs submitted by the aggregator. If the proof is valid, the contract proceeds with reward distribution and model updates. This approach ensures that the blockchain only performs constant-time verification rather than linear-time computation.

Contribution Assessment and Security

A core innovation of this work is the methodology used to reward participants and secure the model against attacks.

Randomized Leave-One-Out (RLOO)

While the Shapley Value is the theoretical gold standard for fair reward distribution, its exponential computational complexity makes it unsuitable for ZKP integration. The authors introduce Randomized Leave-One-Out (RLOO) as a practical alternative. RLOO samples subsets of trainers and measures the impact on model accuracy when a specific trainer's update is excluded. This provides a linear-complexity approximation of contribution that is feasible to prove within a ZKP circuit.

Two-Stage Outlier Detection

To defend against malicious actors, the system employs a robust two-stage filtering process:

  1. Cross-Round Check: Uses cosine similarity to detect if a trainer's current update deviates significantly from their historical behavior.
  2. Cross-Trainer Check: Employs Euclidean distance and the "three-sigma rule" to identify and prune updates that are statistical outliers relative to the rest of the group.

Experimental Evaluation

The system was evaluated using three benchmarks: MNIST (Logistic Regression and MLP), CIFAR10 (ResNet-56), and the Criteo Terabyte Dataset (Deep Learning Recommendation Model).

Key Results

  • Robustness: The outlier detection mechanism achieved 100% accuracy in identifying Byzantine (random noise) attacks across all models. For more sophisticated backdoor attacks, the system maintained a detection accuracy between 90% and 100%.
  • Fairness: In non-i.i.d. (independent and identically distributed) data scenarios, RLOO demonstrated superior fairness compared to other approximation methods, ensuring that honest contributors were consistently rewarded based on the quality of their data.
  • Efficiency: The use of the Groth16 ZKP scheme allowed for highly efficient on-chain operations. While generating a proof for a massive DLRM model took approximately 2.5 hours off-chain, the smart contract was able to verify the entire round of work in just 3 milliseconds.

Conclusion and Future Work

This research demonstrates that a verifiable, decentralized machine learning marketplace is achievable by shifting the blockchain's role from computation to verification. By utilizing RLOO for fair incentives and zkSNARKs for trustless aggregation, the framework overcomes the traditional limitations of blockchain-based FL.

Future research will focus on optimizing ZKP circuits for specific machine learning operations, such as matrix multiplication, to reduce off-chain proving time. Additionally, the authors aim to explore more efficient contribution metrics that maintain the fairness of RLOO while further reducing the number of required inference passes.

Summary updated

BibTeX
@inproceedings{buyukates2023proof,
  author = {Baturalp Buyukates and Chaoyang He and Shanshan Han and Zhiyong Fang and Yupeng Zhang and Jieyi Long and Ali Farahanchi and Salman Avestimehr},
  title = {{Proof-of-Contribution-Based Design for Collaborative Machine Learning on Blockchain}},
  booktitle = {DAPPS},
  year = {2023},
  doi = {10.1109/dapps57946.2023.00012},
}
Figure