SGHA-Attack: Semantic-Guided Hierarchical Alignment for Transferable Targeted Attacks on Vision-Language Models

Haobo Wang, Weiqi Luo, Xiaojun Jia, Xiaochun CaoarXiv 2026

TL;DR

SGHA-Attack is a novel adversarial framework that successfully manipulates the outputs of black-box Vision-Language Models (VLMs) like GPT-4o and LLaVA. By replacing single-image references with a diverse pool of text-to-image generated anchors and aligning intermediate-layer representations across both visual and cross-modal streams, it prevents the attack from overfitting to the surrogate model, achieving unprecedented targeted transferability.

What Problem Does This Paper Address?

Large Vision-Language Models (VLMs) are increasingly deployed in high-stakes applications, making their security a critical concern. In a realistic black-box setting, attackers use a known "surrogate" model (like CLIP) to generate adversarial image perturbations that they hope will transfer to an unseen "victim" model, forcing it to output a specific malicious or incorrect caption.

However, existing targeted transfer attacks suffer from a major flaw: they overfit to the surrogate model. This happens because they typically rely on a single target reference image and only align features at the very final layer of the model's encoder. Because different VLMs use vastly different internal architectures, projection layers, and large language model (LLM) backbones, these late-stage, single-focused attacks often fail to transfer across heterogeneous models.

Methods

To build a more robust and transferable attack, the authors introduce SGHA-Attack (Semantic-Guided Hierarchical Alignment), which injects target semantics throughout the entire feature hierarchy of the surrogate model.

Overview of the proposed SGHA-Attack framework showing the three key components: SGAI, HVSA, and CLSS.

The framework consists of three core components:

  1. Semantic-Guided Anchor Injection (SGAI): Instead of optimizing toward one target reference image, SGAI uses a frozen text-to-image diffusion model (like Stable Diffusion) to generate a diverse pool of images based on the target prompt. It then selects the Top-$K$ most semantically relevant "anchors" and creates a weighted mixture to guide the optimization stably.
  2. Hierarchical Visual Structure Alignment (HVSA): Rather than just matching the final layer, HVSA forces the adversarial image's intermediate visual features to align with the anchor targets across multiple depths of the Vision Transformer (ViT) encoder. It splits this alignment into global semantics (via the CLS token) and coarse spatial cues (via mean-pooled patch tokens).
  3. Cross-Modal Latent Space Synchronization (CLSS): To account for the fact that VLMs rely on cross-modal interactions, CLSS maps intermediate visual and textual features into a shared latent subspace using the surrogate's projection heads. This provides early cross-modal supervision well before the final output layer.

Datasets

The authors evaluated their method using a challenging mismatched setup:

  • Clean Inputs: 1,000 images randomly sampled from ImageNet-1K.
  • Target Prompts: 1,000 text descriptions from MS-COCO, creating a deliberate semantic mismatch with the source images.
  • Reference Images: Synthesized using Stable Diffusion conditioned on the MS-COCO target descriptions to populate the anchor pool.

Key Insights and Ideas

  • The Power of Multi-Anchor Guidance: Relying on a single reference image captures only one specific appearance of a concept. Generating a diverse anchor pool provides a broader, more stable semantic target that prevents the adversarial perturbation from getting stuck in surrogate-specific artifacts.
  • Opening the Visual Backbone: Visual encoders process features hierarchically, evolving from low-level structures to high-level concepts. Enforcing consistency across intermediate layers ensures that the adversarial features mimic the target concept throughout the entire feature extraction process, making the attack highly resilient to variations in downstream architectures.
  • Early Cross-Modal Synchronization: Aligning intermediate visual tokens directly with intermediate text tokens in a shared subspace helps the attack bypass the unique projection modules (like linear layers or Q-Formers) used by different victim VLMs.

Key Results

SGHA-Attack demonstrates a massive leap in targeted Attack Success Rate ($\text{ASR}_{\text{target}}$) across both open-source and commercial black-box models while maintaining imperceptible visual perturbations.

Fig. 3: Visual comparison of adversarial examples generated by various attack methods.

Open-Source VLMs

When evaluated against state-of-the-art open-source models, SGHA-Attack consistently outperformed existing baselines (such as COA and MF-ii):

  • BLIP-2: Achieved a targeted success rate of 94.70% (compared to COA's 80.20%).
  • LLaVA-NeXT (72.3B): Maintained a high success rate of 73.40%, where traditional methods struggled due to the model's scale and robustness.

Commercial Black-Box VLMs

Under an enhanced perturbation setting ($\epsilon = 16/255$), the attack successfully manipulated leading commercial APIs:

  • OpenAI GPT-4o: Reached a targeted success rate of 79% (vs. 47% for the previous best method, M-Attack).
  • Google Gemini-2.0: Achieved 67% targeted success.
  • Anthropic Claude-3.5: Achieved 26% targeted success against this highly robust model.

Additionally, the attack proved highly robust against common adversarial defenses, maintaining its efficacy even after images underwent Bit Reduction, JPEG Compression, or advanced purification methods like DiffPure.

Limitations and Future Work

While highly effective, the authors note that the attack's improvements can be less pronounced on advanced commercial systems that deploy proprietary, policy-rich defense mechanisms and complex input transformations. The authors suggest that future research should focus on developing more adaptive transfer strategies tailored to handle these guarded, commercial black-box environments, as well as designing defenses that explicitly safeguard internal feature hierarchies against semantic hijacking.

Summary updated

BibTeX
@misc{wang2026sgha,
  author = {Haobo Wang and Weiqi Luo and Xiaojun Jia and Xiaochun Cao},
  title = {{SGHA-Attack: Semantic-Guided Hierarchical Alignment for Transferable Targeted Attacks on Vision-Language Models}},
  year = {2026},
  eprint = {2602.01574},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.01574},
}
Figure