arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.25201cs.CLcs.CY
收藏

SafeMath: 在推理过程中提升安全性以提高数学准确性

SafeMath: Safe Solutions for Unsafe Math Word Problems

Indian Institute of Technology Kharagpur(印度理工学院克勒格布尔分校);Cisco Systems(思科系统公司);National University of Singapore(新加坡国立大学)

Sagnik Basu, Subhrajit Mitra, Aman Juneja, Somnath Banerjee, Rima Hazra, Animesh Mukherjee

AI总结:

本文研究了有害数学问题对LLM的影响,提出SafeMath技术在保障安全的同时提升数学推理能力。

摘要:

最近的研究表明,LLM可能通过对抗性或看似无害的输入被操控,导致有害、偏见或违反政策的输出。本文研究了有害和有毒的数学问题这一未被充分探索的问题。我们证明,数学问题,特别是以自然语言叙述形式呈现的,可以成为传播偏见、不道德或心理有害内容的微妙媒介,尤其在涉及儿童的教育环境中风险更高。为系统研究此现象,我们引入ToxicGSM数据集,包含1900个算术问题,其中嵌入有害或敏感上下文,同时保持数学上合理的推理任务。利用此数据集,我们审计现有LLM的行为,并分析安全性和数学正确性之间的权衡。我们进一步提出了SafeMath——一种安全对齐技术,能够在减少有害输出的同时,维持甚至提升数学推理性能。我们的结果强调了解耦语言危害与数学推理的重要性,并证明有效的安全对齐不必以准确性为代价。我们通过https://github.com/Swagnick99/SafeMath/tree/main发布源代码和数据集。

英文摘要:

Recent research points toward LLMs being manipulated through adversarial and seemingly benign inputs, resulting in harmful, biased, or policy-violating outputs. In this paper, we study an underexplored issue concerning harmful and toxic mathematical word problems. We show that math questions, particularly those framed as natural language narratives, can serve as a subtle medium for propagating biased, unethical, or psychologically harmful content, with heightened risks in educational settings involving children. To support a systematic study of this phenomenon, we introduce ToxicGSM, a dataset of 1.9k arithmetic problems in which harmful or sensitive context is embedded while preserving mathematically well-defined reasoning tasks. Using this dataset, we audit the behaviour of existing LLMs and analyse the trade-offs between safety enforcement and mathematical correctness. We further propose SafeMath -- a safety alignment technique that reduces harmful outputs while maintaining, and in some cases improving, mathematical reasoning performance. Our results highlight the importance of disentangling linguistic harm from math reasoning and demonstrate that effective safety alignment need not come at the cost of accuracy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑