Unraveling and Mitigating Safety Alignment Degradation of Vision-Language Models

Qin Liu, Chao Shang, Ling Liu, Nikolaos Pappas, Jie Ma, Neha Anna John, Srikanth Doss, Lluís Màrquez, Miguel Ballesteros, Yassine Benajiba

Abstract: The safety alignment of Vision-Language Models (VLMs) often degrades when vision modules are integrated with safe Large Language Model (LLM) backbones. This paper investigates "safety alignment degradation," attributing it to a representation gap where multi-modal inputs shift away from the text-only distribution the backbone was optimized for. We introduce Cross-Modality Representation Manipulation (CMRM), an inference-time intervention that recovers the backbone's inherent safety by nudging representations back toward the textual space. Empirical results show that CMRM reduces the unsafe rate of LLaVA-7B from 61.53% to 3.15% with minimal impact on utility. Warning: This paper contains examples of toxic or harmful language.

Introduction

Vision-Language Models (VLMs) like LLaVA are typically constructed by integrating a pre-trained vision encoder with a safety-aligned Large Language Model (LLM) backbone. While the backbone is often robustly aligned against generating harmful content in text-only scenarios, this safety frequently collapses when visual inputs are introduced—even if the images are benign, blank, or random noise. This phenomenon, termed "safety alignment degradation," poses a significant risk for the deployment of multi-modal systems.

The Representation Gap

The core issue lies in a fundamental representation gap. LLMs are optimized and aligned within a specific textual embedding space. When visual features are projected into this space, they shift the resulting multi-modal representations into regions where the model's safety training has not been established.

PCA visualizations of the representation gap between text-only and multi-modal inputs across different models.

As shown in Figure 1, text-only queries and multi-modal inputs form distinct, separable clusters. The safety mechanisms developed for the text cluster do not naturally generalize to the multi-modal cluster, leading to the observed degradation. Strikingly, the "blank image paradox" reveals that even a blank image—carrying no semantic information—is sufficient to trigger this shift and subsequent safety failure, proving the issue is modality-driven rather than content-driven.

Methods: Cross-Modality Representation Manipulation (CMRM)

To address this without the need for expensive retraining, we propose CMRM, an inference-time intervention. CMRM identifies the "shift vector" that pulls representations away from the safe textual distribution and subtracts it during the forward pass. This "nudges" the model's internal states back into the region where its safety alignment is active.

The method offers two approaches for shift extraction:

  • Dataset-level (CMRM_dataset): Uses Principal Component Analysis (PCA) across a whole dataset to find a general image-induced shift vector.
  • Sample-level (CMRM_sample): Calculates a specific shift for each individual input by comparing the representation of the prompt with the image against a "corrupted" or blank version.

Results and Discussion

The effectiveness of CMRM was evaluated on safety benchmarks (VLSafe, JailbreakLLMs) and utility benchmarks (L-Bench, S-QA).

Main results comparing safety (Unsafe Rate) and utility (L-Bench, S-QA) across different models and intervention methods.

As detailed in Figure 3, the safety improvements are dramatic. For LLaVA-7B, the unsafe rate on the VLSafe dataset dropped from 61.53% to as low as 3.15% using CMRM_sample. Crucially, this safety gain does not come at the cost of model utility; performance on benchmarks like L-Bench remained stable or even improved, demonstrating that CMRM preserves the model's functional capabilities while restoring its moral compass.

Conclusion and Limitations

Safety alignment degradation in VLMs is a structural issue arising from the shift in latent space when modalities are mixed. CMRM provides a lightweight, effective, and training-free solution to recover the safety inherent in the LLM backbone.

While effective, CMRM introduces a small computational overhead (roughly 10-20% latency increase) due to the extra calculations required to determine the shift vector. Future work may explore similar interventions for other traits like logical reasoning or hallucination reduction.

Summary updated

Abstract

The safety alignment ability of Vision-Language Models (VLMs) is prone to be degraded by the integration of the vision module compared to its LLM backbone. We investigate this phenomenon, dubbed as ''safety alignment degradation'' in this paper, and show that the challenge arises from the representation gap that emerges when introducing vision modality to VLMs. In particular, we show that the representations of multi-modal inputs shift away from that of text-only inputs which represent the distribution that the LLM backbone is optimized for. At the same time, the safety alignment capabilities, initially developed within the textual embedding space, do not successfully transfer to this new multi-modal representation space. To reduce safety alignment degradation, we introduce Cross-Modality Representation Manipulation (CMRM), an inference time representation intervention method for recovering the safety alignment ability that is inherent in the LLM backbone of VLMs, while simultaneously preserving the functional capabilities of VLMs. The empirical results show that our framework significantly recovers the alignment ability that is inherited from the LLM backbone with minimal impact on the fluency and linguistic capabilities of pre-trained VLMs even without additional training. Specifically, the unsafe rate of LLaVA-7B on multi-modal input can be reduced from 61.53% to as low as 3.15% with only inference-time intervention. WARNING: This paper contains examples of toxic or harmful language.
BibTeX
@inproceedings{liu2026unraveling,
  author = {Qin Liu and Chao Shang and Ling Liu and Nikolaos Pappas and Jie Ma and Neha Anna John and Srikanth Doss and Lluís Màrquez and Miguel Ballesteros and Yassine Benajiba},
  title = {{Unraveling and Mitigating Safety Alignment Degradation of Vision-Language Models}},
  booktitle = {University of California Publication Management System},
  year = {2026},
  url = {https://openreview.net/forum?id=16odXxzEE8},
}
Figure