Any-Depth Safety Probing for Vision-Language Models

Safety-trained language models can be talked out of refusing harmful requests in a strangely mechanical way: if the attacker forces the model's reply to begin with a compliant phrase like "Sure, here is how to...", the model tends to finish what it started, because an autoregressive model treats its own opening tokens as commitments and keeps generating a consistent continuation. This trick, affirmative prefix injection, drives attack success rates toward 100% across dozens of open-weight text models (Exposing the Systematic Vulnerability of Open-Weight Models to Prefill Attacks). The problem compounds when the model can also see: vision-language models (VLMs) already lose much of their text-only safety when an image is attached — even a blank one (Yifan Li et al.) — and typography attacks that render the harmful request inside the image push a text-safe model from 5.25% to 79.38% attack success on illegal-activity queries (MM-SafetyBench). The textbook fix, adversarial training — repeatedly generating worst-case perturbations and retraining on them — is computationally out of reach for multi-billion-parameter VLMs, which is why the field has moved to cheap alternatives: frozen backbones with a handful of learned tokens (Robustness Tokens: Towards Adversarial Robustness of Transformers) and inference-time probes (Any-Depth Alignment: Unlocking Innate Safety Alignment of LLMs to Any-Depth).

This proposal asks a single sharp question: does the internal safety signal that makes cheap probing work in text models survive the jump to multimodal inputs, affirmative prefills, and supply-chain backdoors — and if it does not, can a token-level patch restore it at a tiny fraction of adversarial-training cost? Any-Depth Alignment showed that text LLMs never truly lose their refusal capability; it stays latent in the hidden states, and a small linear classifier reading those states can halt harmful generation at any prefill depth, in about 25 ms (Any-Depth Alignment). But that result is text-only. Meanwhile, a newer threat class embeds trigger-activated steering vectors directly in model architecture code, forcing intermediate representations into compliant states with nearly 100% attack success and zero impact on clean accuracy (Architectural Backdoors in Vision-Language Model Supply Chains via Representation Steering) — an attack explicitly designed to live in the same intermediate layers where latent safety is supposed to be readable. Nobody has tested whether the probe signal survives either condition.

Core Claim

The claim is three-part and falsifiable. First, safety-aligned VLMs retain a linearly separable harmfulness signal in their hidden states under affirmative prefill and under cross-modal attacks where the harm is split between image and text — so the Any-Depth probing result transfers to multimodal generation, and a probe trained on cross-modal harmful data detects mid-generation harm at any prefill depth. Second, supply-chain steering backdoors are the specific condition that erases this signal, because they overwrite the very representations the probe reads; this makes them categorically different from input-level jailbreaks, which leave the signal intact. Third, where the backdoor erases the signal, a small set of learned tokens prepended to the input — trained with the backbone frozen, in the style of ROB tokens — can re-linearize it in a few hundred optimization steps, giving a defense whose training cost is three or more orders of magnitude below full min-max adversarial training.

Research Program

The program has three stages, each building on the last. Stage one is a measurement study that resolves an open contradiction in the literature. JailBreakV-28K found that multimodal models inherit text-LLM jailbreak weaknesses regardless of image content, suggesting the image contributes little; MM-SafetyBench found typography images alone collapse safety. We will build a combined attack suite — MM-SafetyBench typography and Stable Diffusion images, FigStep typographic prompts (FigStep), and information-complementarity queries where neither modality is harmful alone (Jingen Qu et al.) — each paired with affirmative prefills of varying depth, from a single "Sure," to 100–500 token compliant continuations, following the 23-strategy methodology of the prefill-vulnerability study (Exposing the Systematic Vulnerability...). The output is a two-way map of prefill depth against visual-attack type, establishing whether visual embeddings amplify prefill susceptibility or the two attack families are simply additive.

Stage two transfers the probing defense. Following Any-Depth Alignment, we inject assistant control tokens into the VLM's key-value cache mid-generation (reusing the cache, so the cost stays constant per check) and train a linear probe on hidden states, using harmful examples from the stage-one suite and benign examples from MME and MM-Vet. The critical scientific measurement is separability: probe AUC as a function of prefill depth, attack family, and layer. Any-Depth Alignment reports near-100% refusal under 2,500-token prefills in text models (Any-Depth Alignment); the open question, which that paper explicitly leaves, is whether the signal survives when the harmful intent is carried by a typographic image rather than the text. SafePTR's finding that multimodal jailbreaks cause semantic deviation concentrated in layers 7–9 (SafePTR: Token-Level Jailbreak Defense in Multimodal LLMs via Prune-then-Restore Mechanism) gives us a concrete layer map to test against: if the deviation is confined to early-middle layers, deeper-layer probes should remain clean.

Stage three is the backdoor stress test and the repair. We reimplement the architectural backdoor of Architectural Backdoors... — a differentiable trigger detector that adds a mean-difference steering vector into intermediate representations — inside our VLM, and measure what it does to probe separability. Our hypothesis is that it collapses the probe where jailbreaks do not, because the steering vector is an additive shift in the same space the probe reads. If so, we train $K$ learned tokens $t$, prepended to the input with the entire VLM frozen, using a dual objective borrowed from ROB tokens (Robustness Tokens) and extended with a probe-separability term:

$$\min_{t}\; \mathbb{E}_x\big[\| f_\theta(t, x) - f_\theta(x)\|_2^2\big] \;+\; \lambda\, \mathbb{E}_{(x,y)}\big[\mathrm{BCE}\big(p(h(t,x)),\, y\big)\big]$$

where $f_\theta$ is the frozen VLM's representation function, $p$ is a linear safety probe applied to hidden states $h$, and $y$ labels the query safe or unsafe. The first term keeps clean behavior intact (the ingredient that let ROB tokens recover DINOv2-G white-box accuracy from 0.3% to 63.1% in 200 training steps); the second term explicitly re-linearizes the safety signal under attack, which ROB tokens never attempted. The deliverable is a defense that is a few megabytes of tokens plus a small probe, not a retrained backbone.

Proposed Experiments

All experiments run on LLaVA-1.5-7B as the primary model (it is the model with the richest reported baseline numbers in the file) plus one larger open-weight VLM to check scale. Attack success is scored with the StrongREJECT rubric, whose automated evaluator agrees with humans at a Spearman correlation of about 0.90 (A StrongREJECT for Empty Jailbreaks). We report attack success rate, false-refusal rate on benign multimodal queries (MME, MM-Vet), utility scores, per-check latency, and — because the computational-cost lens is central — training steps and FLOPs for every defense we train, so that robustness-per-FLOP can be compared directly against adversarial training.

The decisive numbers, all from the file: the undefended reference point is LLaVA-1.5-7B at 79.38% attack success on illegal-activity typography queries in MM-SafetyBench (MM-SafetyBench); text-only models under multi-strategy prefill approach 100% (Exposing...); and the architectural backdoor achieves nearly 100% attack success with 0% clean-accuracy impact on COCO VQA (Architectural Backdoors). For the probe, the target is Any-Depth Alignment's text-model result — attack success reduced from over 50% to below 3% on average, with near-100% refusal under deep prefills (Any-Depth Alignment). For the token repair, the target is ROB-token efficiency: convergence within a few hundred steps at negligible clean-accuracy cost. No reported result found on Lacuna for any probe- or token-based defense evaluated under combined multimodal prefill attacks, and no reported result found on Lacuna for any defense evaluated against architectural steering backdoors in a generative VLM — those two absences define the experimental territory.

Baselines

The naive reference point is the undefended model, where the file pins the number: LLaVA-1.5-7B scores 79.38% attack success on illegal-activity typography queries in MM-SafetyBench (MM-SafetyBench), and we expect our combined prefill-plus-typography suite to push this higher. The cheapest existing defense is the prepended safety prompt, which MM-SafetyBench reports reducing attack success on LLaVA-1.5-7B from 77.33% to 15.68% on its small benchmark (MM-SafetyBench); we run it under the same attacks because it costs nothing, but the prefill literature predicts it collapses once compliant tokens enter the assistant buffer.

The strongest existing competitor on multimodal input attacks is SafePTR, a training-free method that prunes the small fraction of outlier tokens in layers 7–9 and restores them later (SafePTR). It reduced JailBreakV-28K attack success on LLaVA-1.5 from 51.7% to 1.3%, kept MME utility at 1538.1 (up from 1503.6), and adds about 0.15 s per inference — so beating it means matching those numbers while also defending what it cannot reach: prefill content living in the key-value cache and steering vectors acting in deeper layers. We will run SafePTR on our full suite, on identical models and with the identical StrongREJECT scorer, and its predicted blind spots are precisely our stage-two and stage-three conditions. The strongest parameter-efficient trained competitor is SAPT, the Safety Reminder's soft-prompt method, which periodically injects tuned safety tokens when a lightweight detector flags unsafe states (The Safety Reminder: A Soft Prompt to Reactivate Delayed Safety Awareness in Vision-Language Models); it cut combined average attack success on LLaVA-1.5-7B from 76.05% to 3.22% and gradient-based visual attacks on AdvBench from 94.17% to 3.59%, with MM-Vet utility essentially unchanged (31.4 to 31.0). For fairness, our learned tokens get the same token budget, the same number of tuning steps, and the same training data as SAPT's soft prompts, and we report both under every attack family.

Two ablations isolate the proposal's ingredients. The first removes the assistant-header injection and trains the probe on raw generation states, testing whether Any-Depth's key trick — not the probe itself — is what makes deep-prefill detection work. The second trains the probe on text-only harmful data and applies it unchanged to multimodal attacks, isolating the value of cross-modal probe training; the same ablation doubles as a naive port of text-model ADA to VLMs, the closest thing to our stage two that currently exists.

Why not just…?

Why not just run an external guard model over the output? This is the most serious alternative, and we will measure it rather than argue it away. The evidence against it is specific: the prefill-vulnerability study found that prefilled outputs achieve near-100% attack success even when filtered through strong guard models (Exposing...), and Any-Depth Alignment reports that external scanning scales linearly with context — roughly 500 ms and 1 GB at 10,000 tokens, versus 25 ms and 2–3 MB for an internal probe (Any-Depth Alignment). Still, a guard model catches harmful content after it is generated, so the honest framing is complementarity: our probe shrinks the window of leaked unsafe tokens before any external check runs, and we will report that window in tokens for both configurations. If the guard-only pipeline matches our end-to-end attack success at acceptable latency, that is a real threat to the proposal's practical value, and the experiments will surface it.

Why not just write a better system prompt? Prompt-based defenses have genuine in-domain wins: the "Adversarial Possibility" prompt raised LLaVA-7B accuracy under Auto-PGD from 12.54% to 91.46% at zero compute (Improving Adversarial Robustness in Vision-Language Models with Architecture and Prompt Design), and the MM-SafetyBench safety prompt cut attack success to 15.68%. But both are prepended instructions, and the entire prefill literature shows these are overridden the moment compliant tokens occupy the assistant buffer; the prompt-design paper itself notes that adaptive attackers simply fold the defensive prompt into their gradient optimization. We include the safety prompt as a running baseline, and the decisive check is one cell in our grid: safety prompt plus deep prefill. If it holds up there, the proposal loses its prefill-specific motivation.

Why not just fine-tune the model to refuse mid-stream? Supervised deep alignment is the incumbent answer, and it fails on both of this proposal's axes. Any-Depth Alignment tested deeply aligned models and found refusal rates collapse to near zero once attackers supply 100–500 token prefills, while deep alignment simultaneously spikes false refusals on benign inputs (Any-Depth Alignment) — and it inherits the full min-max training cost that makes adversarial training infeasible for VLMs in the first place. Our design deliberately keeps the backbone frozen so the defense can be installed, audited, and removed post-hoc, which supervised fine-tuning does not allow. That said, fine-tuning remains the only known fix if stage two shows the latent signal does not exist in VLMs at all; that outcome would redirect this work toward a measurement contribution rather than a defense.

Why not just use SafePTR? For input-level jailbreaks, it plausibly would — its 51.7%-to-1.3% result on JailBreakV-28K is the best training-free number in the file. But SafePTR prunes input tokens in layers 7–9; an affirmative prefill is not an input token to prune, it is already-generated content sitting in the key-value cache, and a steering backdoor acts on representations after the pruning window. Rather than assert this, we run SafePTR on every condition in our suite: if it matches our probe on prefill-plus-typography and backdoor attacks, the market has spoken and the probe's value collapses to latency and interpretability. We consider this the single most important head-to-head in the proposal.

Decisive Checks

The proposal succeeds if, on LLaVA-1.5-7B and one larger VLM, the cross-modal probe holds average attack success below 5% across prefill depths up to 500 tokens on the combined suite — including typographic and split-harm queries — with false-refusal rates near zero on MME and MM-Vet, while the backdoored model breaks the probe and the learned tokens restore separability within a few hundred frozen-backbone steps. It fails informatively in two ways: if the probe signal is absent in VLMs even without a backdoor, then "innate safety" is a text-architecture phenomenon and multimodal safety needs training-time fixes, contradicting the transfer hypothesis behind several cited defenses; and if SafePTR or the guard-model pipeline matches the probe across all conditions, then the cheap-detection niche is already filled. All three outcomes change what the field believes about where multimodal safety lives, which is why this is worth doing now, before supply-chain steering attacks move from proof of concept to practice.