用替换关键词方式暴露大模型数学推理的脆弱性。
MSCR: Exploring the Vulnerability of LLMs' Mathematical Reasoning Abilities Using Multi-Source Candidate Replacement
- 融合嵌入相似度、WordNet和掩码语言模型生成语义相近词替换输入。
- 单字微调使模型准确率最高下降49.89%,仍保持高语义一致性。
- 揭示模型推理冗长、资源消耗大,适合关注模型鲁棒性的研究者。
大语言模型在复杂任务如数学推理中表现接近人类,但其在微小输入扰动下的鲁棒性尚未系统研究。现有方法普遍存在可扩展性差、语义保持弱和成本高等问题。为此,我们提出MSCR,一种基于多源候选替换的自动化对抗攻击方法。通过结合大模型嵌入空间中的余弦相似度、WordNet词典以及掩码语言模型的上下文预测,为输入问题中的每个词生成一组语义相近的候选词,再逐个筛选替换以实施攻击。我们在GSM8K和MATH500基准上对多种大模型进行大规模实验,结果表明,仅修改一个词的微小扰动即可显著降低所有模型的准确率,最大降幅达49.89%(GSM8K)和35.40%(MATH500),同时保持扰动后问题的高语义一致性。进一步分析显示,扰动不仅导致错误输出,还大幅增加平均回答长度,引发更多冗余推理路径,提高计算资源消耗。这些发现揭示了当前大模型在数学推理任务中存在鲁棒性不足与效率瓶颈。
原文摘要 · Abstract (English)
LLMs demonstrate performance comparable to human abilities in complex tasks such as mathematical reasoning, but their robustness in mathematical reasoning under minor input perturbations still lacks systematic investigation. Existing methods generally suffer from limited scalability, weak semantic preservation, and high costs. Therefore, we propose MSCR, an automated adversarial attack method based on multi-source candidate replacement. By combining three information sources including cosine similarity in the embedding space of LLMs, the WordNet dictionary, and contextual predictions from a masked language model, we generate for each word in the input question a set of semantically similar candidates, which are then filtered and substituted one by one to carry out the attack. We conduct large-scale experiments on LLMs using the GSM8K and MATH500 benchmarks. The results show that even a slight perturbation involving only a single word can significantly reduce the accuracy of all models, with the maximum drop reaching 49.89% on GSM8K and 35.40% on MATH500, while preserving the high semantic consistency of the perturbed questions. Further analysis reveals that perturbations not only lead to incorrect outputs but also substantially increase the average response length, which results in more redundant reasoning paths and higher computational resource consumption. These findings highlight the robustness deficiencies and efficiency bottlenecks of current LLMs in mathematical reasoning tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。