Abstract
Since the concern of privacy leakage extremely discourages user participation in sharing data, federated learning has gradually become a promising technique for both academia and industry for achieving collaborative learning without leaking information about the local data. Unfortunately, most federated learning solutions cannot efficiently verify the execution of each participant's local machine learning model and protect the privacy of user data, simultaneously. In this article, we first propose a Zero-Knowledge Proof-based Federated Learning (ZKP-FL) scheme on blockchain. It leverages zero-knowledge proof for both the computation of local data and the aggregation of local model parameters, aiming to verify the computation process without requiring the plaintext of the local data. We further propose a Practical ZKP-FL (PZKP-FL) scheme to support fraction and non-linear operations. Specifically, we explore a Fraction-Integer mapping function, and use Taylor expansion to efficiently handle non-linear operations while maintaining the accuracy of the federated learning model. Performance analysis demonstrates that the whole running time of the PZKP-FL scheme is approximately less than one minute in parallel execution.
Introduction
Federated Learning (FL) is designed to preserve privacy by keeping data on user devices. However, it faces a significant "trust gap." Participants may act lazily, submitting random updates to claim rewards without performing actual training. Conversely, a central aggregator might perform "gradient inference attacks" to reverse-engineer private data from model updates. Furthermore, most existing solutions lack a mechanism to prove that the global model was aggregated honestly without exposing the underlying local updates.
Existing Zero-Knowledge Proof (ZKP) solutions for machine learning often suffer from high latency, massive memory consumption, or limited support for non-linear models. This paper introduces PZKP-FL, a framework that combines zk-SNARKs and blockchain to make FL both verifiable and private while remaining computationally practical.
System Architecture
The ZKP-FL architecture involves three primary stages: task distribution, local training with proof generation, and secure aggregation. A publisher distributes training tasks to multiple trainers who perform the computation locally.
As shown in Figure 1, the process concludes with a Secure Sum Protocol on the blockchain, ensuring that the global model is aggregated correctly and transparently without revealing individual trainer contributions.
Technical Methodology
Circuit Splitting and Parallelism
A major hurdle for ZK-based machine learning is the memory bottleneck; a single large proof for a complex model can require terabytes of RAM. To solve this, the authors implement Circuit Splitting, dividing the training algorithm into smaller, manageable "pieces."
By processing these pieces in parallel (as seen in Figure 2), the system reduces the total wall-clock time from days to less than a minute. Each piece generates its own proof, which remains a constant size of approximately 5 KB, making it efficient for blockchain storage.
Mathematical Bridges for ZKP
ZKPs typically operate on large prime fields (integers), whereas machine learning relies on floating-point decimals and non-linear functions. PZKP-FL bridges this gap through two key techniques:
- Fraction-Integer Mapping: A scaling ratio ($10^{rat}$) maps fractions to integers, maintaining precision during cryptographic operations.
- Taylor Expansion: Complex non-linear functions like Sigmoid or tanh are approximated using Taylor expansion. This converts complex curves into simple polynomial additions and multiplications that ZKPs can handle efficiently.
Privacy and Security
To prevent the server from stealing data via intermediate gradients, the authors adapt the Groth16 zk-SNARK by injecting uniformly distributed noise into the ZKP statements. This decouples the proof of correctness from the actual value of the gradient, ensuring that verification does not lead to privacy leakage.
Evaluation and Results
The framework was evaluated using the Iris Classification and House Price Prediction datasets. Key findings include:
- Efficiency: In parallel execution, the entire running time for the PZKP-FL scheme is less than one minute.
- Accuracy: The integer-mapped model maintained high accuracy (96% for Iris), comparable to original floating-point versions.
- Scalability: Splitting the circuit allowed the system to run on standard hardware with 4 GiB of RAM, whereas a monolithic proof would have required 30 TiB.
Conclusion
PZKP-FL demonstrates that verifiable federated learning is achievable on standard hardware. While the current implementation requires a "trusted setup" and is best suited for edge nodes rather than low-power mobile devices, it provides a robust foundation for secure, decentralized AI training. Future work will look toward "transparent" ZKPs like STARKs to remove setup dependencies and further optimize for massive deep neural networks.
Summary updated