Abstract
Matrix product states (MPS), a tensor network designed for one-dimensional quantum systems, has been recently proposed for generative modeling of natural data (such as images) in terms of 'Born machine'. However, the exponential decay of correlation in MPS restricts its representation power heavily for modeling complex data such as natural images. In this work, we push forward the effort of applying tensor networks to machine learning by employing the Tree Tensor Network (TTN) which exhibits balanced performance in expressibility and efficient training and sampling. We design the tree tensor network to utilize the 2-dimensional prior of the natural images and develop sweeping learning and sampling algorithms which can be efficiently implemented utilizing Graphical Processing Units (GPU). We apply our model to random binary patterns and the binary MNIST datasets of handwritten digits. We show that TTN is superior to MPS for generative modeling in keeping correlation of pixels in natural images, as well as giving better log-likelihood scores in standard datasets of handwritten digits. We also compare its performance with state-of-the-art generative models such as the Variational AutoEncoders, Restricted Boltzmann machines, and PixelCNN. Finally, we discuss the future development of Tensor Network States in machine learning problems.
Introduction
Generative modeling aims to learn the joint probability distribution of data to create new, realistic samples. Recently, "Born machines" based on tensor networks—mathematical structures used to represent high-dimensional tensors efficiently—have emerged as a physics-inspired alternative to neural networks.
However, the most common tensor network, the Matrix Product State (MPS), is inherently one-dimensional. When applied to 2D images, MPS treats pixels as a long chain, leading to an "exponential decay of correlations." This means the model struggles to recognize that two pixels might be physically close in a 2D grid even if they are far apart in the 1D sequence. This paper introduces Tree Tensor Networks (TTN) as a framework to overcome these limitations, respecting the 2D nature of images without sacrificing computational tractability.
Methodology
The authors employ a Tree Tensor Network (TTN). Unlike a linear chain, a TTN is hierarchical: pixels (physical indices) are the "leaves" of the tree, and they connect upward through "virtual bonds" to internal nodes.
Born Machine Interpretation
The TTN represents a wave function $\Psi(x)$. The probability of a specific data configuration $x$ is given by the Born rule: $p(x) = |\Psi(x)|^2 / Z$, where $Z$ is the normalization factor (partition function).
2D Representation and Spatial Prior
A key innovation is arranging the tree structure to match the 2D spatial layout of images. By ensuring that local clusters of pixels are processed together in the hierarchy, the model can capture spatial correlations more effectively than a 1D chain.
Training and Sampling
- Sweeping Algorithm: Instead of standard backpropagation, the authors use a "sweeping" learning algorithm. They update one or two tensors at a time while keeping others fixed, moving across the tree to minimize the Kullback-Leibler (KL) divergence.
- Canonicalization: Techniques from quantum physics are used to "canonicalize" the tensors, simplifying calculations so that the normalization factor $Z$ can be calculated exactly and efficiently.
- Direct Sampling: The tree structure allows for exact marginalization, enabling the model to generate new samples pixel-by-pixel without needing iterative Markov Chain Monte Carlo (MCMC) methods.
Key Insights
- Logarithmic Correlation Growth: In an MPS, the "distance" between correlations grows linearly. In a TTN, it grows logarithmically with the number of pixels, allowing it to capture long-range dependencies more effectively.
- The "Area Law": Natural images often obey an "area law" of entanglement entropy (local pixels are highly correlated, distant ones less so). The TTN structure is a natural fit for this physical principle.
- Exact Likelihoods: Unlike many deep learning models (like VAEs) that provide an approximation, the TTN allows for the exact calculation of the partition function and the negative log-likelihood (NLL).
Results
The model was evaluated on random binary patterns and the Binary MNIST dataset.
- Superiority over MPS: On random binary patterns, the TTN reached the theoretical minimum NLL even as system size increased, whereas MPS failed to converge for longer chains.
- MNIST Performance: The TTN achieved a test NLL of 94.3 (using the 2D representation), significantly better than the standard tree factor graph (175.8) and the MPS (101.5).
- Comparison to SOTA: While TTN outperformed other tensor-based methods, it still trails behind state-of-the-art neural models like Restricted Boltzmann Machines (86.3), VAEs (84.8), and PixelCNN (81.3).
Conclusion
Tree Tensor Networks represent a significant step forward for tensor-based generative modeling by incorporating spatial priors. While they currently trail the most advanced neural networks in raw performance, their ability to provide exact likelihoods and unbiased samples makes them a compelling area for research. Future work may explore even more sophisticated structures like MERA or PEPS, or hybrid models combining tensor networks with convolutional layers.
Summary updated