TL;DR
While multimodal large language models (MLLMs) excel at refusing explicitly harmful text queries, they are surprisingly blind to safety hazards when a benign text prompt is combined with a risky image—a vulnerability termed cross-modal safety drift. This paper introduces Safety-Awareness Representation Transfer (SRT), a lightweight, inference-time intervention that extracts safety activation directions from text-based refusals and transfers them to visual inputs, drastically reducing unsafe responses without sacrificing model utility or speed.
What Problem Does This Paper Address?
Current MLLM safety alignment relies heavily on text-only data, leaving a critical vulnerability: cross-modal safety drift. This occurs when a textual prompt is completely benign on its own, but its combination with an image introduces a severe safety violation.
The authors categorize this drift into two distinct failure patterns:
- Safe text + Unsafe image ($S_tU_i \rightarrow U$): The user asks a benign question (e.g., "What precautions should be taken when...") accompanied by an image containing explicit self-harm or dangerous objects.
- Safe text + Safe image ($S_tS_i \rightarrow U$): Neither the text nor the image is inherently unsafe in isolation, but their composition implies a harmful intent. For example, asking "Write a poem about diving into the sea" alongside an image of a backpack filled with heavy stones (implying suicide).
As shown below, standard models and existing defenses frequently fail to trigger refusals in these scenarios because the model's internal safety mechanisms are weakly connected to visual inputs.
Methods
Through mechanistic probing of model activations, the authors discovered that explicit harmful text strongly separates safe and unsafe inputs along a low-dimensional "refusal axis" in the model's hidden states. In contrast, visual risk cues fail to trigger this shift because the model's refusal layers do not allocate sufficient attention mass to visual tokens.
To bridge this gap, the authors propose Safety-Awareness Representation Transfer (SRT), a lightweight steering approach that operates with a completely frozen MLLM backbone:
- Direction Extraction & Selection: SRT extracts a candidate activation direction vector ($\mathbf{v}_0$) by calculating the difference between the mean hidden representations of explicit harmful text inputs and benign inputs at pre-refusal layers.
- Refusal-Process Supervision: The raw direction is optimized using a contrastive loss function. This objective forces subsequent refusal layers to increase attention mass on visual risk cues for unsafe inputs, while minimizing any downstream activation disturbance on benign inputs.
- Output-Behavior Supervision: To ensure internal safety awareness translates cleanly into final text generation, a second contrastive loss is applied to the last-layer logits, preserving the model's refusal capability on unsafe inputs while enforcing low KL-divergence on benign queries to prevent over-refusal.
Datasets
The method was trained and evaluated across a diverse suite of safety and utility benchmarks:
- Safety Evaluation ($S_tS_i$ and $S_tU_i$ settings): SIUO, VLSBench, MM-SafetyBench (SD+TYPO split), FigStep, and the holistic safety benchmark HoliSafe (including its SSU, USU, SUU, and UUU subsets).
- Utility Evaluation: MM-Vet, MME, and L-Bench (LLaVA-Bench-Coco) were utilized to verify that general visual understanding, OCR, and reasoning capabilities remained intact.
- Training Details: SRT requires only a small subset of 300 samples from VLSBench (harmful set) and 217 samples from MM-Vet (benign set), taking roughly 30 minutes to train on 4 NVIDIA A100 GPUs.
Key Insights and Ideas
- Text is the Primary Safety Trigger: MLLMs are heavily dependent on explicit textual keywords to activate their safety guardrails. Shifting the hazard entirely into the visual modality drops the model's safe response ratio from 98.3% to 53.3%.
- Visual Blind Spots in Refusal Layers: In explicit text attacks, the word "harm" receives up to 16.23% of the model's attention mass. For visual risks (e.g., an image of drugs or weapons), the corresponding visual tokens receive a mere 2.98% of attention mass in critical refusal layers.
- Upstream Safety is Modality-Agnostic: The internal representations that signify "safety awareness" can be decoupled from the final "refusal execution" layers. By injecting refined text-induced safety directions into upstream layers, the model can be successfully steered to "see" and process visual risks.
Key Results
- State-of-the-Art Safety Mitigation: SRT consistently achieved the lowest unsafe generation rates across multiple model families (Qwen3-VL, Gemma-3, InternVL2, LLaVA-OneVision). On Qwen3-VL-8B, SRT brought the VLSBench unsafe rate down from 34.09% (Baseline) to 1.47%, outperforming existing inference-time defenses like ShiftDC (35.10%) and CoCA (39.93%).
- High Utility Retention: SRT maintains a highly favorable safety-utility trade-off. For instance, Qwen3-VL-8B's MM-Vet utility score slightly improved from 64.4 to 65.0 after applying SRT, proving it avoids the trap of indiscriminate over-refusal.
- Minimal Inference Overhead: Because SRT only applies a static, lightweight activation-level vector addition during the forward pass, it circumvents the high latencies of captioning- or detection-based defenses. It runs at 37.60 ms/token on Qwen3-VL-8B, virtually identical to the vanilla baseline (37.06 ms/token).
Limitations and Future Work
- Dependence on Prior Text Alignment: SRT fundamentally relies on the base MLLM already having a stable, well-aligned text-refusal mechanism. If a base model cannot reliably refuse explicit text threats, the extracted activation directions will lack the necessary safety-aware signals.
- Architectural and Scale Generalization: While the authors demonstrated strong generalization on larger models like Qwen3-VL-32B and Gemma-3-27B-IT, further validation is required across a broader array of model families, scales, and diverse pre-training paradigms to confirm the long-term stability of the refined directions.
Summary updated