ProbGuard: Calibrated Safety Risk Estimation from LLM Output Distributions
作者: Xinzhe Huang, Biwu Yao, Kedong Xiu, Mengnan Zhao, Di Wang, Puning Zhao, Tianhang Zheng
分类: cs.LG
发布日期: 2026-08-11
💡 一句话要点
提出ProbGuard以解决LLM输出安全风险评估问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 安全风险评估 概率模型 Monte-Carlo采样 校准性能 生成内容安全 深度学习
📋 核心要点
- 现有的安全评估方法将LLM输出视为确定性分类任务,忽视了输出的不确定性和概率信息。
- ProbGuard提出了一种基于概率的架构,利用LLM早期输出的分布信号来估计安全风险,允许在生成过程中进行早期停止。
- 实验结果表明,ProbGuard在校准性能上超越了所有基线,且在六种代表性攻击中将攻击成功率限制在1%以内。
📝 摘要(中文)
近年来,针对大型语言模型(LLM)安全性的研究广泛采用了保护措施来识别不安全的LLM输出。现有的保护措施通常将安全评估视为确定性分类任务,将离散的标记序列映射到离散的安全标签。然而,这种范式存在两个局限性:首先,安全评估本质上是一个不确定性问题,尤其是在生成的早期阶段;其次,仅依赖离散标记序列会丢失LLM输出分布中蕴含的丰富概率信息。为了解决这些问题,我们提出了第一个完全概率性的架构无关保护措施ProbGuard,利用LLM早期输出的分布信号来估计和校准安全概率,从而实现对不安全输出的早期停止。通过对分布信号和校准安全风险的后训练,ProbGuard在所有九个模型-数据集组合设置中实现了最佳的校准性能,平均Brier分数和ECE分别降低了79.6%和71.9%。
🔬 方法详解
问题定义:本论文旨在解决现有LLM安全评估方法的不足,特别是其将安全评估视为确定性任务的局限性,导致无法有效处理生成过程中的不确定性和概率信息。
核心思路:论文提出ProbGuard,通过利用LLM生成的早期输出分布信号,估计和校准安全概率,从而实现对不安全输出的早期停止。这种方法能够更好地反映生成过程中的不确定性。
技术框架:ProbGuard的整体架构包括两个主要模块:首先是基于Monte-Carlo采样的安全风险估计模块,其次是后训练模块,用于对分布信号进行校准。通过这两个模块,ProbGuard能够有效地利用LLM的输出分布信息。
关键创新:ProbGuard的主要创新在于其完全概率性的架构设计,能够利用LLM输出的分布信息进行安全风险评估,与现有方法的确定性分类任务形成鲜明对比。
关键设计:在设计中,ProbGuard采用了Monte-Carlo采样来估计安全风险,并通过后训练来优化模型的校准性能,确保在不同的模型-数据集组合中均能实现最佳效果。具体的损失函数和参数设置在论文中进行了详细描述。
🖼️ 关键图片
📊 实验亮点
ProbGuard在实验中表现出色,平均Brier分数和ECE分别降低了79.6%和71.9%,在六种代表性攻击中将攻击成功率限制在1%。这些结果表明ProbGuard在安全性评估中的有效性和优越性。
🎯 应用场景
ProbGuard的研究成果具有广泛的应用潜力,尤其是在需要确保生成内容安全性的领域,如自动内容生成、对话系统和智能助手等。通过有效评估和校准安全风险,ProbGuard能够帮助开发者在实际应用中更好地控制不安全输出,从而提升用户体验和信任度。
📄 摘要(原文)
Recent research on Large Language Model (LLM) safety has widely adopted guardrails to identify unsafe LLM outputs. Existing guardrails typically formulate safety assessment as a deterministic classification task, mapping a discrete token sequence to a discrete safety label. However, this paradigm has two limitations: First, safety assessment is inherently an uncertain problem, particularly during the early generation state. Second, relying solely on discrete token sequences discards the rich probabilistic information embedded in the LLM output distribution. To address these limitations, we propose the first completely probabilistic architecture-agnostic guardrail \textsc{ProbGuard} to leverage the LLM early output distributional signals for estimating and calibrating the safety probability, thereby enabling early stopping of unsafe ongoing outputs. Specifically, given an LLM's generated prefix distribution, we formulate the safety risk as the unsafe probability of its continued generation dynamics and estimate this risk by Monte-Carlo sampling. Through post-training on the distributional signals and calibrated safety risk, \textsc{ProbGuard} achieves the best calibration performance across all nine model--dataset combination settings, reducing the average Brier score and ECE by 79.6\% and 71.9\%, respectively, over the best baseline. \textsc{ProbGuard} further limits the attack success rate to at most 1\% across six representative jailbreak attacks after observing the LLM early output distributions from only the first ten decoding steps.