Table of Contents
Fetching ...

Quantum Neural Networks in Practice: A Comparative Study with Classical Models from Standard Data Sets to Industrial Images

Daniel Basilewitsch, João F. Bravo, Christian Tutschku, Frederick Struckmeier

TL;DR

This study addresses whether quantum machine learning can provide a practical advantage for binary image classification on standard and industrial datasets. It employs two benchmarking streams: randomized quantum/classical neural networks on dimensionality-reduced data and quantum-classical hybrid CNNs on full images, using near-term parametrized quantum circuits. Across datasets, classical and quantum models achieve statistically equivalent accuracies, with quantum methods showing lower variance and a nuanced role for entanglement; no consistent performance gain from increased entanglement is observed within the tested regimes. The findings offer industry-oriented baselines, illuminate current hardware and design limitations, and outline directions for architecture design and benchmarking in quantum ML for practical, real-world tasks.

Abstract

We compare the performance of randomized classical and quantum neural networks (NNs) as well as classical and quantum-classical hybrid convolutional neural networks (CNNs) for the task of supervised binary image classification. We keep the employed quantum circuits compatible with near-term quantum devices and use two distinct methodologies: applying randomized NNs on dimensionality-reduced data and applying CNNs to full image data. We evaluate these approaches on three fully-classical data sets of increasing complexity: an artificial hypercube data set, MNIST handwritten digits and industrial images. Our central goal is to shed more light on how quantum and classical models perform for various binary classification tasks and on what defines a good quantum model. Our study involves a correlation analysis between classification accuracy and quantum model hyperparameters, and an analysis on the role of entanglement in quantum models, as well as on the impact of initial training parameters. We find classical and quantum-classical hybrid models achieve statistically-equivalent classification accuracies across most data sets with no approach consistently outperforming the other. Interestingly, we observe that quantum NNs show lower variance with respect to initial training parameters and that the role of entanglement is nuanced. While incorporating entangling gates seems advantageous, we also observe the (optimizable) entangling power not to be correlated with model performance. We also observe an inverse proportionality between the number of entangling gates and the average gate entangling power. Our study provides an industry perspective on quantum machine learning for binary image classification tasks, highlighting both limitations and potential avenues for further research in quantum circuit design, entanglement utilization, and model transferability across varied applications.

Quantum Neural Networks in Practice: A Comparative Study with Classical Models from Standard Data Sets to Industrial Images

TL;DR

This study addresses whether quantum machine learning can provide a practical advantage for binary image classification on standard and industrial datasets. It employs two benchmarking streams: randomized quantum/classical neural networks on dimensionality-reduced data and quantum-classical hybrid CNNs on full images, using near-term parametrized quantum circuits. Across datasets, classical and quantum models achieve statistically equivalent accuracies, with quantum methods showing lower variance and a nuanced role for entanglement; no consistent performance gain from increased entanglement is observed within the tested regimes. The findings offer industry-oriented baselines, illuminate current hardware and design limitations, and outline directions for architecture design and benchmarking in quantum ML for practical, real-world tasks.

Abstract

We compare the performance of randomized classical and quantum neural networks (NNs) as well as classical and quantum-classical hybrid convolutional neural networks (CNNs) for the task of supervised binary image classification. We keep the employed quantum circuits compatible with near-term quantum devices and use two distinct methodologies: applying randomized NNs on dimensionality-reduced data and applying CNNs to full image data. We evaluate these approaches on three fully-classical data sets of increasing complexity: an artificial hypercube data set, MNIST handwritten digits and industrial images. Our central goal is to shed more light on how quantum and classical models perform for various binary classification tasks and on what defines a good quantum model. Our study involves a correlation analysis between classification accuracy and quantum model hyperparameters, and an analysis on the role of entanglement in quantum models, as well as on the impact of initial training parameters. We find classical and quantum-classical hybrid models achieve statistically-equivalent classification accuracies across most data sets with no approach consistently outperforming the other. Interestingly, we observe that quantum NNs show lower variance with respect to initial training parameters and that the role of entanglement is nuanced. While incorporating entangling gates seems advantageous, we also observe the (optimizable) entangling power not to be correlated with model performance. We also observe an inverse proportionality between the number of entangling gates and the average gate entangling power. Our study provides an industry perspective on quantum machine learning for binary image classification tasks, highlighting both limitations and potential avenues for further research in quantum circuit design, entanglement utilization, and model transferability across varied applications.

Paper Structure

This paper contains 28 sections, 21 equations, 12 figures.

Figures (12)

  • Figure 1: Overview of data sets with $N=500$ and dimension $d = 2$ in panels (a)-(e), and the corresponding learned functions by classical and quantum neural networks in panels (f)-(j) and panels (k)-(o), respectively. The small neural networks in between panels (a)-(e) and (f)-(j) show the best performing architectures (from among the set of randomly generated neural networks). The small quantum neural networks in between panels (a)-(e) and (k)-(o) show the respective best performing quantum architectures (from among the set of randomly generated quantum neural networks). Data points represented by circles (stars) in panels (a)-(o) correspond to the training (validation) data set. In addition, panels (p) and (q) show the architecture for the convolutional autoencoder (CAE) used to reduce the data dimensionality for the images of the second and third data set, respectively, as well as a representative illustration of the original and reconstructed images for various latent dimensions $d$.
  • Figure 2: Image of slats from a TRUMPF flatbed laser cutting machine. The slat in the front is in a good condition whereas the second slat has clear signs of wear and tear, such as tips that have melted away and slag splashes that adhere to the side. Image adapted from Ref. Struckmeier2019.
  • Figure 3: Example scheme of a quantum convolution operation using a filter with dimensions $2\times2$ and a PQC with four qubits. In our QCCNN models, the input matrices are the non-reduced images, either from the handwritten-digit or the industrial-image data sets, cf. Secs. \ref{['subsec:data:mnist']} and \ref{['subsec:data:trumpf']}, and the output feature maps are flattened into a vector and fed to a classical dense layer. A minimal representation of an analogue classical convolution with the same filter size is also shown. Image adapted from Ref. Matic2022.
  • Figure 4: Results for the third data set, i.e., the industrial image snippets from laser cutting machines, using a PCA for dimensionality reduction. Panel (a) shows the performance of $50$ random classical (orange tones) and quantum (blue tones) neural networks for different data dimensions, i.e., sizes of data reduction, and data set sizes, ranging from $200$ to $2000$ data points split into training and validation data with a ratio of $80\%$ to $20\%$. The medium sized markers show the $50$ average performances of each of these $50$ random models where the average is taken with respect to the outcome from training with $10$ sets of random initial parameters, cf. Sec. \ref{['sec:method']}. The outcome from each of these sets is depicted by the smallest markers. The largest markers, connected additionally by a line for better visibility, indicate the performance of the best of the $50$ random models. Panel (b) shows the corresponding number of trainable parameters for each model with those connected by a solid line reflecting the best performing models from panel (a). Panels (c)-(h) illustrate the different variances of the $50$ random models with respect to the $10$ resulting accuracies obtained from the $10$ sets of random initial parameters.
  • Figure 5: Performance comparison between classical and quantum neural networks in terms of the classification accuracy of the best random models, i.e., the connected lines of Fig. \ref{['fig:results_dataset_3_pca']} (a) but for all data sets. The shaded background indicates the standard deviation generated by the $10$ individual random initial parameter sets that make up the shown averaged best random model performance.
  • ...and 7 more figures