EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Re4: Scientific computing agent with rewriting, resolution, review and revision

Ao Cheng, Lei Zhang, Guo-Wei He

Machine Learning: Science and Technology · 29.10.2026

DOI: 10.1088/2632-2153/aebb8b ↗

Kurz gefasst

Fachartikel in der Zeitschrift Machine Learning: Science and Technology, online erschienen am 29.10.2026. Verfasst von Ao Cheng und 2 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: CAS Project for Young Scientists in Basic Research, National Natural Science Foundation of China.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Large language models (LLMs) are a promising class of generative artificial intelligence models and 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, incorporating a "rewriting-resolution-review-revision" logical chain via three reasoning LLMs (functioning as the Consultant, Reviewer, and Programmer, respectively), is integrated in a collaborative and interactive manner. The Consultant module endows the agent with knowledge transfer capabilities to link problems to professional domain insights, thereby rewriting problem descriptions through text augmentation. The Programmer module is responsible for generating and executing well-structured code to deliver the problem resolution. The Reviewer module equips the agent with the capacity for self-debugging and self-refinement through interactive feedback with code runtime outputs. By leveraging the end-to-end review mechanism, the executable code provided by the Programmer undergoes iterative revision. A comprehensive evaluation is conducted on the performance of the proposed agent framework in solving 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 the occurrence of non-physical solutions, thereby establishing a highly reliable framework for autonomous code generation based on natural language descriptions. The review mechanism improved the average execution success (bug-free code and non-NaN solutions) rate of the modern reasoning model 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.

Förderung

  • CAS Project for Young Scientists in Basic Research
  • National Natural Science Foundation of China

Zitieren

APA

Cheng, A., Zhang, L., & He, G. (2026). Re4: Scientific computing agent with rewriting, resolution, review and revision. Machine Learning: Science and Technology. https://doi.org/10.1088/2632-2153/aebb8b

Vancouver

Cheng A, Zhang L, He G. Re4: Scientific computing agent with rewriting, resolution, review and revision. Machine Learning: Science and Technology. 2026. doi:10.1088/2632-2153/aebb8b

BibTeX
@article{Cheng2026,
  author = {Cheng, Ao and Zhang, Lei and He, Guo-Wei},
  title = {Re4: Scientific computing agent with rewriting, resolution, review and revision},
  journal = {Machine Learning: Science and Technology},
  year = {2026},
  doi = {10.1088/2632-2153/aebb8b}
}
Kostenlos starten →