IBIA: An Incremental Build-Infer-Approximate Framework for Approximate Inference of Partition Function

Shivani Bathla, Vinita Vasudevan

Abstract

Exact computation of the partition function is known to be intractable, necessitating approximate inference techniques. Existing methods for approximate inference are slow to converge for many benchmarks. The control of accuracy-complexity trade-off is also non-trivial in many of these methods. We propose a novel incremental build-infer-approximate (IBIA) framework for approximate inference that addresses these issues. In this framework, the probabilistic graphical model is converted into a sequence of clique tree forests (SCTF) with bounded clique sizes. We show that the SCTF can be used to efficiently compute the partition function. We propose two new algorithms which are used to construct the SCTF and prove the correctness of both. The first is an algorithm for incremental construction of CTFs that is guaranteed to give a valid CTF with bounded clique sizes and the second is an approximation algorithm that takes a calibrated CTF as input and yields a valid and calibrated CTF with reduced clique sizes as the output. We have evaluated our method using several benchmark sets from recent UAI competitions and our results show good accuracies with competitive runtimes.

Introduction

In Probabilistic Graphical Models (PGMs), such as Bayesian or Markov networks, calculating the partition function ($Z$) is a fundamental task. It serves as the normalization constant required to convert raw factor scores into valid probabilities. However, computing $Z$ exactly is #P-complete, making it computationally intractable for complex real-world graphs.

Existing approximate solutions typically involve variational methods (e.g., Loopy Belief Propagation) or sampling methods. Variational methods are efficient but often suffer from convergence issues on "hard" graphs, while sampling methods can be slow to reach reliable estimates. The IBIA framework addresses these challenges by providing a structured, non-iterative approach that allows for a controlled trade-off between computational complexity and accuracy.

The IBIA Framework

The core of the IBIA approach is the conversion of a PGM into a Sequence of Clique Tree Forests (SCTF). Unlike traditional methods that attempt to build a single, potentially massive junction tree, IBIA processes the model incrementally through a three-step loop.

The IBIA Framework Flowchart: Initialize, Incremental Build, Infer, and Approximate.
  1. Incremental Build: Factors are added to a Clique Tree Forest (CTF) one by one. The algorithm ensures that the maximum clique size remains below a user-defined bound ($mcs_p$).
  2. Infer: Once the complexity bound is reached, the framework performs standard Belief Propagation. Because the structure is a forest (a collection of trees), this step is non-iterative, guaranteed to converge, and exact for that specific forest.
  3. Approximate: To accommodate new factors, the current CTF is "shrunk" to a smaller bound ($mcs_{im}$). This involves exact marginalization of variables that are no longer needed and local marginalization of others to reduce clique sizes.

Sequence of Clique Tree Forests (SCTF)

A key innovation of IBIA is the decomposition of a complex graph into a sequence of simpler structures. By maintaining a forest structure throughout the process, the algorithm avoids the cycles that lead to convergence failures in other variational techniques.

A complex PGM graph (left) and its representation as a sequence of calibrated clique tree forests, CTF1 and CTF2 (right).

During the approximation phase, the algorithm must decide which information to preserve. IBIA utilizes a Maximum Mutual Information (maxMI) heuristic. It prioritizes preserving the joint distributions of "Interface Variables"—those variables that appear in factors yet to be added to the sequence. By focusing on these bridges to future information, the framework maintains high global accuracy despite local approximations.

Experimental Evaluation

The framework was rigorously tested on 1717 instances from the UAI Inference Competitions and the Probabilistic Inference Challenge (PIC). These benchmarks span diverse domains, including medical diagnosis, protein folding, and digital circuit analysis.

Key Results

  • Robustness: IBIA achieved a high coverage rate, successfully solving 1705 out of 1717 benchmarks within an 8GB memory limit.
  • Accuracy: The method consistently outperformed traditional variational methods like Loopy Belief Propagation (LBP) and Generalized Belief Propagation (HAK).
  • Efficiency: IBIA proved competitive with modern neural-network-based inference methods (e.g., NeuroBE) but without the need for extensive training time. Most "small" benchmarks were resolved in under 20 seconds, while large models typically finished within 20 minutes.

Conclusion

The IBIA framework provides a novel and effective way to estimate the partition function by breaking down intractable graphs into a sequence of manageable clique tree forests. By avoiding iterative loops and utilizing an information-theoretic heuristic for approximation, it offers a reliable "knob" for balancing accuracy and runtime. Future work includes extending the framework to handle variables with very large domain sizes and implementing the core algorithms in C++ for further performance gains.

Summary updated

BibTeX
@article{bathla2023ibia,
  author = {Shivani Bathla and Vinita Vasudevan},
  title = {{IBIA: An Incremental Build-Infer-Approximate Framework for Approximate Inference of Partition Function}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=8L7Rh6FIXt},
}
Figure