arXiv:2605.17329cs.CRcs.AI2026-05被引 2

用10个隐变量实现动态安全审查,既快又准。

LPG: Balancing Efficiency and Policy Reasoning in Latent Policy Guardrails

  • 将复杂政策判断压缩为10个连续隐变量,实现快速推理。
  • 在基准测试中达84.5%准确率、77.9%F1,比基线快11倍。
  • 适合需实时响应的个性化助手安全管控场景。

安全护栏是现代AI系统的关键保障层,但其运行模式正发生变化:随着大模型作为定制化助手部署,安全策略越来越多地由用户、组织或监管环境在推理时指定。这使得安全执行变得高度动态——护栏需适应变化的安全策略而无需重新训练。然而,这一需求带来根本性矛盾:准确判断复杂政策上下文需要推理能力,而实际部署又要求低延迟响应。我们提出潜空间策略护栏(LPG),一种通过语义隐式推理来应对动态策略的框架。LPG将意图解析与策略对齐所需的内部推理过程压缩为由决策相关语义监督的连续状态。推理时仅生成锚定于违规条款的紧凑结论,保持可审计性的同时避免显式推理的延迟。在多项政策护栏基准测试中,LPG-4B实现平均84.5%安全准确率和77.9% F1,仅用10个隐变量完成推理,优于最强动态基线,且在单样本评估下速度约为Qwen3-4B-Thinking的11倍。代码与数据已公开于https://github.com/SaFo-Lab/Latent_Policy_Guard。

原文摘要 · Abstract (English)

Guardrails are a critical safety layer for modern AI systems, but their operating regime is changing. As LLMs are deployed as customized assistants, safety policies are increasingly specified at inference time by users, organizations, or regulatory contexts. This makes safety enforcement fundamentally dynamic: the guardrail should adapt to changing safety policies without retraining. Yet this requirement creates a fundamental tension: faithfully judging complex policy contexts demands reasoning capability, while practical deployment requires low-latency responses. We introduce Latent Policy Guardrail (LPG), a guardrail framework that learnssemantic latent deliberation over dynamic policies. LPG compresses the internal deliberation needed for intent interpretation and policy grounding into continuous states supervised by decision-relevant semantics. At inference time, it generates only a compact verdict anchored to the violated policy clauses, preserving auditability while avoiding the latency of explicit reasoning. Across policy guardrail benchmarks, LPG-4B reaches 84.5% average safety accuracy and 77.9% F1 by compressing deliberation into just 10 latent tokens, outperforming the strongest dynamic baseline while running roughly 11 times faster than Qwen3-4B-Thinking under the single-sample evaluation setup. Code and data are available at https://github.com/SaFo-Lab/Latent_Policy_Guard.

安全护栏动态策略隐变量推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。