[edit]
BNqMark: Bayesian-Network Inference in Large Language Models
Proceedings of the 13th International Conference on Probabilistic Graphical Models, PMLR 343:725-757, 2026.
Abstract
We present the first systematic evaluation of exact Bayesian-network inference in frontier reasoning large language models (LLMs). We introduce BNqMark, a benchmark-generation framework for exact inference in discrete Bayesian networks, and evaluate BNqMark-20, a benchmark instance comprising 78 procedurally generated binary networks and 434 conditional probability queries with exact ground truth. Across 9 frontier reasoning LLMs and 2 evaluation protocols, we find that current models can solve many exact inference queries on small and medium Bayesian networks, especially by externalizing inference as code. Several models correctly answered queries whose exact solution would require more than 13,000 arithmetic operations under variable elimination, rising to 68,000 in the code-generation protocol. Model capability degrades as inference complexity increases: graph and query complexity are both useful predictors of success after controlling for prompt length, network size, and model. These results position Bayesian networks as a controlled testbed for studying probabilistic reasoning in LLMs and motivate future work on richer and more challenging probabilistic inference settings.