Layer-wise QUBO-Based Training of CNN Classifiers for Quantum Annealing
Organizations: Department of Industrial and Systems Engineering, University of Tennessee - Knoxville, Knoxville, 37996, TN, USA. · Department of Physics, Faculty of Science, Cairo University, Giza, 12613, Egypt.
Abstract
Variational quantum circuits for image classification suffer from barren plateaus, while quantum kernel methods scale quadratically with dataset size. We propose an iterative framework based on Quadratic Unconstrained Binary Optimization (QUBO) for training the classifier head of convolutional neural networks (CNNs) via quantum annealing, entirely avoiding gradient-based circuit optimization. Following the Extreme Learning Machine paradigm, convolutional filters are randomly initialized and frozen, and only the fully connected layer is optimized. At each iteration, a convex quadratic surrogate derived from the feature Gram matrix replaces the non-quadratic cross-entropy loss, yielding an iteration-stable curvature proxy. A per-output decomposition splits the -class problem into independent QUBOs, each with binary variables, where is the feature dimension and is the bit precision, so that problem size depends on the image resolution and bit precision, not on the number of training samples. We evaluate the method on six image-classification benchmarks (sklearn digits, MNIST, Fashion-MNIST, CIFAR-10, EMNIST, KMNIST). A precision study shows that accuracy improves monotonically with bit resolution, with 10 bits representing a practical minimum for effective optimization; the 15-bit formulation remains within the qubit and coupler limits of current D-Wave Advantage hardware. The 20-bit formulation matches or exceeds classical stochastic gradient descent on MNIST, Fashion-MNIST, and EMNIST, while remaining competitive on CIFAR-10 and KMNIST. All experiments use simulated annealing, establishing a baseline for direct deployment on quantum annealing hardware.
Figures & tables
| Parameter | Value |
|---|---|
| Dataset | sklearn digits (8 8 images) |
| Training samples | 1000 |
| Test samples | 540 |
| Number of classes | 10 |
| CNN architecture | 1 conv layer ( kernel), pooling, FC output |
| CNN filters | 2 |
| (bits) | Logical Vars | Quadratic Terms |
| 5 | 95 | 4,465 |
| 10 | 190 | 17,955 |
| 15 | 285 | 40,470 |
| 20 | 380 | 72,010 |
| Method | Train Acc | Test Acc | Time (s) | Final Loss |
|---|---|---|---|---|
| Classical FC (SGD) | 82.2% | 79.8% | 22.7 | 0.872 |
| QUBO 5-bit | 33.9% | 33% | 225.6 | 2.704 |
| QUBO 10-bit | 77.7% | 77.4% | 767.3 | 0.758 |
| QUBO 15-bit | 83.9% | 80% | 2605.4 | 0.677 |
| QUBO 20-bit | 84.9% | 81.5% | 9712.6 | 0.671 |
| True Digit | Classical | 5-bit | 10-bit | 15-bit | 20-bit | Result |
|---|---|---|---|---|---|---|
| 0 | 91.6% (T) | 83.4% (T) | 98.1% (T) | 96% (T) | 96.7% (T) | All correct |
| 1 | 29.8% (T) | 1.8% (F) | 34.6% (F) | 41.6% (T) | 55.3% (T) | Mixed |
| 2 | 61.6% (T) | 43.8% (T) | 58.3% (T) | 79.7% (T) | 78.9% (T) | All correct |
| 3 | 66.3% (T) | 80.4% (T) | 49.9% (T) | 86.2% (T) | 77.7% (T) | All correct |
| 4 | 68.3% (T) | 98.1% (T) | 84.2% (T) | 80.3% (T) | 85.3% (T) | All correct |
| 5 | 48% (T) | 44.2% (F) | 66.2% (T) | 67.3% (T) | 64.2% (T) | Mixed |
| Parameter | Value |
|---|---|
| Datasets | MNIST, Fashion-MNIST, CIFAR-10, EMNIST, KMNIST |
| Image resolution | 8 8 grayscale |
| Training samples | 1000 |
| Test samples | 500 |
| Number of classes | 10 |
| Random seeds | 5 (42, 43, 44, 45, 46) |
| Metric | Formula | Range | Chance Level ( ) |
|---|---|---|---|
| Accuracy | 10% | ||
| Precision | 10% | ||
| Recall | 10% | ||
| F1 Score | 10% | ||
| Cohen’s | 0% | ||
| MCC | 0% |
| Dataset | Method | Train Acc | Test Acc | Precision | Recall | F1 | Kappa | MCC |
|---|---|---|---|---|---|---|---|---|
| MNIST | Classical | |||||||
| QUBO 5b | ||||||||
| QUBO 10b | ||||||||
| QUBO 15b | ||||||||
| QUBO 20b | ||||||||
| Fashion | Classical |
| Dataset | Method | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| MNIST | Classical | 98 1 | 71 7 | 91 4 | 80 6 | 88 3 | 65 7 | 88 1 | 73 5 | 49 6 | 78 5 |
| QUBO 5b | 51 26 | 22 11 | 31 20 | 37 14 | 38 10 | 33 11 | 48 16 | 47 13 | 22 14 | 35 20 | |
| QUBO 10b | 95 5 | 61 3 | 75 12 | 75 3 | 85 3 | 68 5 | 90 2 | 71 5 | 50 7 | 73 9 | |
| QUBO 15b | 98 1 | 77 7 | 92 4 | 83 3 | 87 5 | 70 6 | 88 2 | 73 5 | 57 8 | 74 7 | |
| QUBO 20b | 98 2 | 78 7 | 92 3 | 84 4 | 88 3 | 73 4 | 90 2 | 76 5 | 53 8 | 78 4 | |
| Fashion | Classical | 64 6 | 71 12 | 36 12 | 49 15 | 27 15 | 70 10 | 20 8 | 64 20 | 53 11 | 64 12 |
| Dataset | 5-bit | 10-bit | 15-bit | 20-bit |
|---|---|---|---|---|
| MNIST | ||||
| Fashion | ||||
| CIFAR-10 | ||||
| EMNIST | ||||
| KMNIST |