arXiv:2605.24613cs.CLcs.AI2026-05

修复大模型数学推理时,只在确保安全时才替换结果,避免误改正确答案。

Guarded Repair for Harm-Aware Post-hoc Replacement of LLM Mathematical Reasoning

  • 通过符号检查与风险诊断,只在确认更安全时才替换推理过程。
  • 在GSM8K上准确率从95.60%提升至96.89%,修复17个错误且无正确答案被破坏。
  • 适合需要高可靠性、避免误改的数学推理系统部署场景。

大模型数学推理的后处理修复存在不对称风险:修复错误推理有用,但替换原本正确的推理可能造成伤害。本文在选择性替换设定下研究此问题,提出GuardedRepair框架,通过诊断缓存推理路径,仅在确定更安全时触发修复,并仅在确定性验证支持时接受答案变更。该框架结合轻量级符号检查、表面语义风险诊断、有限候选生成与保守接受策略。在完整GSM8K测试集上,初始模型准确率为95.60%,经修复后提升至96.89%,修复了58个剩余错误中的17个,主实验中未出现正确答案被破坏的情况。在弱推理器ASDiv设置下,准确率从78.40%提升至87.60%。直接重生成基线表明,该增益并非单纯由更强模型重解所致:重解所有GSM8K样本反而使准确率降至93.03%,并破坏47个原本正确的答案。额外分析显示,有守卫的修复显著改善修复与破坏的权衡,但替换风险仍存在而非消除。结果支持将后处理修复视为危害感知的选择性替换,而非无约束重解。

原文摘要 · Abstract (English)

Post-hoc repair of LLM mathematical reasoning introduces an asymmetric risk: fixing an incorrect reasoning trace is useful, but replacing a trace that was already correct can be harmful. We study this problem under a selective replacement setting, where a system must decide whether a repaired candidate is safer than preserving the original cached trace. We present GuardedRepair, a guarded best-of-N repair framework that diagnoses cached reasoning traces, selectively triggers repair, and accepts answer-changing candidates only when deterministic verification guards support replacement. The framework combines lightweight symbolic checks, surface semantic-risk diagnostics, bounded candidate generation, and conservative acceptance policies. On the full GSM8K test set, where the initial reasoner already achieves 95.60% accuracy, GuardedRepair improves final accuracy to 96.89%, fixing 17 of 58 remaining errors without measured broken-correct cases in the main run. On a weak-reasoner ASDiv setting, accuracy improves from 78.40% to 87.60%. Direct regeneration baselines show that this gain is not explained by stronger-model re-solving alone: re-solving all GSM8K examples lowers accuracy to 93.03% and breaks 47 initially correct answers. Additional analyses show that guarded repair substantially improves the fixed/broken tradeoff, while also revealing that replacement risk is reduced rather than eliminated. These results support viewing post-hoc repair as harm-aware selective replacement rather than unconstrained re-solving.

大模型修复数学推理安全替换GSM8K

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。