用大模型直接生成贝叶斯网络结构,无需数据也能建模依赖关系。
Bayesian Network Structure Discovery Using Large Language Models
- 大模型基于变量元数据直接生成完整有向无环图
- 零数据场景下仅需一次调用,查询复杂度恒为常数
- 适合数据稀缺或领域知识驱动的建模任务
理解变量间的概率依赖关系是分析复杂系统的核心。传统结构学习方法通常需要大量观测数据,或依赖人工、易错的专家知识引入。近期研究尝试用大语言模型(LLM)进行结构学习,但多数仅将LLM作为预处理或后处理工具,核心学习过程仍依赖数据。本文提出一个统一框架,将LLM置于中心位置,支持无数据和有数据两种设置。在无数据情况下,提出PromptBN,通过大模型对变量元数据的推理,在单次调用中生成完整的有向无环图(DAG),并采用双重验证机制保证全局一致性和无环性,查询复杂度恒为常数$/mathcal{O}(1)$。当有观测数据时,引入ReActBN,结合统计证据与大模型推理,通过可配置结构评分(如贝叶斯信息准则)实现新型ReAct式推理。实验表明,该方法在低数据或无数据场景及分布外数据集上均优于现有纯数据、纯大模型及混合基线。代码已开源:https://github.com/sherryzyh/llmbn。
原文摘要 · Abstract (English)
Understanding probabilistic dependencies among variables is central to analyzing complex systems. Traditional structure learning methods often require extensive observational data or are limited by manual, error-prone incorporation of expert knowledge. 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 introduce 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 regime, we introduce \textbf{PromptBN}, which leverages LLM reasoning over variable metadata to generate a complete directed acyclic graph (DAG) in a single call. PromptBN effectively enforces global consistency and acyclicity through dual validation, achieving constant $\mathcal{O}(1)$ query complexity. When observational data are available, we introduce \textbf{ReActBN} to further refine the initial graph. ReActBN combines statistical evidence with LLM by integrating a novel ReAct-style reasoning with configurable structure scores (e.g., Bayesian Information Criterion). Experiments demonstrate that our method outperforms prior data-only, LLM-only, and hybrid baselines, particularly in low- or no-data regimes and on out-of-distribution datasets. Code is available at https://github.com/sherryzyh/llmbn.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。