arXiv:2608.15673cs.LGcs.AI2026-08

用符号逻辑分离语言模型的语义理解与安全规则推理,提升安全性。

PL-Guard: Probabilistic Logic Reasoning for LLM Guardrails

论文配图:PL-Guard: Probabilistic Logic Reasoning for LLM Guardrails
图 1 · 摘自论文原文
  • 用概率逻辑框架将提示与回复转化为可计算的命题概率
  • 在XSTest上将不安全响应率从22.0%降至0.5%
  • 推理过程透明可审计,适合需要高安全性的场景

大型语言模型的安全防护可视为政策一致性问题:系统需判断提示-回应对中哪些与政策相关的事实成立,以及这些事实依据政策意味着什么。现有方法如策略提示和大模型作为裁判的流水线,常将语义定位与政策推理混在一起,导致对有害提示产生不安全顺从或拒绝帮助无害请求。为分离这两个角色,我们提出PL-Guard,一种神经符号化防护架构。通过包含谓词和ProbLog规则的符号化政策接口,本地大模型利用归一化的真/假标记得分将提示-回应对映射为谓词概率,而ProbLog则在此基础上执行显式的概率规则推理。在离线Qwen评估下,使用人工编写的策略时,PL-Guard将不安全顺从率从基础模型的22.0%降低至0.5%,优于大模型作为裁判基线(6.0%)。代价是过拒率更高,达14.4%(基线为5.2%)。结果表明,分离神经定位与概率符号推理能揭示安全与助人之间的权衡,并使中间推理过程清晰可审计。

原文摘要 · Abstract (English)

Large language model guardrails can be viewed as policy-consistency problems: a system must determine which policy-relevant facts hold in a prompt-response pair and what those facts imply under a given policy. Common approaches, including policy prompting and LLM-as-a-judge pipelines, often overlap the tasks of semantic grounding and policy reasoning: the model both interprets the prompt-response pair and reasons about whether a policy has been violated. This can lead to unsafe compliance with harmful prompts, or refusals to assist benign ones. To separate grounding and reasoning roles, we propose PL-Guard, a neurosymbolic guardrail architecture. Using a symbolic policy interface consisting of predicates and ProbLog rules, a local LLM grounds prompt-response pairs into predicate probabilities using renormalized True/False token scores, while ProbLog performs explicit probabilistic rule inference over the symbolic policy. On the XSTest benchmark, an offline Qwen-based evaluator finds that PL-Guard with a hand-curated policy reduces unsafe compliance from 22.0% for the base model to 0.5%, and below the 6.0% rate of an LLM-as-a-judge baseline. This comes at the cost of higher over-refusal than the LLM-as-a-judge baseline, 14.4% versus 5.2%. These results suggest that separating neural grounding from probabilistic symbolic reasoning can expose the safety-helpfulness tradeoff while making the guardrail's intermediate reasoning steps explicit and auditable.

安全防护符号逻辑大模型

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