Abstract
Sum-Product Networks (SPNs) with complex probability distribution at the leaves have been shown to be powerful tractable-inference probabilistic models. However, while learning the internal parameters has been amply studied, learning complex leaf distribution is an open problem with only few results available in special cases. In this paper we derive an efficient method to learn a very large class of leaf distributions with Expectation-Maximization. The EM updates have the form of simple weighted maximum likelihood problems, allowing to use any distribution that can be learned with maximum likelihood, even approximately. The algorithm has cost linear in the model size and converges even if only partial optimizations are performed. We demonstrate this approach with experiments on twenty real-life datasets for density estimation, using tree graphical models as leaves. Our model outperforms state-of-the-art methods for parameter learning despite using SPNs with much fewer parameters.
Introduction
Sum-Product Networks (SPNs) are a class of "deep" probabilistic models that guarantee tractable inference, allowing for the exact and efficient calculation of marginals and partition functions. Traditionally, the expressive power of SPNs has relied on their internal structure—a hierarchy of sum and product nodes—while the "leaves" at the bottom of the network were restricted to simple univariate distributions or indicator variables.
While structural learning and weight optimization for sum nodes have advanced significantly, the integration of complex, multivariate leaf distributions (such as tree-structured graphical models) has remained a challenge. Previous approaches were often limited to specific cases or required excessively large, shallow networks to compensate for the simplicity of the leaves. This paper introduces a general, efficient Expectation-Maximization (EM) algorithm capable of training almost any type of leaf distribution within an SPN framework.
The EM Framework for SPNs
The core contribution of this work is treating the SPN as an exponentially large mixture model and deriving a novel EM algorithm to optimize its parameters. The process hinges on a theoretical "bridge" (Proposition 2) that relates the network's internal derivatives to its underlying mixture components.
The "Bridge" and Weighted MLE
The authors prove that the value of a specific sub-mixture—the set of all paths through a particular edge—can be calculated in constant time using the network's standard values and derivatives. This realization transforms the "M-step" for leaf nodes into a weighted maximum likelihood estimation (MLE) problem. In this setup:
- E-step: Each data point is assigned a "responsibility" weight based on the current network state.
- M-step: The leaf nodes update their parameters to fit these weighted data points.
This approach is highly general; it works for any distribution where MLE is possible, including Gaussians, Tree Graphical Models, or even small neural networks. Furthermore, the algorithm is computationally efficient, with a cost that scales linearly with the number of edges in the SPN.
Experimental Evaluation
To validate the approach, the researchers evaluated "TreeSPN"—an SPN utilizing tree graphical models as leaves—on 20 real-world binary datasets. These benchmarks spanned various dimensions, from low-dimensional sets like NLTCS (16 variables) to high-dimensional sets like Ad (1556 variables). The performance of TreeSPN was compared against state-of-the-art parameter learning methods, specifically the Concave-Convex Procedure (CCCP) and Collapsed Variational Inference (CVI).
Results and Discussion
The experimental results demonstrate a significant advantage for the proposed EM framework. TreeSPN outperformed CCCP and CVI on 11 out of the 20 datasets. More importantly, it achieved these results with a fraction of the model complexity.
As shown in the results table, the total number of edges across all test models was only 5.4 million for TreeSPN, compared to 27.1 million for the standard CCCP-trained models. This massive model compression indicates that "smarter" leaves allow for much smaller internal network structures without sacrificing predictive power. This reduction in parameters leads to faster inference times and a significantly smaller memory footprint, which is critical for deployment in resource-constrained environments.
Conclusion
By providing a principled way to train complex leaf distributions, this paper shifts the focus of SPN design from purely structural complexity to a balance between internal depth and leaf sophistication. The derived EM algorithm is not only theoretically sound but also practically efficient and highly scalable. Future work may involve integrating this leaf-learning method directly into the structure discovery process or exploring even more complex leaf types, such as non-parametric models, to further push the boundaries of tractable probabilistic modeling.
Summary updated