Probabilistic Inference in the Era of Tensor Networks and Differential Programming

Martin Roa-Villescas,Xuanzhao Gao,Sander Stuijk,Henk Corporaal,Jin-Guo Liu
2024-05-23
Abstract:Probabilistic inference is a fundamental task in modern machine learning. Recent advances in tensor network (TN) contraction algorithms have enabled the development of better exact inference methods. However, many common inference tasks in probabilistic graphical models (PGMs) still lack corresponding TN-based adaptations. In this work, we advance the connection between PGMs and TNs by formulating and implementing tensor-based solutions for the following inference tasks: (i) computing the partition function, (ii) computing the marginal probability of sets of variables in the model, (iii) determining the most likely assignment to a set of variables, and (iv) the same as (iii) but after having marginalized a different set of variables. We also present a generalized method for generating samples from a learned probability distribution. Our work is motivated by recent technical advances in the fields of quantum circuit simulation, quantum many-body physics, and statistical physics. Through an experimental evaluation, we demonstrate that the integration of these quantum technologies with a series of algorithms introduced in this study significantly improves the effectiveness of existing methods for solving probabilistic inference tasks.
Machine Learning,Computational Physics
What problem does this paper attempt to address?
This paper discusses the problem of using tensor networks (TNs) for probabilistic inference in probabilistic graphical models (PGMs). Currently, although the application of tensor networks in quantum physics and machine learning is increasing, the adaptive application of these techniques in PGMs is still under development. The paper proposes a new tensor-based solution for performing the following probabilistic tasks: 1. Computing the partition function. 2. Computing the marginal probability of a variable set. 3. Determining the most likely variable assignment given evidence. 4. Determining the most likely variable assignment after normalizing over a set of different variables. 5. Generating samples from a learned probability distribution. The paper also introduces a novel method of unit tensor to compute marginal probabilities and the most likely assignment, significantly reducing the cost of computing multiple marginal probabilities. The research is inspired by the latest advancements in quantum circuit simulation, quantum many-body physics, and statistical physics, utilizing techniques such as algorithmic contraction ordering and tropical tensor networks to improve the efficiency of existing methods in solving probabilistic inference tasks. Experimental results show that the proposed tensor network implementation method is faster than existing solutions by 3 to 4 orders of magnitude in exact inference tasks, and when the computational cost of the problem exceeds a certain threshold, using GPUs can further improve the inference speed of certain tasks by two orders of magnitude. The source code of the paper is released in open-source form, providing convenience for future research and applications.