CryptoQFL: Quantum Federated Learning on Encrypted Data

Cheng Chu, Lei Jiang, Fan Chen

Abstract

CryptoQFL is a novel framework for training Quantum Neural Networks (QNNs) across decentralized devices without exposing raw data or gradients to a central server. By combining quantum homomorphic encryption with ternary gradient quantization and a custom-built quantum adder, the system achieves a privacy-preserving architecture that is significantly faster and more communication-efficient than previous secure quantum federated learning attempts. This paper details the optimizations that allow for secure aggregation on fully encrypted quantum states while maintaining high model accuracy.

Introduction

Quantum Neural Networks (QNNs) show immense promise for complex tasks in drug discovery, financial modeling, and materials science. However, training these models often requires massive datasets siloed across different organizations, such as hospitals or banks. Moving this data to a central server is frequently prohibited by privacy laws, national security concerns, or logistical constraints.

While Federated Learning (FL) allows models to be trained locally on separate devices, it is not inherently secure against sophisticated attacks. A "semi-honest" central server can perform gradient inversion attacks, reverse-engineering private local data from the gradients sent for aggregation. Existing Quantum FL (QFL) research often overlooks this threat or assumes a "trusted" server. CryptoQFL addresses this gap by enabling secure aggregation on fully encrypted quantum states.

Methodology

The CryptoQFL framework introduces three primary optimizations to make secure QFL practical for distributed systems:

1. Optimized Secure Workflow

Standard Quantum Homomorphic Encryption (QHE) typically utilizes a Quantum One-Time Pad (QOTP) for data and Classical Homomorphic Encryption (CHE) for keys. In traditional setups, the server handles heavy CHE computation, creating a massive latency bottleneck. CryptoQFL flips this paradigm: because clients are aware of the aggregation circuit, they update their QOTP keys locally. This removes the need for remote CHE processing during the aggregation phase.

The CryptoQFL workflow: Clients perform local training and encryption before uploading gradients to an untrusted server for secure aggregation.

2. Ternary Gradient Quantization

To address communication bottlenecks, the authors adapted classical quantization techniques to the quantum realm. Instead of transmitting high-precision floating-point gradients, updates are quantized to just three levels: -1, 0, and 1. This drastically reduces the number of qubits required for transmission without significantly impacting model convergence.

3. Efficient Quantum Adder

The heart of the server-side aggregation is a new quantum adder circuit. Unlike prior designs that produce "garbage" outputs (unused qubits that consume resources), this design is compact, requires fewer ancillary qubits, and minimizes the use of Toffoli (CCX) gates. These gates are computationally expensive and prone to error on current Noisy Intermediate-Scale Quantum (NISQ) hardware.

Key Insights and Results

Latency and Bottlenecks

Baseline analysis revealed that Classical Homomorphic Encryption (CHE) and communication overhead were the primary sources of latency in secure QFL, often dwarfing the actual training time. By shifting key updates to the client side, CryptoQFL significantly reduces this overhead.

Normalized latency breakdown across three tasks (QNN_C, QNN_G, and QCO), highlighting the impact of CHE and communication on total execution time.

Performance Metrics

  • High Accuracy: On the MNIST image classification task (QNN_C), CryptoQFL achieved 99.15% accuracy with ternary gradients, nearly identical to the 99.25% achieved with full-precision floating-point gradients.
  • Adder Efficiency: The custom quantum adder achieved a latency of 28 units, compared to 50 and 55 units for existing state-of-the-art designs, while reducing CCX gate usage by nearly 40%.
  • Scalability: The framework demonstrated strong convergence as the number of clients scaled, proving its viability for real-world distributed environments.

Conclusion and Future Work

CryptoQFL demonstrates that privacy-preserving quantum machine learning is achievable without prohibitive performance penalties. By optimizing the encryption workflow and hardware-level operations, the framework provides a robust defense against gradient inversion attacks.

Future research will focus on expanding the threat model to include "malicious" actors who may attempt to poison gradients. Additionally, the authors plan to investigate the impact of real-world quantum decoherence and gate errors on encrypted aggregation, as current results are primarily based on high-fidelity simulations.

Summary updated

Abstract

Recent advancements in Quantum Neural Networks (QNNs) have demonstrated theoretical and experimental performance superior to their classical counterparts in a wide range of applications. However, existing centralized QNNs cannot solve many real-world problems because collecting large amounts of training data to a common public site is time-consuming and, more importantly, violates data privacy. Federated Learning (FL) is an emerging distributed machine learning framework that allows collaborative model training on decentralized data residing on multiple devices without breaching data privacy. Some initial attempts at Quantum Federated Learning (QFL) either only focus on improving the QFL performance or rely on a trusted quantum server that fails to preserve data privacy. In this work, we propose CryptoQFL, a QFL framework that allows distributed QNN training on encrypted data. CryptoQFL is (1) secure, because it allows each edge to train a QNN with local private data, and encrypt its updates using quantum homomorphic encryption before sending them to the central quantum server; (2) communication-efficient, as CryptoQFL quantize local gradient updates to ternary values, and only communicate non-zero values to the server for aggregation; and (3) computation-efficient, as CryptoQFL presents an efficient quantum aggregation circuit with significantly reduced latency compared to state-of-the-art approaches.
BibTeX
@inproceedings{chu2023cryptoqfl,
  author = {Cheng Chu and Lei Jiang and Fan Chen},
  title = {{CryptoQFL: Quantum Federated Learning on Encrypted Data}},
  booktitle = {QCE},
  year = {2023},
  url = {https://openreview.net/forum?id=Vwlvd1y88c},
}

Loading related content...

Figure