A Blockchain-Enabled Decentralized Federated Learning System with Transparent and Open Incentive and Audit Contracts
摘要
Federated learning is an innovative and secure artificial intelligence model that ensures distributed privacy protection. However, FL faces serious challenges such as potential single point failures, lack of transparency in audits, and insufficient incentives for participants. In this paper, to address the above challenges, we propose a Blockchain-enabled Decentralized Federated Learning (BC-DFL) system with transparent and open incentive and audit mechanisms. We design a two-stage model training contract that enables a transparent and decentralized FL process. In the first stage, local models are collected, and after reaching the predetermined conditions, the winning nodes of blockchain mining perform model aggregation in the second stage. In addition, to reduce the block size, we leverage the Inter-Planetary File System to convert local models into hashes and record them on the blockchain. Moreover, to incentivize desirable behavior and deter malicious actions, we further propose a rewarding formula and corresponding incentive contract. Our smart contracts incorporate a mutual evaluation mechanism for nodes, which enables fair rewards for benign nodes while punishing those with nefarious intent. The experimental results reveal that the proposed system achieves a high anti-single point of failure value and high incentive goal while maintaining similar accuracy to the original FL system. The source code is available on GitHub.