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

SafeAgent:通过自动化风险模拟器保障LLM智能体安全

SafeAgent: Safeguarding LLM Agents via an Automated Risk Simulator

Huazhong University of Science and Technology(华中科技大学);Shanghai Jiaotong University(上海交通大学);Duke University(杜克大学);Lehigh University(理海大学)

Xueyang Zhou, Weidong Wang, Lin Lu, Jiawen Shi, Guiyao Tie, Yongtian Xu, Lixing Chen, Pan Zhou, Neil Zhenqiang Gong, Lichao Sun

AI总结:

针对LLM智能体面临的多源安全风险,本文提出AutoSafe框架,通过开放威胁模型OTS和全自动合成数据生成流水线构建大规模安全训练数据,在合成与真实基准上分别将安全得分平均提升45%和28.91%。

摘要:

基于大语言模型(LLM)的智能体正越来越多地部署在现实世界应用中,例如“数字助理、自主客户服务和决策支持系统”,它们“在多轮、工具增强环境中进行交互”的能力使其不可或缺。然而,由于动态用户交互、外部工具使用以及潜在非预期有害行为所带来的多样且复杂的风险,确保这些智能体的安全仍然是一项重大挑战。为解决这一关键问题,我们提出AutoSafe,这是第一个通过全自动合成数据生成来系统性地增强智能体安全性的框架。具体而言,1)我们引入了一个开放且可扩展的威胁模型OTS,该模型形式化了不安全行为如何从用户指令、交互上下文和智能体动作的相互作用中产生。这使得能够在多样化场景中对安全风险进行精确建模。2)我们开发了一个全自动数据生成流水线,该流水线模拟不安全的用户行为,应用自反思推理来生成安全响应,并构建了一个大规模、多样化且高质量的安全训练数据集——从而消除了对危险的真实世界数据收集的需求。为评估我们框架的有效性,我们在合成和真实世界安全基准上设计了全面的实验。结果表明,AutoSafe平均将安全得分提升了45%,并在真实世界任务上实现了28.91%的提升,验证了我们所学安全策略的泛化能力。这些结果突显了AutoSafe在构建更安全的基于LLM的智能体以用于现实世界部署方面的实际进展和可扩展性。我们已在https://auto-safe.github.io/发布项目页面。

英文摘要:

Large Language Model (LLM)-based agents are increasingly deployed in real-world applications such as "digital assistants, autonomous customer service, and decision-support systems", where their ability to "interact in multi-turn, tool-augmented environments" makes them indispensable. However, ensuring the safety of these agents remains a significant challenge due to the diverse and complex risks arising from dynamic user interactions, external tool usage, and the potential for unintended harmful behaviors. To address this critical issue, we propose AutoSafe, the first framework that systematically enhances agent safety through fully automated synthetic data generation. Concretely, 1) we introduce an open and extensible threat model, OTS, which formalizes how unsafe behaviors emerge from the interplay of user instructions, interaction contexts, and agent actions. This enables precise modeling of safety risks across diverse scenarios. 2) we develop a fully automated data generation pipeline that simulates unsafe user behaviors, applies self-reflective reasoning to generate safe responses, and constructs a large-scale, diverse, and high-quality safety training dataset-eliminating the need for hazardous real-world data collection. To evaluate the effectiveness of our framework, we design comprehensive experiments on both synthetic and real-world safety benchmarks. Results demonstrate that AutoSafe boosts safety scores by 45% on average and achieves a 28.91% improvement on real-world tasks, validating the generalization ability of our learned safety strategies. These results highlight the practical advancement and scalability of AutoSafe in building safer LLM-based agents for real-world deployment. We have released the project page at https://auto-safe.github.io/.

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

↑