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

当心你的智能体!针对基于大语言模型(LLM)的智能体的后门威胁研究

Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agents

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Center for Data Science, Peking University(北京大学数据科学中心);Pattern Recognition Center, WeChat AI, Tencent Inc.(腾讯公司微信AI模式识别中心)

Wenkai Yang, Xiaohan Bi, Yankai Lin, Sishuo Chen, Jie Zhou, Xu Sun

AI总结:

本研究首次针对基于LLM的智能体的后门攻击展开研究,构建通用攻击框架并分析其多样隐蔽的攻击形式,实验证实该类智能体受后门攻击威胁严重且现有防御难以缓解,呼吁开展定向防御研究。

摘要:

在大语言模型(Large Language Models, LLMs)快速发展的推动下,基于LLM的智能体已被开发用于处理各类现实应用,包括金融、医疗、购物等领域。确保基于LLM的智能体在应用过程中的可靠性与安全性至关重要。然而,目前针对基于LLM的智能体的安全问题研究仍不充分。在本研究中,我们首次针对基于LLM的智能体面临的典型安全威胁之一——后门攻击展开调查。我们首先构建了智能体后门攻击的通用框架,随后对不同形式的智能体后门攻击进行了全面分析。具体而言,与仅能操纵用户输入和模型输出的传统LLM后门攻击相比,智能体后门攻击呈现出更多样化且更隐蔽的形式:(1)从最终攻击效果来看,智能体后门攻击者不仅可以选择操纵最终输出分布,还可以仅在中间推理步骤引入恶意行为,同时保持最终输出正确。(2)此外,前者(操纵最终输出的攻击类别)可根据触发器位置分为两个子类,后门触发器既可以隐藏在用户查询中,也可以出现在外部环境返回的中间观测结果中。我们在网页购物和工具使用两个典型智能体任务上实现了上述各类智能体后门攻击变体。大量实验表明,基于LLM的智能体极易遭受后门攻击,且此类后门漏洞无法通过当前的文本后门防御算法轻易缓解。这表明亟需进一步研究开发针对基于LLM的智能体后门攻击的定向防御方法。警告:本文可能包含有偏见的内容。

英文摘要:

Driven by the rapid development of Large Language Models (LLMs), LLM-based agents have been developed to handle various real-world applications, including finance, healthcare, and shopping, etc. It is crucial to ensure the reliability and security of LLM-based agents during applications. However, the safety issues of LLM-based agents are currently under-explored. In this work, we take the first step to investigate one of the typical safety threats, backdoor attack, to LLM-based agents. We first formulate a general framework of agent backdoor attacks, then we present a thorough analysis of different forms of agent backdoor attacks. Specifically, compared with traditional backdoor attacks on LLMs that are only able to manipulate the user inputs and model outputs, agent backdoor attacks exhibit more diverse and covert forms: (1) From the perspective of the final attacking outcomes, the agent backdoor attacker can not only choose to manipulate the final output distribution, but also introduce the malicious behavior in an intermediate reasoning step only, while keeping the final output correct. (2) Furthermore, the former category can be divided into two subcategories based on trigger locations, in which the backdoor trigger can either be hidden in the user query or appear in an intermediate observation returned by the external environment. We implement the above variations of agent backdoor attacks on two typical agent tasks including web shopping and tool utilization. Extensive experiments show that LLM-based agents suffer severely from backdoor attacks and such backdoor vulnerability cannot be easily mitigated by current textual backdoor defense algorithms. This indicates an urgent need for further research on the development of targeted defenses against backdoor attacks on LLM-based agents. Warning: This paper may contain biased content.

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

↑