通过语义同构攻击,让大模型自动生成有害内容。
Safe2Harm: Semantic Isomorphism Attacks for Jailbreaking Large Language Models

- 用安全问题替代有害问题,保持底层逻辑一致。
- 在7个主流模型上测试,效果优于现有方法。
- 适合研究模型安全与对抗攻击的学者使用。
大语言模型在各类任务中表现卓越,但其安全漏洞可能被攻击者利用生成有害内容,对社会多个领域造成负面影响。现有越狱方法多依赖提示工程或对抗优化,本文发现许多有害场景与合法场景在底层原理上高度一致。基于此,提出Safe2Harm语义同构攻击方法,包含四个阶段:首先将有害问题重写为语义安全但原理相似的问题;其次提取两者间的主题映射关系;然后让模型对安全问题生成详细回答;最后依据映射关系反向重写安全回答,得到有害输出。在7个主流大模型和三类基准数据集上的实验表明,Safe2Harm具备强大越狱能力,整体性能优于现有方法。此外,构建了一个包含358个样本的挑战性有害内容评估数据集,用于评估现有有害内容检测方法的有效性,可部署于大模型输入输出过滤以实现防御。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated exceptional performance across various tasks, but their security vulnerabilities can be exploited by attackers to generate harmful content, causing adverse impacts across various societal domains. Most existing jailbreak methods revolve around Prompt Engineering or adversarial optimization, yet we identify a previously overlooked phenomenon: many harmful scenarios are highly consistent with legitimate ones in terms of underlying principles. Based on this finding, this paper proposes the Safe2Harm Semantic Isomorphism Attack method, which achieves efficient jailbreaking through four stages: first, rewrite the harmful question into a semantically safe question with similar underlying principles; second, extract the thematic mapping relationship between the two; third, let the LLM generate a detailed response targeting the safe question; finally, reversely rewrite the safe response based on the thematic mapping relationship to obtain harmful output. Experiments on 7 mainstream LLMs and three types of benchmark datasets show that Safe2Harm exhibits strong jailbreaking capability, and its overall performance is superior to existing methods. Additionally, we construct a challenging harmful content evaluation dataset containing 358 samples and evaluate the effectiveness of existing harmful detection methods, which can be deployed for LLM input-output filtering to enable defense.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。