Vision-language models are chatbots that also accept images. They often refuse a harmful request typed as text and then comply when the same request arrives as a picture, a typographic rendering, or a harmless photo paired with a harmless question whose combination is dangerous. A cheap and promising defense from the text-only world treats generation as a trajectory through the model's hidden states. It trains a small "safety value" network that predicts whether the current trajectory will inevitably end in a harmful answer, and it nudges the model away before that happens. This is the backward reachability idea from control theory: start from the failure states and work out which states can be forced into them. We propose carrying this idea into vision-language models with one essential change. The image is treated as an adversary that can push the hidden state anywhere inside a bounded region. The safety value network is then trained, and partly formally verified, against that worst case.
The change matters because the image channel is the attacker's lever. A tiny pixel perturbation can steer a multimodal model to emit attacker-chosen strings. The same perturbation can just as easily be optimized to fool any learned detector that reads the model's hidden states. The design keeps the 7B model frozen. Only a small network is made robust, and the shield stays inactive on benign inputs. These two choices address the two practical complaints about multimodal safety: adversarial training of billion-parameter models is unaffordable, and safety defenses tax clean accuracy and cause over-refusal.
Core Claim
A latent safety filter for a vision-language model should compute a backward reachable tube with a disturbance. That tube is the set of hidden states from which harm can be forced, given that an attacker controls a bounded displacement of the hidden state induced by the image. A filter with this property resists adaptive white-box image attacks much better than a filter trained on clean multimodal trajectories. It is also cheap to obtain. The inner maximization of adversarial training runs only through the small value network, not through the vision encoder or the language model. Because the network is small, its robustness within that displacement region can be certified with sound bound propagation.
The resulting guarantee is conditional, and we will state it that way. It holds only if the attacker's real reach in hidden-state space stays inside the region we assume, and only as far as the failure labels are correct. Measuring how far that assumption holds is part of the work.
Where This Sits
Three papers motivate the proposal.
Cross-Modal Safety Mechanism Transfer in Large Vision-Language Models locates text safety behavior in middle-to-late layers of LLaVA-style models. It shows that image tokens shift hidden states at exactly those layers, so the refusal mechanism never fires. Its fix, Text-Guided Alignment, pulls image hidden states toward retrieved text hidden states. That fix raises defense success on toxic images from 0–1% to only 17–30%, though it improves ScienceQA from 66.8% to 71.7%.
On the Adversarial Robustness of Multi-Modal Foundation Models shows how large the attacker's lever is. Perturbations of $\ell_\infty \le 1/255$ collapse COCO captioning CIDEr from 84.01 to 9.59, and targeted string injection reaches 100% success at $4/255$.
Safe Inputs but Unsafe Output and USB show that hazards can arise purely from combining benign parts. On SIUO, 13 of 15 models stay below a 50% safe rate. On USB, even the safest model trades a 15.57% attack success rate for a 25.82% refusal rate on harmless prompts.
The method comes mainly from Preemptive Detection and Steering of LLM Misalignment via Latent Reachability (BRT-ALIGN). That paper treats token generation as a dynamical system in hidden-state space and trains a safety value function offline from prompt-response pairs. At inference it applies a least-restrictive filter, flagging unsafe trajectories 7–10 tokens early and steering by latent sampling, 2–4× faster than optimization-based steering. BRT-ALIGN is text-only. It treats the input as fixed rather than adversarial, and its value network is an unprotected target. We keep its filter and change both what the value function means and how it is trained.
Two further papers supply ingredients. From Verification-Guided Shielding for Deep Reinforcement Learning we borrow selective shielding, where the shield stays inactive outside the unsafe region; there it activated on only 1.3–3.4% of steps and cut overhead by up to 71.1%. We also borrow its use of sound verifiers on small networks. From Shields for Safe Reinforcement Learning we take the separation between an unverified policy and a safety layer that substitutes actions only when needed.
Two papers constrain the design. Robustness Tokens shows that parameter-efficient robustness on a frozen backbone converges in 200 steps. However, its defense depends on the tokens staying secret, so we avoid secrecy-based protection and evaluate against attackers who know the value network. Refusal in Language Models Is Mediated by a Single Direction shows refusal is largely one direction in hidden-state space. That makes the safety-relevant geometry low-dimensional, which is what makes certification of a small value network plausible. It also warns that blunt use of that direction causes over-refusal.
Research Program
Setup and value function. We fix LLaVA-1.5-7B and read the hidden state $z_t$ at one middle-to-late layer $L$, chosen where Text-Guided Alignment finds the safety mechanism. Failure states are generations that the HarmBench Llama-2-13B classifier labels harmful; that classifier reports 93.19% agreement with humans. A safety margin $\ell(z)$ is negative on states whose continuations are labeled harmful. We train a small multilayer network $V_\phi$ with parameters $\phi$ to satisfy a disturbance-aware safety backup:
$$V_\phi(z_t) = \min\Big(\ell(z_t),\; \gamma\,\min_{\|\delta\|\le r} V_\phi\big(z_{t+1}+\delta\big)\Big)$$
Here $z_{t+1}$ is the next observed hidden state, $\gamma<1$ is a discount that makes the backup a contraction, and $\delta$ is an attacker-chosen displacement of radius $r$. States with $V_\phi \le 0$ form the robust backward reachable tube.
The inner minimum is a few projected gradient steps on the input of $V_\phi$ alone. Its cost is negligible compared with backpropagating through the 7B model, which is the source of the large compute saving over conventional adversarial training. We stress that the per-step displacement over-approximates a single image perturbation that persists over the whole generation. This makes the tube conservative, and that conservatism is exactly what the over-refusal experiments test.
Calibrating the attacker's reach. The radius $r$ is estimated empirically. On a calibration set we run pixel attacks at $\ell_\infty$ budgets of $1/255$ and $4/255$ through the frozen vision encoder and projector, with both untargeted and harmful-target objectives. We record the displacement these attacks induce at layer $L$, measured both in full space and inside a low-dimensional safety subspace spanned by the refusal direction plus the leading principal components of harmful-minus-benign differences. We then set $r$ at a high quantile of the observed displacements. Typographic and compositional inputs are not norm-bounded. They are handled not by $r$ but by training $V_\phi$ on trajectories from SIUO-style and typographic data.
Formal component. Because $V_\phi$ is small, we can apply sound bound propagation to it, in the spirit of the Marabou-based verification in Verification-Guided Shielding. This certifies, for each flagged or near-boundary state, that no displacement within $r$ moves $V_\phi$ across its threshold. Where certification fails, we follow the same paper: cluster the counterexample regions and encode them as symbolic constraints that widen the tube. The guarantee we can honestly claim is the following. Conditional on the attacker's displacement at layer $L$ staying within $r$, the filter's flag cannot be suppressed. We report what fraction of real attacks satisfy the condition.
Intervention. At inference the filter follows BRT-ALIGN's least-restrictive rule. If $V_\phi(z_t)$ is above a margin, nothing happens. Otherwise we steer by latent resampling toward states with positive certified value, and we fall back to a refusal only if no such state is found within a small budget. Clean accuracy is protected by construction on any input that never enters the tube. The empirical question is how many benign inputs do enter it.
Baselines
The naive reference is undefended LLaVA-1.5-7B. On HADES it shows 90.26% attack success (Images are Achilles' Heel of Alignment), and on FigStep's SafeBench the six open models it tests average 82.50% (FigStep).
Plain multimodal BRT-ALIGN. The most important baseline, which doubles as the key ablation, is BRT-ALIGN ported directly to the vision-language model. It uses the same layer, the same value architecture, the same training trajectories, the same steering rule and the same training-step budget, but has no disturbance term and no certification. This isolates our one ingredient. No reported result was found on Lacuna for BRT-ALIGN on any multimodal benchmark.
Textual unlearning. The strongest existing method on attack success at low cost is textual unlearning (Cross-Modal Safety Alignment: Is textual unlearning all you need?). It reports reducing LLaVA-1.5-7B vision-text attack success from over 75% to about 7.5%, in about 2.2 L4 GPU-hours. We rerun it with its published objectives on our data. We also give our method no more than the same GPU-hours, counting calibration attacks and certification.
Contrastive harmlessness LoRA. This is a low-rank fine-tune evaluated alongside the HADES benchmark (Images are Achilles' Heel of Alignment), reported to cut HADES attack success on LLaVA-1.5 to 5.07%.
Text-Guided Alignment. Text-Guided Alignment is the utility-preserving reference, at 17–30% defense success with ScienceQA improved to 71.7%. Separately, we run our filter on top of a Text-Guided-Alignment model to test whether reducing the semantic shift and robustifying the filter add up.
Zero-training and post-hoc defenses. The zero-training reference is the Adversarial Possibility prompt (Improving Adversarial Robustness in VLMs). It is reported to lift LLaVA-7B APGD accuracy on COCO from 12.54% to 91.46%. We also include an output-side classifier that screens the finished response with the HarmBench classifier.
Fairness rules. All defenses are tuned on the same held-out development split, with the same number of tuning trials. Every one is evaluated against both static and adaptive attacks, where the attacker knows the defense.
What counts as winning. Beating the field means matching or improving on unlearning's attack success on the static benchmarks. It also means holding a clearly lower attack success than both plain multimodal BRT-ALIGN and unlearning under adaptive pixel attacks, at USB safe-input refusal and utility no worse than the undefended model's.
Why not just…?
Why not just port BRT-ALIGN unchanged and train its value function on multimodal trajectories? This is the main threat. If attackers in practice do not exploit the value network, the disturbance term buys nothing. The adaptive-attack experiment settles it. We optimize pixels to produce a harmful target string while keeping the plain value function above threshold, then repeat against the robust one. If both survive equally, the game formulation is unnecessary and we will say so.
Why not just use textual unlearning, which is already cheap and reaches about 7.5%? Its own design freezes the vision encoder and projector. On the Adversarial Robustness of Multi-Modal Foundation Models shows that this channel can be steered to arbitrary target strings at $4/255$. The reported 7.5% comes from non-adaptive jailbreak sets. We measure unlearning under the same white-box pixel attacks. If it holds up, the robust filter's value reduces to its compositional and over-refusal behavior.
Why not just screen outputs with a text safety classifier? This alternative is strong. A classifier that reads only the generated text cannot be fooled by pixel perturbations directly, and it also catches SIUO-style compositional harms, because those harms show up in the answer. Its weaknesses are practical. It acts only after generation, unlike the token lead times reported in BRT-ALIGN and Pro2Guard. It can only block, never steer toward a helpful safe answer. We will report wasted tokens and a helpfulness judgment of the final response on borderline benign queries. If the output classifier matches us on harm and refusal, our contribution shrinks to latency and helpfulness, and we will present it that way.
Why not just adversarially train the value network against real pixel attacks? That is the principled version of our latent-displacement surrogate, and it requires backpropagating through the encoder and the language model for every inner step. We run it once as an expensive upper reference. The surrogate earns its place only if it gets most of the reference's adaptive robustness at a small fraction of its GPU-hours.
Proposed Experiments
Static attacks. Static evaluation uses SafeBench and SafeBench-Tiny from FigStep, the HADES benchmark, SIUO, and the multimodal portion of USB, all scored with the HarmBench classifier at a fixed generation length. HarmBench notes that generation length can swing attack success by as much as 30%.
Adaptive attacks. Adaptive evaluation uses white-box pixel PGD and APGD at $1/255$ and $4/255$ against the full pipeline, with the value network's parameters known to the attacker. We also run combined attacks that join typographic content with perturbations.
Over-refusal and clean utility. Over-refusal is measured on the USB safe-image/safe-text split, using Claude 3.5 Sonnet's 25.82% as an external marker of the tension. Clean utility is measured on ScienceQA, VQA-v2 and MM-Vet. We also record shield activation rate, since a selective shield should fire on a small fraction of tokens, and the overhead per token.
Cost. Cost is reported in GPU-hours, comparable to the 2.2-hour unlearning figure.
Decisive checks. Four checks decide the outcome. First, the robust filter must beat plain multimodal BRT-ALIGN under adaptive attack. Second, its benign activation rate must stay low enough that utility and safe-input refusal are statistically indistinguishable from the undefended model. Third, a large fraction of successful real pixel attacks must induce displacements within the calibrated $r$, which is what gives the conditional certificate practical meaning. Fourth, it must hold its ground against the output classifier on harm while beating it on lead time and helpfulness.
A sweep over $r$ will trace the trade-off between adaptive attack success and over-refusal directly. That sweep is the most informative single figure the project can produce.
References
- Cross-Modal Safety Mechanism Transfer in Large Vision-Language Models
- On the Adversarial Robustness of Multi-Modal Foundation Models
- Safe Inputs but Unsafe Output: Benchmarking Cross-modality Safety Alignment of Large Vision-Language Models
- USB: A Comprehensive and Unified Safety Evaluation Benchmark for Multimodal Large Language Models
- Preemptive Detection and Steering of LLM Misalignment via Latent Reachability
- Verification-Guided Shielding for Deep Reinforcement Learning
- Shields for Safe Reinforcement Learning
- Robustness Tokens: Towards Adversarial Robustness of Transformers
- Refusal in Language Models Is Mediated by a Single Direction
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- Images are Achilles' Heel of Alignment: Exploiting Visual Vulnerabilities for Jailbreaking Multimodal Large Language Models
- $\mathsf{FigStep}$ : Jailbreaking Large Vision-Language Models via Typographic Visual Prompts
- Cross-Modal Safety Alignment: Is textual unlearning all you need?
- Improving Adversarial Robustness in Vision-Language Models with Architecture and Prompt Design
- Pro2Guard: Proactive Runtime Enforcement of LLM Agent Safety via Probabilistic Model Checking