Differentiable Architecture Search for Adversarially Robust Quantum Computer Vision

Mohamed Afane, Quanjiang Long, Haoting Shen, Ying Mao, Junaid Farooq, Ying Wang, Juntao ChenarXiv 2026 · DOI · arXiv

TL;DR

The authors introduce CNL-QNN, a hybrid quantum-classical framework that combines Differentiable Quantum Architecture Search (DQAS) with a lightweight Classical Noise Layer (CNL). By injecting mild, trainable perturbations during classical preprocessing, this approach design discovers Quantum Neural Network (QNN) architectures that are highly resilient against both adversarial attacks and hardware noise—all without sacrificing clean accuracy or consuming precious quantum computing resources.

What Problem Does This Paper Address?

Quantum Neural Networks (QNNs) hold immense promise for quantum computer vision (QCV), potentially leveraging superposition and entanglement to learn rich feature representations. However, Noisy Intermediate-Scale Quantum (NISQ) devices are notoriously fragile. QNNs suffer from extreme sensitivity to both environmental hardware noise and malicious adversarial perturbations (small, intentional alterations to input data designed to fool a model).

Existing defense mechanisms present a frustrating trade-off:

  • Compromised Accuracy: Techniques like internal quantum noise injection or randomized encoding often degrade performance on clean, unperturbed data.
  • Prohibitive Computational Burden: Methods like adversarial training or complex error-correction circuits require massive quantum gate overhead and coherence times that near-term hardware simply cannot support.

As shown in preliminary evaluations, many standard quantum defenses drop below a vital 90% clean accuracy threshold, making them impractical for real-world deployment.

Fig. 3: Accuracy comparison on a 9-qubit configuration, tested for MNIST and FashionMNIST. Models such as a QNN with an internal quantum noise layer and one using randomized encoding fell below the 90% accuracy cutoff, indicating lim- ited clean-performance on these datasets. For CIFAR, the performance across quantum models was too close to be a useful discriminator.

Methods

The core innovation of CNL-QNN is moving the defense mechanism out of the quantum circuit and into the classical preprocessing stage. The framework consists of two main components optimized jointly via gradient descent:

  1. Classical Noise Layer (CNL): Before data is encoded into qubits, the CNL injects a mild, stochastically trained perturbation into the classical input $x$: $$x_{adv} = x + h \cdot \text{sign}(\xi)$$ where $h$ is a small perturbation magnitude and $\xi$ represents Gaussian random noise. This acts as an implicit data augmentation step, smoothing the model's decision boundaries before quantum processing even begins.

  2. Differentiable Quantum Architecture Search (DQAS): The framework searches over a gate pool containing single-qubit rotations ($R_x, R_z$) and two-qubit entangling gates ($CNOT, CZ, ISWAP, etc.$). Using the Gumbel-Softmax relaxation technique, the discrete choice of circuit architecture is transformed into a continuous, differentiable optimization problem.

The entire system is trained using a composite loss function: $$L_{total} = L_{mse}(y, \hat{y}) + \gamma \cdot L_{robust}(y, \hat{y}_{adv})$$ This allows the framework to simultaneously optimize gate selection, circuit parameters, and noise resilience parameters.

Overview of the CNL-QNN framework, illustrating classical preprocessing, CNL perturbation, angle encoding, and differentiable architecture search.

Datasets

The framework was evaluated using binary classification tasks on three prominent computer vision benchmarks:

  • MNIST: Standard handwritten digits.
  • FashionMNIST: Complex clothing articles.
  • CIFAR-10: Real-world objects (highly challenging for near-term quantum models).

To match NISQ constraints, images were downsampled and resized to fit specific qubit configurations: $2\times2$ grids for 4-qubit systems, $3\times3$ grids for 9-qubit systems, and $4\times4$ grids for 16-qubit systems.

Key Insights and Ideas

  • Zero Quantum Overhead Defense: Because the CNL operates entirely in the classical domain, it consumes zero quantum resources. The computational complexity of the perturbation is negligible ($O(d)$ where $d$ is input dimension) compared to quantum circuit execution ($O(2^n \cdot L)$). Empirically, it adds less than 2% to classical training time per epoch.
  • Qubit Capacity Enhances Robustness: A fascinating finding is that model complexity plays a direct role in defense. Moving from a 4-qubit system to a 9-qubit system significantly boosts a QNN's inherent resilience to adversarial attacks, showing that increased quantum state space capacity helps absorb perturbations.

Key Results

CNL-QNN was benchmarked against several state-of-the-art methods, including QuantumDARTS, standard DQAS, a Random QNN, and a classical CNN under various white-box and black-box attacks (FGSM, PGD, BIM, MIM).

  • Adversarial Resilience: Under a strong PGD attack ($\epsilon = 0.3$) on MNIST, CNL-QNN achieved 88.72% robust accuracy, vastly outperforming QuantumDARTS (84.58%) and a classical CNN, which collapsed entirely to 14.32%.
  • Hardware Noise Tolerance: When subjected to simulated hardware noise (phase flip, bit flip, and depolarizing noise up to 10%), CNL-QNN consistently maintained higher accuracy and lower variance than its competitors.
  • Real Hardware Validation: The discovered architectures were deployed on actual quantum hardware (IBM Sherbrooke backend). CNL-QNN achieved competitive accuracies (up to 95.45% on a 16-qubit configuration), proving its practical viability on real physical devices.
Fig. 1: Comparison of standard and robust accuracy on the MNIST dataset under an ϵ = 0.3 attack. The results illustrate the performance of various QNNs and a CNN in both clean conditions and under adversarial attacks (FGSM, PGD, BIM, MIM). The experiments are repeated across five trials with different settings. Our approach achieves a favorable tradeoff between accuracy and robustness for diverse architectures.

Limitations and Future Work

While CNL-QNN successfully bridges the gap between theoretical robustness and practical efficiency, it faces a few limitations:

  • Scalability Constraints: The framework is ultimately bottlenecked by current hardware capacity. Images must be severely downsampled (e.g., $3\times3$ or $4\times4$ pixels) to fit available qubit counts, limiting its immediate application to high-resolution, complex datasets.
  • Future Directions: The authors point toward developing hierarchical quantum encoding schemes and hybrid classical-quantum decomposition methods to distribute computational loads, paving the way for scaling this robust framework to larger computer vision tasks.

Summary updated

Abstract

Current quantum neural networks suffer from extreme sensitivity to both adversarial perturbations and hardware noise, creating a significant barrier to real-world deployment. Existing robustness techniques typically sacrifice clean accuracy or require prohibitive computational resources. We propose a hybrid quantum-classical Differentiable Quantum Architecture Search (DQAS) framework that addresses these limitations by jointly optimizing circuit structure and robustness through gradient-based methods. Our approach enhances traditional DQAS with a lightweight Classical Noise Layer applied before quantum processing, enabling simultaneous optimization of gate selection and noise parameters. This design preserves the quantum circuit's integrity while introducing trainable perturbations that enhance robustness without compromising standard performance. Experimental validation on MNIST, FashionMNIST, and CIFAR datasets shows consistent improvements in both clean and adversarial accuracy compared to existing quantum architecture search methods. Under various attack scenarios, including Fast Gradient Sign Method (FGSM), Projected Gradient Descent (PGD), Basic Iterative Method (BIM), and Momentum Iterative Method (MIM), and under realistic quantum noise conditions, our hybrid framework maintains superior performance. Testing on actual quantum hardware confirms the practical viability of discovered architectures. These results demonstrate that strategic classical preprocessing combined with differentiable quantum architecture optimization can significantly enhance quantum neural network robustness while maintaining computational efficiency.
BibTeX
@misc{afane2026differentiable,
  author = {Mohamed Afane and Quanjiang Long and Haoting Shen and Ying Mao and Junaid Farooq and Ying Wang and Juntao Chen},
  title = {{Differentiable Architecture Search for Adversarially Robust Quantum Computer Vision}},
  year = {2026},
  eprint = {2601.18058},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.18058},
}
Figure