通过推理时自反思记忆演化多模态大语言模型的上下文安全
Evolving Contextual Safety in Multi-Modal Large Language Models via Inference-Time Self-Reflective Memory
提出上下文安全基准 MM-SafetyBench++ 和免训练框架 EchoSafe,通过自反思记忆库在推理时积累和检索安全经验,为视觉语言模型的安全对齐提供可复用的推理时自适应思路。
原文依据 we introduce EchoSafe, a training-free framework that maintains a self-reflective memory bank to accumulate and retrieve safety insights from prior interactions.
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论多模态大语言模型(MLLMs)在广泛的视觉推理任务中取得了显著性能,然而其对安全风险的脆弱性仍然是一个紧迫的问题。尽管先前研究主要关注检测并拒绝明确不安全输入的越狱防御,但这类方法往往忽略了上下文安全,即要求模型区分看似相似但在安全意图上存在显著差异的场景之间的细微上下文差别。在本工作中,我们提出了 MM-SafetyBench++,一个精心构建的用于上下文安全评估的基准。具体而言,对于每个不安全的图文对,我们通过最小修改构建一个对应的安全配对,这些修改翻转了用户意图同时保留了底层上下文含义,从而能够受控地评估模型是否能基于上下文理解调整其安全行为。此外,我们引入了 EchoSafe,一个免训练框架,它维护一个自反思记忆库以积累和检索来自先前交互的安全见解。通过将相关的过往经验整合到当前提示中,EchoSafe 在推理过程中实现了上下文感知的推理和安全行为的持续演化。在各种多模态安全基准上的大量实验表明,EchoSafe 始终取得优越性能,为推进 MLLMs 中的上下文安全建立了一个强有力的基线。所有基准数据和代码将在接收后公开。
英文原文摘要 1560 字符
Multi-modal Large Language Models (MLLMs) have achieved remarkable performance across a wide range of visual reasoning tasks, yet their vulnerability to safety risks remains a pressing concern. While prior research primarily focuses on jailbreak defenses that detect and refuse explicitly unsafe inputs, such approaches often overlook contextual safety, which requires models to distinguish subtle contextual differences between scenarios that may appear similar but diverge significantly in safety intent. In this work, we present MM-SafetyBench++, a carefully curated benchmark designed for contextual safety evaluation. Specifically, for each unsafe image-text pair, we construct a corresponding safe counterpart through minimal modifications that flip the user intent while preserving the underlying contextual meaning, enabling controlled evaluation of whether models can adapt their safety behaviors based on contextual understanding. Further, we introduce EchoSafe, a training-free framework that maintains a self-reflective memory bank to accumulate and retrieve safety insights from prior interactions. By integrating relevant past experiences into current prompts, EchoSafe enables context-aware reasoning and continual evolution of safety behavior during inference. Extensive experiments on various multi-modal safety benchmarks demonstrate that EchoSafe consistently achieves superior performance, establishing a strong baseline for advancing contextual safety in MLLMs. All benchmark data and code will be made publicly accessible upon acceptance.