Research · Quantum ML

Quantum vs. classical CNNs
for medical imaging.

A comparative study asking whether Hybrid Quantum-Classical networks can outperform a standard CNN in low-data melanoma classification. Four experiments, three dead ends, one verified quantum advantage.

+6.36%
Accuracy
vs. classical
+6.71%
Precision
vs. classical
+4.11%
F1-Score
vs. classical
4
Experiments
3 failed · 1 worked
01

The Question

Research Question

Does adding a quantum processing layer improve deep learning performance for melanoma detection?

Tested multiple Quanvolutional architectures against identical classical controls. After three failed experiments, Experiment 4 demonstrated a measurable quantum advantage on data-scarce melanoma classification.

02

The Journey

Four experiments ran end to end. Each node on the timeline records what was tried, what broke, and what survived.

01

The Bottleneck

ConvNeXtBase → 8-Qubit Circuit

Information bottleneck. 1024 features crushed into 8 qubits, collapsing any expressive structure downstream.

Failed
02

Quanvolutional Layer

Quantum filter as feature extractor

Multiple iterations either overfit aggressively or matched the classical control point for point. No usable signal.

Failed
03

Recall-Focused

Simplified circuit · 9,942 test images

High recall (79%) traded for poor precision (42%). The output bottleneck pushed the model toward a single class.

Partial
04

High-Resolution

ResNet18 + Data Re-uploading + Projective Measurement

Quantum advantage verified: +6.4% accuracy, +6.7% precision, better generalization on the held-out set.

Success
03

Winning Architecture

The four moves that made Experiment 4 actually work.

01

ResNet18

Partially unfrozen classical backbone.

02

14 × 14 grid

196 feature patches — 4× the previous resolution.

03

Data Re-uploading

Features encoded twice to inject non-linearity into the circuit.

04

256-D Measurement

Projective output, up from 8 dimensions.

04

Results

Head to head on the held-out test set. Same data, same backbone — only the quantum layer differs.

Metric
QCNN
Classical
Δ
Accuracy
77.73%
71.37%
+6.36%
Precision
49.97%
43.26%
+6.71%
Recall
85.04%
91.95%
-6.91%
F1-Score
62.95%
58.84%
+4.11%
AUC
0.8906
0.8858
+0.5%
Bar chart comparing QCNN and Classical CNN across accuracy, precision, recall, F1-score and AUC
QCNN vs. Classical CNN — performance across five metrics on the held-out test set. Fig. 1

Finding

QCNN wins four of five metrics.

Classical edges recall only because it over-predicts the positive class. QCNN actually learns to discriminate — accuracy, precision, F1, and AUC all rise together.

05

Key Findings

01

Superior Generalization

Anti-overfitting effect

The classical model drove training loss down to 0.06 while validation loss climbed to 0.79. The QCNN stayed balanced, acting as a natural regularizer on a small dataset.

02

Escaping the Recall Trap

Learning to discriminate

Classical models inflated recall by calling almost everything positive. The QCNN kept 85% recall while actually raising precision — a meaningfully different behaviour.

03

Quantum Expressivity

High-dimensional feature space

Data Re-uploading and Projective Measurement expanded the output from 8 to 256 dimensions, enabling finer-grained discrimination between visually similar lesions.

06

Conclusion

A properly designed hybrid quantum-classical architecture — with Data Re-uploading and high-dimensional projective measurement — can outperform an equivalent classical model on tasks that demand generalization from limited data.

Not a clinical result, not a universal claim — a narrow, reproducible advantage on one real problem. Enough to justify pushing the architecture further.

Built with
PythonPyTorchPennyLaneResNet188-Qubit PQC

Related Research

Looking for the production model?

The high-performance ConvNeXtBase ensemble achieving 98.59% recall for clinical melanoma detection.

Read the
full work.

The repository holds every experiment, the failed iterations, the training scripts, and the notebooks used for the final comparison.

Type
Research project · MSc coursework
Architecture
ResNet18 · 8-Qubit PQC · Data Re-uploading
Stack
PyTorch · PennyLane