arXiv:2604.18901cs.LGcs.AI2026-04被引 2

发现大模型残留流中可几何恢复的有害意图特征

Harmful Intent as a Geometrically Recoverable Feature of LLM Residual Streams

论文配图:Harmful Intent as a Geometrically Recoverable Feature of LLM Residual Streams
图 1 · 摘自论文原文
  • 用软AUC优化从少量样本中提取有害意图方向
  • 平均AUROC达0.982,1%误报率下召回率达0.797
  • 不同提取方式导致方向差异73度,揭示方法依赖性

对12个跨架构、多规模(0.5B至9B)的语言模型进行分析,发现有害意图在残差流激活中具有线性可分性。通过每类100个标注样本的软AUC优化,得到平均有效AUROC为0.982,1%误报率下的真正率(TPR)为0.797,且在三个未见危害基准和一个硬良性控制集上表现良好。该方向在去除拒绝机制的模型中仍能保持与指令微调版本相差不超过±0.003的性能。监督策略均超过AUROC 0.96,但其TPR@1%FPR差异超10倍于AUROC差距;部署的9B安全分类器也呈现相同模式(AUROC 0.94,TPR 0.30),提示安全检测评估应默认采用低误报率报告。几何测量显示:同一层、同一流激活下,两种池化方式(内容令牌最大池化 vs 指令后位置最后令牌)所提取的方向相距73°,将其中一个投影出去后,另一方向的检测性能基本不变,表明探测到的是协议特异性方向而非唯一计算特征。

原文摘要 · Abstract (English)

Aligned language models refuse harmful instructions, but the representations through which they recognise such instructions are less well characterised than the behaviours they produce. Harmful intent is linearly separable from residual-stream activations across 12 models spanning four architectural families (Qwen2.5, Qwen3.5, Llama-3.2, Gemma-3) and three alignment variants (base, instruction-tuned, abliterated), with parameter scales from 0.5B to 1.3B and a within-family scale extension to 9B on Qwen3.5. A direction fitted from 100 labelled examples per class via Soft-AUC optimisation reaches mean effective AUROC 0.982 and TPR@1\%FPR 0.797, generalises to three held-out harm benchmarks and a hard-benign control, and matches its instruction-tuned counterpart within $\pm 0.003$ AUROC in abliterated variants from which the refusal mechanism has been removed. The supervised strategies all exceed AUROC 0.96, but their TPR@1\%FPR varies by more than ten times the AUROC gap; a deployed 9B safety classifier shows the same pattern at AUROC 0.94 and TPR 0.30, motivating low-FPR reporting as a default in safety-adjacent detection evaluation. Geometric measurements refine the picture. The recovered direction is concentrated within each extraction protocol but protocol-dependent across them: two pooling choices applied to the same chat-templated activations at the same residual-stream layer (max-pool over content tokens versus last-token at the post-instruction position) recover harm directions $73^\circ$ apart, and projecting one out leaves detection under either max-pool extraction essentially intact. Probing identifies a protocol-specific direction rather than a unique computational feature.

大模型安全残差流意图识别

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