On Inference and Learning With Probabilistic Generating Circuits

Juha Harviainen, Vaidyanathan Peruvemba Ramaswamy, Mikko KoivistoUAI 2023

Abstract

Probabilistic generating circuits (PGCs) are economical representations of multivariate probability generating polynomials (PGPs). They unify and extend decomposable probabilistic circuits and determinantal point processes, admitting tractable computation of marginal probabilities. However, the need for addition and multiplication of high-degree polynomials incurs a significant additional factor in the complexity of inference. Here, we give a new inference algorithm that eliminates this extra factor. Specifically, we show that it suffices to keep track of the highest degree coefficients of the computed polynomials, rendering the algorithm linear in the circuit size. In addition, we show that determinant-based circuits need not be expanded to division-free circuits, but can be handled by division-based fast algorithms. While these advances enhance the appeal of PGCs, we also discover an obstacle to learning them from data: it is NP-hard to recognize whether a given PGC encodes a PGP. We discuss the implications of our ambivalent findings and sketch a method, in which learning is restricted to PGCs that are composed of moderate-size subcircuits.

Introduction

In probabilistic machine learning, a fundamental trade-off exists between expressivity—the complexity of distributions a model can represent—and tractability—the efficiency of computing marginal probabilities. Probabilistic Circuits (PCs) are well-regarded for modeling local conditional independencies, while Determinantal Point Processes (DPPs) excel at capturing global negative correlations.

Probabilistic Generating Circuits (PGCs) have emerged as a unifying framework. By allowing "sum nodes" to have negative weights, PGCs can be exponentially more succinct than standard PCs. However, this power comes with challenges: slow inference due to polynomial arithmetic and the risk of creating "invalid" circuits that output negative probabilities.

A joint probability table and its corresponding Probabilistic Generating Circuit (PGC) with negative weights.

Algorithmic Advances in Inference

The primary bottleneck for PGCs has been the computational overhead of performing arithmetic on high-degree polynomials during inference. This paper introduces several techniques to mitigate this:

  • Linear-Time Coefficient Tracking: For decomposable PGCs (where child nodes have disjoint variable sets), the authors demonstrate that full polynomial computation is unnecessary. By employing a specialized semiring to track only the highest-degree coefficients, inference complexity is reduced to $O(m)$, where $m$ is the circuit size.
  • Point Evaluation and Interpolation: For general PGCs, evaluating the circuit at specific points followed by fast polynomial interpolation provides a more efficient path than direct polynomial arithmetic, achieving $O(mn)$ complexity.
  • Division-Based Determinants: The research proves that determinant-based PGCs do not require expansion into massive division-free circuits. Instead, standard $O(n^3)$ matrix algorithms like Gaussian elimination can be utilized directly.

The Complexity of Learning and Feasibility

While inference has been streamlined, the "power of negation" introduces a significant hurdle for learning. Because sum nodes can have negative weights, it is non-trivial to ensure the circuit represents a valid probability generating polynomial (PGP) with non-negative coefficients.

The authors prove that checking "PGC feasibility"—verifying if a circuit's coefficients are all non-negative—is NP-hard. This result is established via a reduction from k-CNF-SAT, illustrating that the parameter space for valid PGCs is fundamentally difficult to navigate.

Reduction from k-CNF-SAT to PGC feasibility, demonstrating the NP-hardness of verifying valid distributions.

Conclusion and Future Directions

The findings present an ambivalent outlook: PGCs are now significantly faster for inference, yet fundamentally hard to verify during learning. To circumvent the NP-hardness of the feasibility problem, the authors propose a modular learning approach. This involves constructing large PGCs from small, manageable sub-circuits (e.g., fewer than 20 variables) where feasibility can be checked locally. These blocks are then combined using operations that are mathematically guaranteed to preserve validity. Future research will focus on the empirical validation of these compound learning frameworks on real-world datasets.

Summary updated

BibTeX
@inproceedings{harviainen2023inference,
  author = {Juha Harviainen and Vaidyanathan Peruvemba Ramaswamy and Mikko Koivisto},
  title = {{On Inference and Learning With Probabilistic Generating Circuits}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=lTt_6R3zHlJ},
}
Figure