用轻量监控提前识别对话中的隐性有害内容,不增加推理开销。
AERIC: Anticipatory Hidden-State Monitoring for Implicit Harmful Dialogue

- 基于模型内部状态,在生成过程中预测潜在有害内容。
- 在多个基准上将检测准确率提升至0.71以上,触发率超64%。
- 仅387个可训练参数,部署延迟增加不足2.5%,适合实时应用。
当前语言模型面临双重安全挑战:需尽早发现风险以避免暴露有害内容,且有害性常为隐性而非显式毒性文本。现有响应级防护对完成文本有效,流式防护接近词元时间,但尚未解决轻量监控能否从生成器自身内部轨迹预判隐性有害偏移的问题。本文研究同轮次前瞻性监控,即安全监控可读取常规解码过程中的隐藏状态,但不可触发基模型额外前向传播。提出AERIC,一种面向隐性有害对话的转移型隐藏状态方法,结合短时程危险预测、敏感度抑制与提示条件残差评分,采用同轮次指数移动平均决策规则。默认线性监控仅含387个可训练头参数。在平衡基准上,相比Qwen3GuardStream-4B,AERIC将DiaSafety的AUROC从0.6830提升至0.7143,Harmful Advice从0.8219提升至0.8582。针对提示级触发基准,通过源端安全预算规则校准阈值,在保证安全触发率≤10%前提下,触发@64达0.6438(HarmBench DirectRequest)和0.4656(SocialHarmBench),分别平均抑制23.53至41.86个回答词元。同轮次部署效率高:在63个提示的固定生成基准上,平均延迟仅增加2.34%,而Qwen3Guard-Stream-4B增加79.40%。
原文摘要 · Abstract (English)
Current language models create two safety challenges: risk must be detected early enough to avoid exposing harmful continuation, and the harmfulness itself may be implicit rather than signaled by overtly toxic text. Existing response-level guards are strong at judging completed text, and native streaming guards move closer to token time, but both settings leave open whether a lightweight monitor can anticipate implicit harmful drift from the generator's own internal trajectory. We study anticipatory same-pass monitoring, where a safety monitor may read hidden states produced during ordinary decoding but may not invoke an additional forward pass through the base model. We introduce AERIC, a transfer-oriented hidden-state approach for implicit harmful dialogue that combines short-horizon hazard forecasting, support-sensitive suppression, and prompt-conditioned residual scoring under a same-pass exponential moving average decision rule. The default linear monitor contains only 387 trainable head parameters. Against Qwen3GuardStream-4B on balanced benchmarks, AERIC improves AUROC from 0.6830 to 0.7143 on DiaSafety and from 0.8219 to 0.8582 on Harmful Advice. For promptlevel trigger benchmarks, we calibrate the AERIC threshold by a source-side safe-budget rule that maximizes trigger coverage while constraining the safe-trigger rate to at most 10%. Under that rule, trigger@64 reaches 0.6438 and 0.4656 on HarmBench DirectRequest and 0.6849 and 0.7363 on SocialHarmBench for Qwen and Gemma, respectively, withholding between 23.53 and 41.86 answer tokens on average. Same-pass deployment is also efficient: on a 63-prompt harmfulprompt fixed-generation benchmark aggregated over HarmBench DirectRequest and SocialHarmBench under Qwen3-8B, the monitor increases mean latency by only 2.34%, whereas Qwen3Guard-Stream-4B increases it by 79.40%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。