跳到正文
arXiv cs.AI· Ao Cheng, Lei Zhang, Guowei He·· 4 小时前AI 评分38

Re4:带重写、求解、审查与修订机制的科学计算 Agent 框架

Re4: Scientific Computing Agent with Rewriting, Resolution, Review and Revision

AI 导读

论文提出 Re4 科学计算 Agent 框架,通过 Consultant、Reviewer、Programmer 三个推理 LLM 构建“重写-求解-审查-修订”协作链路,从自然语言描述自动生成代码。

正文 · 原文

View PDF HTML (experimental)

Abstract:Large language models (LLMs) have demonstrated abilities to perform complex tasks in multiple domains, including mathematical and scientific reasoning. In this work, we construct a novel agent framework for solving representative problems in scientific computing. The proposed agent incorporates a "rewriting-resolution-review-revision" logical chain via three reasoning LLMs (the Consultant, Reviewer, and Programmer) in a collaborative and interactive manner. The Consultant module enables knowledge transfer to link problems to professional domain insights, thereby rewriting problem descriptions through text augmentation. The Programmer module generates and executes well-structured code to solve problems. The Reviewer module enables self-debugging and self-refinement through interactive feedback with code runtime outputs. Through the end-to-end review mechanism, the Programmer's executable code undergoes iterative revision. We comprehensively evaluate the framework on typical partial differential equations (PDEs), engineering-oriented flow past a cylinder, ill-conditioned linear systems, and data-driven physical analysis problems. Compared with a single-model approach, this collaborative framework significantly improves the bug-free code generation rate and reduces non-physical solutions, establishing a reliable framework for autonomous code generation from natural language descriptions. The review mechanism improved the average execution success (bug-free code and non-NaN solutions) rate of DeepSeek R1 from 59% to 82%, while ChatGPT 4.1-mini improved from 66% to 87% and Gemini-2.5 improved from 60% to 84%. Automatic code generation and review provide a promising workflow for scientific computing; analysis of solver-development trajectories further reveals recurring implementation difficulties in boundary treatment, array indexing, and the preservation of numerical constraints.
Comments: Under minor revision at Machine Learning: Science and Technology (IOP Publishing)
Subjects: Artificial Intelligence (cs.AI); Computational Physics (physics.comp-ph)
Cite as: arXiv:2508.20729 [cs.AI]
  (or arXiv:2508.20729v3 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2508.20729

arXiv-issued DOI via DataCite

Submission history

From: Ao Cheng [view email]
[v1] Thu, 28 Aug 2025 12:50:48 UTC (36,870 KB)
[v2] Mon, 2 Mar 2026 14:14:41 UTC (36,914 KB)
[v3] Tue, 27 Oct 2026 14:51:46 UTC (40,502 KB)

来源:arXiv cs.AI · arxiv.org