用结构化非自然语言攻击对齐大模型,突破安全防护
QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language
- 将恶意指令转为结构化非自然查询语句绕过安全机制
- 在主流大模型上实现高成功率攻击,最高达90%以上
- 揭示对齐模型漏洞,适合安全研究者与防御开发者
大型语言模型(LLMs)在自然语言处理领域展现出巨大潜力,但也面临严重的安全与伦理风险。尽管已发展出如安全对齐等防御技术,已有研究显示可通过精心设计的越狱攻击绕过这些防护。本文提出QueryAttack框架,通过将自然语言中的恶意查询转换为结构化非自然查询语言,以知识库视角探测安全对齐的泛化能力。我们在主流大模型上进行了广泛实验,结果表明QueryAttack不仅实现了高攻击成功率(ASR),还能成功绕过多种防御机制。此外,我们提出一种针对性防御方法,在GPT-4-1106上使攻击成功率降低高达64%。代码已开源于https://github.com/horizonsinzqs/QueryAttack。
原文摘要 · Abstract (English)
Recent advances in large language models (LLMs) have demonstrated remarkable potential in the field of natural language processing. Unfortunately, LLMs face significant security and ethical risks. Although techniques such as safety alignment are developed for defense, prior researches reveal the possibility of bypassing such defenses through well-designed jailbreak attacks. In this paper, we propose QueryAttack, a novel framework to examine the generalizability of safety alignment. By treating LLMs as knowledge databases, we translate malicious queries in natural language into structured non-natural query language to bypass the safety alignment mechanisms of LLMs. We conduct extensive experiments on mainstream LLMs, and the results show that QueryAttack not only can achieve high attack success rates (ASRs), but also can jailbreak various defense methods. Furthermore, we tailor a defense method against QueryAttack, which can reduce ASR by up to $64\%$ on GPT-4-1106. Our code is available at https://github.com/horizonsinzqs/QueryAttack.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。