Bayesian Network MPE via LLM-Compiled Semantic Maximizing Circuits

Victor H. S. S. Ragazzi, Jhonatan S. Oliveira, Cory Butz, Leonardo Bonato Felix
Proceedings of the 13th International Conference on Probabilistic Graphical Models, PMLR 343:711-724, 2026.

Abstract

Recent research has shown that Large Language Models (LLMs) are able to construct the Directed Acyclic Graph (DAG) of a Bayesian Network (BN) at an accuracy level similar to the data-driven methods. A natural question that arises is whether LLMs can perform emph{logical inference} over these assembled graphical structures without having access to associated Conditional Probability Tables (CPTs). We tackle this question by focusing on Most Probable Explanation (MPE) inference, a task that closely aligns with LLM reasoning. We introduce a novel CPT-free emph{sequential semantic inference} method which is structured as a two-phase framework. An offline emph{semantic compilation} phase constructs a reusable emph{semantic maximizing circuit} by querying the LLM over assignment contexts induced by the DAG and a variable elimination ordering. An online emph{evaluation} phase applies evidence through circuit labels and resolves MPE queries by traversal, without making calls to the LLM at runtime. An empirical study shows that MPE accuracy surpasses 80% across six BNs and is even close to the levels reported in the literature for DAG learning, thereby demonstrating the potential of LLMs to be used as logical, parameter-free inference engines.

Cite this Paper


BibTeX
@InProceedings{pmlr-v343-s-s-ragazzi26a, title = {{Bayesian} Network {MPE} via {LLM}-Compiled Semantic Maximizing Circuits}, author = {S. S. Ragazzi, Victor H. and S. Oliveira, Jhonatan and Butz, Cory and Bonato Felix, Leonardo}, booktitle = {Proceedings of the 13th International Conference on Probabilistic Graphical Models}, pages = {711--724}, year = {2026}, editor = {Camps-Valls, Gustau and Leonelli, Manuele and Varando, Gherardo}, volume = {343}, series = {Proceedings of Machine Learning Research}, month = {09--11 Sep}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v343/main/assets/s-s-ragazzi26a/s-s-ragazzi26a.pdf}, url = {https://proceedings.mlr.press/v343/s-s-ragazzi26a.html}, abstract = {Recent research has shown that Large Language Models (LLMs) are able to construct the Directed Acyclic Graph (DAG) of a Bayesian Network (BN) at an accuracy level similar to the data-driven methods. A natural question that arises is whether LLMs can perform emph{logical inference} over these assembled graphical structures without having access to associated Conditional Probability Tables (CPTs). We tackle this question by focusing on Most Probable Explanation (MPE) inference, a task that closely aligns with LLM reasoning. We introduce a novel CPT-free emph{sequential semantic inference} method which is structured as a two-phase framework. An offline emph{semantic compilation} phase constructs a reusable emph{semantic maximizing circuit} by querying the LLM over assignment contexts induced by the DAG and a variable elimination ordering. An online emph{evaluation} phase applies evidence through circuit labels and resolves MPE queries by traversal, without making calls to the LLM at runtime. An empirical study shows that MPE accuracy surpasses 80% across six BNs and is even close to the levels reported in the literature for DAG learning, thereby demonstrating the potential of LLMs to be used as logical, parameter-free inference engines.} }
Endnote
%0 Conference Paper %T Bayesian Network MPE via LLM-Compiled Semantic Maximizing Circuits %A Victor H. S. S. Ragazzi %A Jhonatan S. Oliveira %A Cory Butz %A Leonardo Bonato Felix %B Proceedings of the 13th International Conference on Probabilistic Graphical Models %C Proceedings of Machine Learning Research %D 2026 %E Gustau Camps-Valls %E Manuele Leonelli %E Gherardo Varando %F pmlr-v343-s-s-ragazzi26a %I PMLR %P 711--724 %U https://proceedings.mlr.press/v343/s-s-ragazzi26a.html %V 343 %X Recent research has shown that Large Language Models (LLMs) are able to construct the Directed Acyclic Graph (DAG) of a Bayesian Network (BN) at an accuracy level similar to the data-driven methods. A natural question that arises is whether LLMs can perform emph{logical inference} over these assembled graphical structures without having access to associated Conditional Probability Tables (CPTs). We tackle this question by focusing on Most Probable Explanation (MPE) inference, a task that closely aligns with LLM reasoning. We introduce a novel CPT-free emph{sequential semantic inference} method which is structured as a two-phase framework. An offline emph{semantic compilation} phase constructs a reusable emph{semantic maximizing circuit} by querying the LLM over assignment contexts induced by the DAG and a variable elimination ordering. An online emph{evaluation} phase applies evidence through circuit labels and resolves MPE queries by traversal, without making calls to the LLM at runtime. An empirical study shows that MPE accuracy surpasses 80% across six BNs and is even close to the levels reported in the literature for DAG learning, thereby demonstrating the potential of LLMs to be used as logical, parameter-free inference engines.
APA
S. S. Ragazzi, V.H., S. Oliveira, J., Butz, C. & Bonato Felix, L.. (2026). Bayesian Network MPE via LLM-Compiled Semantic Maximizing Circuits. Proceedings of the 13th International Conference on Probabilistic Graphical Models, in Proceedings of Machine Learning Research 343:711-724 Available from https://proceedings.mlr.press/v343/s-s-ragazzi26a.html.

Related Material