C-SafeGen 提出基于 Claim 的流式守护解码,为大语言模型生成提供可认证安全保证
C-SafeGen: Certified Safe LLM Generation with Claim-Based Streaming Guardrails
AI 导读
论文提出 C-SafeGen,包含基于 Claim 的流式解码算法(CSD)与基于 conformal analysis 的统计风险保证框架,用于守护大语言模型的逐句安全生成,并通过回溯机制修改高风险内容。理论证明 CSD 可渐近地将安全风险控制到任意期望水平,并给出高概率安全风险上界。实验显示其效果和效率优于最先进的安全解码方法。
正文 · 原文
Abstract:Despite the remarkable capabilities of large language models (LLMs) across diverse applications, they remain vulnerable to generating content that violates safety regulations and policies. To mitigate these risks, LLMs undergo safety alignment; however, they can still be effectively jailbroken. Off-the-shelf guardrail models are commonly deployed to monitor generations, but these models primarily focus on detection rather than ensuring safe decoding of LLM outputs. Moreover, existing efforts lack rigorous safety guarantees, which are crucial for the universal deployment of LLMs and certifiable compliance with regulatory standards. In this paper, we propose a Claim-based Stream Decoding (CSD) algorithm coupled with a statistical risk guarantee framework using conformal analysis. Specifically, our CSD algorithm integrates a stream guardrail model to safeguard sequential claims generated by LLMs and incorporates a backtracking mechanism to revise claims flagged with high safety risks. We provide theoretical guarantees demonstrating that the CSD algorithm achieves the desired generation distribution subject to safety constraints. Furthermore, we introduce a generation risk certification framework and derive a high-probability upper bound on the safety risk of the proposed CSD algorithm. We prove that our method can asymptotically control safety risk to any desired level. Empirical evaluations demonstrate the effectiveness and efficiency of the CSD algorithm compared to state-of-the-art safety decoding approaches. Additionally, we validate the soundness and tightness of the derived safety risk upper bound using realistic data.
| Subjects: | Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.34961 [cs.AI] |
| (or arXiv:2610.34961v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2610.34961 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Mintong Kang [view email]
[v1]
Mon, 26 Oct 2026 07:28:16 UTC (741 KB)
来源:arXiv cs.AI · arxiv.org