FedQNN: Federated Learning using Quantum Neural Networks

Nouhaila Innan, Muhammad Al-Zafar Khan, Alberto Marchisio, Muhammad Shafique, Mohamed Bennai

Introduction

Quantum Machine Learning (QML) represents a frontier in computational science, offering the potential for exponential speedups in processing complex datasets. However, the practical application of QML is currently hindered by the limitations of Noisy Intermediate-Scale Quantum (NISQ) hardware and the sensitive nature of the data required for training. The FedQNN framework addresses these challenges by integrating Federated Learning (FL) principles with Quantum Neural Networks (QNNs). This decentralized approach allows multiple clients to collaboratively train a global quantum model without ever sharing their raw, local data, thereby preserving privacy and distributing the computational load across multiple NISQ devices.

Problem Statement

The development of scalable QML systems faces two primary obstacles:

  1. Hardware Constraints: Current quantum processors are limited by noise, decoherence, and high operational costs. Training large-scale models on a single device is often infeasible.
  2. Data Privacy and Security: Centralizing sensitive information—such as medical records or genomic data—into a single repository for training creates significant regulatory hurdles and security risks.

FedQNN proposes a solution by adapting the classical Federated Learning paradigm to the quantum domain, enabling secure, distributed training that is compatible with existing NISQ-era hardware.

The FedQNN Framework

Quantum Architecture

The core of the FedQNN framework is a specialized QNN architecture designed for efficiency. The process begins with Angle Embedding, which maps classical data features into quantum states via rotations about the X-axis. The quantum circuit itself is composed of alternating layers designed to maximize expressivity:

  • Superposition: Hadamard (H) gates are applied to create quantum superpositions.
  • Entanglement: CNOT gates are utilized to create dependencies between qubits.
  • Parameterized Rotations: $R_Y$ rotation gates serve as the learnable parameters ($\theta$) of the model.

Federated Optimization

FedQNN utilizes a decentralized training loop inspired by the classical FedAvg algorithm. Each participating client maintains a local dataset and performs training iterations using the Adam optimizer to minimize Mean Squared Error (MSE) loss. Instead of transmitting raw data, clients send only their updated model weights ($\theta$) to a central server. The server aggregates these weights—typically through simple averaging—to update a global model, which is then redistributed to the clients for the next round of training.

Experimental Evaluation

Datasets

The researchers validated FedQNN across three distinct datasets to demonstrate its versatility:

  • Iris Dataset: A standard benchmark for classification tasks (150 samples).
  • Breast Cancer Dataset: A healthcare-oriented dataset comprising 286 instances with nine attributes.
  • Synthetic DNA Dataset: A custom genomics dataset focused on the binary classification of promoter vs. non-promoter genetic sequences.

Hardware and Simulation

The framework was tested using the PennyLane simulator for noise-free benchmarking and validated on real-world quantum hardware via IBM Quantum. Specifically, the ibm_nairobi, ibm_lagos, and ibm_perth QPUs were used to assess the model's performance in the presence of environmental noise and gate infidelities.

Results and Analysis

Performance Metrics

FedQNN demonstrated high accuracy across all tested domains. The framework achieved 90% accuracy on both the Iris and Synthetic DNA datasets, and 86% accuracy on the Breast Cancer dataset. Notably, when deployed on real IBM QPUs, the model maintained a performance threshold above 80% accuracy within only 10 iterations, highlighting its rapid convergence capabilities despite hardware noise.

Convergence and Scalability

Two key insights emerged from the experimental data:

  • The "Zigzag" Convergence: While individual training trials showed fluctuations due to quantum noise, the mean accuracy across trials followed a stable upward trend. This "zigzag" pattern eventually stabilizes as the global model converges.
  • Strength in Numbers: A positive correlation was observed between the number of participating clients and the final model accuracy. Increasing the number of nodes improved the generalizability of the global model, suggesting that FedQNN scales effectively with larger decentralized networks.

Comparative Analysis

In comparison to existing Quantum Federated Learning (QFL) benchmarks, such as SlimQFL and Vanilla QFL—which typically report accuracies between 60% and 77% on image-based datasets like MNIST—FedQNN showed superior performance, particularly in its ability to handle non-image data types like genomic sequences.

Limitations and Future Work

While FedQNN proves the viability of decentralized QML, several challenges remain. The inherent fragility of quantum states makes the training process susceptible to decoherence and information loss. Furthermore, while classical averaging (FedAvg) is effective for current models, the authors suggest that more sophisticated, quantum-specific aggregation techniques may be required as circuits become more complex. Future research will focus on optimizing circuit designs and exploring advanced "quantum state agglomeration" methods to further enhance security and efficiency.

Conclusion

FedQNN represents a significant step toward practical, privacy-preserving Quantum Machine Learning. By successfully bridging the gap between federated architectures and NISQ-era hardware, the framework provides a robust path for collaborative quantum research in sensitive fields like healthcare and genomics.

Summary updated

BibTeX
@inproceedings{innan2024fedqnn,
  author = {Nouhaila Innan and Muhammad Al-Zafar Khan and Alberto Marchisio and Muhammad Shafique and Mohamed Bennai},
  title = {{FedQNN: Federated Learning using Quantum Neural Networks}},
  booktitle = {IJCNN},
  year = {2024},
  doi = {10.1109/ijcnn60899.2024.10651123},
}
Figure