Tractable Learning for Complex Probability Queries

Jessa Bekker, Jesse Davis, Arthur Choi, Adnan Darwiche, Guy Van den Broeck

Introduction

In the realm of "tractable learning," researchers aim to build probabilistic models where answering questions (inference) is guaranteed to be computationally fast. However, this promise of "tractability" is often quite narrow. Most current models, such as Sum-Product Networks (SPNs) or those based on Arithmetic Circuits (ACs), are only efficient for simple queries, like finding the most likely state (MPE) or calculating basic conditional probabilities.

Real-world reasoning, unfortunately, demands much more. Imagine asking a model complex questions such as:

  • Threshold: "What is the probability that at least 50% of lawmakers will vote 'yes'?"
  • Comparison: "Is it more likely that a review has more positive than negative words?"
  • Parity: "What is the probability that an even number of sensors are triggered?"

For standard tractable models, these "complex" queries are often NP-hard. This paper introduces LearnSDD, a novel machine learning algorithm that learns probabilistic models (specifically, Markov networks) capable of answering these complex queries in polynomial time. By bridging high-level logical reasoning with efficient probabilistic inference, LearnSDD significantly expands the library of reasoning primitives available to practitioners without sacrificing speed.

LearnSDD: Shifting to Sentential Decision Diagrams

The core innovation of LearnSDD is its choice of underlying representation. Instead of relying on standard Arithmetic Circuits, the algorithm compiles models into Sentential Decision Diagrams (SDDs).

Comparison of Markov Network, SDD, and AC representations.

SDDs are a highly structured representation of Boolean functions that possess two "superpowers" crucial for learning:

  1. Efficient Conjoin: New features can be incrementally added to the model in linear time.
  2. Dynamic Minimization: The algorithm can automatically "compress" the circuit during the learning phase to keep the model small and inference fast.

The LearnSDD learning loop starts with a simple model and greedily adds logical features. It uses a scoring function that carefully balances how well the model fits the training data against the "cost" of inference (dictated by the size of the SDD). To build the model, the algorithm employs two specific feature generators: a Conjunctive generator that combines existing features, and a Mutex generator that automatically identifies mutually exclusive variables (e.g., a "Color" variable that can be Red, Blue, or Green, but not all three simultaneously), which drastically simplifies the resulting structure.

Key Insights: Tractability is Relative

A major theoretical takeaway from the paper is that a model isn't universally "tractable" or "intractable"—tractability is strictly relative to specific queries. A model that is lightning-fast for simple probabilities might be entirely useless for counting tasks.

The authors prove that symmetric Boolean functions—queries that depend only on how many variables are true, rather than which specific ones are true—can always be answered in polynomial time if the model is represented as an SDD. By treating the Markov network inference as a "weighted model counting" problem, the authors successfully import tools from the formal logic community to solve traditionally hard problems in machine learning.

Empirical Results: Speed and Compactness

The authors evaluated LearnSDD on several real-world datasets, including Traffic & Temperature data (to test Mutex feature detection), GovTrack.us voting data (to test threshold queries), and Movie Reviews (to test group comparisons and parity).

Inference times for complex queries comparing SDD and AC models.

The results demonstrated massive improvements in both model size and inference speed:

  • Inference Speedup: On complex queries like thresholds, comparisons, and parity, SDD-based models were orders of magnitude faster. In the Movie Review tests, the SDD answered parity and word-count queries in less than 300 milliseconds. In stark contrast, standard AC-based models timed out (exceeding 10 minutes) in over 85% of the test cases.
  • Complex Reasoning at Scale: The SDD model successfully answered voting threshold queries with up to 75% unknown variables in under ten minutes—a feat previously considered computationally prohibitive for these types of models.
  • Model Compactness: LearnSDD produced significantly smaller models than the state-of-the-art ACMN learner while maintaining identical accuracy, largely thanks to its native handling of mutual exclusivity.

Limitations and Future Work

While SDDs drastically expand the range of tractable queries, some limitations remain. "Partial Maximum A Posteriori" (Partial MAP)—finding the most likely assignment for only a subset of variables—remains NP-hard even with this representation. Additionally, while unweighted thresholds (simple counting) are efficient, weighted thresholds (where certain variables carry more importance) do not always yield a compact SDD representation, meaning they can still be slow in worst-case scenarios.

Looking forward, the authors suggest exploring "Probabilistic SDDs," a related representation that could offer even greater flexibility and efficiency for modeling structured probability spaces.

Summary updated

BibTeX
@inproceedings{bekker2015tractable,
  author = {Jessa Bekker and Jesse Davis and Arthur Choi and Adnan Darwiche and Guy Van den Broeck},
  title = {{Tractable Learning for Complex Probability Queries}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2015},
}
Figure