Bayesian Network Structure Discovery Using Large Language Models

Yinghuan Zhang, Yufei Zhang, Parisa Kordjamshidi, Zijun Cui
11/1/2025
cs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Understanding probabilistic relationships among variables is crucial for analyzing complex systems. Traditional structure learning methods often require extensive observational data and incur high computational costs. Recent studies have explored using large language models (LLMs) for structure learning, but most treat LLMs as auxiliary tools for pre-processing or post-processing, leaving the core learning process data-driven. In this work, we propose a unified framework for Bayesian network structure discovery that places LLMs at the center, supporting both data-free and data-aware settings. In the data-free case, we introduce \textbf{PromptBN} to query LLMs with metadata and efficiently uncover valid probabilistic relationships. When observational data are available, we introduce \textbf{ReActBN}, which integrates the ReAct reasoning paradigm with structure scores such as the Bayesian Information Criterion (BIC) for iterative refinement. Unlike prior methods that offload refinement to external algorithms, our framework maintains the LLM actively in the loop throughout the discovery process. Experiments demonstrate that our method significantly outperforms both existing LLM-based approaches and traditional data-driven algorithms, particularly in the low- or no-data scenario. Code is publicly available at {\texttt{\textcolor{magenta}{https://github.com/sherryzyh/prompt2bn}}}.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2025bayesian,
  title  = {Bayesian Network Structure Discovery Using Large Language Models},
  author = {Yinghuan Zhang and Yufei Zhang and Parisa Kordjamshidi and Zijun Cui},
  year   = {2025},
  eprint = {2511.00574},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.00574v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.00574.svg)](https://codeofpaper.com/paper/2511.00574)

Discussion