Papers
Topics
Authors
Recent
Search
2000 character limit reached

PromptBN: Data-Free Bayesian Network Discovery

Updated 5 July 2026
  • PromptBN is a data-free method for constructing Bayesian networks using variable metadata such as names, descriptions, and distributions.
  • It leverages large language models to synthesize complete directed acyclic graphs in a single query, validated through both node-centric and edge-centric checks.
  • The approach serves both as a standalone zero-sample estimator and as an initializer for further data-aware refinement, excelling in semantically transparent network settings.

Searching arXiv for the specified paper and closely related work on LLM-based Bayesian network structure discovery. PromptBN is a data-free method for Bayesian network structure discovery that places a LLM at the center of graph construction. Introduced as Phase 1 of the Prompt2BN framework, it infers a directed acyclic graph directly from variable metadata rather than from observational samples, using variable names, descriptions, and distributions as its input representation. The method is designed for settings in which traditional constraint-based or score-based structure learning is weakened by limited data, and it treats the LLM not as a peripheral pre-processing or post-processing tool but as the primary agent of structure discovery (Zhang et al., 1 Nov 2025).

1. Concept and problem setting

Bayesian network structure discovery seeks a directed acyclic graph G=(V,E)\mathcal{G} = (\mathcal{V}, \mathcal{E}) over variables V\mathcal{V} that encodes probabilistic dependencies. The paper states the standard score-based objective as

G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}

where G\mathbb{G} is the candidate graph space and D\mathcal{D} is observational data (Zhang et al., 1 Nov 2025).

PromptBN addresses the special case in which no observational samples are available. In this setting, “data-free” means that the method does not use a dataset D\mathcal{D}; instead, it relies on semantic metadata and the LLM’s pretrained knowledge. The method therefore assumes that variable metadata are sufficiently informative for the model to infer plausible probabilistic relationships (Zhang et al., 1 Nov 2025).

The underlying motivation is twofold. First, traditional methods “typically require large amounts of observational data” and their performance “deteriorates significantly with limited samples.” Second, manual incorporation of prior knowledge is labor-intensive and error-prone. PromptBN is proposed as a way to exploit semantic information already present in variable schemas, especially in low-data or no-data regimes (Zhang et al., 1 Nov 2025).

2. Position within the Prompt2BN framework

PromptBN is the first phase of the two-phase Prompt2BN framework. The full framework consists of:

  • PromptBN: a data-free method that generates an initial Bayesian network from metadata alone.
  • ReActBN: a data-aware refinement method that keeps the LLM in the loop while using structure scores such as BIC for iterative improvement (Zhang et al., 1 Nov 2025).

This division is central to the paper’s claim that prior LLM-based work often uses LLMs only for auxiliary tasks, whereas Prompt2BN keeps the LLM active in the core discovery process. PromptBN is therefore both a standalone method for no-data settings and an initializer for subsequent data-aware refinement (Zhang et al., 1 Nov 2025).

The paper also evaluates a hybrid baseline, PromptBN+HC, showing that a PromptBN-generated graph can be used as initialization for Hill Climbing. This suggests that PromptBN functions not only as a zero-shot graph constructor but also as a semantic prior over graph structure (Zhang et al., 1 Nov 2025).

A plausible implication is that PromptBN should be understood less as a replacement for all statistical structure learning and more as a metadata-driven structural prior whose utility depends on the semantic recoverability of the target network.

3. Metadata representation and prompting protocol

PromptBN operates on a metadata table I=metadata(V)\mathcal{I} = metadata(\mathcal{V}). For each variable, the metadata include exactly three fields:

  1. variable name
  2. variable description
  3. variable distribution (Zhang et al., 1 Nov 2025)

The paper gives an Asia-network example whose metadata table contains columns node, var_name, var_description, and var_distribution, with variables such as asia, tub, smoke, lung, and dysp (Zhang et al., 1 Nov 2025).

The prompting strategy is described as meta-prompting. The meta-prompt P\mathcal{P} specifies:

  1. Task definition: infer a Bayesian network from metadata I\mathcal{I}.
  2. Variable schema: include each variable’s name, description, and distribution.
  3. Output format: require both a node-centric representation and an edge-centric representation.
  4. Reasoning protocol: instruct the model to reason over variable metadata.
  5. Response constraints: require strict formatting, completeness, and acyclicity (Zhang et al., 1 Nov 2025).

The method-specific formalization is

G=LLM-Query(metadata(V);knowledge(M)),\mathcal{G} = \text{LLM-Query}(metadata(\mathcal{V}); knowledge(\mathcal{M})),

where V\mathcal{V}0 is the chosen LLM (Zhang et al., 1 Nov 2025).

PromptBN does not use pairwise querying, BFS-style expansion, iterative parent search, or score-driven combinatorial optimization. Instead, it frames structure discovery as a single-query inference task in which the model outputs a complete candidate graph in one response (Zhang et al., 1 Nov 2025).

4. Graph generation, output schema, and validation

The output of PromptBN is required in two forms:

  • a node-centric representation, listing the parents of each node;
  • an edge-centric representation, listing directed edges explicitly as from-to pairs (Zhang et al., 1 Nov 2025).

This dual representation is not merely for readability. It supports an explicit validation pipeline with two checks.

Structural consistency validation

The first check verifies that the node-centric and edge-centric outputs encode the same graph. If a node V\mathcal{V}1 lists V\mathcal{V}2 as a parent, then the edge list must contain V\mathcal{V}3, and conversely (Zhang et al., 1 Nov 2025).

DAG constraint validation

The second check verifies that the edge-centric graph is acyclic. The paper describes this operationally as DAG Constraint Validation (Zhang et al., 1 Nov 2025).

Regeneration loop

If either validation fails, the model is prompted again. The pseudocode repeats querying until:

The acceptance condition is thus effectively

V\mathcal{V}4

This regeneration loop does not make PromptBN an iterative search method in the usual structure-learning sense. The graph-construction logic remains single-shot; the repeated calls are a validity-enforcement mechanism rather than a refinement trajectory over neighboring graphs (Zhang et al., 1 Nov 2025).

5. Algorithmic procedure

The paper’s PromptBN pseudocode can be summarized as the following operational sequence (Zhang et al., 1 Nov 2025):

  1. Prepare metadata Build V\mathcal{V}5, with each variable’s name, description, and distribution.
  2. Construct the meta-prompt The prompt instructs the model to infer a Bayesian network from metadata, reason over semantic relationships, return both node-centric and edge-centric outputs, and satisfy completeness and acyclicity constraints.
  3. Query the LLM Submit V\mathcal{V}6 and V\mathcal{V}7 to model V\mathcal{V}8.
  4. Parse the response Extract V\mathcal{V}9 and G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}0.
  5. Validate structural consistency Check that the two graph representations are equivalent.
  6. Validate acyclicity Check that G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}1 is a DAG.
  7. Retry if necessary Regenerate until a valid graph is obtained or the retry limit is exceeded.
  8. Return the final graph Output G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}2 if validation succeeds.

The paper characterizes PromptBN as having G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}3 query complexity, in contrast to LLM baselines that require G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}4, G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}5, or G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}6 query patterns (Zhang et al., 1 Nov 2025). This claim refers to the number of LLM interactions required for a graph, not to overall symbolic post-processing cost.

6. Empirical performance and benchmark behavior

The paper evaluates PromptBN on 10 Bayesian network datasets, including standard bnlearn benchmarks and newer BnRep datasets. Reported graph sizes include:

  • Asia: 8 nodes, 8 edges
  • Cancer: 5 nodes, 4 edges
  • Earthquake: 5 nodes, 4 edges
  • Child: 20 nodes, 25 edges
  • Insurance: 27 nodes, 52 edges
  • Alarm: 37 nodes, 46 edges
  • Hailfinder: 56 nodes, 66 edges
  • blockchain: 12 nodes, 13 edges
  • covid: 15 nodes, 34 edges
  • disputed3: 27 nodes, 34 edges (Zhang et al., 1 Nov 2025)

Evaluation uses SHD and NHD, with smaller values better. The NHD formula is given as

G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}7

where G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}8 is the ground-truth edge indicator and G=argmaxGGScore(G,D) s.t. GDAG,\begin{aligned} \mathcal{G}^* &= \arg\max_{\mathcal{G} \in \mathbb{G}} \text{Score}(\mathcal{G}, \mathcal{D}) \ \text{s.t. } \mathcal{G} &\in \text{DAG}, \end{aligned}9 is the predicted edge indicator (Zhang et al., 1 Nov 2025).

On standard bnlearn datasets, PromptBN in the 0-sample condition achieves the following reported results:

Dataset SHD NHD
Asia 0.0 0.0
Cancer 0.6 24
Child 21.6 44.5
Insurance 35.6 43.9
Alarm 41.8 30.5
Hailfinder 76.8 185

On newer datasets, the paper reports:

Dataset SHD NHD
blockchain 15.2 100
covid 45.0 225
disputed3 15.6 18

The paper emphasizes that PromptBN achieves perfect recovery on Asia and outperforms reported LLM-only alternatives on 4 of 5 compared datasets. It also highlights the Insurance result, where PromptBN obtains SHD G\mathbb{G}0 versus 52 for Scalability, and the disputed3 result, where PromptBN’s NHD G\mathbb{G}1 is better than PC-Stable G\mathbb{G}2 and HC G\mathbb{G}3, despite PromptBN using no data while those baselines use 100 samples (Zhang et al., 1 Nov 2025).

The observed performance profile is uneven but interpretable. PromptBN is strongest on small, semantically transparent networks, especially Asia and Cancer, and remains competitive on some medium graphs such as Insurance. It degrades on larger and more complex networks, especially Hailfinder and covid (Zhang et al., 1 Nov 2025).

This suggests that PromptBN’s error characteristics are governed less by graph size alone than by the extent to which the benchmark structure is semantically recoverable from names, descriptions, and distributions.

7. Assumptions, strengths, and limitations

PromptBN depends on several strong assumptions.

Semantically informative metadata

The method requires that variable names and descriptions carry enough domain meaning for the LLM to infer plausible dependencies. The paper explicitly notes that PromptBN could not be applied to the nao-dk-med dataset used by chatPC because that dataset lacks semantic meaning and distributional properties (Zhang et al., 1 Nov 2025).

Usefulness of distribution annotations

Each variable includes distribution information in the prompt. The paper presents this as part of the schema, though it does not isolate how much these annotations contribute relative to names and descriptions (Zhang et al., 1 Nov 2025).

Alignment between pretrained knowledge and target structure

PromptBN assumes that the LLM’s internal world knowledge corresponds sufficiently well to the target network’s dependency structure. This is plausible for medical and environmental benchmarks but need not hold for networks containing domain-specific modeling choices or dependencies that are not semantically evident (Zhang et al., 1 Nov 2025).

Within those assumptions, PromptBN has several clear strengths:

  • Data-free operation: it can infer useful graph structure with zero observational samples.
  • Low query complexity: the method is described as G\mathbb{G}4 in LLM queries.
  • Strong small-graph performance: it achieves exact or near-exact recovery on small benchmarks such as Asia and Cancer.
  • Useful initialization: PromptBN+HC outperforms HC alone in the paper’s low-data experiments, and ReActBN directly refines PromptBN outputs (Zhang et al., 1 Nov 2025).

Its limitations are equally explicit:

  • Dependence on metadata quality
  • Formatting and parsing fragility, including UnP outputs for some models
  • Weaker performance on larger or less semantically recoverable graphs
  • Validity without correctness: the consistency and acyclicity checks ensure a valid DAG, not a correct one
  • Model sensitivity: performance depends on both reasoning quality and output-format reliability (Zhang et al., 1 Nov 2025)

The paper’s model ablation shows that stronger general-purpose reasoning models do not always perform better for PromptBN. It reports variation across o3-pro, o3, o4-mini, gpt-4.1, gpt-4o, Deepseek-r1, Deepseek-v3, gemini-2.5-pro, and gemini-2.0-flash, with some models failing parsing constraints on some datasets (Zhang et al., 1 Nov 2025).

8. Relationship to broader LLM-based structure discovery

PromptBN is distinguished in the paper from several prior LLM-based approaches:

  • PairwisePrompt: queries ordered variable pairs
  • BFSPrompt: expands neighborhood information across nodes
  • chatPC: substitutes LLM calls for CI tests inside a PC-like pipeline
  • Scalability: aggregates multiple LLM experts (Zhang et al., 1 Nov 2025)

The specific novelty claimed for PromptBN is that it treats the LLM as the primary graph constructor, uses a single-step prompt to construct a complete Bayesian network, and embeds this within a validation-driven workflow that enforces structured output and acyclicity (Zhang et al., 1 Nov 2025).

This distinguishes PromptBN from pairwise edge elicitation or LLM-assisted score-based methods. The graph is not assembled from multiple local judgments or refined by an external search engine during the PromptBN phase; it is synthesized globally in one response and then accepted or regenerated based on structural validity.

A plausible implication is that PromptBN shifts the locus of difficulty from combinatorial graph search to prompt design, metadata quality, and model reliability. In conventional BN discovery, the main challenge is navigating G\mathbb{G}5 under statistical constraints; in PromptBN, the challenge is whether semantic priors encoded in the LLM are rich and precise enough to reconstruct the graph directly.

9. Representative output semantics

The appendix’s Asia example illustrates the intended output style. For the node dysp, the sample response includes:

The edge list then includes:

  • bronc -> dysp, justified by “Bronchitis can cause dyspnoea.”
  • either -> dysp, justified by “Either tuberculosis or lung cancer can cause dyspnoea.” (Zhang et al., 1 Nov 2025)

These justifications are not essential to the formal PromptBN algorithm, whose core output is graph structure, but they illustrate the semantics-first character of the method. The LLM is not merely proposing adjacency; it is articulating dependency structure in domain-language terms.

This suggests that PromptBN occupies an intermediate position between symbolic expert elicitation and automated structure learning. It does not estimate CPTs, and it does not optimize a score over data, but it does transform variable semantics into a fully specified parent-set graph.

10. Significance

PromptBN is best understood as a metadata-conditioned, zero-shot estimator of Bayesian network structure whose principal innovation lies in recasting structure discovery as LLM-native graph synthesis. Its core contributions are practical and procedural rather than heavily algebraic: direct graph generation from semantic metadata, dual-format output constraints, automatic consistency and acyclicity validation, and integration into a broader LLM-centered discovery-and-refinement pipeline (Zhang et al., 1 Nov 2025).

The method’s empirical profile indicates that semantic recoverability is its decisive factor. Where variable names, descriptions, and distributions strongly imply real-world dependency relations, PromptBN can achieve exact or near-exact recovery without any observational samples. Where the target graph is larger, less semantically transparent, or more dependent on domain-specific modeling choices, performance declines markedly (Zhang et al., 1 Nov 2025).

Accordingly, PromptBN is most naturally situated in scenarios such as early-stage model construction, prior elicitation, low-sample domains, or metadata-rich applications in which observational data are absent or insufficient. It does not remove the need for data-aware refinement, but it substantially changes the starting point: instead of beginning from an empty or random graph, one can begin from a semantically grounded DAG inferred directly from variable metadata (Zhang et al., 1 Nov 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PromptBN.