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. We release the source code and dataset at https://github.com/Swagnick99/SafeMath/tree/main.


翻译:近期研究表明,大型语言模型可能通过对抗性及表面看似正常的输入被操纵,从而产生有害、有偏见或违反政策的结果。本文探讨了一个尚未充分研究的议题:有害且具有毒性的数学应用题。我们证明,数学问题——尤其是以自然语言叙述形式呈现的问题——可以作为传播偏见、不道德或心理有害内容的隐蔽媒介,在涉及儿童的教育场景中风险尤为突出。为系统研究这一现象,我们引入了ToxicGSM数据集,包含1,900个算术问题,其中嵌入了有害或敏感语境,同时保留了数学定义明确的推理任务。利用该数据集,我们审计了现有大型语言模型的行为,并分析了安全约束与数学正确性之间的权衡。我们进一步提出SafeMath——一种安全对齐技术,在减少有害输出的同时,维持甚至提升数学推理性能。我们的结果强调了将语言危害与数学推理剥离的重要性,并表明有效的安全对齐不必以准确性为代价。开源代码及数据集发布于https://github.com/Swagnick99/SafeMath/tree/main。

0
下载
关闭预览

相关内容

数学是关于数量、结构、变化等主题的探索。
《大型推理模型的安全性:综述》
专知会员服务
24+阅读 · 2025年4月25日
《基于大语言模型的数学推理与优化研究综述》
专知会员服务
33+阅读 · 2025年3月26日
大模型数学推理数据合成相关方法
专知会员服务
36+阅读 · 2025年1月19日
深度学习在数学推理中的应用综述
专知会员服务
48+阅读 · 2022年12月25日
机器学习的可解释性:因果推理和稳定学习
DataFunTalk
13+阅读 · 2020年3月3日
机器学习必备的数学基础有哪些?
人工智能头条
12+阅读 · 2019年10月18日
相关性≠因果:概率图模型和do-calculus
论智
31+阅读 · 2018年10月29日
详解常见的损失函数
七月在线实验室
20+阅读 · 2018年7月12日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
综述 | 世界动作模型:少做梦,多行动
专知会员服务
2+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
4+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
3+阅读 · 6月23日
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关资讯
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员