NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diagnosing and Repairing Unsafe Channels in Vision-Language Models via Causal Discovery and Dual-Modal Safety Subspace Projection

Jinhu Fu, Yihang Lou, Qingyi Si, Shudong Zhang, Sen Su

TL;DR

Large Vision-Language Models (LVLMs) are highly capable but remain dangerously susceptible to multimodal jailbreak attacks. This paper introduces CARE (Causal Analysis and Repair for Enhancing Safety), a training-free defense framework that precisely pinpoints safety-critical channels in mid-layer Feed-Forward Networks (FFNs) and dynamically projects harmful activations into a safe subspace during inference. CARE slashes attack success rates to under 10% while maintaining the model's core reasoning and visual capabilities.

What Problem Does This Paper Address?

While safety alignment (like RLHF) has made text-only models reasonably robust, adding a visual modality re-opens the floodgates for adversarial exploitation. Attackers can easily bypass safety guardrails by embedding malicious instructions inside images (structure-based attacks) or applying subtle pixel perturbations (perturbation-based attacks).

Existing defense mechanisms typically rely on expensive adversarial retraining, input preprocessing (which degrades image quality), or multi-pass response evaluations that introduce severe latency. Recent inference-time activation steering methods help, but they are often coarse-grained, ignore cross-modal interactions, and inadvertently distort benign representations, crippling the model's general performance. This paper aims to precisely diagnose where and how unsafe behaviors manifest internally and repair them on the fly without retraining.

Methods

The authors propose a two-step framework: Diagnosing and Repairing.

  1. Diagnosing via Causal Tracing: The authors perform causal mediation analysis by systematically blocking layers and components to see which ones are responsible for generating unsafe responses. They discover that safety mechanisms primarily emerge in the mid-layers and are heavily mediated by Feed-Forward Network (FFN) modules rather than Multi-Head Self-Attention (MHSA) modules.
  2. Token Attribution: To isolate the most influential tokens, they use a Radial Basis Function (RBF) kernel to compute nonlinear association strengths. This includes a cross-modal kernel alignment to map visual tokens to text tokens, identifying exactly which parts of an image or prompt drive the jailbreak.
  3. Dual-Modal Safety Subspace Projection: Using activations from a small set of benign and malicious prompts, they perform a generalized eigen-decomposition to isolate the exact mathematical subspace where malicious activations deviate from benign ones.
  4. Inference-Time Intervention & Adaptive Fusion: During inference, token activations are dynamically projected onto the orthogonal complement of this harmful subspace (effectively neutralizing the unsafe features). Because attacks can be driven by text, images, or both, CARE independently computes visual and textual safety subspaces and blends them using an adaptive cross-modal fusion mechanism based on intervention strength.
Overview of the CARE framework compared to previous activation steering methods.

Datasets

The framework was evaluated using a diverse suite of safety and utility datasets:

  • Safety Benchmarks (Attacks): JailBreakVBench and MM-SafetyBench for standard jailbreaks; AdvBench and FigStep for extracting malicious activation profiles; and PGD-based adversarial attacks (PGD-Toxic, PGD-Jailbreak).
  • General Capability Benchmarks (Utility): COCO 2017 validation (for benign baseline activations), MMBench, MM-Vet, and SQA (Science Question Answering) to ensure general multimodal performance is preserved.

Key Insights and Ideas

  • The Mid-Layer Safety Hub: Causal tracing revealed that safety alignment isn't scattered uniformly. In LLaVA-OneVision, safety representations sharply consolidate around layers 16–18; in Qwen2.5-VL, they peak around layers 12–14. Bypassing these specific layers causes a massive spike in attack success rates.
  • FFNs are the Discriminative Projectors: A major "aha" moment was discovering that FFNs exert a much stronger causal influence on safety than attention (MHSA) blocks. FFN activations exhibit low inter-sample correlation, meaning they process features cleanly and separably, making them the ideal target for subspace projection. Attention blocks, by contrast, highly entangle context, making safety features harder to isolate without disrupting general capabilities.
Figure 2. Causal tracing of security components through layered blocking methods.

Key Results

  • Jailbreak Mitigation: On JailBreakVBench and MM-SafetyBench, CARE reduced the Attack Success Rate (ASR) of Qwen2.5-VL and LLaVA-OneVision from baseline levels of 25–40% down to below 10%, outperforming state-of-the-art inference defenses like ASTRA and SPO-VLM.
  • Adversarial Robustness: Against aggressive Projected Gradient Descent (PGD) attacks, CARE successfully mitigated attack effectiveness down to 5–15% (compared to 50–70% for undefended models).
  • Preserving Utility: Unlike baseline defenses that suffer heavy performance penalties on standard tasks, CARE incurred only a minor performance drop (2–8%) across MMBench, MM-Vet, and SQA, demonstrating excellent preservation of semantic fidelity.

Limitations and Future Work

While CARE is highly efficient and training-free, it does require a small, pre-collected set of benign and malicious activation samples to compute the initial covariance matrices and define the safety subspaces. Additionally, the current implementation applies a static projection operator per layer group; the authors note that future work will focus on developing fully adaptive multi-modal safety control and dynamic safety reasoning that can adjust to evolving, multi-turn conversation risks.

Summary updated

BibTeX
@inproceedings{fu2026diagnosing,
  author = {Jinhu Fu and Yihang Lou and Qingyi Si and Shudong Zhang and Sen Su},
  title = {{Diagnosing and Repairing Unsafe Channels in Vision-Language Models via Causal Discovery and Dual-Modal Safety Subspace Projection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=gR1L1VYIvM},
}
Figure