arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.07242cs.CRcs.AIcs.CL
收藏

三明治攻击:针对大语言模型的多语言混合自适应攻击

Sandwich attack: Multi-language Mixture Adaptive Attack on LLMs

University of New Haven(纽黑文大学)

Bibek Upadhayay, Vahid Behzadan

AI总结:

本文提出“三明治攻击”这一多语言混合黑盒攻击向量,通过在提示中混合不同语言操纵LLMs生成有害响应,并在多个主流模型上验证其有效性,旨在推动更安全鲁棒的LLMs研究。

摘要:

大语言模型(LLMs)正被日益广泛地开发和应用,但其普及使用面临诸多挑战。这些挑战包括使LLMs的响应与人类价值观对齐,以防止有害输出,这一问题通过安全训练方法加以解决。即便如此,恶意行为者和恶意用户仍成功尝试操纵LLMs,使其对有害问题生成未对齐的响应,例如在学校实验室制造炸弹的方法、有害药物配方以及规避隐私权的方式。另一个挑战是LLMs的多语言能力,这种能力使模型能够理解并用多种语言进行响应。因此,攻击者利用LLMs在不同语言上预训练数据集的不平衡性,以及模型在低资源语言上的性能相对低于高资源语言的情况。结果,攻击者使用低资源语言故意操纵模型以生成有害响应。许多类似的攻击向量已被模型提供方修补,使LLMs对基于语言的操纵更具鲁棒性。在本文中,我们引入了一种新的黑盒攻击向量,称为“三明治攻击”:一种多语言混合攻击,它操纵最先进的LLMs生成有害且未对齐的响应。我们使用五个不同模型进行的实验,即Google的Bard、Gemini Pro、LLaMA-2-70-B-Chat、GPT-3.5-Turbo、GPT-4和Claude-3-OPUS,表明攻击者可以利用该攻击向量从这些模型中生成有害响应并诱发未对齐的响应。通过详细说明三明治攻击的机制和影响,本文旨在指导未来的研究和开发,朝着更安全、更具韧性的LLMs方向发展,确保它们服务于公共利益,同时最大限度地减少被滥用的可能性。

英文摘要:

Large Language Models (LLMs) are increasingly being developed and applied, but their widespread use faces challenges. These include aligning LLMs' responses with human values to prevent harmful outputs, which is addressed through safety training methods. Even so, bad actors and malicious users have succeeded in attempts to manipulate the LLMs to generate misaligned responses for harmful questions such as methods to create a bomb in school labs, recipes for harmful drugs, and ways to evade privacy rights. Another challenge is the multilingual capabilities of LLMs, which enable the model to understand and respond in multiple languages. Consequently, attackers exploit the unbalanced pre-training datasets of LLMs in different languages and the comparatively lower model performance in low-resource languages than high-resource ones. As a result, attackers use a low-resource languages to intentionally manipulate the model to create harmful responses. Many of the similar attack vectors have been patched by model providers, making the LLMs more robust against language-based manipulation. In this paper, we introduce a new black-box attack vector called the \emph{Sandwich attack}: a multi-language mixture attack, which manipulates state-of-the-art LLMs into generating harmful and misaligned responses. Our experiments with five different models, namely Google's Bard, Gemini Pro, LLaMA-2-70-B-Chat, GPT-3.5-Turbo, GPT-4, and Claude-3-OPUS, show that this attack vector can be used by adversaries to generate harmful responses and elicit misaligned responses from these models. By detailing both the mechanism and impact of the Sandwich attack, this paper aims to guide future research and development towards more secure and resilient LLMs, ensuring they serve the public good while minimizing potential for misuse.

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

↑