Soft Learning Probabilistic Circuits

Soroush Ghandi, Benjamin Quost, Cassio de Campos · DOI

Abstract

Probabilistic Circuits (PCs) provide a framework for representing complex probability distributions while maintaining tractable exact inference. However, traditional structure learning algorithms like LearnSPN rely on "hard" data partitioning, creating a discrepancy between the learning phase and the inference phase. This paper introduces SoftLearn, a novel learning procedure that employs soft clustering to better align the training process with the model's inherent probabilistic structure. By allowing data points to be shared across circuit branches, SoftLearn achieves superior log-likelihoods and generates higher-quality samples across diverse datasets.

1. Introduction

Generative modeling often involves a trade-off between expressivity and tractability. While deep generative models such as Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) can capture high-dimensional data distributions, they often struggle with exact probabilistic queries, such as marginalization or conditioning. Probabilistic Circuits (PCs), including Sum-Product Networks (SPNs), address this by representing distributions as computational graphs of simple operations. This structure allows for exact inference in polynomial time.

Despite their theoretical advantages, the performance of PCs is heavily dependent on the quality of the learned structure. The standard algorithm for this task, LearnSPN, utilizes a top-down approach that recursively partitions data. However, LearnSPN employs "hard" clustering, which assigns each data point to a single branch. This creates a fundamental mismatch: while the model "sums" over multiple branches during inference to calculate probability, it is restricted to a single branch during training. This greedy approach can lead to rigid partitions and poor generalization, as errors made early in the partitioning process propagate through the entire sub-circuit.

2. The SoftLearn Methodology

To bridge the gap between training and inference, the authors propose SoftLearn. Unlike LearnSPN, SoftLearn treats data points as shared resources. During the recursive construction of the circuit, every data point is propagated through all children of a sum node, weighted by its membership probability in each cluster.

2.1 Technical Adaptations

Implementing soft clustering requires a significant re-engineering of the standard PC learning pipeline to accommodate weighted data:

  • Weighted Univariate Estimation: Leaf nodes, typically representing Gaussians or Multinomials, are estimated using weighted frequencies and means rather than simple counts.
  • Weighted Independence Tests: To determine when to create product nodes (representing independent variable groups), the algorithm employs a weighted chi-square test.
  • Soft Clustering Mechanisms: The authors explored two primary methods for the soft split: an Adjusted K-means (where memberships are assigned via a softmax function over distances) and Expectation-Maximization (EM) under conditional independence assumptions.

3. Experimental Evaluation

The efficacy of SoftLearn was evaluated across a broad spectrum of benchmarks, including 20 binary datasets (e.g., NLTCS, MSNBC, KDD-2k), 6 mixed-variable datasets from OpenML-CC18 (e.g., bank, electricity), and the Binary-MNIST dataset for qualitative analysis.

3.1 Performance Metrics

SoftLearn demonstrated significant improvements over traditional LearnSPN implementations:

  • Log-Likelihood: SoftLearn outperformed LearnSPN on 14 out of 20 discrete datasets and all 6 mixed-variable datasets in terms of test log-likelihood.
  • Comparative Analysis: The model proved competitive with more complex architectures such as EiNet and RAT-SPN, and it outperformed the established LearnPSDD on 16 of the 20 binary benchmarks.
  • Sample Quality: Qualitative evaluations on MNIST revealed that PCs trained with SoftLearn produced clearer, more interpretable digit samples compared to the "cluttered" outputs of hard-clustered models.

4. Key Insights

The success of SoftLearn stems from several core principles:

  • Learning-Inference Compatibility: By mirroring the inference process during training, the model learns a more representative structure. If the model sums over branches to calculate probability, it should distribute data across those branches during training.
  • Regularization through Soft Margins: Soft clustering acts as a natural regularizer. By allowing data points to influence multiple branches, the model becomes less sensitive to initial greedy partitioning errors, mitigating the risk of propagating mistakes through the sub-circuit.
  • Efficiency vs. Accuracy: The authors noted that "Early SoftLearn"—limiting clustering to just two iterations—was sufficient to outperform standard LearnSPN. This suggests that even a coarse soft estimate provides better generalization than a precise hard partition.

5. Conclusion and Future Work

SoftLearn represents a significant step forward in the structure learning of Probabilistic Circuits. By replacing rigid data partitioning with a more flexible, weighted approach, it enhances both the predictive accuracy and the generative quality of the models.

However, the increased flexibility comes at the cost of circuit complexity, as data is no longer strictly partitioned. Future research will focus on integrating node pruning and merging techniques to maintain model compactness. Additionally, the authors intend to explore combining soft learning with global structure search methods to further improve performance on complex tabular and structured data.

Summary updated

BibTeX
@article{ghandi2024soft,
  author = {Soroush Ghandi and Benjamin Quost and Cassio de Campos},
  title = {{Soft Learning Probabilistic Circuits}},
  journal = {Int. J. Approx. Reason.},
  year = {2024},
  doi = {10.1016/j.ijar.2025.109467},
}
Figure