Efficient Parameter Estimation for Bayesian Network Classifiers using Hierarchical Linear Smoothing

Connor Cooper, Geoffrey I. Webb, Daniel F. SchmidtarXiv 2025 · DOI

Abstract

Bayesian Network Classifiers (BNCs) are highly regarded for their interpretability and theoretical foundations. However, their predictive performance often lags behind "black-box" ensembles like Random Forests due to challenges in parameter estimation. Specifically, the Conditional Probability Tables (CPTs) at the heart of BNCs suffer from the "curse of dimensionality": as more features are added, the number of cells in these tables grows exponentially, leading to severe data sparsity. This paper proposes Hierarchical Linear Smoothing (HLS), a method that reformulates complex hierarchical probability smoothing as a computationally efficient log-linear regression. HLS leverages Bayesian shrinkage to share information across related CPT cells, achieving state-of-the-art accuracy while remaining orders of magnitude faster than previous hierarchical smoothing techniques.

Introduction

The primary bottleneck in scaling Bayesian Network Classifiers is the estimation of parameters within Conditional Probability Tables. When a node has multiple parents, the number of possible configurations—and thus the number of parameters to estimate—explodes. In many real-world datasets, even large ones, many of these configurations will have few or no observations, resulting in unreliable probability estimates.

Traditional solutions like additive smoothing (e.g., Laplace smoothing) are often too simplistic. More sophisticated approaches, such as those based on Hierarchical Dirichlet Processes (HDPs), allow for "borrowing strength" from more general parent configurations. However, HDPs are notoriously difficult to implement and rely on slow MCMC sampling methods like Gibbs sampling, making them impractical for large-scale applications. HLS addresses these issues by transforming the hierarchical structure of a CPT into a linear model.

Methodology: From Trees to Matrices

The core innovation of HLS is the mapping of a hierarchical prior structure into a design matrix for multinomial logistic regression. This process involves four key steps:

  1. Tree Representation: Each CPT is represented as a tree where each level corresponds to a parent node, and branches represent the specific values of those parents.
  2. Log-Linear Reformulation: The probability of a leaf node is modeled using a linear predictor. This predictor is the sum of coefficients ($\beta$) associated with each node on the path from the root to that leaf.
  3. Bayesian Shrinkage: To handle sparsity, HLS applies Bayesian regularization (typically a Bayesian ridge prior). This encourages the model to "shrink" specific, data-poor coefficients toward their more general, data-rich ancestors in the hierarchy.
  4. Efficient Inference: Instead of complex HDP sampling, HLS utilizes a Pólya-Gamma sampler. This allows the model to perform Bayesian inference using standard, optimized linear algebra routines.
Figure 1: The transition from (a) HDP prior structures to (b) HLS coefficients and (c) the final HLS design matrix (UB).

By converting the smoothing problem into a regression framework, HLS can exploit sparse matrix optimizations, making it significantly more scalable than its predecessors.

Experimental Results

The authors evaluated HLS across 50 datasets from the UCI Machine Learning Repository, covering a wide range of domains and sample sizes. Numerical features were discretized using the Minimum Description Length (MDL) principle to maintain the categorical nature of the BNCs.

Performance and Accuracy

HLS consistently outperformed standard additive smoothing and showed high competitiveness against Random Forests. While Random Forests often maintained a slight edge in zero-one loss (classification accuracy), BNCs equipped with HLS frequently won on log loss. This indicates that HLS produces better-calibrated probability estimates, which are crucial for many decision-making tasks.

Figure 6: (a) Win-draw-loss results comparing HLS regularization against various Ridge and Lasso baselines. (b) Scatter plot of zero-one loss comparing HLS-NB and HLS-IG on KDB structures.

Computational Efficiency

The most striking result is the speed of HLS. In simulations with 100,000 samples, HLS was found to be orders of magnitude faster than HDP-based smoothing. For instance, while HDP required over 16 seconds for parameter estimation, the optimized HLS-fast variant completed the same task in approximately 0.26 seconds. This efficiency allows BNCs to be applied to much larger and more complex network structures than was previously feasible.

Conclusion and Future Work

Hierarchical Linear Smoothing represents a significant step forward for Bayesian Network Classifiers. By bridging the gap between complex Bayesian non-parametrics and efficient linear regression, it provides a practical way to handle data sparsity without sacrificing interpretability or speed.

Future research directions include extending HLS to handle continuous features directly without discretization and improving the scaling of the design matrix for features with very high cardinality. Additionally, exploring discriminative design matrices could further enhance the classification performance of HLS-based BNCs, potentially surpassing ensemble methods in a wider variety of metrics.

Summary updated

BibTeX
@misc{cooper2025efficient,
  author = {Connor Cooper and Geoffrey I. Webb and Daniel F. Schmidt},
  title = {{Efficient Parameter Estimation for Bayesian Network Classifiers using Hierarchical Linear Smoothing}},
  year = {2025},
  eprint = {2505.23320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23320},
}
Figure