arXiv:2610.36110cs.LGOct 2026

Manuscript Offprint

arXiv:2610.36110

Dirichlet Process Mixtures within Semiparametric Bayesian Networks: A Novel Conditional Density Estimation Approach

Victor Alejandre, Pedro Larrañaga, Concha Bielza

A PREPRINT

Victor Alejandre

Computational Intelligence Group

Departamento de Inteligencia Artificial

Universidad Politécnica de Madrid

Campus de Montegancedo, Boadilla del Monte

28660 Madrid, Spain

victor.alejandre@upm.es

Pedro Larrañaga

Computational Intelligence Group

Departamento de Inteligencia Artificial

Universidad Politécnica de Madrid

Campus de Montegancedo, Boadilla del Monte

28660 Madrid, Spain

pedro.larranaga@fi.upm.es

Concha Bielza

Computational Intelligence Group

Departamento de Inteligencia Artificial

Universidad Politécnica de Madrid

Campus de Montegancedo, Boadilla del Monte

28660 Madrid, Spain

mcbielza@fi.upm.es

October 28, 2026

Abstract

Semiparametric Bayesian networks (SPBNs) are flexible probabilistic graphical models for representing joint distributions of continuous variables through lower-dimensional conditional probability distributions (CPDs). Existing SPBN models use kernel density estimators (KDEs) for non-parametric CPD modeling, but their one-component-per-observation mixture representation can lead to increased inference costs and density estimation errors, which can be limiting. In this work, we define a new CPD modeling approach for non-parametric components based on Bayesian non-parametric Dirichlet Process Mixtures (DPMs) within SPBNs. DPMs provide a data-adaptive clustering of observations, yielding a more compact representation while retaining the flexibility of non-parametric density estimation, unlike KDE. This results in lower inference costs while improving density estimation performance. We implement the proposed DPM-based SPBN (DPM-SPBN) by extending the open-source PyBNesian package and evaluate it on synthetic and real-world data. For a given network structure, DPM-based CPDs significantly outperform state-of-the-art Bayesian network models for continuous variables in density estimation, achieving lower absolute log-likelihood errors on synthetic data. We further investigate the impact of the proposed CPD modeling on structure learning methods relying on CPD-based scores. DPM-based SPBNs achieve lower structure learning and density estimation errors than KDE-based SPBNs. Experiments on real-world data corroborate these findings, identifying DPM-based CPD modeling as the most effective alternative among the evaluated non-parametric approaches for continuous variables.

Keywords Semiparametric Bayesian networks · Dirichlet process mixtures · Variational Bayes inference

A PREPRINT

1 Introduction

A Bayesian network (BN) [1] is a probabilistic graphical model designed to represent and learn the joint probability distribution (JPD) of a set of variables. The JPD provides a general probabilistic representation of the data-generating process, from which marginal and conditional distributions, as well as other quantities of interest, can be derived. Consequently, many statistical and machine learning problems, including exploratory data analysis, classification, regression, and probabilistic inference, can be formulated in terms of the JPD or properties derived from it. However, solving a predictive task does not necessarily require explicitly modeling the underlying probability distribution. Instead, many machine learning methods are designed to learn a predictive function or a specific functional of the underlying distribution. For example, under squared-error loss, the population-optimal regression function is the conditional expectation E[Y∣X=x]\mathbb{E}[Y \mid X = x], which can be estimated without explicitly modeling the full conditional distribution or the JPD. Explicit probabilistic models, in contrast, characterize the underlying probability distribution and its associated uncertainty, from which predictive quantities can be derived, while also enabling a broader range of tasks, such as probabilistic inference and uncertainty quantification, that support informed decision-making.

Despite these advantages, probabilistic modeling introduces several practical challenges. First, tractable models often require strong assumptions about the underlying distribution, such as assuming a Gaussian distribution when the true data-generating process deviates from this family, potentially introducing model bias. Second, the number of parameters required to represent a JPD grows rapidly with the number of variables. For example, a categorical distribution over two binary variables requires three parameters, whereas representing the JPD of ten binary variables requires more than a thousand parameters. A similar issue arises when representing the covariance matrix of a multivariate Gaussian distribution. This growth increases both data requirements and computational complexity, making direct estimation increasingly impractical as the dimensionality increases.

BNs address these limitations by exploiting conditional independence relationships between variables. A BN decomposes the JPD into a set of lower-dimensional conditional probability distributions (CPDs), transforming the estimation of a JPD into a collection of more manageable local estimation problems. This factorization can substantially reduce the number of parameters that need to be estimated, thereby reducing computational costs and data requirements. Formally, a BN is defined by a directed acyclic graph (DAG), which encodes the conditional (in)dependence relationships among variables, together with a set of CPDs that characterize the corresponding local probabilistic relationships.

BNs have become a well-established framework for probabilistic modeling, with extensive research that addresses both their theoretical development and their application in diverse fields, including engineering, medicine and biology [2, 3, 4, 5]. The framework has been extended to accommodate discrete, continuous, and hybrid domains while preserving the underlying principles of probability theory. Accordingly, a wide range of parametric and non-parametric approaches have been developed for modeling CPDs. In parallel, substantial research has focused on learning the DAG structure from data, with the complexity and methodology of structure learning often depending on the variable types and the CPD models employed. Notable parametric extensions include Gaussian BNs [6] and conditional linear Gaussian BNs [7], which provide established formulations for continuous and hybrid domains, respectively.

For continuous variables, parametric CPD models can achieve faster convergence rates when the assumed distributional family adequately represents the underlying data generating process. However, misspecification of the assumed distribution can lead to substantial estimation errors. To address this limitation, several non-parametric approaches have been proposed, including Gaussian processes and kernel density estimators (KDEs). These methods avoid imposing a specific parametric distributional form and can therefore mitigate the bias associated with model misspecification, although this flexibility typically comes at the cost of slower convergence rates. In particular, KDEs achieve a mean integrated squared error (MISE) convergence rate of O(N−4/(d+4))O(N^{-4/(d+4)}), where N denotes the sample size and d the dimensionality of the data, compared to the usual parametric rate of O(N−1)O(N^{-1}) (see Section 2.8 of [8]).

Among the BN models developed for continuous and hybrid domains, semiparametric Bayesian networks (SPBNs) provide a flexible framework for CPD modeling [9, 10]. SPBNs combine parametric and non-parametric approaches, allowing the CPD representation to be selected according to the characteristics of the data. In particular, SPBNs can employ linear Gaussian CPDs when the data are adequately described by the corresponding parametric assumptions, while KDEs provide a more flexible alternative when such assumptions are not appropriate. Thus, SPBNs combine the computational efficiency of parametric estimation.

A PREPRINT

with the flexibility of non-parametric estimation, providing an effective framework for modeling continuous and hybrid domains.

KDEs present several practical limitations when used for CPD modeling. A well-known challenge is the bias–variance trade-off, which has motivated extensive research on bandwidth selection methods to improve estimation accuracy [11]. In addition, KDE-based models can become computationally demanding because the estimator typically contains one kernel component per observation, making density evaluation increasingly expensive as the sample size grows. Another important limitation is the curse of dimensionality, which is reflected in the convergence rate of the estimator and becomes increasingly pronounced as dimensionality d increases. Although factorization provided by BNs reduces the dimensionality of individual CPD estimation problems, these limitations can still affect the accuracy and computational efficiency of CPD estimation in practice.

In this work, we propose a novel approach for nonparametric modeling of CPDs in SPBNs based on Dirichlet process mixture models (DPMs) [12]. By leveraging the clustering properties of DPMs, the proposed approach groups similar observations into a reduced number of mixture components, reducing the computational cost of density evaluation while retaining the flexibility of non-parametric modeling. As a Bayesian non-parametric mixture model, it provides a compact representation of CPDs that becomes particularly advantageous as the dimensionality d of the data increases, where KDE-based approaches become increasingly challenging. We integrate this formulation into the SPBNs framework for the non-parametric nodes CPD estimation to obtain DPM-SPBNs and conduct extensive experiments on synthetic and real-world data. We compare DPM-SPBNs with KDE-based SPBNs and state-of-the-art BN models for continuous variables in terms of density estimation and computational requirements. We further investigate the effect of the proposed CPD formulation on structure learning by combining DPM-based CPDs with hill-climbing (HC) and comparing the resulting DPM-SPBNs with their KDE-based counterparts. Overall, the results demonstrate improved density estimation, substantially lower inference costs, and moderate training times, establishing DPM-SPBNs as a leading alternative for non-parametric modeling of continuous variables in BNs.

The remainder of the paper is organized as follows. Section 2 reviews the theoretical background on DPMs and BNs. Section 3 presents and develops the proposed DPM-SPBN framework. Section 4 describes the experimental evaluation, examining the impact of DPM-based CPD modeling on learning of SPBN parameters and structures. Finally, Section 5 concludes the paper and outlines the directions for future research.

References (51)