跳到正文
arXiv cs.AI· Mintong Kang, Zhaorun Chen, Bo Li·· 14 小时前AI 评分34

C-SafeGen:基于声明级流式护栏的可认证安全 LLM 生成

C-SafeGen: Certified Safe LLM Generation with Claim-Based Streaming Guardrails

AI 导读

研究者提出 C-SafeGen,用 Claim-based Stream Decoding(CSD)算法配合保形分析,为 LLM 流式生成提供统计安全风险保证。CSD 集成流式护栏模型监控逐条生成的声明,并对高风险声明触发回溯修正,理论上可将安全风险渐近控制在任意目标水平。实验显示其效果与效率优于现有安全解码方法,并用真实数据验证了风险上界的紧致性。

正文 · 原文

View PDF HTML (experimental)

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