Bounded Reachability & Jailbreak Detection via Contraction-Constrained State Space Models
作者: Omanshu Thapliyal
分类: cs.AI
发布日期: 2026-10-02
备注: 21 pages, 18 figures, AIMS Workshop @ COLM 2026
💡 一句话要点
提出收缩约束状态空间模型以解决安全头的可达性与监测问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 安全头 状态空间模型 鲁棒性认证 收缩条件 有害内容检测
📋 核心要点
- 现有的安全头在鲁棒性方面缺乏正式认证,导致其在处理有害输入时的可靠性受到质疑。
- 本文提出了一种基于收缩约束的状态空间模型,通过满足特定条件来实现对安全头的正式认证。
- 实验结果显示,使用收缩正则化的S4安全头在监测越狱攻击时,检测率达到了0.994,显著提升了分类性能。
📝 摘要(中文)
安全头是附加在预训练语言模型上的轻量级分类器,用于在生成之前标记有害输入。尽管其检测性能已被实证研究,但其正式的鲁棒性特性仍未得到充分探索。本文探讨了基于状态空间模型(SSM)的安全头在有界嵌入空间扰动下能否被认证为对所有输入产生相同预测。我们证明,答案依赖于一个条件:状态转移矩阵的$l_ ext{∞}$范数必须满足$ orm{A}_ ext{∞}<1$(收缩条件),这使得线性时不变分类器的区间界限传播(IBP)认证成为可能。当收缩条件成立时,可达的输出区间具有有界的稳态宽度,样本可以被认证为鲁棒分类。当条件不成立时,区间随序列长度呈指数增长,且在任何实际扰动半径下认证变得不可能。我们通过铰链惩罚来强制收缩,并在有害评论数据上显示认证比例从41%提高到59%。
🔬 方法详解
问题定义:本文旨在解决安全头在处理有害输入时的鲁棒性认证问题。现有方法缺乏对输入扰动的正式认证,导致其在实际应用中的可靠性不足。
核心思路:论文提出通过收缩条件来确保状态转移矩阵的$l_ ext{∞}$范数小于1,从而实现对输出的区间界限传播(IBP)认证。这一设计使得在有界扰动下,模型能够保持一致的预测。
技术框架:整体架构包括状态空间模型的构建、收缩条件的强制实施以及通过铰链惩罚优化模型。主要模块包括输入处理、状态转移、输出生成和认证过程。
关键创新:最重要的技术创新在于提出了收缩条件作为认证的核心依据,与现有方法相比,提供了形式化的鲁棒性保证,而不仅仅是经验性检测。
关键设计:关键参数设置包括状态转移矩阵的设计和铰链惩罚的权重调整,确保收缩条件的满足。此外,采用线性时不变分类器结构以实现有效的区间界限传播。
🖼️ 关键图片
📊 实验亮点
实验结果表明,经过收缩正则化的S4安全头在毒性评论数据集上的认证比例从41%提升至59%。在越狱检测任务中,S4安全头在JailbreakBench上实现了零样本迁移,检测率达到0.994,显示出显著的性能提升。
🎯 应用场景
该研究在安全性检测领域具有广泛的应用潜力,尤其是在社交媒体、在线评论和内容生成等场景中。通过提供正式的鲁棒性认证,能够有效提升模型在处理有害内容时的可靠性,未来可能推动更安全的AI应用开发。
📄 摘要(原文)
Safety heads are lightweight classifiers attached to pretrained language models for flagging harmful inputs before generation. Their empirical detection performance has been studied, but their formal robustness properties remain largely unexplored. We ask when a State Space Model (SSM)-based safety head can be certified to produce the same prediction for all inputs within a bounded embedding-space perturbation. We prove that the answer turns on a single condition: the $l_\infty$ norm of the state transition matrix must satisfy $\norm{A}\infty<1$ (the \emph{contraction condition}), which enables exact interval bound propagation (IBP) certification for linear time-invariant classifiers. When the contraction condition holds, the reachable output interval has bounded steady-state width and examples can be certified as robustly classified. When it fails, the interval grows exponentially with sequence length and certification is impossible at any practical perturbation radius. We enforce contraction with a hinge penalty and show on toxic comment data that certified fraction improves from 41\% to 59\%, with a sharp empirical phase transition at $\norm{A}\infty=1$ matching the theory. Applying a contraction-regularized S4 head to jailbreak detection on JailbreakBench, we achieve a zero-shot transfer to AdvBench (DR=0.994) and HarmBench (DR=0.988). A logistic regression on mean-pooled Mamba-130M embeddings matches or exceeds the S4 head on every detection metric, confirming that harmful intent is already linearly separable in the embedding space. The S4 safety head's contribution is not superior discrimination but the formal certification that no probe-based approach provides.