NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explaining Deep Tractable Probabilistic Models: The sum-product network case

Athresh Karanam, Saurabh Mathur, Predrag Radivojac, David M. Haas, Kristian Kersting, Sriraam Natarajan

Abstract

We consider the problem of explaining a class of tractable deep probabilistic models, the Sum-Product Networks (SPNs) and present an algorithm ExSPN to generate explanations. To this effect, we define context-specific independencies (CSIs) as the primary vehicle for explanation and demonstrate how they can be extracted from the internal structure of an SPN.

Introduction

Deep Probabilistic Models, specifically Sum-Product Networks (SPNs), have gained prominence due to their ability to perform exact inference efficiently. However, their internal structure remains a "black box" to human experts. While an SPN can accurately predict outcomes in sensitive domains like healthcare, it lacks the transparency required for experts to validate its logic or develop interventional strategies. For instance, a model might identify that blood pressure is independent of age only under specific conditions (e.g., the absence of diabetes), but this relationship is buried within the network's parameters.

To address this, we introduce EXSPN, a novel algorithm designed to transform complex SPNs into human-readable CSI-trees. By extracting context-specific independencies (CSIs), EXSPN bridges the gap between high-performing deep models and the need for interpretable, expert-validated explanations in critical fields.

Methodology: The EXSPN Algorithm

The core contribution of this work is the conversion of an SPN into a CSI-tree, which explicitly represents conditional independencies. The process involves several key steps:

  1. Normalization: The input SPN is converted into a "normal" form to ensure structural consistency and completeness.
  2. Instance Mapping: The algorithm determines the flow of data points through the network's nodes, identifying which instances activate specific paths.
  3. Tree Construction: Using a depth-first search, the SPN's internal structure is mapped to a tree. Product nodes represent conditional independencies (branches), while sum nodes represent the latent choices or "contexts" that lead to those independencies.
  4. Context Approximation: To ensure readability, small discriminative models (e.g., Decision Trees) are trained on the data passing through specific nodes. Feature importance from these models generates logical labels for tree edges (e.g., Age > 30).
  5. Pruning: A heuristic prunes branches representing statistically insignificant data samples, resulting in a compact, interpretable model.
Figure 1: Mapping a normal SPN to its corresponding CSI-tree using approximate context labels to define independence.

Experimental Setup

EXSPN was evaluated across 11 diverse datasets to test its robustness and accuracy:

  • Synthetic Data: Used to verify the recovery of known ground-truth independencies in a controlled environment.
  • UCI Benchmarks: Eight standard datasets, including Mushroom, Adult, Wine Quality, and Yeast.
  • NLTCS: Data from the National Long Term Care Survey.
  • nuMoM2b: A real-world clinical study monitoring first-time mothers to predict gestational diabetes, involving variables such as BMI, age, and smoking history.

Results and Discussion

Our evaluation focused on structural recovery, compression efficiency, and expert validation.

Structural Recovery and Compression

On synthetic data and known Bayesian Networks, EXSPN recovered correct independencies with high accuracy, achieving ratios between 0.83 and 0.88. Furthermore, CSI-trees offered superior compression compared to traditional association rule mining. For the "Plants" dataset, while the Apriori algorithm generated 1,043 rules, the reduced CSI-tree captured the model's logic in just 23 rules.

Key Insights: Independence as Explanation

A fundamental premise of this work is that independence serves as a powerful explanation. By showing a domain expert what a model considers independent under specific conditions, we provide a clear map of the model's causal assumptions. A critical insight was treating sum nodes as contexts. In an SPN, sum nodes act as mathematical mixtures; EXSPN interprets these as "hidden switches" that define the environment for the variables in the sub-graph below. By using surrogate decision trees to label these switches, we provide human-readable logic regardless of the underlying network's depth.

Figure 2: A comparison between a complex SPN and its resulting CSI-tree, demonstrating how network paths are collapsed into clear, conditional branches.

Expert Validation in Healthcare

In the nuMoM2b clinical study, the extracted CSI-tree revealed that BMI is independent of other variables when gestational diabetes (oDM) is absent, but becomes dependent when it is present. This finding was explicitly validated by a domain expert, Dr. David Haas, confirming that the model's learned logic aligns with clinical knowledge.

Conclusion

EXSPN demonstrates that the internal logic of deep tractable models can be made transparent through the extraction of context-specific independencies. By treating sum nodes as "hidden switches" for context, we can generate human-readable explanations that are both accurate and concise. Future work will explore scaling the algorithm to high-dimensional datasets and extending the CSI-tree approach to other tractable models like Arithmetic Circuits.

Summary updated

BibTeX
@inproceedings{karanam2022explaining,
  author = {Athresh Karanam and Saurabh Mathur and Predrag Radivojac and David M. Haas and Kristian Kersting and Sriraam Natarajan},
  title = {{Explaining Deep Tractable Probabilistic Models: The sum-product network case}},
  booktitle = {PGM},
  year = {2022},
  url = {https://openreview.net/forum?id=AWXihJUmkK},
}
Figure