通过外部化攻防共进化,实现大模型安全的持续防护与迁移。
Model-Agnostic Lifelong LLM Safety via Externalized Attack-Defense Co-Evolution

- 构建可复用的攻击技能库和记忆检索防御模型,打破封闭循环。
- 防御成功率99.61%,参数仅需对手37.5%仍胜出,且不损失正常推理能力。
- 适合长期维护模型安全的团队,尤其关注高效迁移与持续演进的场景。
大型语言模型仍易受恶意提示攻击而生成有害内容。现有安全范式通常将红队测试与后训练耦合在封闭的策略闭环中,导致攻击发现快速饱和,难以暴露新漏洞,且防御机制效率低、僵化、难以跨模型迁移。为此,我们提出EvoSafety框架,基于持久、可检查、可复用的外部结构。红队方面,攻击策略配备对抗技能库,支持通过简单扩展持续探测漏洞并演化攻击向量;防御学习方面,以轻量级辅助防御模型结合记忆检索替代模型特定的安全微调,实现高效、可迁移、模型无关的安全增强,且鲁棒性可通过纯记忆更新提升。单一训练流程下,防御策略可运行于引导(Steer)与守卫(Guard)模式:前者激活目标模型内在防御,后者直接过滤有害输入。大量实验表明,EvoSafety优势显著:在守卫模式下,防御成功率高达99.61%,较Qwen3Guard-8B高出14.13%,仅需其37.5%参数,同时保持良性查询下的推理性能。警告:本文包含潜在有害文本。
原文摘要 · Abstract (English)
Large language models remain vulnerable to adversarial prompts that elicit harmful outputs. Existing safety paradigms typically couple red-teaming and post-training in a closed, policy-centric loop, causing attack discovery to suffer from rapid saturation and limiting the exposure of novel failure modes, while leaving defenses inefficient, rigid, and difficult to transfer across victim models. To this end, we propose EvoSafety, an LLM safety framework built around persistent, inspectable, and reusable external structures. For red teaming, EvoSafety equips the attack policy with an adversarial skill library, enabling continued vulnerability probing through simple library expansion after saturation, while supporting the evolution of adversarial vectors. For defense learning, EvoSafety replaces model-specific safety fine-tuning with a lightweight auxiliary defense model augmented with memory retrieval. This enables efficient, transferable, and model-agnostic safety improvements, while allowing robustness to be enhanced solely through memory updates. With a single training procedure, the defense policy can operate in both Steer and Guard modes: the former activates the victim model's intrinsic defense mechanisms, while the latter directly filters harmful inputs. Extensive experiments demonstrate the superiority of EvoSafety: in Guard mode, it achieves a 99.61% defense success rate, outperforming Qwen3Guard-8B by 14.13% with only 37.5% of its parameters, while preserving reasoning performance on benign queries. Warning: This paper contains potentially harmful text.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。