Table of Contents
Fetching ...

Quantum Normalizing Flows for Anomaly Detection

Bodo Rosenhahn, Christoph Hirche

TL;DR

The paper tackles anomaly detection under limited training data by introducing Quantum Normalizing Flows (QNF), which learn a bijective mapping from data to a standard normal distribution using optimized quantum gate sequences. Training employs quantum architecture search (Monte Carlo Graph Search) to minimize $D_{KL}$ or the cosine dissimilarity $D_{cos}$, enabling both effective anomaly scoring and forward-backward flow-based generation. Empirical results on Iris and Wine datasets show competitive performance against classical baselines (Isolation Forest, LOF, and One-Class SVM), illustrating the practical viability of quantum-native anomaly detection and generative sampling. The work highlights the potential of quantum-normalizing flows to leverage compact quantum representations and exact reversibility, with the added benefit of a publicly released optimization codebase for reproducibility and further development.

Abstract

A Normalizing Flow computes a bijective mapping from an arbitrary distribution to a predefined (e.g. normal) distribution. Such a flow can be used to address different tasks, e.g. anomaly detection, once such a mapping has been learned. In this work we introduce Normalizing Flows for Quantum architectures, describe how to model and optimize such a flow and evaluate our method on example datasets. Our proposed models show competitive performance for anomaly detection compared to classical methods, esp. those ones where there are already quantum inspired algorithms available. In the experiments we compare our performance to isolation forests (IF), the local outlier factor (LOF) or single-class SVMs.

Quantum Normalizing Flows for Anomaly Detection

TL;DR

The paper tackles anomaly detection under limited training data by introducing Quantum Normalizing Flows (QNF), which learn a bijective mapping from data to a standard normal distribution using optimized quantum gate sequences. Training employs quantum architecture search (Monte Carlo Graph Search) to minimize or the cosine dissimilarity , enabling both effective anomaly scoring and forward-backward flow-based generation. Empirical results on Iris and Wine datasets show competitive performance against classical baselines (Isolation Forest, LOF, and One-Class SVM), illustrating the practical viability of quantum-native anomaly detection and generative sampling. The work highlights the potential of quantum-normalizing flows to leverage compact quantum representations and exact reversibility, with the added benefit of a publicly released optimization codebase for reproducibility and further development.

Abstract

A Normalizing Flow computes a bijective mapping from an arbitrary distribution to a predefined (e.g. normal) distribution. Such a flow can be used to address different tasks, e.g. anomaly detection, once such a mapping has been learned. In this work we introduce Normalizing Flows for Quantum architectures, describe how to model and optimize such a flow and evaluate our method on example datasets. Our proposed models show competitive performance for anomaly detection compared to classical methods, esp. those ones where there are already quantum inspired algorithms available. In the experiments we compare our performance to isolation forests (IF), the local outlier factor (LOF) or single-class SVMs.
Paper Structure (16 sections, 15 equations, 8 figures, 2 tables)

This paper contains 16 sections, 15 equations, 8 figures, 2 tables.

Figures (8)

  • Figure 1: Visualization of a normalizing flow $f$. It is a bijective transformation $f$ of an arbitrary distribution (from a given dataset) to e.g. a normal distribution.
  • Figure 2: Tiny example graph of quantum circuits. The edges are labelled with elementary gates. The vertices are given by the unitary operator built by taking the product of the gates along the shortest path. (Image taken from RosOsb2023a)
  • Figure 3: TSNE-plot of the iris (top) and wine (bottom) datasets. The iris dataset has been selected since one class separates very easy from the rest, whereas the remaining classes are more similar and overlapping. The second class of the wine dataset is spreading into the classes one and three.
  • Figure 4: Optimized Normalizing Flow from an input distribution (magenta-cross) to a target distribution (blue-circle) and the comparison to a discrete Gaussian distribution (red-triangle).
  • Figure 5: The resulting ROC-Curves and the aurea-under the ROC-Curve (AUROC) for different settings on the Iris and Wine dataset. QF-KL shows the performance using the KL-divergence for optimization and QF-cos shows the performance using the cosine dissimilarity score.
  • ...and 3 more figures