Does Adversarial Robustness Live in the Same Layers Across Modalities?

Unified multi-modal encoders such as ImageBind map images, audio, video, thermal images, point clouds and event streams into one shared embedding space. Each modality has its own transformer "tower" feeding that space. These encoders are strikingly fragile: CALMARS found that small adversarial perturbations (input changes too small for a person to notice, chosen to fool the model) push the non-visual towers to near-zero accuracy. The current fix freezes every tower and retrains only a small output projection per modality. Meanwhile, the image-only literature has learned where inside a transformer cheap robustness updates should go. AdvCLIP-LoRA found that the attention value projections matter most, and FullLoRA found that the scale and shift of layer normalization must also move. Nobody has asked whether that placement knowledge transfers to an audio or point-cloud tower, or whether those towers break somewhere else entirely.

This note proposes a measurement-first answer, and the measurement is cheap. On the frozen model, run a few attack steps, then record at which depth each tower amplifies the perturbation and where its normalization statistics shift. Place a fixed budget of mergeable low-rank adapters there, meaning small add-on weight matrices that can be folded back into the original weights after training. Then test three things against the image-derived recipe ported unchanged and against output-head-only calibration. Do the towers differ? Does placing adapters by the diagnostic beat the ported recipe? Does it beat simply spending the budget uniformly?

Core Claim

The claim is that where adversarial damage originates inside a transformer depends on the modality, not just the architecture. If so, a placement rule tuned on images will under-protect towers whose perturbations grow at different depths.

The concrete prediction is about the non-visual towers that CALMARS found most fragile. Their perturbation amplification and normalization shift should peak at depths different from the image tower's. Under a matched parameter budget, a per-tower placement chosen by a training-free drift diagnostic should then beat three alternatives on those towers: the ported image recipe, uniform low-rank adaptation, and head-only calibration.

The opposite result is also useful. If all towers show the same profile and the ported recipe matches the diagnostic, we get a clean positive transfer result: robustness placement is architectural, and one recipe found on images suffices. Either way, the project answers a question the file shows no one has asked. The contribution is the transfer test and the diagnostic, not a new adapter type.

Research Program

The diagnostic. For a frozen tower and a small calibration set, craft perturbations $\delta$ with a short projected-gradient attack. Projected gradient descent (PGD) repeatedly nudges the input in the direction that most increases the loss, keeping the change within a budget $\epsilon$. Then compute a per-layer amplification score:

$$a_\ell = \frac{\lVert h_\ell(x+\delta) - h_\ell(x)\rVert \,/\, \lVert h_\ell(x)\rVert}{\lVert h_{\ell-1}(x+\delta) - h_{\ell-1}(x)\rVert \,/\, \lVert h_{\ell-1}(x)\rVert}$$

Here $h_\ell(x)$ is the token representation after block $\ell$, and $a_\ell > 1$ means block $\ell$ enlarges the relative perturbation. Alongside $a_\ell$, record the change in the per-token mean and variance entering each layer normalization under attack. This is the "magnitude gap" FullLoRA identified in image transformers, measured here per modality. Further split blocks into attention and MLP sub-layers to see whether amplification sits in the value path, which AdvCLIP-LoRA found critical for images, or in the first MLP, which SPU found stores generic knowledge in CLIP.

The diagnostic uses a few forward and backward passes on frozen weights. That matters because the dominant cost in this area is the repeated inner attack loop during training, which AdvCLIP-LoRA and AdvMask both note. The diagnostic does not attempt a full search.

The adapter family. All arms use the same mergeable unit. It combines low-rank updates on chosen linear layers with tuning of the existing layer-norm scale and shift. The layer-norm part is mergeable because a layer norm's affine parameters fold exactly into the next linear weight.

This deliberately avoids FullLoRA's extra normalization layer inside the adapter branch, which cannot be merged and adds inference cost. It also avoids DEFEAT's codebook lookup. One ablation tests whether dropping the non-mergeable piece costs robustness. The only thing that varies between arms is where the budget goes.

Training. Training follows CALMARS's two-stage recipe, so the comparison isolates placement. Stage one aligns clean features with the original encoder. Stage two stabilizes adversarial representations, combining a fixed-center contrastive loss with a clean-to-adversarial feature-matching term. We add AdvMask's layer-wise alignment loss only at the adapted layers.

The transfer protocol. First, derive the image recipe on the image tower with the diagnostic and confirm it against an exhaustive placement sweep. Then apply three placements to every other tower at an identical budget: the image recipe unchanged, the tower's own diagnostic placement, and uniform spreading.

Baselines

The naive reference point is the undefended encoder. CALMARS reports that UniBind falls to 0% ImageNet-1K accuracy at $\epsilon = 8/255$.

The strongest existing method is CALMARS itself: frozen towers, trained modality-specific projection heads, under 1% trainable parameters. It reports clean ImageNet-1K accuracy rising from 74.7% to 95.3%, 32.1% robust accuracy at $\epsilon = 8/255$, and gains of up to 47.3% at $\epsilon = 4/255$. It is the right competitor because it is the only defense in the file built for unified encoders across all six modalities. Its weakness on our question is that it never touches internal layers. We found no reported per-modality result on Lacuna for CALMARS's audio, thermal, point-cloud or event towers, so we rerun it on every tower. We use its training objectives and its CrossMaxim multi-directional attack, and match data, attack strength and wall-clock budget. Our method counts as beating it only if internal placement improves robust accuracy on the non-visual towers at matched trainable-parameter count. Our arms get the head budget plus an equal adapter budget, and a second CALMARS arm with an enlarged head of the same total size keeps the comparison honest.

The second baseline is uniform low-rank adaptation at the same total rank on all attention and MLP projections of every tower. This is the AdvLoRA and AdvCLIP-LoRA design: static, symmetric ranks. AdvLoRA reports 82.4% mean recall under attack on MSCOCO retrieval, though for a different dual encoder. The third baseline is the ported image recipe: value-projection adapters plus layer-norm tuning at depths chosen on the image tower, with nothing re-measured.

Two ablations isolate the key ingredient. One places the same budget at randomly chosen layers. The other inverts the diagnostic ranking, putting adapters where amplification is lowest. If the diagnostic placement does not beat random placement, the diagnostic carries no information. A further ablation adds FullLoRA's non-mergeable normalization layer to measure what mergeability costs.

Why not just…?

Why not just keep CALMARS's head-only calibration? It is cheap and already moves ImageNet robustness from 0% to 32.1%. But a projection head can only reshape the final embedding. AdvMask shows attacks corrupt intermediate blocks, and output-only fixes cannot undo that. The enlarged-head control settles the question directly. If a bigger head matches internal placement on audio and point clouds, internal adapters are not worth it, and we would report that.

Why not just port the image recipe to every tower? This is the most serious threat. All towers share a ViT-style architecture, so the recipe may simply work. The transfer protocol is built to detect exactly this. If the ported recipe is within noise of the diagnostic placement on every tower, we report architectural transfer as the finding and recommend the recipe.

Why not just use uniform LoRA, or a learned allocator like COBRA? Uniform allocation is simple and well supported. COBRA shows that gradient-heavy layers are not the functionally important ones and that learned allocation beats uniform rank on GLUE. However, COBRA adds 75% overhead to short runs and was never tested under an adversarial objective. We include uniform rank as a baseline. We also include a COBRA-style arm with gradient magnitude replaced by adversarial gradient magnitude, to check whether our cheaper diagnostic captures the same signal.

Proposed Experiments

The primary testbed is ImageBind and UniBind across all six modality towers. Evaluation covers ImageNet-1K zero-shot classification, MSR-VTT video-text retrieval, and the non-visual evaluation sets used by CALMARS. Attacks are PGD at $\epsilon \in \{4/255, 8/255\}$ (with modality-appropriate equivalents), CrossMaxim, and AutoAttack where applicable. Metrics are clean accuracy or recall, robust accuracy or recall, trainable parameters, and post-merge inference latency.

The first decisive check is descriptive: do amplification profiles $a_\ell$ and layer-norm shifts differ significantly across towers? We test this with rank correlation of layer orderings across seeds and calibration subsets.

The second check is causal. On towers whose profiles diverge from the image tower, diagnostic placement must beat the ported recipe, random placement, and uniform rank. On towers whose profiles match, the ported recipe should tie with the diagnostic. This within-experiment prediction makes the diagnostic falsifiable.

The third check is a cross-family replication. We apply the same protocol to the CLIP vision and text encoders against AdvCLIP-LoRA on its few-shot classification suite (ImageNet-1K, Caltech101 and others), where it reports a clean drop of about 2.24% under PGD-100 defense. This tests whether vision and text placement also diverge. The secondary benchmark is AdvMask's 38.48% average 16-shot robust accuracy.

Finally, we measure whether the mergeable unit closes the 45.13% versus 46.97% AutoAttack gap that FullLoRA reported between plain LoRA and its normalization-aware variant on ViT-Base CIFAR-10. If it does, magnitude correction need not cost inference latency.