Quantum Vision Clustering

Xuan-Bac Nguyen, Hugh Churchill, Khoa Luu, Samee U. KhanResearch Square 2025

Abstract

Unsupervised visual clustering has garnered significant attention recently, aiming to characterize distributions of unlabeled visual images through clustering based on a parameterized appearance approach. Alternatively, clustering algorithms can be viewed as assignment problems where an unlabelled sample needs to be assigned into a specific cluster. This problem can be formulated as Quadratic Unconstrained Binary Optimization that is characterized as NP-hard, yet precisely solvable for small instances on contemporary hardware. Adiabatic quantum computing (AQC) emerges as a promising solution to offer a good speed in solving the NP-hard optimization problems. However, existing clustering approaches face challenges in designing the problems to be solved by the quantum computer. In this study, we present the first clustering formulation tailored for resolution using Adiabatic quantum computing. An Ising model is introduced to represent the quantum mechanical system implemented on AQC. The proposed approach demonstrates high competitiveness compared to state-of-the-art optimization-based methods, even when utilizing off-the-shelf integer programming solvers. Lastly, this work showcases the solvability of the proposed clustering problem on current-generation real quantum computers for small examples and analyzes the properties of the obtained solutions.

Introduction

Unsupervised visual clustering—the task of grouping unlabeled images based on similarity—is a cornerstone of computer vision, yet it remains notoriously difficult. Traditional algorithms like K-Means are limited because they require a predetermined number of clusters ($k$) and often struggle with the high-dimensional complexity of raw image data.

Modern "Deep Clustering" approaches solve part of this by using neural networks to learn better features. However, these methods usually rely on brittle, rule-based "post-processing" steps to merge or refine clusters. These heuristics are often sensitive to hyperparameter tuning and don't scale well. The authors identify a gap: the final assignment of data points to clusters is essentially an NP-hard optimization problem. They propose that instead of using "rules of thumb," we should use the specialized power of quantum computers to solve this optimization directly.

Methodology

The authors propose a hybrid pipeline that combines classical deep learning with quantum optimization. The workflow transitions from high-dimensional image data to a discrete optimization problem solvable on quantum hardware.

Overview of the Quantum Vision Clustering pipeline, from feature extraction to QUBO-based refinement.

The pipeline consists of four primary stages:

  1. Feature Extraction: A pre-trained AlexNet converts images into 64-dimensional feature vectors.
  2. Initial Grouping: A classical K-Nearest Neighbors (K-NN) algorithm and a transformer-based model called Clusformer are used to create initial, "noisy" local clusters.
  3. QUBO Formulation: This is the core innovation. The clustering refinement task is mapped into a Quadratic Unconstrained Binary Optimization (QUBO) problem. The objective function ($f$) is composed of three parts:
  4. Cluster Constraint ($f_0$): Ensures a sample is not assigned to more than one cluster.
  5. Cluster Assignment ($f_1$): Minimizes the distance (cosine similarity) between samples and cluster "anchors."
    • Triplet Assignment Constraint ($f_2$): A novel addition that considers pairwise relationships between samples, ensuring that if two samples are very similar, they are encouraged to stay in the same cluster.
  6. Quantum Solving: The QUBO problem is mapped to an Ising model and solved using the D-Wave Advantage quantum annealer, which searches for the "ground state" (lowest energy configuration) representing the optimal clustering solution.

Experimental Setup

The researchers evaluated their approach on two standard computer vision benchmarks:

  • MNIST: A dataset of 70,000 grayscale images of handwritten digits (0-9).
  • CIFAR100: A more complex dataset of 60,000 color images across 100 distinct classes (e.g., aquatic mammals, flowers, vehicles).

Key Insights and Ideas

  • Clustering as an Energy Minimization Problem: By treating "misalignment" as high energy, the quantum computer naturally "settles" into the most logical clustering arrangement.
  • Removing the 'k' Requirement: Unlike K-Means, this QUBO formulation allows the system to discover the number of clusters dynamically based on the data's structural properties and the anchor assignments.
  • The Power of Triplets: By including the $f_2$ constraint, the model doesn't just look at how close a point is to a center; it looks at how points relate to each other. This significantly improves intra-cluster similarity.
  • Hybrid Efficiency: The paper demonstrates that we don't need to do everything on a quantum computer. Using classical AI for feature extraction and quantum annealing for the final "hard" optimization leverages the best of both worlds.

Key Results

The "Clusformer + QUBO" approach consistently outperformed classical baselines (K-Means, HAC, and DBSCAN) and even the standalone Clusformer model.

  • MNIST Performance: The quantum-enhanced method achieved a Normalized Mutual Information (NMI) of 94.73%, compared to 92.38% for the standard Clusformer and 90.56% for the best-performing K-Means setup.
  • CIFAR100 Performance: On this more challenging dataset, the QUBO approach improved the NMI from 58.38% to 60.10%.
  • Precision and Recall: The model showed high competitiveness in Fowlkes Mallows Scores ($F_P$ and $F_B$), reaching 96.20% and 96.75% respectively on MNIST, indicating very few false positives or missed assignments.

Limitations and Future Work

While the results are promising, the authors acknowledge several hurdles:

  • Hardware Constraints: Current quantum annealers have a limited number of qubits and couplers. To handle large datasets, the authors implemented a "batching" strategy, which may not capture global dependencies as well as a full-scale quantum run.
  • Noise and Sensitivity: Real-world quantum hardware is prone to noise, requiring careful tuning of the Hamiltonian parameters to ensure the system reaches the true ground state.
  • Complexity of Formulation: The current QUBO model is relatively straightforward. The authors suggest that future work could involve more "descriptive" formulations that capture even more complex visual relationships as quantum hardware continues to scale.

Summary updated

BibTeX
@inproceedings{nguyen2025quantum,
  author = {Xuan-Bac Nguyen and Hugh Churchill and Khoa Luu and Samee U. Khan},
  title = {{Quantum Vision Clustering}},
  booktitle = {Research Square},
  year = {2025},
  doi = {10.21203/rs.3.rs-5022498/v1},
}
Figure