# Poster 29674

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29674

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi there. In this video, we will share our team's work on the safety defense of vision language models titled ETA evaluating then aligning safety of vision language models at inference time, which has been accepted at iClear 2025. Vision language models introduce an additional visual modality, but the extra visual information exhibits weak safety. As shown in the image, when harmful text is matched with semantically related images, vision language models are more likely to produce harmful content that deviates from human value.
values. We attribute this to the inherent continuous property of visual features bypassing the safety mechanisms established on discrete text token embeddings. From the images, we can observe that mapping continuous visual tokens to the nearest text tokens has reduced the model's unsafe rate to some degree, and the converted image tokens are also strongly related to the images. This also provides some insight into how we understand visual tokens. The experimental results indicate that for VLM safety, we need to establish a new
multi -modal safety mechanism. Here, we propose a two-stage inference-time defense strategy called ETA. ETA decomposes the complete defense into evaluating and then aligning. For user inputs, ETA first conducts a bilevel evaluation in the E stage. For behaviors identified as unsafe, it performs a shallow to deep level alignment, ultimately providing safe and helpful responses. In the evaluating stage, we propose a bilevel pre and post generation evaluation.
Using the clip score and reward score to assess the safety of the input images and output text respectively. Motivated by the fact that visual features are encoded by the clip vision encoder, we use the clip score to measure the similarity between the input images and predefined harmful semantics, thereby determining the safety of input images. For the output responses, a straightforward approach would be to evaluate them using the reward model. However, the original input format of the textual reward model evaluates responses.
is based on input-output relevance rather than a safety-centric judgment. Therefore, we designed a safety-specific input format that reformulates the question into a safety-centric open-ended query guiding the reward model to assess the response's safety primarily. The improvement in KL divergence further validates the effectiveness of the safety-specific format.
Through this, we have established a multimodal safety awareness for vision language models for unsafe behavior. In the aligning stage, ETA pre-fills the safety prefix as an AI assistant before generating responses during shallow alignment. This guides the subsequent generation toward a safer distribution through the autoregressive decoding mechanism of the language model.
To identify the most helpful and harmless generation trajectory, we use the clip and reward scores as metrics for the sentence -level best of N in the deep alignment stage. This ensures that the output responses are relevant to the user's input images while maintaining the overall safety of the complete response. Considering that our ETA does not require any additional training, it can be viewed as a plug-and-play inference-time defense method. ETA effectively reduces the model's unsafe rate across multiple safety benchmarks on different architectures of vision-language models.
Even on LAMA vision, which has already undergone multimodal alignment and RLHF, ETA can still provide safe responses on challenging samples. What's even more interesting is that previous defense strategies, whether fine-tuning based or inference time based, have struggled to achieve a balance between helpfulness and harmlessness, resulting in overly conservative behaviors that significantly impact the model's helpfulness. In contrast, ETA reliably distinguishes between safe and harmful behaviors through bi-level evaluation.
And compared to inference-time baselines, ETA introduces only a slight computational overhead. Thank you for watching. If you have any questions, feel free to reach out via email.
