Skip to main content
QUICK REVIEW

[Paper Review] Image Classification Based on Quantum KNN Algorithm

Yijie Dang, Nan Jiang|arXiv (Cornell University)|May 16, 2018
Quantum Computing Algorithms and ArchitectureComputer Science31 references6 citations
TL;DR

This paper proposes a quantum-enhanced K-Nearest Neighbor (KNN) algorithm for image classification, leveraging quantum superposition for parallel similarity computation and quantum minimum search to accelerate k-nearest neighbor identification. The method achieves a complexity of $O(\sqrt{kM})$, significantly reducing runtime compared to classical KNN, while maintaining high accuracy—83.1% on Graz-01 and 78% on Caltech-101—demonstrating efficient, scalable classification with a single measurement step.

ABSTRACT

Image classification is an important task in the field of machine learning and image processing. However, the usually used classification method --- the K Nearest-Neighbor algorithm has high complexity, because its two main processes: similarity computing and searching are time-consuming. Especially in the era of big data, the problem is prominent when the amount of images to be classified is large. In this paper, we try to use the powerful parallel computing ability of quantum computers to optimize the efficiency of image classification. The scheme is based on quantum K Nearest-Neighbor algorithm. Firstly, the feature vectors of images are extracted on classical computers. Then the feature vectors are inputted into a quantum superposition state, which is used to achieve parallel computing of similarity. Next, the quantum minimum search algorithm is used to speed up searching process for similarity. Finally, the image is classified by quantum measurement. The complexity of the quantum algorithm is only O((kM)^(1/2)), which is superior to the classical algorithms. Moreover, the measurement step is executed only once to ensure the validity of the scheme. The experimental results show that, the classification accuracy is 83.1% on Graz-01 dataset and 78% on Caltech-101 dataset, which is close to existing classical algorithms. Hence, our quantum scheme has a good classification performance while greatly improving the efficiency.

Motivation & Objective

  • To address the high computational complexity of classical KNN in image classification, especially under big data workloads.
  • To leverage quantum computing's parallelism to optimize similarity computation and k-nearest neighbor search.
  • To design a quantum image classification framework that maintains high accuracy while drastically reducing time complexity.
  • To demonstrate feasibility and performance of quantum KNN on real-world natural image datasets like Graz-01 and Caltech-101.
  • To establish a quantum advantage in image classification by minimizing measurement steps and ensuring scheme validity.

Proposed method

  • Feature vectors are extracted from images using classical computation, preserving compatibility with existing pipelines.
  • The extracted classical feature vectors are encoded into a quantum superposition state to enable parallel evaluation of similarity across all training samples.
  • Quantum amplitude amplification via Dürr’s algorithm is applied to identify the k smallest distances efficiently, reducing search complexity to $O(\sqrt{kM})$.
  • The quantum minimum search algorithm is used to locate the k nearest neighbors by iteratively amplifying the amplitudes of the smallest distances.
  • A single quantum measurement is performed to collapse the state and retrieve the indices of the k nearest training images.
  • Classification is determined by majority voting over the k nearest neighbors, with the result output as the predicted class.

Experimental results

Research questions

  • RQ1Can quantum computing significantly reduce the time complexity of KNN-based image classification compared to classical methods?
  • RQ2How does the proposed quantum KNN algorithm perform in terms of classification accuracy on real natural image datasets like Graz-01 and Caltech-101?
  • RQ3Can the quantum scheme maintain high accuracy even with limited training data, given its reduced computational overhead?
  • RQ4What is the impact of using a single quantum measurement step on the validity and reliability of the classification outcome?
  • RQ5To what extent can quantum parallelism and amplitude amplification be effectively harnessed to accelerate similarity computation and neighbor search in image classification?

Key findings

  • The quantum KNN algorithm achieves a time complexity of $O(\sqrt{kM})$, offering a significant improvement over the classical $O(M)$ and $O(M\log k)$ complexities for similarity and search operations.
  • On the Graz-01 dataset, the algorithm reaches a peak accuracy of 83.1% when $k=5$ and 90% of the data is used for training.
  • On the Caltech-101 dataset, the algorithm achieves 78% accuracy with $k=3$ and a 90% training ratio, demonstrating strong performance on multi-class natural images.
  • Even with reduced training data, the algorithm maintains accuracy above 70%, indicating robustness to data scarcity.
  • The classification accuracy is comparable to state-of-the-art classical KNN methods, validating the scheme’s effectiveness despite its quantum implementation.
  • The use of a single measurement step ensures the validity and consistency of the quantum classification process, avoiding measurement-induced state collapse issues.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.