mlsanityData to 7 Oct 2026

Chain of Unit-Physics: A Primitive-Centric Approach to Scientific Code Synthesis

arXiv 2512.01010 ↗First posted 30 Nov 2025cs.MA cs.AI cs.LGcited by 0

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Agentic large language models are proposed as autonomous code generators for scientific computing, yet their reliability in high-stakes problems remains unclear. Developing computational scientific software from natural-language queries remains challenging broadly due to (a) sparse representation of domain codes during training and (b) the limited feasibility of RLHF with a small expert community. To address these limitations, this work conceptualizes an inverse approach to code design, embodied in the Chain of Unit-Physics framework: a first-principles (or primitives)-centric, multi-agent system in which human expert knowledge is encoded as unit-physics tests that explicitly constrain code generation. The framework is evaluated on a nontrivial combustion task, used here as a representative benchmark for scientific problem with realistic physical constraints. Closed-weight systems and code-focused agentic variants fail to produce correct end-to-end solvers, despite tool and web access, exhibiting four recurrent error classes: interface (syntax/API) hallucinations, overconfident assumptions, numerical/physical incoherence, and configuration fragility. Open-weight models with chain-of-thought (CoT) decoding reduce interface errors but still yield incorrect solutions. On the benchmark task, the proposed framework converges within 5-6 iterations, matches the human-expert implementation (mean error of 3.1×10-3 %), with a ~33.4 % faster runtime and a ~30 % efficient memory usage at a cost comparable to mid-sized commercial APIs, yielding a practical template for physics-grounded scientific code generation. As datasets and models evolve, zero-shot code accuracy will improve; however, the Chain of Unit-Physics framework goes further by embedding first-principles analysis that is foundational to scientific codes.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 18 of its 42 references that are in the map. First posted on arXiv 30 Nov 2025.

Builds on

18 of 42 references.

References · 18

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  5. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
  6. 2024The AI Scientist: Towards Fully Automated Open-Ended Scientific Discoverycited by 1,002
  7. 2024Chain-of-Thought Reasoning Without Promptingcited by 208
  8. 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 199
  9. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  10. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  11. 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
  12. 2024Test-Driven Development for Code Generationcited by 32
6 more
  1. 2023BatchPrompt: Accomplish more with lesscited by 16
  2. 2025Learning to Generate Unit Tests for Automated Debuggingcited by 16
  3. 2024Rocks Coding, Not Development--A Human-Centric, Experimental Evaluation of LLM-Supported SE Taskscited by 13
  4. 2023A Reliable Knowledge Processing Framework for Combustion Science using Foundation Modelscited by 7
  5. 2020AMReX: Block-Structured Adaptive Mesh Refinement for Multiphysics Applicationscited by 5
  6. 2025Steering Conceptual Bias via Transformer Latent-Subspace Activationcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026FormalScience: Scalable Human-in-the-Loop Autoformalisation of Science with Agentic Code Generation in Lean
  2. 2025MOSAIC: Multi-agent Orchestration for Task-Intelligent Scientific Coding
  3. 2025AInsteinBench: Benchmarking Coding Agents on Scientific Repositories
  4. 2026Infinite Problem Generator: Verifiably Scaling Physics Reasoning Data with Agentic Workflows
  5. 2026SciNav: A General Agent Framework for Scientific Coding Tasks
  6. 2025Can Theoretical Physics Research Benefit from Language Agents?
  7. 2025ATHENA: Agentic Team for Hierarchical Evolutionary Numerical Algorithms
  8. 2026An Agentic Evaluation Framework for AI-Generated Scientific Code in PETSc