Quantum Patch-Based Autoencoder for Anomaly Segmentation
Maria Francisca Madeira, Alessandro Poggiali, Jeanette Miriam Lorenz
TL;DR
The paper targets pixel-level anomaly segmentation in images by introducing a Quantum Patch-Based Autoencoder (QPB-AE) that operates entirely on quantum hardware with a patch-wise processing strategy. Each patch is embedded into a quantum state, compressed via a Matrix Product State (MPS) encoder, and evaluated with a SWAP-test fidelity to yield patch-level anomaly scores, which are stitched into a full anomaly map without reconstructing the full image. The approach achieves logarithmic parameter scaling with patch size and demonstrates competitive anomaly localization across MvTEC-AD and BUSI datasets with far fewer trainable parameters than a classical autoencoder baseline. This work highlights the practical potential of QML for unsupervised anomaly segmentation on NISQ devices, with promising implications for low-data regimes and resource-efficient quantum architectures.
Abstract
Quantum Machine Learning investigates the possibility of quantum computers enhancing Machine Learning algorithms. Anomaly segmentation is a fundamental task in various domains to identify irregularities at sample level and can be addressed with both supervised and unsupervised methods. Autoencoders are commonly used in unsupervised tasks, where models are trained to reconstruct normal instances efficiently, allowing anomaly identification through high reconstruction errors. While quantum autoencoders have been proposed in the literature, their application to anomaly segmentation tasks remains unexplored. In this paper, we introduce a patch-based quantum autoencoder (QPB-AE) for image anomaly segmentation, with a number of parameters scaling logarithmically with patch size. QPB-AE reconstructs the quantum state of the embedded input patches, computing an anomaly map directly from measurement through a SWAP test without reconstructing the input image. We evaluate its performance across multiple datasets and parameter configurations and compare it against a classical counterpart.
