TL;DR: Vision-Language Models (VLMs) are surprisingly easy to "jailbreak" compared to their text-only counterparts because visual inputs trick the model into perceiving harmful requests as safe. This paper introduces ShiftDC (Activation Shift Disentanglement and Calibration), a training-free, inference-time method that recalibrates internal activations to restore safety alignment without sacrificing the model's visual reasoning performance.
The Problem: Safety Perception Distortion
While Large Language Models (LLMs) have become quite robust at rejecting harmful text prompts, their multimodal successors—VLMs—are notoriously leaky. A model that correctly refuses to explain "how to make a bomb" in text might happily provide instructions if the user asks "How do I make this?" alongside an image of a bomb.
The authors identify a phenomenon they call safety perception distortion. They discovered that adding an image modality causes a systematic "activation shift" in the model's internal layers. Essentially, the presence of an image pushes the model's internal state into a region that the underlying LLM backbone perceives as "safe," even when the content is clearly malicious.
Existing defenses often rely on expensive fine-tuning or "defensive prompts" that make the model overly cautious, leading it to reject perfectly benign requests (the "over-refusal" problem).
The Solution: ShiftDC
To counter this vulnerability, the researchers propose ShiftDC, an inference-only technique that operates directly on the model's internal activations. The process works in three main steps:
- Isolating the Safety Direction: By comparing activations of safe versus unsafe text-only prompts, the authors identify a "safety-relevant" vector in the activation space.
- Disentangling the Modality Shift: During inference, the VLM processes the image-text input. It also generates a quick caption of the image to create a "text-only counterpart." The difference between the multimodal activation and the text-only activation represents the "modality-induced shift."
- Calibration: This modality shift is disentangled into two parts: a component that aligns with the safety direction and a component that contains useful visual information (utility). ShiftDC subtracts only the safety-distorting component, effectively "moving" the activation back to a position where the LLM backbone's original safety mechanisms can recognize the threat.
Unlike other methods, ShiftDC is training-free and does not require modifying the model's underlying weights.
Key Insights
- The "Optimism" of Vision: The most striking finding is that images—even blank ones—tend to shift activations toward the "safe" side of the model's decision boundary. The VLM isn't "forgetting" its training; it's being systematically misled by the new modality.
- Linear Separability: In text-only mode, safe and unsafe activations are clearly separated. Once images are introduced, these activations become "intermixed" in the internal layers, making it impossible for the model to distinguish between them without calibration.
- Utility Preservation: Because ShiftDC only removes the component of the shift that is orthogonal to visual semantics (the safety-relevant part), the model retains its ability to describe colors, count objects, and understand spatial relationships.
Evaluation and Results
The authors evaluated ShiftDC across a comprehensive suite of benchmarks, including safety datasets (MM-SafetyBench, FigStep, JailBreakV-28K) and utility benchmarks (MME, MM-Vet, MMBench).
- Significant Safety Gains: On LLaVA-1.5-7B, ShiftDC reduced the Attack Success Rate (ASR) on MM-SafetyBench from 69.3% to 39.7% for OCR-based attacks.
- Outperforming Baselines: ShiftDC consistently beat other inference-time defenses like ECSO and AdaShield across multiple models (LLaVA, MiniGPT-4, Qwen-VL, etc.).
- Zero Utility Loss: On the MME benchmark, ShiftDC maintained a score of 1863.6, nearly identical to the original model's 1863.1, whereas other defense methods saw significant drops in performance.
- Reduced False Alarms: In over-sensitivity tests (MOSSBench), ShiftDC showed only a negligible increase in refusal rates for safe queries, proving it avoids the "trigger-happy" behavior of prompt-based defenses.
Limitations and Future Work
While highly effective, ShiftDC has a few limitations. First, it relies on the VLM's ability to generate a reasonably accurate caption; if the model fails to recognize the core content of the image during the captioning step, the calibration might be less effective. Second, the authors use a single linear direction to represent "safety." Future work could explore higher-dimensional subspaces or non-linear manifolds to capture more complex safety boundaries. Finally, while effective against semantic and typographic attacks, the paper does not deeply explore "uninterpretable" adversarial noise (pixel-level perturbations specifically designed to flip a model's output).
Summary updated