Article Intelligence
Improving Medical Calculation of LLMs with Embedded Coding
先看结论
arXiv:2609.31908v1 Announce Type: new Abstract: Large Language Models (LLMs) perform well on medical examinations and question-answering benchmarks, but remain unreliable on medical calculation tasks that require exact numerical outputs. These calculations support high-stakes decisions such as medication dosing, organ-function assessment, and prognostic scoring, for which even small errors can have serious clinical consequences. We introduce MedCode, a framework that improves medical calculation by training LLMs to generate embedded executable code. Given a clinical context, the model identifies the relevant calculator, extracts its input variables, and produces a script that delegates arithmetic operations to a deterministic interpreter. Executing the script returns the calculated value together with an explanation and the appropriate unit. We construct supervised fine-tuning (SFT) and preference datasets from the MedCalc benchmark and additionally curate a dataset for calculation tasks in Intensive Care Unit (ICU) scenarios. We further propose weighted Direct Preference Optimization (wDPO), which adaptively emphasizes preference pairs that are difficult for the model to distinguish. Experiments with LLaMA3-8B, Qwen2.5-7B, and Mistral-7B show absolute accuracy gains of 20--30 percentage points, demonstrating the effectiveness of embedded code generation for medical calculation.
核心指标
先判断这篇文章值不值得继续读
评分用于衡量信号强度,判断类指标用于解释方向、热度、后续动作与可信程度。
影响力
衡量事件对技术、产业或生态的外部影响强度。
N/A
复合价值
综合新颖性、可执行性与长期观察价值。
N/A
情绪
N/A
当前信息不足,暂时不能稳定判断这篇文章的市场或社区情绪。
Hype
N/A
暂无足够信息判断热度是否来自真实进展。
行动建议
N/A
暂无明确后续动作,建议先按影响力和风险信息判断是否继续读。
置信度
分别对应影响力、复合价值与 Hype 判断的可信程度。
N/A
提取事实
结构化事实、实体识别与逻辑链
Large Language Models (LLMs) perform well on medical examinations and question-answering benchmarks, but remain unreliable on medical calculation tasks that require exact numerical outputs. These calculations support high-stakes decisions such as medication dosing, organ-function assessment, and prognostic scoring, for which even small errors can have serious clinical consequences. We introduce MedCode, a framework that improves medical calculation by training LLMs to generate embedded executable code. Given a clinical context, the model identifies the relevant calculator, extracts its input variables, and produces a script that delegates arithmetic operations to a deterministic interpreter. Executing the script returns the calculated value together with an explanation and the appropriate unit. We construct supervised fine-tuning (SFT) and preference datasets from the MedCalc benchmark and additionally curate a dataset for calculation tasks in Intensive Care Unit (ICU) scenarios. We further propose weighted Direct Preference Optimization (wDPO), which adaptively emphasizes preference pairs that are difficult for the model to distinguish. Experiments with LLaMA3-8B, Qwen2.5-7B, and Mistral-7B show absolute accuracy gains of 20--30 percentage points, demonstrating the effectiveness of embedded code generation for medical calculation.
影响与价值
技术/商业影响、关注焦点与受影响对象
风险、机会与行动
结合机会清单和风险矩阵判断后续关注重点