Hugging Face Daily PapersFelipe Ocampo Osorio, Sebastián Andrés Cajas Ordoñez, Maximin Lange1 min readpaperadvanced
Towards a Deterministic Math Solver for Clinical Language Models
Summary
The paper proposes a Program‑Solve interface where LLMs emit Python code that a sandboxed executor runs, making arithmetic deterministic for clinical calculators. Experiments show the approach boosts a 32B model’s accuracy on a verified benchmark, but coverage and upstream extraction remain limiting factors.
- The Program‑Solve interface has the LLM generate case‑specific Python code that runs in a sandbox, turning arithmetic into deterministic execution rather than relying on the model's own calculations.
- On the MedCalc‑Bench Verified benchmark the 32B model improves from 83.47% to 90.53% accuracy (+7.05 points, statistically significant), while the 7B model shows a non‑significant 3.29‑point gain.
- A hand‑written 22‑calculator library is perfectly accurate on its 440 supported cases but only covers 40% of the benchmark, illustrating the trade‑off between coverage and correctness.
- Even with perfect formula provision, errors in variable extraction or outdated clinical coefficients still limit overall reliability; the executor cannot compensate for upstream mistakes.
Clinical AI engineers and LLM developers should care because deterministic numeric computation is essential for safe medical decision support, and this work shows a practical way to improve reliability without hand‑coding every calculator.
7/10
