Accurate parameter estimation for Bayesian network classifiers using hierarchical Dirichlet processes

François Petitjean, Wray L. Buntine, Geoffrey I. Webb, Nayyar Abbas Zaidi

Accurate Parameter Estimation for Bayesian Network Classifiers using Hierarchical Dirichlet Processes

Introduction

Bayesian Network Classifiers (BNCs) have long been valued in machine learning for their interpretability and "out-of-core" learning capabilities—the ability to process data sequentially without requiring the entire dataset to reside in memory. However, BNCs often face a significant hurdle: the classic bias-variance tradeoff. While increasing model complexity (adding more parent nodes) can reduce bias, it simultaneously increases variance due to the exponential growth of parameters, leading to the "data sparsity" problem.

The Challenge of Data Sparsity

In a complex BNC, the number of conditional probability distributions to estimate grows rapidly. As we allow nodes to have more parents, we often find ourselves trying to estimate probabilities from very few data points at the "leaves" of the network. Traditional smoothing techniques, such as Laplace smoothing, are frequently insufficient for these high-variance scenarios.

Comparison of Bayesian Network Classifier structures: (a) Naive Bayes and (b) a more complex structure with multiple parent dependencies.

As shown in the figure above, moving from a simple Naive Bayes structure (a) to a more complex network (b) increases the number of dependencies. Without accurate parameter estimation, the complex model (b) may perform worse than the simple model (a) because its parameters are poorly estimated from sparse data.

Hierarchical Dirichlet Processes for Parameter Estimation

To address this, the authors propose using Hierarchical Dirichlet Processes (HDPs) to estimate the probability tables. The core innovation lies in treating conditional probability distributions not as independent entities, but as part of a hierarchy.

  • Hierarchical Smoothing: A specific distribution (e.g., the probability of a class given three features) "borrows strength" from its parent distribution (the probability given only two of those features). This creates a sophisticated "back-off" mechanism: if local data is scarce, the model relies more on broader, data-rich parent distributions.
  • Efficient Inference: To maintain computational efficiency, the researchers employed a collapsed Gibbs sampler. This approach uses latent variables ("pseudo-counts") to represent the fraction of data passed up the hierarchy, avoiding the memory overhead typically associated with the Chinese Restaurant Process.
  • Automatic Adaptation: The HDP-based estimates automatically adapt to local variance. In data-rich regions, the model trusts local evidence; in data-poor regions, it pulls the estimate toward the global mean.

Evaluation and Results

The researchers evaluated their approach using 68 standard UCI datasets and a massive "Splice" dataset containing 50 million training examples.

The results were compelling:

  1. Performance vs. Ensembles: On categorical data, BNCs using HDP estimation (such as TAN-HDP and SkDB-HDP) significantly outperformed Random Forests in both accuracy (0–1 Loss) and probability calibration (RMSE).
  2. Scalability: The "out-of-core" nature of BNCs proved critical for big data. While Random Forest failed to process the 50-million-sample Splice dataset due to memory constraints (138GB RAM), the HDP-BNC (SkDB5-HDP) ran successfully. It achieved a 0.318% error rate, nearly matching the highly optimized XGBoost (0.314%) while providing superior probability calibration.
  3. Efficiency: Once trained, BNCs are significantly faster at classification than ensemble methods like Random Forest because they rely on simple table look-ups.

Conclusion

This research demonstrates that the perceived weakness of BNCs in complex tasks was often a result of poor parameter calibration rather than structural limitations. By applying HDPs for smarter smoothing, BNCs can outperform state-of-the-art ensembles on categorical data while remaining uniquely suited for massive datasets that exceed system memory. Future work may extend this framework to handle "long-tail" data via Pitman–Yor processes and apply it to general Bayesian networks beyond classification.

Summary updated

BibTeX
@article{petitjean2018accurate,
  author = {François Petitjean and Wray L. Buntine and Geoffrey I. Webb and Nayyar Abbas Zaidi},
  title = {{Accurate parameter estimation for Bayesian network classifiers using hierarchical Dirichlet processes}},
  journal = {Machine Learning},
  year = {2018},
  doi = {10.1007/s10994-018-5718-0},
}
Figure