Solving MAP Exactly by Searching on Compiled Arithmetic Circuits

Jinbo Huang, Mark Chavira, Adnan DarwicheAAAI 2006

Abstract

The MAP (maximum a posteriori hypothesis) problem in Bayesian networks is to find the most likely states of a set of variables given partial evidence on the complement of that set. Standard structure-based inference methods for finding exact solutions to MAP, such as variable elimination and join-tree algorithms, have complexities that are exponential in the constrained treewidth of the network. A more recent algorithm, proposed by Park and Darwiche, is exponential only in the treewidth and has been shown to handle networks whose constrained treewidth is quite high. In this paper we present a new algorithm for exact MAP that is not necessarily limited in scalability even by the treewidth. This is achieved by leveraging recent advances in compilation of Bayesian networks into arithmetic circuits, which can circumvent treewidth-imposed limits by exploiting the local structure present in the network. Specifically, we implement a branch-and-bound search where the bounds are computed using linear-time operations on the compiled arithmetic circuit. On networks with local structure, we observe orders-of-magnitude improvements over the algorithm of Park and Darwiche. In particular, we are able to efficiently solve many problems where the latter algorithm runs out of memory because of high treewidth.

Introduction

In Bayesian networks, the MAP problem involves finding the most likely state for a subset of variables (the MAP variables) given some evidence. While conceptually straightforward, it is computationally significantly harder than finding the Most Probable Explanation (MPE), where evidence is provided for all non-query variables. Standard exact inference methods are limited by the constrained treewidth of a network, which grows exponentially as the problem becomes more complex. Even previous state-of-the-art approaches (PD03) that are limited only by unconstrained treewidth often fail on real-world networks where the treewidth is high enough to cause memory exhaustion.

The ACEMAP Approach

The authors introduce ACEMAP, a new algorithm that exploits "local structure"—such as determinism (0/1 probabilities) and context-specific independence—to bypass traditional treewidth bottlenecks. The core of the method is the compilation of the Bayesian network into an Arithmetic Circuit (AC).

Compilation of a Bayesian network into an arithmetic circuit.

An AC is a directed acyclic graph where internal nodes represent additions and multiplications. This representation allows for the "compression" of the network by exploiting local logical patterns. ACEMAP utilizes this structure within a depth-first branch-and-bound search. At each step, the algorithm uses the compiled AC to compute an upper bound on the probability of the best completion of the current assignment. Because AC evaluation is linear in the size of the circuit, these bounds are computed with extreme efficiency.

To optimize the search, the authors developed a static variable ordering heuristic based on "cone size" in the AC. Variables that contribute more to the "looseness" of the probability bound are prioritized, tightening the bounds early in the search process.

Experimental Evaluation

The algorithm was evaluated on a diverse set of benchmarks, including relational Bayesian networks (blockmap, mastermind), grid networks with high determinism, and classic benchmarks like alarm and hailfinder. These datasets were selected specifically because many possess high treewidths that defeat traditional structure-based algorithms.

Performance comparison between PD03 and ACEMAP across various network types.

Key Results

  • Superior Scalability: ACEMAP outperformed the previous state-of-the-art (PD03) on 51 out of 55 tested networks.
  • Orders of Magnitude Speedup: In many instances, ACEMAP was hundreds or thousands of times faster. For example, on the blockmap-10-1 network, PD03 failed to solve the problem, while ACEMAP reached a solution in just 0.34 seconds.
  • Memory Efficiency: ACEMAP successfully solved numerous problems where previous methods ran out of memory due to high treewidth (e.g., cases where the constrained treewidth exceeded 100).
  • Compilation Efficiency: For most networks, the time required to compile the AC was negligible compared to the search time, and the resulting circuits were compact enough to fit easily in RAM.

Conclusion

ACEMAP demonstrates that a network's graph structure (treewidth) does not tell the whole story of its computational complexity. By replacing jointrees with Arithmetic Circuits, the authors transformed a memory-intensive problem into a search problem guided by fast, linear-time circuit evaluations. While the current implementation relies on static variable ordering, future work exploring efficient dynamic ordering on ACs could further extend the dominance of this approach across even more diverse network types.

Summary updated

BibTeX
@inproceedings{huang2006solving,
  author = {Jinbo Huang and Mark Chavira and Adnan Darwiche},
  title = {{Solving MAP Exactly by Searching on Compiled Arithmetic Circuits}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2006},
  url = {https://openreview.net/forum?id=S1WiVAedZB},
}
Figure