arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.21492cs.CRcs.CL
收藏

FATH:基于认证的测试时防御方法对抗间接提示注入攻击

FATH: Authentication-based Test-time Defense against Indirect Prompt Injection Attacks

UW-Madison(威斯康星大学麦迪逊分校);Huazhong University of Science and Technology(华中科技大学);University of Rochester(罗切斯特大学);NVIDIA(英伟达公司);Cornell University(康奈尔大学);University of Michigan, Ann Arbor(密歇根大学安娜堡分校);UC-Davis(加州大学戴维斯分校)

Jiongxiao Wang, Fangzhou Wu, Wendi Li, Jinsheng Pan, Edward Suh, Z. Morley Mao, Muhao Chen, Chaowei Xiao

AI总结:

针对LLM集成应用的间接提示注入攻击,提出测试时防御策略FATH,通过基于哈希标签的格式认证系统识别用户指令响应,在Llama3和GPT3.5上实现对多种攻击的SOTA防御效果。

摘要:

大型语言模型(LLMs)已被广泛部署为核心,结合额外工具和文本信息应用于现实场景。然而,将外部信息集成到LLM集成应用中引发了重大安全问题,其中提示注入攻击尤为危险:外部文本中的恶意指令可利用LLMs生成攻击者期望的答案。尽管已有训练时和测试时防御方法,但训练时方法成本过高、现有测试时方法效果有限,均不实用。本文提出新型测试时防御策略Formatting AuThentication with Hash-based tags(FATH),不同于阻止LLM响应外部指令的现有方法,FATH实现认证系统,要求LLM用安全策略响应所有指令,并选择性过滤用户指令的响应作为最终输出。为此,我们使用基于哈希的认证标签标记每个响应,便于准确识别用户指令对应的响应,提升对抗自适应攻击的鲁棒性。综合实验表明,该防御方法可有效对抗间接提示注入攻击,在Llama3和GPT3.5模型上针对多种攻击方法取得最先进性能。代码已开源:https://github.com/Jayfeather1024/FATH

英文摘要:

Large language models (LLMs) have been widely deployed as the backbone with additional tools and text information for real-world applications. However, integrating external information into LLM-integrated applications raises significant security concerns. Among these, prompt injection attacks are particularly threatening, where malicious instructions injected in the external text information can exploit LLMs to generate answers as the attackers desire. While both training-time and test-time defense methods have been developed to mitigate such attacks, the unaffordable training costs associated with training-time methods and the limited effectiveness of existing test-time methods make them impractical. This paper introduces a novel test-time defense strategy, named Formatting AuThentication with Hash-based tags (FATH). Unlike existing approaches that prevent LLMs from answering additional instructions in external text, our method implements an authentication system, requiring LLMs to answer all received instructions with a security policy and selectively filter out responses to user instructions as the final output. To achieve this, we utilize hash-based authentication tags to label each response, facilitating accurate identification of responses according to the user's instructions and improving the robustness against adaptive attacks. Comprehensive experiments demonstrate that our defense method can effectively defend against indirect prompt injection attacks, achieving state-of-the-art performance under Llama3 and GPT3.5 models across various attack methods. Our code is released at: https://github.com/Jayfeather1024/FATH

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

↑