arXiv:2507.20333cs.AIcs.LG2025-07被引 9

高维表示让大模型更安全也更易被绕过,降维可增强抗攻击能力。

The Blessing and Curse of Dimensionality in Safety Alignment

  • 通过降维保留对齐信息,避开高维中的线性漏洞。
  • 实验证明降维后模型抗提示劫持能力显著提升。
  • 适合关注模型安全与对抗攻击的研究者阅读。

大型语言模型(LLMs)因广泛应用而备受安全对齐关注,其参数量增长伴随隐藏维度增大。本文提出:高维表示虽是优势,却可能引发新问题——激活空间中的线性结构可被利用于激活工程以绕过安全对齐。通过可视化不同规模模型中与安全等概念相关的线性子空间,我们发现高维表征的独特负面影响。进一步验证表明,将模型表示投影到低维子空间,可在保持对齐信息的同时规避这些线性结构。实验确认该方法显著降低模型对表示工程导致的越狱攻击的敏感性。基于实证结果,我们提供了关于线性越狱方法与模型隐藏维度之间关系的理论分析。总体而言,高维内部表示在安全对齐中既是助力也是隐患。

原文摘要 · Abstract (English)

The focus on safety alignment in large language models (LLMs) has increased significantly due to their widespread adoption across different domains. The scale of LLMs play a contributing role in their success, and the growth in parameter count follows larger hidden dimensions. In this paper, we hypothesize that while the increase in dimensions has been a key advantage, it may lead to emergent problems as well. These problems emerge as the linear structures in the activation space can be exploited, in the form of activation engineering, to circumvent its safety alignment. Through detailed visualizations of linear subspaces associated with different concepts, such as safety, across various model scales, we show that the curse of high-dimensional representations uniquely impacts LLMs. Further substantiating our claim, we demonstrate that projecting the representations of the model onto a lower dimensional subspace can preserve sufficient information for alignment while avoiding those linear structures. Empirical results confirm that such dimensional reduction significantly reduces susceptibility to jailbreaking through representation engineering. Building on our empirical validations, we provide theoretical insights into these linear jailbreaking methods relative to a model's hidden dimensions. Broadly speaking, our work posits that the high dimensions of a model's internal representations can be both a blessing and a curse in safety alignment.

模型安全高维表示越狱攻击

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