BlockDFL: A Blockchain-based Fully Decentralized Federated Learning Framework

Federated learning (FL) enables collaborative training of machine learning models while protecting the privacy of data. Traditional FL heavily relies on a trusted centralized server. It is vulnerable to poisoning attacks, the sharing of raw model updates puts the private training data under the risk of being reconstructed, and it suffers from an efficiency problem due to heavy communication cost. Although decentralized FL eliminates the central dependence, it may worsen the other problems due to insufficient constraints on the behavior of participants and distributed consensus on the global model update. In this paper, we propose a blockchain-based fully decentralized peer-to-peer (P2P) framework for FL, called BlockDFL for short. It leverages blockchain to force participants to behave well. It integrates gradient compression and our designed voting mechanism to coordinate decentralized FL among peer participants without mutual trust, while preventing data from being reconstructed from transmitted model updates. Extensive experiments conducted on two real-world datasets exhibit that BlockDFL obtains competitive accuracy compared to centralized FL and can defend poisoning attacks while achieving efficiency and scalability. Especially when the proportion of malicious participants is as high as 40%, BlockDFL can still preserve the accuracy of FL, outperforming existing fully decentralized FL frameworks based on blockchain.
View on arXiv