Tensorizing flows: a tool for variational inference

Yuehaw Khoo, Michael Lindsey, Hongli ZhaoarXiv 2023 · DOI

Abstract

Variational Inference (VI) often relies on Normalizing Flows (NFs) to approximate complex target distributions. However, NFs typically start from a unimodal Gaussian base, making them prone to mode collapse when the target is multimodal. We present Tensorizing Flows (TF), which utilize a Tensor Network (specifically a Tensor Train) as a non-Gaussian base distribution. This hybrid approach combines the global structural modeling of tensor networks with the local expressive power of neural flows. Our results on high-dimensional synthetic and physics-based models demonstrate that TFs significantly improve mode capture and approximation accuracy compared to standard NFs.

Introduction

A central challenge in machine learning and statistical physics is approximating complex, high-dimensional probability distributions. Normalizing Flows have emerged as a dominant framework, transforming simple base distributions into complex ones via invertible neural networks. Despite their success, NFs struggle with multimodality. The "topological gap" between a single-mode Gaussian and a multi-mode target requires the flow to "tear" the probability mass, a difficult optimization task that often leads to missing modes entirely.

Methodology: The Tensorizing Flow

Tensorizing Flows address the limitations of standard NFs by providing a more informed starting point. The method decomposes the task into global structure capture and local refinement.

The Tensor Train Base

Instead of a Gaussian, TFs use a Tensor Train (TT)—also known as a Matrix Product State—to represent the base distribution. The TT-cross algorithm is employed to approximate the square root of the target density. This allows the base distribution to capture the "skeleton" of the target, including its primary modes, right from the start of training.

The Tensor Train (TT) decomposition approximates a high-dimensional tensor $\mathcal{A}$ as a sequence of low-rank cores $\mathcal{C}_k$, enabling efficient representation and sampling.

The TT representation scales linearly with the dimension $d$, ensuring computational feasibility for high-dimensional problems. By approximating the square root of the density as a functional tensor train and then squaring it, the authors ensure the base distribution is always non-negative and normalizable.

Neural Flow Refinement

Following the TT initialization, an Invertible Residual Network (iResNet) is applied. While the TT captures the global modes, the flow's role is to smooth out discretization errors and account for any correlations not captured by the low-rank tensor approximation. This "division of labor" allows each component to play to its strengths.

Experimental Evaluation

The authors evaluated their method on synthetic but challenging high-dimensional distributions where the ground truth is known:

  • 30D Gaussian Mixture Model (GMM): TFs successfully captured all five modes accurately, whereas standard NFs failed to find several modes, leading to higher validation loss.
  • Ginzburg-Landau Models (1D and 2D): In these physics-inspired tasks ($d=35$ and $d=64$), TFs achieved significantly lower error ratios in estimating the log-partition function. For the 2D case, the TF achieved an error ratio of 0.0974, indicating it was significantly more accurate than the standard NF baseline.

Qualitative analysis of samples from the 2D Ginzburg-Landau model showed that TF-generated configurations were structurally indistinguishable from ground truth spin configurations, while standard NF samples appeared blurry or structurally incorrect.

Conclusion

Tensorizing Flows offer a robust solution to the mode collapse problem in variational inference. By replacing the naive Gaussian base with a structured Tensor Train, the model is initialized with a global map of the target distribution. This synergy between tensor networks and deep learning opens new avenues for exploring complex energy landscapes in fields ranging from quantum chemistry to molecular dynamics.

Summary based on the paper "Tensorizing flows: a tool for variational inference".

Summary updated

BibTeX
@misc{khoo2023tensorizing,
  author = {Yuehaw Khoo and Michael Lindsey and Hongli Zhao},
  title = {{Tensorizing flows: a tool for variational inference}},
  year = {2023},
  eprint = {2305.02460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.02460},
}
Figure