[论文解读] AI-for-Science Low-code Platform with Bayesian Adversarial Multi-Agent Framework
该论文提出一个贝叶斯对抗型多主体框架(任务管理者、解题生成者、评估者),实现为一个低代码平台,通过共同演化代码、测试和提示来提升面向科学的AI代码生成在各种大型语言模型中的鲁棒性。
Large Language Models (LLMs) demonstrate potentials for automating scientific code generation but face challenges in reliability, error propagation in multi-agent workflows, and evaluation in domains with ill-defined success metrics. We present a Bayesian adversarial multi-agent framework specifically designed for AI for Science (AI4S) tasks in the form of a Low-code Platform (LCP). Three LLM-based agents are coordinated under the Bayesian framework: a Task Manager that structures user inputs into actionable plans and adaptive test cases, a Code Generator that produces candidate solutions, and an Evaluator providing comprehensive feedback. The framework employs an adversarial loop where the Task Manager iteratively refines test cases to challenge the Code Generator, while prompt distributions are dynamically updated using Bayesian principles by integrating code quality metrics: functional correctness, structural alignment, and static analysis. This co-optimization of tests and code reduces dependence on LLM reliability and addresses evaluation uncertainty inherent to scientific tasks. LCP also streamlines human-AI collaboration by translating non-expert prompts into domain-specific requirements, bypassing the need for manual prompt engineering by practitioners without coding backgrounds. Benchmark evaluations demonstrate LCP's effectiveness in generating robust code while minimizing error propagation. The proposed platform is also tested on an Earth Science cross-disciplinary task and demonstrates strong reliability, outperforming competing models.
研究动机与目标
- 解决多主体LLM代码生成在科学任务中的可靠性与错误传播问题。
- 使非专家能够将模糊的领域提示转化为可执行、领域一致的需求。
- 使用非LLM的贝叶斯更新规则共同进化代码、测试用例和提示,降低对任一单一模型的依赖。
- 在地球科学和AI‑for‑Science基准上,以及多种基础模型上,展示鲁棒性和跨领域的有效性。
提出的方法
- 三主体架构:Task Manager(Challenger)、Solution Generator(Solver)和Evaluator,迭代地共同优化计划、测试用例和代码。
- 提示的贝叶斯更新:p(Prompt^{t+1}_{ij}|S_3^t) ∝ p(S_3^t|Prompt^{t}_{ij}) p(Prompt^{t}_{ij}),实现递归 refinement,而非依赖单一LLM。
- 带先验的贝叶斯优化估计:通过AST/代码嵌入对生成的代码进行嵌入,并基于与已测试代码的结构相似性预测性能,以指导昂贵的评估。
- 对抗性测试用例生成(ATC):TM设计具有挑战性但可解的测试用例,以推动SG,提升鲁棒性并减少错误传播。
- 迭代评估框架:计算测试用例分数S1、代码分数S2、提示分数S3,以驱动贝叶斯提示更新和候选提示的选择。
- 样例代码池管理:维护并扩展具有高指导质量的样例代码池,纳入SG的新高表现代码。

实验结果
研究问题
- RQ1该贝叶斯对抗型多主体框架能否提高面向科学的AI代码生成在多种LLM上的可靠性与鲁棒性?
- RQ2对抗性测试用例生成机制是否能减缓多主体代码生成流程中的错误传播?
- RQ3在AI‑for‑Science基准和通用代码生成基准上,该框架的表现相对于最先进基线如何?
- RQ4非专家领域用户是否能通过低代码平台将模糊提示转化为可执行的科学工作流,无需专家提示工程?
- RQ5贝叶斯迭代提示更新对多轮迭代中的解题质量有何影响?
主要发现
- 该框架在基础模型从1.7B到235B的错误传播方面实现鲁棒解,与地球科学基准上有显著提升。
- 在SciCode基准上,较小的开源模型在框架协同下,在某些设定下接近或超过较大模型(例如在某些情形下Qwen3-14b的框架与较大基线相当)。
- 在ScienceAgentBench与GPT-4o配合时,该框架达到最先进的有效执行率(VER)并在SR/CBS分数上具竞争力。
- 迭代贝叶斯共更新在多轮迭代中提升性能,ATC在后续迭代中带来额外增益。
- 该框架对提示质量具有鲁棒性,缩小了基础提示与专家提示之间的差距,使非专家也能获得显著结果。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。