arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.14197cs.CLcs.AI
收藏

针对大型语言模型间接提示注入攻击的基准测试与防御

Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models

University of Science and Technology of China(中国科学技术大学);Hong Kong University of Science and Technology(香港科技大学);Microsoft Corporation(微软公司)

Jingwei Yi, Yueqi Xie, Bin Zhu, Emre Kiciman, Guangzhong Sun, Xing Xie, Fangzhao Wu

AI总结:

本文提出了首个间接提示注入攻击基准BIPIA,评估了现有LLM的漏洞,并基于分析提出了边界意识和显式提醒两种防御机制,在黑盒和白盒设置下有效降低攻击成功率同时保持输出质量。

摘要:

大型语言模型与外部内容的整合催生了诸如Microsoft Copilot等应用,但也引入了间接提示注入攻击的漏洞。在这些攻击中,嵌入在外部内容中的恶意指令可以操纵LLM的输出,导致其偏离用户预期。为了解决这一关键但尚未充分探索的问题,我们引入了首个用于评估此类漏洞风险的间接提示注入攻击基准,名为BIPIA。使用BIPIA,我们评估了现有的LLM,发现它们普遍存在漏洞。我们的分析指出了导致攻击成功的两个关键因素:LLM无法区分信息性上下文和可执行指令,以及它们缺乏避免执行外部内容中指令的意识。基于这些发现,我们提出了两种新颖的防御机制——边界意识和显式提醒——以在黑盒和白盒设置中解决这些漏洞。大量实验表明,我们的黑盒防御提供了实质性的缓解,而我们的白盒防御将攻击成功率降低至接近零的水平,同时保持了LLM的输出质量。我们希望这项工作能激发对保护LLM应用的进一步研究,并促进其安全可靠的使用。

英文摘要:

The integration of large language models with external content has enabled applications such as Microsoft Copilot but also introduced vulnerabilities to indirect prompt injection attacks. In these attacks, malicious instructions embedded within external content can manipulate LLM outputs, causing deviations from user expectations. To address this critical yet under-explored issue, we introduce the first benchmark for indirect prompt injection attacks, named BIPIA, to assess the risk of such vulnerabilities. Using BIPIA, we evaluate existing LLMs and find them universally vulnerable. Our analysis identifies two key factors contributing to their success: LLMs' inability to distinguish between informational context and actionable instructions, and their lack of awareness in avoiding the execution of instructions within external content. Based on these findings, we propose two novel defense mechanisms-boundary awareness and explicit reminder-to address these vulnerabilities in both black-box and white-box settings. Extensive experiments demonstrate that our black-box defense provides substantial mitigation, while our white-box defense reduces the attack success rate to near-zero levels, all while preserving the output quality of LLMs. We hope this work inspires further research into securing LLM applications and fostering their safe and reliable use.

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

↑