mlsanityData to 14 Oct 2026

Assessing Large Language Models for Stabilizing Numerical Expressions in Scientific Software

arXiv 2604.04854 ↗First posted 6 Apr 2026cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Scientific software relies on high-precision computation, yet finite floating-point representations introduce precision errors that propagate in safety-critical domains. Despite growing use of large language models (LLMs) in scientific applications, their reliability in handling floating-point numerical stability has not been systematically evaluated. This paper evaluates LLMs' reasoning through two tasks: (1) detecting instability in numerical expressions by generating error-inducing inputs (detection), and (2) rewriting expressions to improve numerical stability (stabilization). Building on popular numerical benchmarks, we assess 4 state-of-the-art LLMs on 2,037numerical structures, including nested conditionals, high-precision literals, and multi-variable arithmetic, across 469,000 tasks. Our results show that LLMs complement traditional approaches in detecting and stabilizing numerically unstable computations. Notably, LLMs outperform baseline methods precisely where the latter fail, stabilizing 61.2% of expressions the baseline fails to improve. More broadly, however, traditional baselines outperform LLMs: Herbie stabilizes 93.7% of the expressions compared to 67.2% by LLMs, and on expressions that both stabilize, Herbie achieves higher accuracy in 42.7% of cases. LLMs struggle with control flow and high-precision literals, consistently removing such structures rather than reasoning about their numerical implications, while performing substantially better on purely symbolic expressions. Even when LLMs preserve structure, their numerical reasoning falters, yielding semantically inequivalent expressions in over 46% of cases. These findings suggest LLMs are effective at stabilizing expressions that classical techniques cannot, yet struggle when high-precision magnitudes and control-flow semantics demand precise reasoning, since such concrete patterns are rarely seen during training.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 6 Apr 2026.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference
  2. 2026Beyond the Answer Key: Robustness Evaluation of Large Language Models for Step-Level Mathematical Verification
  3. 2025Mathematical Reasoning in Large Language Models: Assessing Logical and Arithmetic Errors across Wide Numerical Ranges
  4. 2025Do LLMs Overthink Basic Math Reasoning? Benchmarking the Accuracy-Efficiency Tradeoff in Language Models
  5. 2025ReliableMath: Benchmark of Reliable Mathematical Reasoning on Large Language Models
  6. 2024Evaluating Mathematical Reasoning of Large Language Models: A Focus on Error Identification and Correction
  7. 2026Hidden Reliability Risks in Large Language Models: Systematic Identification of Precision-Induced Output Disagreements
  8. 2024Large Language Models Struggle with Unreasonability in Math Problems