一句话:提出自适应护栏 AdaptiveGuard,通过 OOD 检测与持续学习在部署后动态防御新型越狱攻击。
LLM 驱动软件依赖护栏过滤不安全提示,但已有护栏面对未见越狱攻击时性能会从 95% 骤降至 12%,部署后如何动态适应新威胁成为关键挑战。本文提出 AdaptiveGuard,将新型越狱攻击视为分布外(OOD)输入进行检测,并利用持续学习框架在少量更新步骤内学习防御策略。实验表明,AdaptiveGuard 达到 96% 的 OOD 检测准确率,仅需两步更新即可适应新攻击,且在适应后仍保持超过 85% 的分布内 F1 分数,优于其他基线。作者开源了系统与数据集。
Guardrails are critical for the safe deployment of Large Language Models (LLMs)-powered software. Unlike traditional rule-based systems with limited, predefined input-output spaces that inherently constrain unsafe behavior, LLMs enable open-ended, intelligent interactions—opening the door to jailbreak attacks through user inputs. Guardrails serve as a protective layer, filtering unsafe prompts before they reach the LLM. However, prior research shows that jailbreak attacks can still succeed over 70% of the time, even against advanced models like GPT-4o. While guardrails such as LlamaGuard report up to 95% accuracy, our preliminary analysis shows their performance can drop sharply—to as low as 12%—when confronted with unseen attacks. This highlights a growing software engineering challenge: how to build a post-deployment guardrail that adapts dynamically to emerging threats? To address this, we propose AdaptiveGuard, an adaptive guardrail that detects novel jailbreak attacks as out-of-distribution (OOD) inputs and learns to defend against them through a continual learning framework. Through empirical evaluation, AdaptiveGuard achieves 96% OOD detection accuracy, adapts to new attacks in just two update steps, and retains over 85% F1-score on in-distribution data post-adaptation, outperforming other baselines. These results demonstrate that AdaptiveGuard is a guardrail capable of evolving in response to emerging jailbreak strategies post deployment. We release our AdaptiveGuard and studied datasets at https://github.com/awsm-research/AdaptiveGuard to support further research.
DOI 原文 ·
@inproceedings{paperbot9267,
title = {AdaptiveGuard: Towards Adaptive Runtime Safety for LLM-Powered Software},
author = {Rui Yang and Michael Fu and Chakkrit Tantithamthavorn and Chetan Arora and Gunel Gulmammadova and Joey Chua},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00279}
}