Compiling Bayesian Network Classifiers into Decision Graphs

Andy Shih, Arthur Choi, Adnan Darwiche

Introduction

Bayesian Network (BN) classifiers are robust tools for modeling uncertainty, yet they often function as "black boxes" in practical applications. While they excel at calculating posterior probabilities to inform decisions, the underlying logic remains opaque to end-users. This lack of transparency poses significant challenges for interpreting specific outcomes or formally verifying model behavior—such as ensuring that increasing a certain feature value consistently leads to a specific classification.

This research, presented at AAAI 2019, bridges the gap between probabilistic modeling and symbolic logic. The authors introduce an algorithm to compile complex BN classifiers into Ordered Decision Diagrams (ODDs). This transformation converts a probabilistic model into a tractable symbolic form, enabling linear-time formal verification and the generation of human-readable explanations.

The Compilation Framework

The core contribution is a recursive algorithm that translates the discrete decision function of a BN into an ODD. An ODD is a rooted directed acyclic graph where following a path from the root to a leaf based on feature values yields the final classification.

Subclassifiers and Decomposition

To handle large networks, the algorithm identifies "splitting nodes" ($H$) that d-separate sets of features. This allows the complex classifier to be decomposed into smaller, more manageable subclassifiers.

Decomposition of a complex Bayesian Network into smaller subclassifiers.

Optimization via Equivalence Intervals

A key technical innovation is the use of equivalence intervals. The authors demonstrate that many distinct sub-problems in the compilation process actually induce identical decision behavior. By calculating a "margin" ($\alpha, \beta$) and a "coefficient" ($\gamma$), the algorithm can detect these redundancies. If a sub-problem falls within a previously solved equivalence interval, the algorithm reuses the existing solution, significantly reducing computational overhead.

From Probabilities to Symbolic Logic

The most significant insight of this work is decision invariance: maintaining the exact decision logic does not require tracking precise probabilities. There exists a range of parameter values within which the BN's classification remains unchanged.

By moving from numeric optimization to symbolic reasoning, the model becomes inherently more interpretable. Once compiled into an ODD, complex queries—such as finding the minimum set of features to flip a decision—can be answered in time linear to the size of the ODD.

Experimental Evaluation

The algorithm was tested on several established Bayesian networks, including:

  • Andes: An intelligent tutoring system for physics (223 nodes).
  • win95pts: A diagnostic network for Windows 95 printing (76 nodes).
  • cpcs54: A large medical diagnostic network (54 nodes).

Key Results

  • Efficiency and Scalability: The algorithm successfully compiled networks with over 200 nodes. For the Andes network, the resulting ODD was less than 1% of the theoretical worst-case size.
  • Explanation and Verification: In a case study on win95pts, the ODD revealed that a "Printer Offline" classification could be explained by a single feature (the printer icon being grayed out), regardless of other unknown variables. Furthermore, the authors formally proved the monotonicity of the Andes physics classifier, providing safety guarantees that are typically unattainable with neural networks.

Limitations and Future Work

While highly effective, the current approach has limitations. The "equivalence interval" optimization is primarily tailored for binary classifications, and the size of the resulting ODD is sensitive to the feature ordering. Future research aims to generalize these intervals for multi-class problems and develop more sophisticated heuristics for feature blocking to further enhance scalability in dense, high-treewidth networks.

Summary updated

BibTeX
@inproceedings{shih2019compiling,
  author = {Andy Shih and Arthur Choi and Adnan Darwiche},
  title = {{Compiling Bayesian Network Classifiers into Decision Graphs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33017966},
}
Figure