Skip to content
Quantum.world

Research

Do emulated quantum circuits change what CNNs look at? Performance and explainability comparison in medical image classification

Overview Research area: Quantum machine learning, specifically hybrid quantum–classical convolutional neural networks for medical image classification, with an explainability (SHAP-based) comparison a

Do emulated quantum circuits change what CNNs look at? Performance and explainability comparison in medical image classification
arXiv
2607.21186
Published
2026-07-23
Authors
Guillermo Rubiños Rodríguez, Martín Ottavianelli, Mateo Alonso, Gonzalo Blázquez Gil, Boris-Stephan Rauchmann, Pablo Díez-Valle, Sergio Altares-López

AI summary

Overview

Research area: Quantum machine learning, specifically hybrid quantum–classical convolutional neural networks for medical image classification, with an explainability (SHAP-based) comparison against a parameter-matched classical baseline.

Technical level: Intermediate. Readers should know basic CNN architecture and roughly what a qubit, gate, and measurement are; the paper's quantum component is small (four qubits) and classically emulated.

Scope (one sentence): A systematic, architecture-controlled benchmark of a four-qubit emulated quantum circuit replacing one dense layer in a CNN, evaluated on retinal OCT and OASIS-1 brain MRI across training-set sizes, learning rates, batch sizes, entanglement and observable sets, plus two new SHAP-based tools for comparing what the two models look at.

What This Paper Is About

Hybrid quantum–classical CNNs are often proposed as alternatives to classical deep learning, but many reported quantum components are small enough to be simulated efficiently on ordinary computers, and comparisons against classical baselines are frequently not capacity-matched. The authors turn that simulability from an objection into a design choice: they embed a small, classically emulated quantum circuit (EQC) inside a CNN and ask whether it changes performance or the image regions the model attends to, holding everything else fixed. The goal is a fair, dataset- and hyperparameter-independent answer to whether such a quantum-inspired layer adds anything measurable for medical image classification.

Key Contributions

  1. A controlled architecture pair. A Hybrid Quantum-inspired CNN (HQiCNN) and a classical CNN share an identical convolutional backbone and differ only in one intermediate dense layer (ReLU dense layer versus a four-qubit EQC), with matched parameter counts so any difference is attributable to the quantum-inspired component.
  2. A broad hyperparameter study. Training set size, learning rate, batch size, circuit entanglement and observable set are varied systematically over 10 randomly selected seeds, totalling 640 configurations (per Table 1's formula 9×3×10 + 3×10 + 2×8×10 + 3×6×10 = 640), repeated across two medical imaging datasets.
  3. An ablation of the quantum properties. The effect of removing entanglement and of using richer observable sets is tested across training sizes, rather than treating the circuit as a fixed black box.
  4. Two SHAP-based explainability tools. The |SHAP|IoU compares, per image, the overlap of the top 10% absolute SHAP regions of both models, and EMD_pos quantifies, across the test set, the similarity of positive SHAP distributions as a two-dimensional earth mover's distance bounded by (63/64)√2 ≈ 1.3921 for 64×64 inputs.

Main Findings

  • No architecture consistently dominates. The HQiCNN achieves its largest gains in intermediate-data regimes, while the CNN reaches the highest accuracies for the largest training sets on both datasets.
  • Best OCT accuracies are close. At a learning rate of 0.001 and 30,000 training samples, the CNN reaches 0.937 ± 0.006 mean test accuracy versus 0.931 ± 0.008 for the HQiCNN; the CNN also reaches 0.930 ± 0.010 and the HQiCNN 0.930 ± 0.009 at a learning rate of 0.01 with 30,000 and 12,000 samples respectively.
  • Accuracy rises with data, with diminishing returns. Both models improve as training size grows from 200 to 30,000 samples; the largest gains occur between very small and intermediate sizes, with increases becoming more gradual beyond roughly 12,000 samples.
  • Learning rate of 0.001 is the most stable setting. A learning rate of 0.01 sometimes gives better accuracy but with larger fluctuations across configurations, and 0.0001 systematically yields lower accuracies for both models.
  • Entanglement can be removed at little cost. Removing entanglement produces comparable performance while enabling substantially better scalability of the quantum simulations.
  • Richer observables need data. Larger observable sets become beneficial only when sufficient training data are available.
  • Both models look at plausible anatomy. The SHAP analysis shows both architectures consistently attend to anatomically plausible regions, while the HQiCNN learns more localized disease-relevant features under limited-data conditions.
  • Preprocessing choice matters for encoding. Of three strategies for mapping the four-dimensional feature vector into rotation angles (scaled sigmoid 2π·sigmoid(v), modulo remainder(v, 2π), and no transformation), the scaled sigmoid consistently outperformed the others and was fixed for the rest of the study.

Methodology in Plain English

The authors build two models with the same eyes and different middlemen. Both start with three convolutional layers (kernel size three, ReLU, batch normalization, max pooling) that turn a 64×64 image into a 128-dimensional feature vector, then a linear reduction layer compresses it to four numbers. From there the paths split: the classical branch passes those four numbers through a ReLU dense layer producing 12 values, while the quantum-inspired branch encodes them as rotation angles on four qubits, applies trainable rotations plus CNOT-based entanglement, and measures the Pauli X, Y and Z observables on each qubit to produce the same 12 values. A final linear layer maps to class labels in both cases.

The circuit is simulated directly with native PyTorch functions rather than a quantum framework, which lets the hybrid model compute gradients by ordinary backpropagation in one backward pass instead of the 2p forward passes the parameter-shift rule would need for p parameters. Training uses cross-entropy loss on unnormalized logits, a maximum of 100 epochs, early stopping with patience eight, and a learning rate scheduler with patience three and reduction factor 0.3, with GradScaler handling quantum and classical gradients uniformly.

Experiments sweep training sizes {200, 400, 800, 1000, 1200, 1600, 2000, 12000, 30000}, learning rates {10⁻², 10⁻³, 10⁻⁴}, batch sizes {8, 16, 32}, entangled versus not entangled circuits, and three observable sets, each over 10 seeds. The balanced OCT dataset drives the main analysis; the smaller balanced OASIS-1 dataset serves as a robustness check under a simplified 2D setting, explicitly not intended as a clinical conclusion. Images from both datasets are resized to 64×64 and normalized to [0, 1]. For interpretability, SHAP values are converted into the two comparison tools described above.

Why This Matters

Impact on research. The paper directly addresses the criticism that reported quantum advantages in QML may be artifacts of uncontrolled comparisons or of classically simulable circuits. By parameter-matching the baseline, isolating a single layer, and reporting when the quantum-inspired model wins and when it loses, it provides a template for honest benchmarking. The finding that entanglement can be dropped without performance loss, while improving simulation scalability, is practically useful for anyone designing hybrid circuits under qubit constraints.

Real-world applications:

  • Retinal OCT triage across NORMAL, CNV, DME and DRUSEN classes, where data efficiency and transparent attention maps support clinical trust.
  • Dementia staging from structural MRI, where explainability is needed to justify predictions to clinicians.
  • Resource-constrained deployment, where small emulated circuits avoid quantum hardware and its measurement-based gradient costs.
  • Regulatory and audit workflows, where the proposed |SHAP|IoU and EMD_pos metrics give a quantitative way to check that a model attends to anatomically plausible regions rather than spurious features.

Industry relevance. Medical imaging vendors, clinical decision-support developers, and quantum-software teams get a concrete, reproducible comparison protocol plus open questions about when a quantum layer is worth the extra complexity; the results suggest the answer is data-regime dependent rather than universal.

Future Directions

  • Determining why the HQiCNN helps in the intermediate-data regime and stops helping at the largest training sizes, for example by isolating which features the EQC represents differently.
  • Testing whether the entanglement and observable-set conclusions hold on larger circuits, other datasets and other imaging modalities, since the OASIS check was a deliberately simplified 2D robustness test.
  • Extending the SHAP-based tools beyond comparison into validation, for instance linking EMD_pos values to clinically meaningful localization criteria.
  • Moving from emulation toward hardware or larger qubit counts, where measurement-based gradients and barren plateaus re-enter the picture and the backpropagation shortcut used here no longer applies.

Target Audience

Researchers and graduate students in quantum machine learning and hybrid quantum–classical modeling; medical imaging and clinical AI engineers interested in explainability and data efficiency; and benchmarking or regulatory reviewers who need rigorously controlled comparisons between quantum-inspired and classical architectures. Practitioners with only a classical deep learning background can follow the methodology, while the quantum-circuit details will be most useful to those already familiar with parameterized circuits.

Authors’ abstract

Numerous studies have analyzed the use of hybrid quantum-classical convolutional neural networks as a promising alternative to classical deep learning. However, network components on quantum hardware impose fundamental limitations, while the scalability of quantum circuits leads to trainability issues. In this work, we investigate whether small, classically-emulated quantum circuit components can play a meaningful role within complex models, offering an alternative to purely classical convolutional architectures. To this end, we present a systematic study of the effectiveness of a Hybrid Quantum-inspired Convolutional Neural Network (HQiCNN) compared with a parameter-matched classical Convolutional Neural Network (CNN) that differs only in an intermediate dense neural layer. Both models are evaluated on two real-world medical datasets while systematically varying the different hyperparameters, ensuring a fair model comparison that is both dataset and hyperparameter independent. The results show that no architecture consistently dominates the other: the HQiCNN achieves its largest gains in intermediate-data regimes, whereas the CNN reaches the highest accuracies for the largest training sets in both datasets. Furthermore, removing entanglement produces comparable performance while enabling substantially better scalability of quantum simulations, and richer observable sets become beneficial only when sufficient training data are available. Finally, we propose two SHAP-based explainability tools for comparing the predictions between both models, $|SHAP|$IoU and $EMD_{pos}$ metric, to demonstrate that both architectures consistently attend to anatomically plausible regions. Thus, we provide a comprehensive benchmark showing that, under certain conditions, hybrid quantum-inspired models are an alternative that can offer benefits in practical tasks such as medical image classification.

Read the original paper