AegisLLM用多个智能体协作防御大模型攻击,实时自适应提升安全性。
AegisLLM: Scaling Agentic Systems for Self-Reflective Defense in LLM Security
- 设计四角色智能体协同工作:协调者、分流器、响应者、评估者。
- 仅用20个训练样本即实现接近完美的信息遗忘,比基线提升51%。
- 无需重训练即可应对新型攻击,适合需要高安全性的部署场景。
我们提出AegisLLM,一种针对对抗攻击和信息泄露的协作式多智能体防御系统。该系统由自主智能体——协调者、分流器、响应者和评估者——构成结构化工作流,协同保障大模型输出的安全与合规性,并通过提示优化实现自我迭代。实验表明,测试时扩展智能体角色并结合自动化提示优化(如DSPy)可显著提升鲁棒性而不损失模型实用性。该方法支持实时应对演化攻击,无需模型重训练。在关键威胁场景下的全面评估显示,该系统表现优异:在WMDP去学习基准上,仅用20个训练样本和少于300次语言模型调用即实现近乎完美的去学习效果;在强拒绝测试中相比基线模型提升51%,在PHTest上的误拒率仅为7.9%,远低于同类方法的18%-55%。结果表明,动态自适应的智能体推理优于静态防御机制,确立了AegisLLM作为传统模型修改类方法的有力运行时替代方案。代码已开源。
原文摘要 · Abstract (English)
We introduce AegisLLM, a cooperative multi-agent defense against adversarial attacks and information leakage. In AegisLLM, a structured workflow of autonomous agents - orchestrator, deflector, responder, and evaluator - collaborate to ensure safe and compliant LLM outputs, while self-improving over time through prompt optimization. We show that scaling agentic reasoning system at test-time - both by incorporating additional agent roles and by leveraging automated prompt optimization (such as DSPy)- substantially enhances robustness without compromising model utility. This test-time defense enables real-time adaptability to evolving attacks, without requiring model retraining. Comprehensive evaluations across key threat scenarios, including unlearning and jailbreaking, demonstrate the effectiveness of AegisLLM. On the WMDP unlearning benchmark, AegisLLM achieves near-perfect unlearning with only 20 training examples and fewer than 300 LM calls. For jailbreaking benchmarks, we achieve 51% improvement compared to the base model on StrongReject, with false refusal rates of only 7.9% on PHTest compared to 18-55% for comparable methods. Our results highlight the advantages of adaptive, agentic reasoning over static defenses, establishing AegisLLM as a strong runtime alternative to traditional approaches based on model modifications. Code is available at https://github.com/zikuicai/aegisllm
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。