Abstract
In the Bayesian approach to structure learning of graphical models, the equivalent sample size (ESS) in the Dirichlet prior over the model parameters was recently shown to have an important effect on the maximum-a-posteriori estimate of the Bayesian network structure. In our first contribution, we theoretically analyze the case of large ESS-values, which complements previous work: among other results, we find that the presence of an edge in a Bayesian network is favoured over its absence even if both the Dirichlet prior and the data imply independence, as long as the conditional empirical distribution is notably different from uniform. In our second contribution, we focus on realistic ESS-values, and provide an analytical approximation to the "optimal" ESS-value in a predictive sense (its accuracy is also validated experimentally): this approximation provides an understanding as to which properties of the data have the main effect determining the "optimal" ESS-value.
Introduction
Learning the structure of a Bayesian Network (BN) from data is a fundamental task in probabilistic graphical modeling. A common approach utilizes the Bayesian Dirichlet likelihood equivalent uniform (BDeu) score to evaluate candidate structures. However, the BDeu score is highly sensitive to a hyperparameter known as the Equivalent Sample Size (ESS), denoted by $\alpha$. The ESS represents the strength of the prior belief, effectively acting as a set of "virtual" observations. Recent research has highlighted a critical issue: as $\alpha$ increases, the learned graph tends to become increasingly dense, transitioning from an empty graph to a complete clique, often regardless of the underlying data patterns. This paper investigates the theoretical reasons for this behavior and proposes a practical solution for selecting an optimal $\alpha$.
Theoretical Analysis: The Skewness Trap
The sensitivity of the BDeu score at large ESS values can be understood through a "skewness detector" effect. When $\alpha$ is large, the prior (typically a uniform Dirichlet distribution) exerts significant influence. If the empirical data distribution is non-uniform (skewed), the Bayesian framework perceives a "disagreement" between the prior and the data.
By performing a leading-order Taylor expansion of the Bayes factor for large but finite ESS values, we introduce a "uniformity-measure" ($U$). The analysis reveals that an edge is favored whenever the data is notably non-uniform, even if the variables are statistically independent. In these cases, the model adds an edge to "explain" the skewness of the marginal distributions, which the uniform prior cannot accommodate. This explains the monotonic increase in graph density observed in previous studies as $\alpha$ grows.
Analytical Approximation of Optimal ESS
To move beyond the "skewness trap" and avoid computationally expensive brute-force searches for the best ESS, we derive an analytical approximation, $\alpha^*$. This value is designed to be "optimal" in a predictive sense, minimizing the expected test error.
The derivation treats $\alpha$ as a latent variable. By equating a complexity-penalized training error (akin to the Akaike Information Criterion) with a Taylor expansion of regularized parameter estimates, we arrive at a formula for $\alpha^*$. A key finding is that $\alpha^*$ is largely independent of the total sample size ($N$) and the number of nodes ($n$). Instead, it is driven by the relationship between the model's complexity and the entropy of the data. Specifically, the denominator of the $\alpha^*$ formula represents the difference between the entropy of the prior distribution and the empirical distribution; higher data skewness or stronger dependencies lead to a smaller, more conservative optimal ESS.
Experimental Validation
The proposed analytical approximation was validated using 20 datasets from the UCI Machine Learning Repository. These datasets span a wide range of sizes (90 to 58,000 samples) and dimensions (5 to 15 variables).
As shown in the table above, the analytical $\alpha^*$ matches the experimental "gold standard" $\alpha^M$ (found via exhaustive search) with high precision. For instance, in the Adult dataset, the experimental optimal was 50, while the formula predicted 49. In the Iris dataset, both values were exactly 2. Furthermore, the iterative algorithm used to calculate $\alpha^*$ is highly efficient, typically converging in only 1 to 4 rounds.
Conclusion
This work clarifies the role of the ESS in Bayesian Network structure learning. By identifying the "skewness trap" at high ESS values and providing a robust, computationally efficient analytical formula for $\alpha^*$, we provide researchers with the tools to select principled prior strengths. While this study focuses on discrete variables and Dirichlet priors, the insights regarding the interplay between prior uniformity and data entropy offer a foundation for future extensions to continuous domains and more complex prior families.
Summary updated