Even Sailors Need Calm Seas: Taming the Geometry of VLMs for Fast Adversarial Fine-Tuning

Yuqing Wen, Junhao Dong, Ting Peng, Xudong Zhang, Jiaming Zhang, Weiming Liu, Zhengtao Yao, Xinghua Qu, Yew-Soon OngNeurIPS 2026

TL;DR

Vision-Language Models (VLMs) like CLIP are notoriously fragile against adversarial pixel noise, and making them robust usually requires prohibitively expensive, multi-step training. When researchers try to take a fast, single-step shortcut, VLMs suffer a geometric meltdown—memorizing the exact attack strength they were trained on while collapsing against weaker attacks. By flattening the wild curves of the VLM loss landscape, the authors' new framework, LinGuard, delivers heavy-duty, multi-step robustness at near single-step speed.

What Problem Does This Paper Address?

Modern AI assistants rely heavily on VLMs as their visual "eyes." Unfortunately, imperceptible, maliciously crafted pixel noise (adversarial perturbations) can easily trick a VLM into hallucinating—making it describe a running dog as "a dead bird perched on a wooden rail."

The gold-standard defense is adversarial fine-tuning: repeatedly attacking the model during training and teaching it to resist. However, generating strong attacks requires taking many iterative gradient steps (like PGD) for every single parameter update. On massive VLMs, this computational tax is brutal.

In standard vision-only models, engineers often bypass this cost using single-step approximations (like FGSM), taking just one big leap in the gradient's direction. The catch? Single-step methods are prone to Catastrophic Overfitting (CO), where the model learns to ace the simple single-step training attack while its defense against smarter, multi-step attacks abruptly drops to zero.

When the authors tried applying established single-step fixes from standard vision models directly to VLMs, they failed spectacularly. Not only was Catastrophic Overfitting much worse, but VLMs also exhibited a bizarre new failure mode the authors call Perturbation Radius Overfitting (PRO): a model trained to survive a strong attack budget ($\epsilon = 8/255$) paradoxically loses accuracy when tested against weaker single-step attacks ($\epsilon' < 8/255$).

Illustration of Perturbation Radius Overfitting (PRO), where single-step VLMs perform worse on weaker attacks than the training budget, unlike LinGuard.

Methods

Why do single-step approximations break down on VLMs? Single-step attacks assume the local loss landscape is roughly flat and linear—like walking up a steady ramp. Using mathematical analysis of the input-space Hessian (curvature), the authors prove that single-step failure is driven by two geometric culprits along the perturbation path:

  1. Angular Misalignment: The gradient direction twists wildly inside the perturbation zone.
  2. Magnitude Surge: The steepness (norm) of the gradient explodes.

To calm these choppy geometric seas, the authors introduce LinGuard (Linearization Guard). Keeping the text encoder frozen and updating only the image encoder via standard single-step FGSM, LinGuard adds two lightweight regularizers evaluated at a shared, random interior point ($\eta$) inside the perturbation ball:

  • Angular Misalignment (AM) Loss: Penalizes the cosine distance between the clean input gradient and the interior perturbed gradient. While inspired by unimodal alignment methods, evaluating it inside the ball keeps the path straight and prevents PRO.
  • Magnitude Surge (MS) Loss: Uses a fast finite-difference step along the perturbed gradient direction to approximate and suppress local Hessian curvature—stopping gradient explosions at their source.

Because both regularizers share the same random interior point and reuse already-computed gradients, LinGuard avoids extra backward passes and stays remarkably fast.

Datasets

No new benchmarks are introduced; instead, the authors test zero-shot and downstream transfer across standard datasets:

  • Fine-Tuning: ImageNet training set.
  • Zero-Shot Classification (14 benchmarks): ImageNet, STL10, CIFAR-10, CIFAR-100, ImageNet-R, ImageNet-S, Stanford Cars, OxfordPets, Flowers102, DTD, EuroSAT, FGVC Aircraft, PCAM, and Caltech101.
  • Downstream Generative Tasks (plug-and-play vision encoder in LLaVA 1.5): COCO and Flickr30k (Image Captioning), plus TextVQA and VQAv2 (Visual Question Answering).

Key Insights and Ideas

  • Cosine Similarity Warps the Landscape: Standard unimodal classifiers use linear heads, which contribute zero extra curvature. CLIP-style VLMs, however, classify via cosine similarity (normalizing features onto a hypersphere). The authors prove this normalization injects an intrinsic excess curvature term ($\sim 1/(\tau \|z\|_2^2)$) into the loss landscape, explaining why CO is far worse on VLMs and why PRO emerges.
  • Straightening Isn't Flattening (And Vice Versa): You need both regularizers. Aligning gradient angles alone doesn't stop the gradient norm from surging tenfold, and suppressing curvature at a single point doesn't prevent gradients from drifting off-course along a path.
  • Don't Over-Tame the Sea: In ablation studies, pushing the Magnitude Surge weight too high ($\lambda_{MS} = 2.0$) caused optimization collapse—clean accuracy dropped to random chance ($\sim 10\%$) while training robust accuracy artificially spiked due to gradient obfuscation (flattening gradients so much the attacker is blinded, destroying semantic features in the process).

Key Results

LinGuard matches multi-step TeCoA robustness at a fraction of the cost while suppressing the CO Gap and gradient norm surges.

Figure 1: Illustration of CO in VLMs. LinGuard matches multi-step (TeCoA [38]) robustness while significantly reducing computational costs (Left). As the perturbation budget (ϵ) increases, existing single-step methods exhibit a widening CO Gap (top right) and a drastic surge in adversarial gradient norms (bottom right). Our method effectively mitigates CO and suppresses gradient norm growth.
  • Multi-Step Robustness at Single-Step Speed: Across 14 zero-shot datasets (ViT-B/32 at $\epsilon = 4/255$), standard single-step baselines collapse under PGD-20 attacks to 7.74%–11.86% average robust accuracy. LinGuard achieves 24.61% robust accuracy and 45.35% clean accuracy—virtually matching the expensive multi-step TeCoA baseline (25.48% robust, 44.58% clean) which is $\sim 2.5\times$ slower to train.
  • Scaling & Architecture Transfer: On ImageNet with a larger ViT-L/14 backbone, FGSM hits 0.00% AutoAttack accuracy while LinGuard reaches 45.70%. It also leads on convolutional backbones (ResNet-50).
  • Plug-and-Play Generative Defense: Dropping LinGuard's ViT-L/14 encoder directly into LLaVA 1.5 boosts average robust performance across four VQA and captioning benchmarks under PGD-50 attacks from 5.29 (standard CLIP) and 5.54 (FGSM) up to 19.47, keeping generated captions grounded in reality.

Limitations and Future Work

  • Convolutional Curvature: On ResNet-50, LinGuard's gains (8.08% PGD-20, 4.02% AutoAttack) are more modest than on Vision Transformers. The authors note this is likely due to stronger input-space curvature intrinsic to the convolutional layers themselves, which lies outside the cosine-head normalization curvature targeted by their analysis.
  • Hyperparameter Balance: Extreme regularization triggers gradient obfuscation and accuracy collapse, requiring careful tuning ($\lambda_{AM} = 0.4, \lambda_{MS} = 1.2$).
  • Future Work: Although much faster than multi-step training, computing gradient regularizers still adds some overhead compared to vanilla training; the authors plan to explore advanced gradient calculation acceleration strategies to push efficiency even further.

Summary updated

Abstract

Vision-Language Models (VLMs) such as CLIP have demonstrated strong performance across tasks yet remain highly vulnerable to adversarial attacks. While adversarial fine-tuning has been demonstrated to be effective against such malicious inputs, its multi-step adversary generation scheme during fine-tuning further induces prohibitive computational costs for VLM backbones. Previous works in unimodal models have introduced single-step strategies to reduce this burden. However, we find naive single-step strategies fail on VLMs due to more severe catastrophic overfitting. In addition, we identify a novel failure mode termed *Perturbation Radius Overfitting*, where VLMs overfit to the specific training attack budget while paradoxically becoming fragile to weaker perturbations. We trace these failures to growing angular misalignment and magnitude surge of the local gradients, which compromise the local linearity essential for accurate single-step approximation. Guided by this analysis, we introduce a joint adversarial optimization scheme that actively rectifies the local geometry by suppressing both angular misalignment and magnitude surge along the perturbation path. Our approach consistently outperforms existing single-step methods across various datasets and VLM architectures, achieving state-of-the-art robustness while preserving efficiency. To our knowledge, this is the first work to systematically examine single-step adversarial fine-tuning on VLMs and establish the geometric foundations of their robustness.
BibTeX
@inproceedings{wen2026even,
  author = {Yuqing Wen and Junhao Dong and Ting Peng and Xudong Zhang and Jiaming Zhang and Weiming Liu and Zhengtao Yao and Xinghua Qu and Yew-Soon Ong},
  title = {{Even Sailors Need Calm Seas: Taming the Geometry of VLMs for Fast Adversarial Fine-Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=elpJhhSIEj},
}
Figure