arXiv:2512.12069cs.CRcs.AI2025-12ACL被引 12

通过分析模型内部表示,用简单方法区分恶意攻击与正常变化。

Rethinking Jailbreak Detection of Large Vision Language Models with Representational Contrastive Scoring

  • 利用模型内部表示的几何结构进行对比评分
  • 在未见过的攻击类型上达到顶尖检测效果
  • 轻量高效,适合实际部署,可解释性强

大型视觉语言模型(LVLMs)面临日益增多的多模态越狱攻击,亟需具备泛化能力且计算高效的防御机制。现有方法或针对特定攻击模式,泛化性差;或计算开销大。尽管轻量级异常检测方法有潜力,但其常见的单类设计常将未见良性输入误判为恶意,导致过度拒绝。为此,我们提出表征对比评分(RCS),核心洞察是:最强的安全信号存在于模型自身的内部表示中。该方法分析这些表示的内部几何结构,学习一个轻量投影,使安全关键层中的良性与恶意输入最大化分离,从而生成简单而强大的对比分数,有效区分真实恶意意图与单纯分布偏移。其实例MCD(马哈拉诺比斯对比检测)和KCD(K近邻对比检测)在测试未见攻击类型的挑战性评估协议中表现领先。本工作表明,通过在内部表示上应用简单可解释的统计方法,即可实现有效的越狱检测,为更安全的LVLM部署提供了实用路径。

原文摘要 · Abstract (English)

Large Vision-Language Models (LVLMs) are vulnerable to a growing array of multimodal jailbreak attacks, necessitating defenses that are both generalizable to novel threats and efficient for practical deployment. Many current strategies fall short, either targeting specific attack patterns, which limits generalization, or imposing high computational overhead. While lightweight anomaly-detection methods offer a promising direction, we find that their common one-class design tends to confuse unseen benign inputs with malicious ones, leading to unreliable over-rejection. To address this, we propose Representational Contrastive Scoring (RCS), a framework built on a key insight: the most potent safety signals reside within the LVLM's own internal representations. Our approach inspects the internal geometry of these representations, learning a lightweight projection to maximally separate benign and malicious inputs in safety-critical layers. This enables a simple yet powerful contrastive score that differentiates true malicious intent from mere distribution shift. Our instantiations, MCD (Mahalanobis Contrastive Detection) and KCD (K-nearest Contrastive Detection), achieve state-of-the-art performance on a challenging evaluation protocol designed to test generalization to unseen attack types. This work demonstrates that effective jailbreak detection can be achieved by applying simple, interpretable statistical methods to the internal representations, offering a practical path towards safer LVLM deployment.

模型安全越狱检测视觉语言模型轻量检测

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