让大模型按需开启安全干预,避免误伤正常生成。
SafeRI: Recognition and Intervention for Token-Level Safety Intervention in Large Vision Language Models

- 用轻量识别器实时判断生成状态是否安全,决定是否激活干预模块。
- 仅在检测到不安全时启用LoRA微调,保持其他生成不受影响。
- 适合需要精准安全控制的多模态应用,如医疗或金融对话系统。
现有视觉语言模型的安全对齐方法通常全局修改模型行为:一旦安全参数训练或加载,就会参与所有生成过程,无论内容是否安全。这种持续干预会无谓扰动模型原有的推理路径,损害其通用多模态能力。我们主张安全对齐应为按需触发的干预,而非对每个解码轨迹的永久修改。为此,提出一种流式识别与门控LoRA框架,用于内在视觉语言模型的安全控制。在自回归生成过程中,一个轻量级识别器实时评估当前预令牌生成状态是否安全,并据此更新后续解码步骤的LoRA门控;否则仍沿用冻结主干策略。该LoRA模块基于不安全前缀、过渡语句及安全延续进行训练,学习在激活后将不安全生成引导回安全响应。跨多个安全性和通用基准的实验表明,该方法在后对齐设置下具有显著有效性。
原文摘要 · Abstract (English)
Existing safety alignment methods for vision-language models usually modify the model behavior globally: once the safety parameters are trained or loaded, they participate in both unsafe and already-safe generations. This always-on intervention can unnecessarily perturb the model's original reasoning path and degrade general multimodal capabilities. We argue that safety alignment should be an on-demand intervention rather than a permanent modification to every decoding trajectory. To this end, we propose a streaming recognition and gated LoRA framework for intrinsic VLM safety. During autoregressive generation, a lightweight recognizer estimates whether the current pre-token generation state is safe or unsafe. Its output updates the LoRA gate for the following decoding step; otherwise, generation follows the frozen-backbone policy. The LoRA module is trained from unsafe prefixes, transition statements, and safe continuations, so that it learns to redirect unsafe generations back to safe responses after activation. Experiments across multiple safety and general-purpose benchmarks demonstrate the effectiveness of our method in post-alignment settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。