Abstract
Blockchain has become a popular decentralized paradigm for various applications in the zero-trust environment. The core of the blockchain is the consensus protocol, which establishes consensus among all the participants. PoW (Proof-of-Work) is one of the most popular consensus protocols. However, the PoW consensus protocol which incentives the participants to use their computing power to solve a meaningless hash puzzle is continuously questioned as energy-wasting. To address these issues, we propose an efficient and secure consensus protocol based on proof of useful federated learning for blockchain (called FedChain). We first propose a secure and robust blockchain architecture that takes federated learning tasks as proof of work. Then a pool aggregation mechanism is integrated to improve the efficiency of the FedChain architecture. To protect model parameter privacy for each participant within a mining pool, a secret sharing-based ring-all reduce architecture is designed. We also introduce a data distribution-based federated learning model optimization algorithm to improve the model performance of FedChain. At last, a zero-knowledge proof-based federated learning model verification is introduced to preserve the privacy of federated learning participants while proving the model performance of federated learning participants. Our approach has been tested and validated through extensive experiments, demonstrating its performance.
Introduction
Traditional Proof-of-Work (PoW) consensus—the backbone of networks like Bitcoin—is notoriously energy-inefficient, consuming vast amounts of electricity to solve arbitrary mathematical puzzles. While "Proof of Useful Work" (PoUW) has been proposed as an alternative, previous attempts to use Machine Learning (ML) as the "work" faced three major hurdles: centralization, privacy, and verification. Most Federated Learning (FL) schemes rely on a central server, which contradicts blockchain's decentralized nature. Furthermore, sharing model updates can leak sensitive data, and verifying that a miner actually performed the training is computationally expensive. FedChain addresses these issues by replacing meaningless hash puzzles with useful FL tasks within a secure, decentralized framework.
Methodology
FedChain utilizes several sophisticated techniques to build a secure, decentralized FL-based consensus protocol. The workflow involves task publication, mining pool formation, decentralized model training, and verification.
Mining Pool Aggregation and Ring All-Reduce
To reduce network congestion, nodes are clustered into "mining pools" based on communication latency. This allows for parallel processing and faster consensus. Instead of a central server, FedChain uses a decentralized architecture where nodes share model parameters in a ring formation. By integrating secret sharing and adding noise to parameters, the system ensures that no single node can see another's raw model updates, preserving privacy.
Optimization and Verification
To handle "non-IID" data (where different miners have very different types of data), the protocol uses Kullback–Leibler (KL) divergence to weight model updates. This ensures the global model performs well even when data is imbalanced across the network. Finally, the system employs zkCNN (Zero-Knowledge Proofs) for Convolutional Neural Networks. This allows miners to prove their model reaches a specific accuracy threshold on a test set without revealing the actual model weights to the verifiers.
Experimental Evaluation
The framework was evaluated using two standard computer vision benchmarks: MNIST and Fashion-MNIST. The experiments focused on consensus latency, scalability, and model accuracy under varying data distributions.
Key Results
- Efficiency and Scalability: FedChain significantly reduces consensus latency compared to traditional centralized FL (FedAvg) and standard blockchain protocols as the number of nodes increases. While FedAvg hits a bottleneck at the central server, FedChain’s decentralized approach scales gracefully. Increasing the number of mining pools steadily decreases latency; for instance, in a 500-node network, increasing pool count drastically cuts consensus time.
- Accuracy: On imbalanced (non-IID) data, FedChain outperformed standard benchmarks like FedAvg and FedProx. When data was highly skewed, FedChain maintained high accuracy while others struggled.
- Security: The integration of secret sharing and ZKPs provided a robust defense against privacy leaks and "lazy" miners who might try to claim rewards without performing the required training.
Conclusion
FedChain demonstrates that computational effort spent on gradient descent in FL can serve the same cryptographic purpose as hashing in PoW, provided the work is provable. By decentralizing the FL process and utilizing ZKPs for privacy-preserving verification, FedChain offers a sustainable and useful alternative to traditional consensus mechanisms. Future work will involve testing on global wide-area networks and exploring more complex AI tasks beyond image classification.
Summary updated