Algebra of inference in graphical models revisited

Siamak Ravanbakhsh, Russell GreinerarXiv 2014

Abstract

This paper studies the form and complexity of inference in graphical models using the abstraction offered by algebraic structures. In particular, we broadly formalize inference problems in graphical models by viewing them as a sequence of operations based on commutative semigroups. We then study the computational complexity of inference by organizing various problems into an "inference hierarchy". When the underlying structure of an inference problem is a commutative semiring -- i.e. a combination of two commutative semigroups with the distributive law -- a message passing procedure called belief propagation can leverage this distributive law to perform polynomial-time inference for certain problems. After establishing the NP-hardness of inference in any commutative semiring, we investigate the relation between algebraic properties in this setting and further show that polynomial-time inference using distributive law does not (trivially) extend to inference problems that are expressed using more than two commutative semigroups. We then extend the algebraic treatment of message passing procedures to survey propagation, providing a novel perspective using a combination of two commutative semirings. This formulation generalizes the application of survey propagation to new settings.

Introduction

In the study of graphical models, the term "inference" encompasses a diverse set of tasks depending on the domain of application. Physicists might seek the partition function, computer scientists might search for the most likely configuration (Max-Sum), and statisticians often calculate marginal probabilities (Sum-Product). While these problems are conceptually related, they have historically been studied in isolation. This paper addresses the lack of a unified theoretical language by formalizing inference through the lens of abstract algebra, specifically using commutative semigroups and semirings. By doing so, it maps out the fundamental computational complexity of inference and provides a novel algebraic generalization of Survey Propagation.

Algebraic Formalization

The authors propose viewing a factor graph as a collection of functions whose values belong to a commutative semigroup. In this framework, inference is defined as a sequence of "marginalization" operations—such as summation or maximization—performed over these values. This abstraction allows for the definition of an "inference hierarchy" (Σ, Π, Φ, Ψ, ∆), which is recursive and analogous to the polynomial hierarchy in computational complexity theory.

A factor graph representation used to define the algebraic inference hierarchy.

Complexity Mapping

A key contribution of this work is the rigorous mapping of inference tasks to specific complexity classes. Using oracles and Turing machine reductions, the authors prove that the entire inference hierarchy is PSPACE-complete. Specific findings include:

  • Sum-Sum / Min-Min: Solvable in polynomial time (P).
  • Max-Min: NP-complete.
  • Sum-Min / Sum-Product: PP-complete (Probabilistic Polynomial time).

Furthermore, the paper establishes the "universal" hardness of inference, proving that inference in any commutative semiring is NP-hard under randomized reduction. This suggests that the difficulty is inherent to the graphical structure and algebraic requirements, rather than the specific operations chosen. The connection to Toda’s Theorem further highlights that even seemingly simple problems like sum-product are as hard as the entire polynomial hierarchy.

The Distributive Law and Survey Propagation

The efficiency of algorithms like Belief Propagation (BP) on tree-structured graphs relies on the distributive law. However, the authors demonstrate a fundamental limit: the distributive law cannot be trivially extended to problems involving more than one type of marginalization (e.g., Marginal MAP). Mathematically, if two different marginalization operations commute and distribute over the same expansion operation, they are shown to be identical.

To move beyond these limits, the paper reformulates Survey Propagation (SP). Traditionally viewed as a specialized technique from statistical physics for constraint satisfaction, SP is reinterpreted here as a general algebraic tool. By introducing a third binary operation and viewing SP as a message-passing procedure over a combination of two commutative semirings, the authors derive generalized SP equations that are applicable to any commutative semiring, accounting for multiple fixed points of the standard BP algorithm.

Conclusion

This research provides a definitive theoretical boundary for inference in graphical models. While the algebraic framework offers elegance and a path toward generalized algorithms, challenges remain. The framework is exact primarily on tree-structured graphs, and its behavior on graphs with loops remains a powerful but heuristic approximation. Future work will look to extend this rigorous algebraic treatment to continuous variable domains and hybrid models, as well as identifying which specific counting versions of SP remain efficient in practice.

Summary updated

BibTeX
@misc{ravanbakhsh2014algebra,
  author = {Siamak Ravanbakhsh and Russell Greiner},
  title = {{Algebra of inference in graphical models revisited}},
  year = {2014},
  eprint = {1409.7410},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1409.7410},
}
Figure