Chain of Unit-Physics: A Primitive-Centric Approach to Scientific Code Synthesis
Vansh Sharma, Venkat Raman

TL;DR
This paper introduces the Chain of Unit-Physics framework, a multi-agent, primitives-centric approach that encodes human expert knowledge as unit-physics tests to improve scientific code synthesis from natural language.
Contribution
It presents a novel, first-principles-based multi-agent system that constrains code generation with explicit physics tests, enhancing reliability in scientific computing tasks.
Findings
Framework converges within 5-6 iterations
Matches human-expert implementation accuracy
Achieves faster runtime and better memory efficiency
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning in Materials Science · Scientific Computing and Data Management · Natural Language Processing Techniques
