arXiv:2504.18872cs.CLcs.LG2025-04被引 3

LAT让拒绝行为在隐空间更集中,提升抗攻击能力但易被自生成向量攻破

Latent Adversarial Training Improves the Representation of Refusal

  • 通过引入噪声训练,使拒绝行为在隐空间的前两个主成分中集中
  • 主成分解释了75%的激活差异方差,显著高于基准模型
  • 增强对他人生成向量的鲁棒性,但对自生成向量更脆弱

近期研究发现语言模型的拒绝行为主要编码在其隐空间的一个方向上,易受针对性攻击。尽管隐空间对抗训练(LAT)通过训练时注入噪声试图提升鲁棒性,但其对拒绝行为表征的影响仍不明确。本文以Llama 2 7B为例,分析LAT如何重构隐空间中的拒绝表征,对比传统监督安全微调(SSFT)和嵌入空间对抗训练(AT)。通过计算有害与无害指令对的激活差异并应用奇异值分解(SVD),发现LAT使拒绝表征高度集中于前两个SVD分量,解释约75%的激活差异方差,显著高于基线模型。这种集中化使攻击向量更具迁移性:LAT模型对来自基线模型的向量攻击更具鲁棒性,但对自生成向量攻击反而更敏感。结果表明,LAT的扰动训练能更全面地表征拒绝行为,揭示了其在模型安全上的潜力与新风险。

原文摘要 · Abstract (English)

Recent work has shown that language models' refusal behavior is primarily encoded in a single direction in their latent space, making it vulnerable to targeted attacks. Although Latent Adversarial Training (LAT) attempts to improve robustness by introducing noise during training, a key question remains: How does this noise-based training affect the underlying representation of refusal behavior? Understanding this encoding is crucial for evaluating LAT's effectiveness and limitations, just as the discovery of linear refusal directions revealed vulnerabilities in traditional supervised safety fine-tuning (SSFT). Through the analysis of Llama 2 7B, we examine how LAT reorganizes the refusal behavior in the model's latent space compared to SSFT and embedding space adversarial training (AT). By computing activation differences between harmful and harmless instruction pairs and applying Singular Value Decomposition (SVD), we find that LAT significantly alters the refusal representation, concentrating it in the first two SVD components which explain approximately 75 percent of the activation differences variance - significantly higher than in reference models. This concentrated representation leads to more effective and transferable refusal vectors for ablation attacks: LAT models show improved robustness when attacked with vectors from reference models but become more vulnerable to self-generated vectors compared to SSFT and AT. Our findings suggest that LAT's training perturbations enable a more comprehensive representation of refusal behavior, highlighting both its potential strengths and vulnerabilities for improving model safety.

模型安全隐空间对抗训练

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