TraceAegis:通过分层与行为异常检测保障基于LLM的智能体安全
TraceAegis: Securing LLM-Based Agents via Hierarchical and Behavioral Anomaly Detection
AI总结:
针对基于LLM的智能体易受工具投毒等攻击的问题,提出基于溯源的分析框架TraceAegis,通过构建分层结构和受约束的行为规则来表征并验证正常行为,有效检测异常行为,并在新构建的基准数据集上取得优异表现。
摘要:
基于LLM的智能体在现实应用中展现出了良好的适应性。然而,这些智能体仍然容易受到各种攻击,例如工具投毒和恶意指令,这些攻击会破坏其执行流程,并可能导致数据泄露和经济损失等严重后果。现有研究通常试图通过预定义特定规则并在运行时强制执行来缓解此类异常,以增强安全性。然而,设计全面的规则非常困难,需要大量的人工工作,并且仍然存在导致漏报的漏洞。随着智能体系统演变为复杂的软件系统,我们从软件系统安全中汲取灵感,提出了TraceAegis,这是一个基于溯源的分析框架,利用智能体执行追踪来检测潜在异常。具体而言,TraceAegis构建了一个分层结构来抽象稳定的执行单元,这些单元表征了正常的智能体行为。然后将这些单元总结为受约束的行为规则,这些规则指定了完成任务所需的条件。通过根据分层和行为约束验证执行追踪,TraceAegis能够有效地检测异常行为。为了评估TraceAegis的有效性,我们引入了TraceAegis-Bench,这是一个涵盖两个代表性场景的数据集:医疗保健和企业采购。每个场景包括1,300个良性行为和300个异常行为,其中异常行为要么违反了智能体的执行顺序,要么破坏了其执行序列的语义一致性。实验结果表明,TraceAegis在TraceAegis-Bench上取得了强劲的性能,成功识别了大多数异常行为。
英文摘要:
LLM-based agents have demonstrated promising adaptability in real-world applications. However, these agents remain vulnerable to a wide range of attacks, such as tool poisoning and malicious instructions, that compromise their execution flow and can lead to serious consequences like data breaches and financial loss. Existing studies typically attempt to mitigate such anomalies by predefining specific rules and enforcing them at runtime to enhance safety. Yet, designing comprehensive rules is difficult, requiring extensive manual effort and still leaving gaps that result in false negatives. As agent systems evolve into complex software systems, we take inspiration from software system security and propose TraceAegis, a provenance-based analysis framework that leverages agent execution traces to detect potential anomalies. In particular, TraceAegis constructs a hierarchical structure to abstract stable execution units that characterize normal agent behaviors. These units are then summarized into constrained behavioral rules that specify the conditions necessary to complete a task. By validating execution traces against both hierarchical and behavioral constraints, TraceAegis is able to effectively detect abnormal behaviors. To evaluate the effectiveness of TraceAegis, we introduce TraceAegis-Bench, a dataset covering two representative scenarios: healthcare and corporate procurement. Each scenario includes 1,300 benign behaviors and 300 abnormal behaviors, where the anomalies either violate the agent's execution order or break the semantic consistency of its execution sequence. Experimental results demonstrate that TraceAegis achieves strong performance on TraceAegis-Bench, successfully identifying the majority of abnormal behaviors.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。