Where Visual Jailbreaks Hide in the Spectrum

A vision-language model (VLM) is a language model that has been given eyes: an image encoder turns pictures into vectors, and those vectors are fed to a chat model that was safety-trained on text alone. A tiny, invisible change to an image's pixels can push such a model into producing content it would refuse if asked in words. A long line of image-classifier defenses says these invisible changes leave a fingerprint in the image's frequency spectrum, meaning the decomposition of an image into smooth, slowly varying patterns and fine, rapidly varying ones. We propose to test that claim where it now matters most, on safety jailbreaks of VLMs. The test uses attackers who know the defense and route around it, and it charges every defense for the damage it does to ordinary use.

The central question is not "can a frequency detector catch today's attacks?" Against standard attacks the answer is yes. The question is: when a frequency defense is in place and the attacker adapts, where in the spectrum does the attack go, how much less effective does it become there, and what does the defense cost benign users? We will build an attack whose perturbation is confined to chosen frequency bands and optimized through the defense itself. With it we will map, for LLaVA-class models, the trade-off between clean utility and adaptive jailbreak success across a family of spectral defenses. We will then ask whether any point on that curve beats a latent-space safety defense on its own. We also ask whether the two, stacked together, force the attacker into a region where it must pay twice.

Core Claim

Our hypothesis is specific and falsifiable. Under a fixed pixel budget, jailbreak perturbations restricted to low spatial frequencies should be substantially less effective than unrestricted ones. The reason is that the attacker loses most of the free directions in which a nearly invisible change can steer the image encoder. If this holds, a cheap spectral sanitizer does not need to be unbreakable. It only needs to confine the attacker to low frequencies, where a second defense operating on the model's internal activations has more to catch. If the hypothesis fails, and low-frequency jailbreaks at small budgets are nearly as effective as unrestricted ones, then frequency defenses are the wrong tool for VLM safety. That is a result worth establishing, because the literature currently points in both directions.

The evidence for the fingerprint comes from classifiers. Detecting AutoAttack Perturbations in the Frequency Domain trains logistic regression on Fourier magnitudes and reports 100% detection accuracy with 0.0% false negatives at $\epsilon = 8/255$ on CIFAR-10, and over 98% on ImageNet. The authors state plainly that they never tested attackers who mask the signature. Is RobustBench/AutoAttack a suitable Benchmark for Adversarial Robustness? argues that such high-frequency artifacts partly reflect how benchmark attacks are generated, not what attacks must do. Contrastive Spectral Rectification (CSR) is a test-time CLIP defense. It flags inputs whose representation shifts under a Gaussian blur and then optimizes them toward the blurred anchor. It loses only 0.7% clean accuracy and gains 18.1% robust accuracy against AutoAttack, but it concedes that global color attacks corrupt the low-pass anchor. So three papers disagree about whether low frequencies are a safe harbor for defenders or an open door for attackers. None of the three measures this on safety jailbreaks.

Research Program

The first component is a band-restricted adaptive jailbreak attack. We parameterize the perturbation as $\delta = \mathrm{IDCT}(M_b \odot z)$. Here $z$ holds the free discrete cosine transform (DCT) coefficients, meaning the weights on a fixed set of cosine patterns of increasing spatial frequency. $M_b$ is a binary mask keeping only band $b$, and IDCT is the inverse transform back to pixels. $\delta$ is clipped to an $\ell_\infty$ budget $\epsilon$ in pixel space. The attack runs Auto-Projected Gradient Descent (APGD), the step-size-adapting projected gradient method used by On the Adversarial Robustness of Multi-Modal Foundation Models. That paper reports 100% targeted success on OpenFlamingo at $4/255$. The attack loss is the likelihood of an affirmative harmful completion for harmful queries drawn from the RedTeam-2K base of JailBreakV-28K. The attack is adaptive in the full sense. Every defense sits inside the forward pass. Non-differentiable steps are handled by Backward Pass Differentiable Approximation (BPDA), which substitutes a smooth surrogate on the backward pass. Randomized steps are handled by Expectation Over Transformation (EOT), which averages gradients over the defense's random draws. When a detector is present, a detector-evasion term is added to the loss. This follows the stance of Optimizing Adaptive Attacks against Content Watermarks for Language Models: a defense is only as strong as the best optimizer that sees it.

The second component is a graded family of spectral defenses applied at the image input of LLaVA-1.5-7B. The family runs from a fixed low-pass filter at several cutoffs, through a Fourier-magnitude detector in the style of the AutoAttack-detection paper, to CSR ported onto LLaVA's CLIP encoder. At the end of the family is a randomized band-resampling sanitizer, which replaces a random subset of mid- and high-frequency coefficients per query instead of zeroing them. Each defense yields one point per setting on a plane: clean utility (MM-Vet score) on one axis and adaptive attack success rate on the other. That plane is the main deliverable.

The third component is composition with a latent defense. SafeSteer builds a low-dimensional safety subspace from activations at an intermediate layer, fixed offline by singular value decomposition. A harm-sensing classifier then decides when to steer activations along it. We run SafeSteer alone, the spectral defense alone, and both together, each under a joint adaptive attack that optimizes against everything in the pipeline at once. The mechanistic question is whether low-band perturbations, the only ones that survive the sanitizer, leave larger footprints in SafeSteer's layer-15 activations than unrestricted ones do. If they do, the composition is more than the sum of its parts. We measure this directly by projecting attacked activations onto the safety subspace as a function of band.

Scope is a deliberate constraint. Typographic and scene jailbreaks like FigStep and those in MM-SafetyBench are semantic, not perturbations. There, ASR on LLaVA-1.5-7B illegal-activity queries rises from 5.25% text-only to 79.38% with a typography image. A frequency detector has no business catching these. Font edges are high-frequency, so a naive detector would fire on every benign sign or document. We therefore treat these attacks as a false-positive hazard for the spectral layer. They are left to the latent layer.

Baselines

The naive reference is undefended LLaVA-1.5-7B with and without the safety system prompt. MM-SafetyBench reports that this prompt cuts ASR on its tiny split from 77.33% to 15.68%. We rerun it on identical queries under the adaptive perturbation attack, because the prompt was never tested against optimized pixels.

The strongest existing inference-time competitor is SafeSteer. It reports reducing average ASR on LLaVA-v1.5 from 62.8% to 5.9% across MM-SafetyBench and JailBreakV-28K, with a 1.7-point MM-Vet gain, at 2.42 seconds per response. Those numbers come from structural and semantic attacks. We found no reported result on Lacuna for SafeSteer under gradient-based pixel jailbreaks, and its fixed subspace is exactly the kind of static boundary an adaptive attacker can steer orthogonal to. We run it from the published description on the same model, queries, and judge. The attacker gets the same step count and restarts it gets against our pipeline. Beating SafeSteer means lower adaptive ASR at equal or better MM-Vet, or equal ASR with less white-box access.

The strongest training-time competitor is E$^2$AT. It adversarially trains the vision-language projector and reports JailBreakV-28K weighted ASR falling from 0.452 to 0.054 on LLaVA. Where compute allows, we retrain it on the same base model and compare under our band-restricted attack. We report its training cost alongside, since our pipeline requires none.

The spectral baselines are fixed Gaussian blur, the Fourier-magnitude logistic detector, and CSR, whose reported figure is a 0.7% clean drop on 16 classification benchmarks with +18.1% robust accuracy. Each is tuned with the same validation budget: a grid of cutoffs or thresholds chosen on a held-out split of benign MM-Vet-style queries at a fixed 5% false-positive target. The ablation that isolates our key ingredient replaces randomized band resampling with deterministic band removal at the same cutoff. If resampling buys nothing under EOT, the randomness is decorative.

Why not just…?

Why not just blur or downsample every image? Blurring is a point on our frontier, not an alternative to it. CSR's authors note that using the blurred image directly sacrifices fine detail on clean inputs, and a fixed filter is transparent to BPDA. We expect blur to show poor MM-Vet at any cutoff that matters, especially on text-rich items. If instead some cutoff dominates the more elaborate spectral defenses on the frontier, we will say so and recommend blur.

Why not just use SafeSteer and skip the input spectrum? This is the real threat to the proposal. If SafeSteer alone holds adaptive ASR near its reported 5.9% under our band-restricted attack, with its MM-Vet gain intact, then the spectral layer adds latency and false positives for no benefit. The SafeSteer-alone arm of the composition experiment settles this directly. We commit to reporting it even if it makes the spectral component unnecessary.

Why not just adversarially train the encoder or projector? E$^2$AT's numbers are strong. However, CSR reports that adversarial fine-tuning of CLIP typically costs 20% or more in clean accuracy. AdROD finds that adversarial training overfits the perturbation geometry it saw. Our band-restricted attack is a different geometry from the pixel-space PGD that E$^2$AT trains on. Running E$^2$AT against it tests whether that overfitting appears in the safety setting.

Why not just filter the text prompt? Baseline Defenses for Adversarial Attacks Against Aligned Language Models shows perplexity filtering and paraphrasing work on text suffixes, at roughly a 10% benign false-positive rate. In our threat model the text is a fluent harmful request and the payload is in the pixels, so these filters have nothing to see. We include perplexity filtering once to confirm this, not as a serious contender.

Proposed Experiments

The first decisive check is the band-efficacy curve. For LLaVA-1.5-7B with no defense, we measure attack success against perturbation budget $\epsilon \in \{1, 4, 8, 16\}/255$ for low-only, mid-only, high-only, and unrestricted perturbations. Success is judged by Llama-Guard as in JailBreakV-28K, with the harmfulness and intent-alignment scores from OmniSafeBench-MM (toolbox) as a second judge. Suppose low-only success at $4/255$ is within a few points of unrestricted success. Then the core hypothesis is false and the paper becomes a negative result about frequency defenses for VLM safety.

The second check is the utility-versus-adaptive-ASR frontier for every defense above. It reports MM-Vet score, false-refusal rate on benign image queries, and latency. It also reports false-positive rate on a benign typographic control set, made by rendering harmless instructions with FigStep's own rendering procedure, so that font edges cannot be mistaken for attacks.

The third check is the composition test. Spectral sanitizer plus SafeSteer faces a joint adaptive attack, compared against each component alone. It is paired with the activation-footprint analysis, which asks whether surviving low-band attacks move activations further along SafeSteer's safety subspace. We also run semantic jailbreaks from MM-SafetyBench and FigStep through the composed pipeline. This confirms the spectral layer neither helps nor hurts on attacks it was never meant for, and that JailDAM-style detection (code) remains the right complement there.

A result that would change practice is either of two outcomes. The first is a composed defense that holds adaptive ASR below SafeSteer alone at no MM-Vet cost. The second is a clean demonstration that it cannot, because jailbreaks lose little efficacy when pushed into low frequencies.