TL;DR
Vision-Language Models (VLMs) remain highly vulnerable to jailbreak attacks because existing safety frameworks overlook complex, context-dependent interactions between text and images. This paper introduces HoliSafe, a comprehensive dataset and benchmark covering all five safe/unsafe multimodal combinations, alongside a plug-and-play Visual Guard Module (VGM) that gives VLMs the dual ability to generate safe text and explicitly classify visual harms.
What Problem Does This Paper Address?
While large language models have benefited from extensive safety alignment, extending these guardrails to multimodal Vision-Language Models (VLMs) introduces a massive blind spot: the interplay between text and images.
Current VLM safety datasets and benchmarks suffer from narrow coverage, typically focusing on single modalities in isolation (e.g., an explicitly unsafe text prompt). They completely miss contextually unsafe combinations where a benign image paired with a benign text prompt together produce harmful content (such as generating a malicious interpretation of a harmless photo). Furthermore, existing defense strategies rely almost entirely on data-centric fine-tuning without architectural safeguards, leaving models unable to explicitly detect or reason about harmful visual features.
Methods
To bridge the gap between pure safety classifiers and conversational agents, the authors propose a modular framework featuring a Visual Guard Module (VGM).
- Architecture: The VGM is a lightweight multi-layer perceptron (MLP) consisting of two linear layers and a GELU activation function. It takes the final-layer visual tokens processed by the vision encoder and LLM, pools them into a single global vector, and classifies the image's harmfulness according to a 7-category safety taxonomy.
- Dual Functionality: Instead of acting as an external, standalone guardrail, the VGM is plugged directly into the VLM. This allows the model to simultaneously generate a safe textual response and output an interpretable safety classification to justify its refusal.
- Joint Training: The framework uses joint end-to-end training with two objectives: a classification loss for the VGM and a standard next-token prediction loss (via LoRA) for the VLM backbone.
Datasets
The authors introduced a unified data suite to train and evaluate their framework:
- HoliSafe Dataset: A newly curated dataset containing 14,246 image-instruction-response triplets. It systematically covers all five possible safeness combinations: Unsafe Image + Unsafe Text ($U_I U_T$), Unsafe Image + Safe Text ($U_I S_T$), Safe Image + Unsafe Text ($S_I U_T$), Safe Image + Safe Text yielding Unsafe content ($S_I S_T \rightarrow U$), and Safe Image + Safe Text yielding Safe content ($S_I S_T \rightarrow S$). Images were sourced from existing datasets (VLGuard, SPA-VL, LLaVAGuard) and augmented with synthetic images from generative models (FLUX-Dev, REVE).
- HoliSafe-Bench: A subset of 1,796 images and 4,031 QA instances reserved exclusively for benchmarking.
Key Insights and Ideas
- Images are the Primary Vulnerability: Unsafe images are a significantly more potent attack vector than unsafe text. Scenarios involving unsafe images paired with safe text ($U_I S_T$) consistently yielded the highest attack success rates across all models. This occurs because while the LLM component inherits text-level safety alignment, the vision encoder is typically not pre-trained for safety.
- The Power of Multimodal Context: Models frequently fail when individual modalities appear safe but their combination is toxic ($S_I S_T \rightarrow U$), highlighting the critical need for holistic benchmarks.
- String Matching is Highly Effective for Evaluation: The authors found an incredibly high correlation ($\rho = 0.99$) between simple keyword-based string matching and advanced LLM-as-a-judge evaluations, offering a cost-effective alternative for safety benchmarking.
Key Results
The authors implemented their framework across several open-weight architectures, creating the Safe-VLM series (SafeLLaVA, SafeGem, and SafeQwen).
- State-of-the-Art Safety: Safe-VLM models dramatically reduced the mean Attack Success Rate (mASR). For example, SafeLLaVA-7B dropped the mASR to under 10–16% across various automated judges, outperforming standard safety-tuned baselines whose failure rates peaked as high as 79.1%.
- No Utility Trade-off: Crucially, this safety enhancement comes with virtually no penalty to general capabilities; helpfulness scores across standard benchmarks (MMMU, VizWiz, etc.) dropped by a negligible 0 to 1.2 percentage points.
- Superior Guard Performance: When evaluated purely as an image safety classifier, Safe-VLM outperformed specialized standalone guard models like Llama-Guard-3-Vision and ShieldGemma in F1-score and precision.
Limitations and Future Work
- Reasoning-Enhanced Models: The benchmark does not yet include proprietary, reasoning-heavy models (like Gemini 1.5 Pro) due to high inference API costs.
- Simplistic Guard Architecture: The VGM currently utilizes a basic MLP architecture. The authors note that exploring more advanced architectures, such as Transformer-based guard modules, could further boost the model's visual discrimination capabilities and allow it to actively steer the text generation process.
Summary updated