arXiv:2509.26238cs.LG2025-09被引 12

动态调整检测强度,让大模型安全监控更高效省资源。

Beyond Linear Probes: Dynamic Safety Monitoring for Language Models

  • 用逐项累加的多项式分类器,按需增加计算量
  • 在4个30B参数模型上,性能超越或持平传统方法
  • 适合需要灵活调节安全等级的开发者和监管者

监控大语言模型的激活值是提前发现有害请求的有效手段。但传统安全监测对每条输入都消耗相同算力,导致简单请求浪费资源,而廉价方法又可能漏掉隐蔽风险。本文提出截断多项式分类器(TPCs),作为线性探测的自然扩展,可逐项训练和评估。测试时可早期停止实现轻量监测,或增加项数以增强防护。该方法提供两种使用模式:一是作为安全调节旋钮,通过增加项数“购买”更强防护;二是自适应级联,明确案例快速通过低阶检查,模糊输入才启用高阶防护,降低总体成本。在WildGuardMix数据集上,针对最多300亿参数的4个模型,TPCs在有害提示分类任务中表现优于或等同于同等规模的MLP基线,且比黑箱模型更具可解释性。

原文摘要 · Abstract (English)

Monitoring large language models' (LLMs) activations is an effective way to detect harmful requests before they lead to unsafe outputs. However, traditional safety monitors often require the same amount of compute for every query. This creates a trade-off: expensive monitors waste resources on easy inputs, while cheap ones risk missing subtle cases. We argue that safety monitors should be flexible--costs should rise only when inputs are difficult to assess, or when more compute is available. To achieve this, we introduce Truncated Polynomial Classifiers (TPCs), a natural extension of linear probes for dynamic activation monitoring. Our key insight is that polynomials can be trained and evaluated progressively, term-by-term. At test-time, one can early-stop for lightweight monitoring, or use more terms for stronger guardrails when needed. TPCs provide two modes of use. First, as a safety dial: by evaluating more terms, developers and regulators can "buy" stronger guardrails from the same model. Second, as an adaptive cascade: clear cases exit early after low-order checks, and higher-order guardrails are evaluated only for ambiguous inputs, reducing overall monitoring costs. On WildGuardMix, across 4 models with up to 30B parameters, we show that TPCs compete with or outperform MLP-based probe baselines of the same size for harmful prompt classification, all the while being more interpretable than their black-box counterparts. Our code is available at http://github.com/james-oldfield/tpc.

安全监控动态计算可解释性

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