On the Relative Expressiveness of Bayesian and Neural Networks

Arthur Choi, Ruocheng Wang, Adnan Darwiche

TL;DR

This paper bridges the gap between model-based and function-based AI by introducing Testing Bayesian Networks (TBNs). By adding a simple conditional "testing operator" to standard Bayesian networks, the authors elevate their queries from restricted multi-linear forms to universal approximators. This allows TBNs to match the expressiveness of neural networks while retaining the unique ability to integrate structured domain knowledge.

What Problem Does This Paper Address?

Artificial intelligence has long experienced a tension between two paradigms:

  1. Model-based approaches (e.g., Bayesian networks): Excel at capturing uncertainty, causal relationships, and hard logical constraints, but are computationally restricted in the types of functions they can represent.
  2. Function-based approaches (e.g., deep neural networks): Act as "universal approximators" capable of fitting highly complex functions from data, but operate as data-hungry black boxes that struggle to incorporate prior domain knowledge.

Standard Bayesian network (BN) queries fundamentally lack expressiveness because they can only compute multi-linear functions or quotients of them. This explains why discriminatively trained BNs are routinely outperformed by neural networks on complex data-fitting tasks. The authors address this dilemma by asking: How can we give Bayesian networks the universal approximation power of neural networks without losing their capacity for structured reasoning?

Methods

The authors introduce Testing Bayesian Networks (TBNs) and their circuit counterparts, Testing Arithmetic Circuits (TACs).

  • Dynamic CPT Selection: In a standard BN, Conditional Probability Tables (CPTs) are static. In a TBN, certain nodes are designated as "testing nodes." Their CPTs are selected dynamically at runtime based on whether the posterior probability of their parents given ancestral evidence satisfies a threshold condition (e.g., $P^*(u) \ge T$).
  • Sigmoid Relaxation for Training: To make TBNs trainable via gradient descent, the authors generalize the hard threshold test into a continuous sigmoid selection function. This allows the network to choose a weighted average of CPTs smoothly.
  • Symbolic Factor Elimination: The authors provide a two-phase compilation algorithm to transform a TBN query into a TAC. The first phase ("flattening") resolves the conditional testing nodes based on ancestral evidence, turning them into regular circuit nodes. The second phase performs standard probabilistic inference.
  • Discriminative Learning: The resulting TAC structures are implemented and trained in TensorFlow, optimizing a mean squared error (MSE) loss function to fit target data.

Datasets

The paper evaluates the proposed method using synthetically generated datasets designed to test function approximation capabilities:

  • The authors defined five continuous target functions ($f_1$ through $f_5$) and two additional complex periodic/exponential functions ($g_1, g_2$) over the input space $[0, 1]^2$.
  • Training and evaluation data examples were created by dissecting the input space into a $32 \times 32$ grid and recording the exact function outputs as labels.

No standard real-world benchmarks were utilized in this foundational theoretical paper.

Key Insights and Ideas

  • The Power of the Threshold: Just as a simple threshold test ($x > 0$) transforms a basic linear function into a universally approximating Rectified Linear Unit (ReLU) in neural networks, adding a threshold test to multi-linear arithmetic circuits unlocks universal approximation for graphical models.
  • Piecewise Multi-linear Functions: While ReLU neural networks represent piecewise linear functions, TBN queries represent piecewise multi-linear functions. This provides a distinct functional form that can fit complex topologies differently.
  • Architecture from Logic, Not Handcrafting: Instead of manually guessing a neural network architecture, a TAC's structure is directly compiled from the TBN. This guarantees that the resulting function respects all the independence assumptions and logical constraints (like 0/1 parameters) encoded in the original Bayesian network.

Key Results

  • Universal Approximation Theorem: The authors mathematically prove that TBN queries can approximate any continuous monotonic function to an arbitrary error $\epsilon$ using $O(\lceil 1/\epsilon \rceil)$ nodes, and extend this proof to multivariate, non-monotonic functions.
  • Qualitative Superiority over Standard BNs: When trained on non-linear surfaces (such as sinusoids), the learned TAC functions successfully mapped the complex curves. In contrast, standard Arithmetic Circuits (ACs) failed completely, effectively flattening the target shapes into simple planes due to their multi-linear limitations.
Target Function Type Standard AC Approximation Learned TAC Approximation
Non-linear / Periodic ($f_1, f_2, f_3, g_1, g_2$) Poor (Fits a flat plane) Excellent (Captures curves/peaks)
Purely Multi-linear ($f_5$) Excellent Excellent
  • Granularity Scaling: Experiments with varying numbers of testing nodes (4, 8, and 16) confirmed that increasing the number of testing units systematically increases the expressiveness and fidelity of the approximation.

Limitations and Future Work

  • Ancestral Evidence Constraint: To keep semantics clean, the current TBN framework dictates that CPT selection can only depend on ancestral evidence. If evidence is observed downstream of a testing node, it does not influence the CPT selection.
  • Selection Ambiguities: Allowing CPT selection to depend on arbitrary evidence introduces potential circular dependencies (where the selection of one CPT impacts the selection of another). The authors note that resolving these ambiguities requires a more thorough future treatment.
  • Dimensional Scaling: The constructive proof for multivariate functions scales exponentially with the number of input variables $n$, a limitation shared with shallow neural network architectures.

Summary updated

BibTeX
@inproceedings{choi2018relative,
  author = {Arthur Choi and Ruocheng Wang and Adnan Darwiche},
  title = {{On the Relative Expressiveness of Bayesian and Neural Networks}},
  booktitle = {PGM},
  year = {2018},
}
Figure