Self-Aware Safety Augmentation: Leveraging Internal Semantic Understanding to Enhance Safety in Vision-Language Models

Wanying Wang, Zeyu Ma, Han Zheng, Xin Tan, Mingang Chen

Introduction

The rapid advancement of Large Vision-Language Models (LVLMs) has introduced significant security challenges. While their text-only counterparts have matured in safety alignment, the integration of visual modalities creates new vulnerabilities. Attackers exploit these via "jailbreak" images, such as typography attacks or context-dependent harmful prompts. Traditional defenses, like supervised fine-tuning (SFT) or Reinforcement Learning from Human Feedback (RLHF), are computationally expensive and often fail to generalize to novel attack vectors.

The Structural Mismatch in LVLM Safety

Recent mechanistic analysis reveals a "structural mismatch" in how LVLMs process safety. Information flow typically progresses through three distinct phases:

  1. Safety Perception (Early Layers): The model identifies potential safety violations through specific "safety heads."
  2. Semantic Understanding (Middle Layers): The model integrates image and text features to grasp the full context.
  3. Linguistic Expression (Late Layers): The model prioritizes generating fluent, helpful responses.

The vulnerability arises because the model often flags risks in Phase I before fully understanding the complex semantic relationship in Phase II. By the time the model reaches Phase III, the internal safety signal is often suppressed by the pressure to provide a helpful response.

The SASA framework bridges the gap between early safety perception and deep semantic understanding by projecting information across layers.

Self-Aware Safety Augmentation (SASA)

To address this mismatch, researchers proposed Self-Aware Safety Augmentation (SASA). SASA is a tuning-free method that enhances the model's internal safety awareness without retraining.

Representation Projection

SASA identifies "safety layers" in the early phase and "fused layers" in the middle phase. It projects the rich semantic representations from the fused layers back onto the safety layers. This "briefing" mechanism ensures that the early safety checkpoints are informed by the model's deeper understanding of the input's intent.

Linear Probing

To efficiently detect harmful intent, SASA employs a lightweight linear probe trained on the model's output logits. This probe can identify if the internal state is "aware" of a risk during the generation of the very first token, allowing for immediate intervention.

Key Findings and Results

The existence of specialized safety heads in early layers is a cornerstone of this approach. Ablation studies demonstrate that removing even a few of these heads significantly increases the Attack Success Rate (ASR), confirming their critical role in initial risk detection.

Ablation of safety heads in early layers leads to a sharp increase in Attack Success Rate (ASR) across multiple LVLM architectures.

Empirical evaluations across benchmarks like MM-SafetyBench and VLGuard show that SASA reduces ASR by an average of 97%. For instance, in MiniGPT-v2, the ASR plummeted from 98.93% to just 1.29%. Crucially, this safety boost comes with negligible impact on model utility; performance on benign tasks like ScienceQA remained stable, dropping by less than 0.3%.

Conclusion

SASA demonstrates that LVLMs possess an inherent, internal awareness of safety risks that is often underutilized during standard generation. By mathematically bridging the gap between early perception and deep semantic understanding, SASA provides a robust, efficient, and tuning-free defense against complex multimodal attacks. Future work will explore non-linear projection methods and scaling these dynamics to models with 70B+ parameters.

Summary updated

BibTeX
@inproceedings{wang2025self,
  author = {Wanying Wang and Zeyu Ma and Han Zheng and Xin Tan and Mingang Chen},
  title = {{Self-Aware Safety Augmentation: Leveraging Internal Semantic Understanding to Enhance Safety in Vision-Language Models}},
  booktitle = {ACM Multimedia},
  year = {2025},
}
Figure