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

The Task Shield:强制任务对齐以防御 LLM 智能体中的间接提示注入

The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents

The Pennsylvania State University(宾夕法尼亚州立大学);Princeton University(普林斯顿大学);California State University, Long Beach(加州州立大学长滩分校)

Feiran Jia, Tong Wu, Xin Qin, Anna Squicciarini

AI总结:

针对LLM智能体面临的间接提示注入威胁,提出测试时防御机制Task Shield,通过验证每个指令和工具调用是否对齐用户目标来确保安全,在AgentDojo基准上有效降低攻击成功率并维持高任务效用。

摘要:

大型语言模型(LLM)智能体越来越多地被部署为会话助手,能够通过工具集成执行复杂的现实世界任务。这种与外部系统交互和处理各种数据源的增强能力虽然强大,却引入了重大的安全漏洞。特别是,间接提示注入攻击构成了严重威胁,其中嵌入在外部数据源中的恶意指令可以操纵智能体偏离用户意图。虽然基于规则约束、源聚光灯和认证协议的现有防御措施显示出前景,但它们在保持稳健安全性的同时难以维持任务功能性。我们提出了一种新颖且正交的视角,将智能体安全从防止有害行为重新定义为确保任务对齐,要求每个智能体动作都服务于用户目标。基于这一洞察,我们开发了 Task Shield,这是一种测试时防御机制,系统地验证每个指令和工具调用是否有助于实现用户指定的目标。通过在 AgentDojo 基准上的实验,我们证明 Task Shield 在 GPT-4o 上将攻击成功率降低至 2.07%,同时保持较高的任务效用 69.79%。

英文摘要:

Large Language Model (LLM) agents are increasingly being deployed as conversational assistants capable of performing complex real-world tasks through tool integration. This enhanced ability to interact with external systems and process various data sources, while powerful, introduces significant security vulnerabilities. In particular, indirect prompt injection attacks pose a critical threat, where malicious instructions embedded within external data sources can manipulate agents to deviate from user intentions. While existing defenses based on rule constraints, source spotlighting, and authentication protocols show promise, they struggle to maintain robust security while preserving task functionality. We propose a novel and orthogonal perspective that reframes agent security from preventing harmful actions to ensuring task alignment, requiring every agent action to serve user objectives. Based on this insight, we develop Task Shield, a test-time defense mechanism that systematically verifies whether each instruction and tool call contributes to user-specified goals. Through experiments on the AgentDojo benchmark, we demonstrate that Task Shield reduces attack success rates (2.07\%) while maintaining high task utility (69.79\%) on GPT-4o.

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

↑