Table of Contents
Fetching ...

A Matrix Product State Model for Simultaneous Classification and Generation

Alex Mossi, Bojan Žunkovic, Kyriakos Flouris

TL;DR

This work introduces a Matrix Product State (MPS) model that acts as both a classifier and a generator within a GAN-inspired training regime to improve generative realism without sacrificing classification accuracy. The method leverages embedding functions that map inputs to an MPS-compatible representation, and employs an exact sampling procedure for non-normalized PDFs via a reduced density matrix. It analyzes Fourier versus Legendre embeddings, demonstrating GAN-style training reduces outliers and improves generation (measured by a bound-like $FID$-style score) while preserving accuracy, with latent-space dynamics providing insights into class structure and perturbation robustness. The approach offers a scalable, tensor-network-based alternative for joint classification-generation tasks on low-dimensional data and points to extensions with richer embeddings and integration with broader generative frameworks.

Abstract

Quantum machine learning (QML) is a rapidly expanding field that merges the principles of quantum computing with the techniques of machine learning. One of the powerful mathematical frameworks in this domain is tensor networks. These networks are used to approximate high-order tensors by contracting tensors with lower ranks. Initially developed for simulating quantum systems, tensor networks have become integral to quantum computing and, by extension, to QML. Drawing inspiration from these quantum methods, specifically the Matrix Product States (MPS), we apply them in a classical machine learning setting. Their ability to efficiently represent and manipulate complex, high-dimensional data makes them effective in a supervised learning framework. Here, we present an MPS model, in which the MPS functions as both a classifier and a generator. The dual functionality of this novel MPS model permits a strategy that enhances the traditional training of supervised MPS models. This framework is inspired by generative adversarial networks and is geared towards generating more realistic samples by reducing outliers. In addition, our contributions offer insights into the mechanics of tensor network methods for generation tasks. Specifically, we discuss alternative embedding functions and a new sampling method from non-normalized MPSs.

A Matrix Product State Model for Simultaneous Classification and Generation

TL;DR

This work introduces a Matrix Product State (MPS) model that acts as both a classifier and a generator within a GAN-inspired training regime to improve generative realism without sacrificing classification accuracy. The method leverages embedding functions that map inputs to an MPS-compatible representation, and employs an exact sampling procedure for non-normalized PDFs via a reduced density matrix. It analyzes Fourier versus Legendre embeddings, demonstrating GAN-style training reduces outliers and improves generation (measured by a bound-like -style score) while preserving accuracy, with latent-space dynamics providing insights into class structure and perturbation robustness. The approach offers a scalable, tensor-network-based alternative for joint classification-generation tasks on low-dimensional data and points to extensions with richer embeddings and integration with broader generative frameworks.

Abstract

Quantum machine learning (QML) is a rapidly expanding field that merges the principles of quantum computing with the techniques of machine learning. One of the powerful mathematical frameworks in this domain is tensor networks. These networks are used to approximate high-order tensors by contracting tensors with lower ranks. Initially developed for simulating quantum systems, tensor networks have become integral to quantum computing and, by extension, to QML. Drawing inspiration from these quantum methods, specifically the Matrix Product States (MPS), we apply them in a classical machine learning setting. Their ability to efficiently represent and manipulate complex, high-dimensional data makes them effective in a supervised learning framework. Here, we present an MPS model, in which the MPS functions as both a classifier and a generator. The dual functionality of this novel MPS model permits a strategy that enhances the traditional training of supervised MPS models. This framework is inspired by generative adversarial networks and is geared towards generating more realistic samples by reducing outliers. In addition, our contributions offer insights into the mechanics of tensor network methods for generation tasks. Specifically, we discuss alternative embedding functions and a new sampling method from non-normalized MPSs.

Paper Structure

This paper contains 20 sections, 29 equations, 15 figures, 3 tables, 2 algorithms.

Figures (15)

  • Figure 1: Penrose diagram of the MPS decomposition in Eq. \ref{['eq:mps_def']}. Horizontal lines, bond indices $\alpha_i$, connect adjacent tensors $A_i$, while vertical lines, physical indices $d_j$, represent input features via $\phi (x_i)$. Boundary tensors $A_1,A_n$ are rank-2, two open indices, and internal tensors are rank-3, three open indices
  • Figure 2: This illustrates an example of how a single MPS of the ensemble, corresponding to the class $C$, and input are contracted in the forward pass, considering the case $N=4$. The red lines indicate the indices that are being contracted in each step. By squaring the value of the final scalar $y^C$, we get a non-normalized probability, i.e., $p(c=i|\mathbf{x}) = \frac{1}{Z}\cdot y_i^2$, with $Z = \sum_c y_c^2$ being a normalization constant depending on the outputs of the ensemble of MPSs.
  • Figure 3: This illustrates the MPS architecture used for classification in the case of an additional central tensor. The blue tensors constitute the MPS, while the red component represents the additional tensor that enables multiple label classes for classification.
  • Figure 4: This illustrates an example of how MPS and inputs are contracted in the forward pass of the classification, considering the case $N=4$. The red lines indicate the indices that are being contracted in each step.
  • Figure 5: Visual description of the tensor contractions that produce the matrix $V_{i, \{x_j\}_{j<i}}$, used to calculate the conditional probability $p(x_i|x_{1}, ..., {x_{i-1}}) = \phi(x_i)\cdot V_{i, \{x_j\}_{j<i}}\cdot \phi(x_i)$ during the $i$-th iteration of our sampling algorithm.
  • ...and 10 more figures