← 研踪 PaperTrailarXiv:2612.01303 · v1
Verified Numerics from Natural Language: Teaching a Small Language Model to Write Groundwater-Flow Solvers
首次提交 2026-12-01 16:59
版本更新 2026-12-01 16:59
雷达观测 2026-12-02 23:12
摘要
Large language models (LLMs) can write simulation code, yet a solver that runs may still converge at the wrong rate or to the wrong answer. We show that a small open model learns to write correct solvers from plain-English problem statements when it is trained on cheap, programmatically generated and numerically verified data. For two-dimensional steady Darcy flow with heterogeneous and anisotropic conductivity, wells and mixed boundary conditions, a generator produces problems with second-order finite-volume solvers, and a convergence verifier runs every solver on two grids and checks its error and observed order. On 2000 correct and 1857 mutant runs the verifier rejects no correct solver and accepts 0.5% of mutants, where execution and mass-balance checks accept over 94%. Qwen3-8B fine-tuned on 2000 verified solvers passes 99.70.3% of in-distribution and 99.80.3% of held-out-combination test problems, level with GPT-6.2 Sol, in one local pass of about 1000 tokens; untuned, it writes no passing solver. Minimal pairs that change one physical fact in the wording show what the trained model still misreads: it solves both problems of 451% of pairs and writes the same source sign whether a well injects or extracts water. Replacing a quarter of the training problems by paraphrases and minimal pairs raises this to 87% with no loss of test accuracy. Corrupted training targets show which generator errors the verifier must catch: the model absorbs mixed errors in half of its targets but learns a single bug repeated in half of them.
作者备注:15 pages, 6 figures. Code and data: https://github.com/Binyao111/right-numerics-wrong-physics
观测到的版本
相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。
v1 · 2026-12-01 16:59 · 最新观测版本
Verified Numerics from Natural Language: Teaching a Small Language Model to Write Groundwater-Flow Solvers
Large language models (LLMs) can write simulation code, yet a solver that runs may still converge at the wrong rate or to the wrong answer. We show that a small open model learns to write correct solvers from plain-English problem statements when it is trained on cheap, programmatically generated and numerically verified data. For two-dimensional steady Darcy flow with heterogeneous and anisotropic conductivity, wells and mixed boundary conditions, a generator produces problems with second-order finite-volume solvers, and a convergence verifier runs every solver on two grids and checks its error and observed order. On 2000 correct and 1857 mutant runs the verifier rejects no correct solver and accepts 0.5% of mutants, where execution and mass-balance checks accept over 94%. Qwen3-8B fine-tuned on 2000 verified solvers passes 99.70.3% of in-distribution and 99.80.3% of held-out-combination test problems, level with GPT-6.2 Sol, in one local pass of about 1000 tokens; untuned, it writes no passing solver. Minimal pairs that change one physical fact in the wording show what the trained model still misreads: it solves both problems of 451% of pairs and writes the same source sign whether a well injects or extracts water. Replacing a quarter of the training problems by paraphrases and minimal pairs raises this to 87% with no loss of test accuracy. Corrupted training targets show which generator errors the verifier must catch: the model absorbs mixed errors in half of its targets but learns a single bug repeated in half of them.
查看此版本解读 →查看此版本原文 ↗