Lancelot: Towards Efficient and Privacy-Preserving Byzantine-Robust Federated Learning within FullyHomomorphic Encryption

Chuan Ma, Siyang Jiang, Hao Yang, Qipeng Xie, Sen Wang, Tao Xiang, Guoliang XingResearch Square 2024

Abstract

In sectors such as finance and healthcare, where data governance is subject to rigorous regulatory requirements, the exchange and utilization of data are particularly challenging. Federated Learning (FL) has risen as a pioneering distributed machine learning paradigm that enables collaborative model training across multiple institutions while maintaining data decentralization. This approach inherently heightens data privacy by sharing only model weights, rather than raw data. Despite its advantages, FL is vulnerable to adversarial threats, particularly poisoning attacks during model aggregation, a process typically managed by a central server. To counteract the vulnerabilities of traditional FL frameworks, Byzantine-robust federated learning (BRFL) systems have been introduced, which rely on robust aggregation rules to mitigate the impact of malicious attacks. However, in these systems, neural network models still possess the capacity to memorize and potentially expose individual training instances inadvertently. This presents a significant privacy risk, as attackers could reconstruct private data by leveraging the information contained in the model itself. Existing solutions fall short of providing a viable, privacy-preserving BRFL system that is both completely secure against information leakage and computationally efficient. To address these concerns, we propose Lancelot, an innovative and computationally efficient BRFL framework that employs fully homomorphic encryption (FHE) to safeguard against malicious client activities while preserving data privacy. Lancelot features a novel interactive sorting mechanism called masked-based encrypted sorting. This method successfully circumvents the multiplication depth limitations of ciphertext, ensuring zero information leakage. Furthermore, we incorporate cryptographic enhancements, such as Lazy Relinearization and Dynamic Hoisting, alongside GPU hardware acceleration, to achieve a level of computational efficiency that makes Lancelot a viable option for practical implementation. Our extensive testing, including medical imaging diagnostics and widely used public image datasets, demonstrates that Lancelot significantly outperforms existing methods, offering more than a twenty-fold increase in processing speed while maintaining data privacy. The Lancelot framework thus stands as a potent solution to the pressing issue of privacy in secure, multi-centric scientific collaborations, paving the way for safer and more efficient federated learning applications.

Introduction

Federated Learning (FL) allows multiple parties—such as hospitals or financial institutions—to train a shared model without exchanging raw data. However, the paradigm faces two critical threats: privacy leakage and Byzantine attacks. Even without raw data, model updates (gradients) can "memorize" training instances, allowing attackers to reconstruct private images using techniques like Deep Leakage from Gradients (DLG). Simultaneously, malicious participants can "poison" the global model by sending fraudulent updates to degrade accuracy.

To mitigate poisoning, Byzantine-robust FL (BRFL) employs rules like "Krum" or "Median" to filter outliers. However, these rules typically require the server to inspect and sort model updates, which compromises privacy. While Fully Homomorphic Encryption (FHE) allows computation on encrypted data, it is traditionally too slow for the complex sorting operations required by BRFL. Lancelot addresses this by bridging the gap between FHE and robust aggregation with high efficiency.

Methodology: The Lancelot Framework

Lancelot introduces three primary innovations to achieve secure and efficient robust aggregation:

1. Masked-based Encrypted Sorting

Instead of performing a depth-heavy sort entirely within ciphertext, Lancelot utilizes an interactive protocol between the Server and a trusted Key Generation Center (KGC). The server computes encrypted distances between models and sends them to the KGC. The KGC decrypts these distances, determines the sorting order, and returns an encrypted "mask." This mask allows the server to aggregate honest models without ever identifying which client provided which update, ensuring zero information leakage.

The Lancelot system architecture illustrates the nine-step interactive protocol between clients, the server, and the Key Generation Center.

2. Cryptographic Optimizations

  • Lazy Relinearization: Relinearization is a heavy cleanup step required after FHE multiplications. Lancelot defers this step, performing a single relinearization after a series of additions, which significantly reduces processing time.
  • Dynamic Hoisting: This technique optimizes homomorphic rotations essential for matrix math by parallelizing rotations and reducing expensive modulus-raising operations.

3. Hardware Acceleration

The framework is implemented using a custom GPU-based FHE library, offloading heavy polynomial arithmetic from the CPU to maximize throughput.

Experimental Results

Lancelot was evaluated across standard benchmarks (MNIST, FMNIST, CIFAR-10, SVHN) and 12 MedMNIST medical datasets.

Computational Efficiency

Lancelot consistently outperformed state-of-the-art libraries like OpenFHE. As shown in the performance data, Lancelot achieves a speedup of over 20x across various models and client scales. For instance, on a ResNet-34 model with CIFAR-10, processing time was reduced from over 3 hours (11,559 seconds) to just 9 minutes (548 seconds).

Performance comparison showing Lancelot's significant speedup over OpenFHE across different robust aggregation rules and model architectures.

Security and Robustness

Under "label-flipping" attacks where 10% of clients were malicious, Lancelot maintained accuracy levels nearly identical to non-encrypted robust baselines. Furthermore, the framework proved resilient against DLG and IDLG reconstruction attacks; while standard FL updates allowed for image recovery, Lancelot updates resulted in unidentifiable noise and high Mean Square Error (MSE).

Conclusion

Lancelot demonstrates that the trade-off between privacy and robustness in Federated Learning can be overcome. By combining a novel interactive sorting protocol with targeted cryptographic and hardware optimizations, Lancelot moves FHE-based FL from a theoretical research area into a viable tool for secure, multi-centric scientific collaboration. Future work will focus on scaling these techniques to extremely large models and adapting the framework for resource-constrained mobile devices in cross-device FL scenarios.

Summary updated

BibTeX
@inproceedings{ma2024lancelot,
  author = {Chuan Ma and Siyang Jiang and Hao Yang and Qipeng Xie and Sen Wang and Tao Xiang and Guoliang Xing},
  title = {{Lancelot: Towards Efficient and Privacy-Preserving Byzantine-Robust Federated Learning within FullyHomomorphic Encryption}},
  booktitle = {Research Square},
  year = {2024},
  doi = {10.21203/rs.3.rs-5149131/v1},
}
Figure