Classical-quantum approach to image classification: Autoencoders and quantum SVMs
Donovan Slabbert, Francesco Petruccione
Abstract
In order to leverage quantum computers for machine learning tasks such as image classification, consideration is required. Noisy Intermediate-Scale Quantum (NISQ) computers have limitations that include noise, scalability, read-in and read-out times, and gate operation times. Therefore, strategies should be devised to mitigate the impact complex datasets that can have on the overall efficiency of a quantum machine learning pipeline. This may otherwise lead to excessive resource demands or noise. We apply a classical feature extraction using a ResNet10-inspired convolutional autoencoder to reduce dataset dimensionality and extract abstract, meaningful features before feeding them into a quantum layer. The chosen quantum layer is a quantum-enhanced support vector machine (QSVM), as SVMs typically do not require large sample sizes to identify patterns in data and have short-depth quantum circuits, which limits the impact of noise. The autoencoder is trained to extract meaningful features through image reconstruction, aiming to minimize the mean squared error across a training set of images. We use three datasets to illustrate the pipeline: HTRU-1, MNIST, and CIFAR-10. We include a quantum-enhanced one-class support vector machine (QOCSVM) for the highly unbalanced HTRU-1 set, with classical machine learning results for comparison. HTRU-2 is also included to serve as a benchmark for a dataset with meaningful features. The autoencoder achieved near-perfect reconstruction and high accuracy for MNIST, while CIFAR-10 showed poorer performance due to image complexity, and HTRU-1 struggled due to the imbalance in the dataset. The varying performance across datasets highlights the need to balance dimensionality reduction and prediction performance using quantum methods.