Skip to content

GapAttack: multimodal adversarial attacks beyond target alignmentGapAttack: Beyond Target Alignment in Multi-Modal Adversarial Attacks

Maitreya Sawai, Xugui Zhou
Louisiana State University
arXiv: Adversarial Attacks, Backdoors & PoisoningarXiv:2611.39045Originally published Indexed by this site · 2 days agoAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose GapAttack, which jointly optimizes target alignment and modality-axis position; on OpenCLIP, captioning success rate improves by up to 9.2 percentage points.

Threat modelThe attacker has white-box access to a fixed multimodal encoder and can only apply ℓ∞≤32/255 perturbations to the input; at construction time it does not know the identity, parameters, or outputs of downstream consumers, nor does it access their original training data, and the goal is to make downstream outputs tend toward a specified target while preserving the input's perceptual semantics.

Questions
Shared multimodal encoders allow a single input perturbation to potentially affect multiple downstream consumers. The authors examine whether target alignment alone is sufficient to improve attack success rates on tasks such as captioning, retrieval and image generation.
Methods
GapAttack adds a signed position term along the line connecting the image and text centroids on top of target similarity, estimates the modality axis from clean reference samples and calibrates the weight, then generates perturbations with PGD; the construction process does not query downstream consumers.
Experiments and results
The experiments cover OpenCLIP, ImageBind, and classification, retrieval, captioning, and image generation. The authors report gains in most generation tasks, but mixed retrieval results; after JPEG preprocessing, the five-threshold average success rates of the two attacks are close.
Limitations and future work
The authors state that the evaluation covers only digital image perturbations on two encoders, with an ℓ∞ budget of 32/255; results at high alignment thresholds are also affected by whether the threshold can be reached within the iteration budget. The OpenCLIP main queue is 350, 100, and 100 images, and ImageBind is 100 images.
Experimental setupOpenCLIP ViT-B/32 (ViT-B-32-quickgelu)、ImageBind-Huge et al. · ImageNet-V2、MS-COCO et al. · targeted attack success rate、Retrieval@1 et al.
Metrics
targeted attack success rateRetrieval@1target alignment αaugmentation similarity scentroid similarity contrast Γ
AI summaryResearchers propose an adversarial attack method against multimodal encoders, GapAttack; across multiple datasets, encoders and downstream tasks, the attack effect on the image captioning task improves by up to 9.2 percentage points over baselines while maintaining near-perfect targeted classification success rates. The method jointly optimizes target alignment and the placement of adversarial embeddings along the modality axis, which is defined by the centroids of image and text embeddings. The study also finds that stronger target alignment does not necessarily improve downstream attack success rates, emphasizing that modality geometry needs to be considered when attacking shared multimodal representations.

Researchers propose an adversarial attack method against multimodal encoders, GapAttack; across multiple datasets, encoders and downstream tasks, the attack effect on the image captioning task improves by up to 9.2 percentage points over baselines while maintaining near-perfect targeted classification success rates. The method jointly optimizes target alignment and the placement of adversarial embeddings along the modality axis, which is defined by the centroids of image and text embeddings. The study also finds that stronger target alignment does not necessarily improve downstream attack success rates, emphasizing that modality geometry needs to be considered when attacking shared multimodal representations.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Beyond target alignment, how the position of adversarial embeddings relative to modality regions affects multi-downstream attacks.

    The core question is: at comparable target alignment levels, does the position of the adversarial embedding along the modality axis affect downstream attack success. The authors argue that optimizing only cosine similarity to the target cannot fully describe the downstream impact of attacks on shared multimodal representations.

    • Application scenario: Encoders such as CLIP and ImageBind map different modalities into a shared space and are reused for retrieval, classification, captioning, and image generation. The authors state that this reuse creates a common attack surface, where a single perturbation may affect multiple independent consumers.
    • Shortcomings of existing methods: Existing embedding attacks mainly emphasize target alignment, same-modality target construction, or proxy optimization. The authors state that stronger alignment does not necessarily yield higher downstream success rates, and that evaluating only the encoder or a single consumer is insufficient to characterize the impact.
    • Core observation: Different modalities occupy different regions in the shared embedding space, i.e., the modality gap. The Figure 2 caption and main text describe the success rates of ClipCap-COCO and ClipCap-CC as varying non-monotonically with alignment, but the converted text does not retain readable curve values.
    • Proposed method: The authors propose GapAttack, which jointly optimizes target alignment and the position of the adversarial embedding along the modality axis defined by the centroid, and compares attack effects at matched alignment levels.
    • Threat model:
      • Goal: Construct x′=x+δ so that downstream outputs tend toward the attacker-chosen target y while preserving the perceptual semantics of x.
      • Knowledge: White-box access to the fixed encoder, including parameters and input gradients; the modality centroid and axis are estimated using available clean reference samples.
      • Capability: Can only perturb the input, subject to an ℓ∞ budget; cannot access the original training data of the encoder or consumers.
      • Victim system: The fixed multimodal encoder and its downstream consumers; at construction time the identity, parameters, and outputs of consumers are unavailable.
  2. What related research exists?

    Related work is divided into three groups: shared embedding attacks, downstream attack behavior, and modality geometry and robustness.

    Shared multimodal embedding attacks

    • Adversarial Illusions (2024): Uses embedding alignment of contrastive representations to steer perturbed inputs toward cross-modal targets, without requiring knowledge of downstream consumers. Adversarial Hubness (2026) instead exploits hubness so that injected content is relevant to many unrelated queries.
    • CrossFire (2024) and PTA (2026): CrossFire first transforms the target into the source modality before embedding alignment; PTA uses both target-modal and source-modal proxies to improve generalizability and undetectability.
    • Other multimodal attacks: Self-interpreting adversarial images (2025) uses adversarial images as soft prompts to influence vision-language models; Jailbreak in Pieces (2024) studies compositional jailbreaks of multimodal pipelines. The paper only describes their differing goals and access assumptions.

    Downstream tasks and transfer behavior

    • AttackVLM (2023), MT-AdvCLIP (2025): Study downstream attack behavior through surrogate-based transfer and gradient conflicts in non-targeted cross-task attacks, respectively.
    • Attention and target-removal attacks (2024, 2025): Related work compares attention-based and embedding-based perturbations, or uses loss balancing to achieve targeted removal of target objects from captions.
    • Positioning of this paper: The authors state that GapAttack complements the above methods by analyzing position along the centroid modality axis at matched target-alignment levels and adding an explicit axial control term.

    Modality gap, representation learning, and robustness

    • Mind the Gap (2022) and follow-up work: Characterizes the separation of modality distributions; follow-up work narrows the gap to improve cross-modal representations, or preserves and compensates for the gap in continual learning, and corrects modality mismatch in text-only captioning.
    • Geometry and robustness (2026): Related work links modality geometry to sensitivity under embedding perturbations. Robust CLIP (2024) and LORE (2025) use unsupervised adversarial fine-tuning to bring perturbed input embeddings close to clean reference embeddings.
    • Defense work: Table I also lists Consensus, A4D, CLIPure, and COLA; the main text does not use them as baselines in this experiment. This paper studies targeted input perturbations on a fixed encoder, rather than improving encoder robustness.

    Experimental baselines and data: The external attack baselines are Illusions, CrossFire, and PTA, plus the GapAttack* multi-target proxy variant; on ImageBind, alignment-only (λ=0) is used as a control. The data use ImageNet-V2, MS-COCO, STL-10, and ESC-50.

  3. How does the paper address this problem?

    GapAttack constrains the embedding position using the centroid modality axis, and calibrates the weights of alignment and position using the encoder output.

    The overall idea is to add modality-axis placement beyond the target alignment loss: first estimate the modality axis from clean reference samples, then calibrate the weight of the position term, and finally optimize the input perturbation with PGD. Neither the attack construction nor the calibration uses the parameters or outputs of downstream consumers.

    Modality axis and position definition

    • The encoder outputs unit-normalized embeddings, and the inner product equals cosine similarity. The centroid difference between the two modalities is defined as g=𝔼[θ(m̄)(ym̄)]−𝔼[θ(m)(xm)], and the unit vector ĝ=g/‖g‖2 points toward the target modality centroid.
    • The signed axial gap between any two embeddings is G(u,v)=⟨v−u,ĝ⟩; a positive value means v has a larger projection on ĝ.
    • The ImageBind experiments replace the target-side centroid with µref, the unweighted average of the text and audio centroids, and the axis points from the image centroid to this aggregated reference centroid.

    Joint attack objective

    • Under the ℓ∞ perturbation constraint, GapAttack maximizes ⟨θ(m)(xm+δ),θ(m̄)(ym̄)⟩+λ G(θ(m)(xm+δ),θ(m̄)(ym̄)).
    • The first term increases similarity to the target embedding; when λ>0, the second term prefers a smaller axial projection, biasing the adversarial embedding toward the source modality side. λ=0 degenerates to alignment-only.
    • GapAttack* additionally aligns multiple target proxies in the manner of PTA, to test whether proxy-based alignment brings additional gains.

    Encoder-side calibration and PGD

    • Calibration fixes α=0.5 and records, for each candidate λ, the perturbation that first reaches this alignment threshold, so that the average axial projection of its adversarial embeddings approaches the average projection of the clean embeddings of the same batch of inputs.
    • For the average projection of candidate λ, it finds the two values that bracket the clean mean and interpolates; this yields λ=0.5 for OpenCLIP and λ=0.40 for ImageBind, which are then reused in attacks on the same encoder.
    • PGD starts from δ0=0, uses sign-gradient updates, with step size decaying from ϵ/4 to ϵ/100, up to 7,500 iterations, ϵ=32/255.
    • When evaluating at a specified alignment level, the iteration that first reaches the threshold is kept; if not reached, it is recorded as threshold not reached. The modality-axis term reuses the already computed embeddings, and the authors state that each iteration adds only O(d) arithmetic and requires no additional encoder forward pass.

    Downstream consumers and success determination

    • Margin consumers: zero-shot classification and retrieval rank a fixed candidate set by embedding similarity; a target candidate scoring higher than all other candidates is a targeted top-1 success.
    • Captioning: ClipCap-COCO and ClipCap-CC use a two-layer MLP to map 512-dimensional image embeddings into a ten-token GPT-2 prefix. The authors additionally train IBCap, which processes ImageBind embeddings with a two-layer MLP (1024→3840→7680, Tanh), with a training set of 118,287 images and 591,753 captions from MS-COCO train2017.
    • Generation determination: captions are embedded by the same OpenCLIP ViT-B/32 text encoder and compared with 1,000 class prompts; success is when the target enters the top ten. BindDiffusion generates one image per embedding, the two attack arms share noise seeded by source index, and the same CLIP classifier determines whether the target enters the top ten.
    • Threshold convention: the success rate denominator is the full cohort, and those not reaching the threshold count as failures; captioning is reported only when at least 20 inputs reach the threshold, otherwise N/A. Retrieval is scored only on inputs that reach the threshold.
  4. What experiments did the paper conduct?

    Experiments show that generative consumers often benefit, but retrieval results are mixed, and the peak advantage after JPEG does not equal the mean advantage.

    Experimental setup

    • Encoders under test: OpenCLIP ViT-B/32 (OpenAI weights, ViT-B-32-quickgelu, 512 dimensions) and ImageBind-Huge (1,024 dimensions, six modalities); the attack is white-box with respect to the encoder, with a perturbation budget of ℓ∞≤32/255.
    • Data and sample sizes: OpenCLIP uses 350 ImageNet-V2 images, 100 MS-COCO images, and 100 STL-10 images; ImageBind uses 100 ImageNet-V2 images. Modality geometry is additionally examined with ImageNet-V2 and ESC-50, taking two audio segments per class from ESC-50.
    • Target construction: Source classes are taken from the encoder's zero-shot top-1 over 1,000 ImageNet classes; targets are uniformly sampled from the remaining 999 classes, and all attacks reuse the same source–target pairs.
    • Baselines and variants: Illusions, CrossFire, PTA, and the multi-target proxy variant GapAttack*; ablations include Random Direction, No G Term, and alignment-only (λ=0) on ImageBind.
    • Downstream tasks: Zero-shot classification, ClipCap-COCO, ClipCap-CC, TextCap, IBCap, Retrieval@1 with a fixed gallery of 1,000 images, and BindDiffusion image generation.
    • Evaluation and repetition: Captions and generated images are both judged by regularized CLIP class ranking, with target top-ten as success; the paper does not use an LLM judge or human review; the number of independent repetitions of the attacks or confidence intervals is not reported.

    Main results

    Table II selects the best alignment α⋆ post hoc for each attack, dataset, and consumer on OpenCLIP; values are full-queue success rates (%).

    Swipe horizontally to read the table

    AttackImageNet-V2 Zero-shotImageNet-V2 COCO Cap.ImageNet-V2 CC Cap.MS-COCO COCO Cap.STL-10 COCO Cap.
    Illusions100.044.055.755.057.0
    CrossFire79.454.353.754.051.0
    PTA100.043.153.754.055.0
    GapAttack100.057.464.962.058.0
    GapAttack*100.053.460.361.059.0

    According to Table II; in Zero-shot on MS-COCO and STL-10, Illusions, PTA, GapAttack, and GapAttack* are all 100.0, and CrossFire is 82.0 and 78.0, respectively.

    • The authors' interpretation of the main results: The authors state that GapAttack improves over the strongest external baseline for that setting by 1.0–9.2 percentage points across the four captioning settings, and maintains 100% targeted classification success on three datasets.
    • Proxy exception: GapAttack* is one percentage point higher than GapAttack only on STL-10 captioning, and lower on the other three captioning settings; the authors accordingly emphasize the benefit of the single-text-target version.
    • Alignment scale limitation: CrossFire's α is measured on the generated image embedding side and is not on the same scale as the text-target α of other methods; α⋆ is selected for post hoc comparison and does not participate in attack construction or λ calibration.

    ImageBind generation tasks and retrieval

    • Captioning: In Table IV, alignment-only success rates at α=0.3–0.7 are 22.0, 38.0, 44.0, 48.0, and 45.0, respectively; joint alignment is 24.0, 47.0, 49.0, 51.0, and 56.0, respectively. The authors note that the largest difference is 11.0 percentage points at α=0.7.
    • Image generation: In the same table, alignment-only is 24.0, 57.0, 69.0, 80.0, and 81.0, respectively, and joint alignment is 30.0, 60.0, 82.0, 84.0, and 90.0, respectively; the largest difference is 13.0 percentage points at α=0.5. Both methods achieve 100% zero-shot targeted classification at α=0.5.
    • Retrieval negative result: Among the nine thresholds in Table VI, joint alignment is higher on three, tied on one, and lower on five; at α=0.9, alignment-only is 57.0% and joint alignment is 2.0%. The authors explain that Retrieval@1 also depends on the ranking of the target gallery image relative to other images, and at high thresholds is also affected by the threshold attainment rate.

    Position ablations and defense transformations

    • Modality axis ablation: In Table III on the OpenCLIP, ImageNet-V2 350-image queue, Random Direction gives Zero-shot/COCO Cap./CC Cap. of 99.7/37.1/48.6, No G Term gives 100.0/44.0/55.7, and GapAttack gives 100.0/57.4/64.9, each at its own best α⋆.
    • Image-side and text-side position: In Table V, the image side (λ>0, Γ=−0.46) gives 57.4, 64.9, and 72.0 on ClipCap-COCO, ClipCap-CC, and TextCap; the text side (λ=−0.5, Γ≈+0.49) gives 36.0, 38.6, and 57.4. The authors state that being close to the text-side reference does not guarantee greater success on the text-trained TextCap.
    • Augmentation stability: In Table VII on ImageBind at α=0.7, the average similarity across six augmentations is 0.91 for clean, 0.38 for the joint attack, and 0.32 for alignment-only; the authors state that both attacks remain less stable than clean inputs. The Figure 4(a) main text states that the joint attack has a higher mean at every commonly evaluated threshold.
    • JPEG preprocessing: The Figure 4(b) main text reports that after quality 75, the observed peak for the joint attack versus alignment-only is 35.0% versus 31.0%, but the five-threshold mean at α=0.3–0.7 is 23.2% versus 23.4%. The authors state that the success rates of both attacks decrease, and the retained peak advantage depends on the checkpoint.

    Other ablations and analyses

    • λ sweep: The Figure 3 main text states that the peak captioning at λ=0.5 is 57.4%, higher than at λ=0 and λ=1.0; the authors state that a stronger position bias does not necessarily yield greater success.
    • Clean geometry reference: In the corresponding diagnostics in Figure 3, the Γ references for clean images and text targets are approximately −0.46 and +0.52.
    • Clean projection dispersion: The standard deviation of the clean image axial projection divided by the centroid distance is 5.3% for OpenCLIP and 11.7% for ImageBind.
    • Clean caption base rate: 2.0% for ClipCap-COCO and 1.7% for ClipCap-CC.
  5. What are some points that can be further explored?

    The authors explicitly delimit the scope of the evaluation and caution that high-threshold results need to be interpreted together with the threshold attainment rate.

    Limitations and future directions noted by the authors

    • Access and reference-sample prerequisites: Sec. IV-F states that GapAttack's construction and λ calibration depend on white-box access to a fixed encoder and on available clean reference samples; this is a condition for the method to hold.
    • Evaluation scope: Sec. IV-F explicitly states that the evaluation covers digital image perturbations on two encoders, with a perturbation budget of ℓ∞=32/255.
    • High-threshold attainment issue: Sec. IV-F points out that success at high alignment thresholds is also limited by whether the optimization can reach the specified threshold within the iteration budget, and results need to be interpreted together with threshold-attainment rates.
    • Preprocessing sensitivity: Sec. IV-F defers preprocessing sensitivity to the JPEG compression test in Sec. IV-E; that experiment shows that the peak and the five-threshold mean give different relative comparisons.
    • Consumer differences: Sec. V summarizes the gains as varying with consumer and preprocessing conditions, rather than all downstream tasks benefiting consistently; the paper does not separately list a specific future-work agenda.

    Experimental coverage

    • Models and tasks: the attacked encoders are OpenCLIP ViT-B/32 and ImageBind-Huge; consumers cover zero-shot classification, three ClipCap-style captioners, the author-trained IBCap, fixed-gallery retrieval and BindDiffusion.
    • Sample sizes: the three OpenCLIP attack cohorts are 350, 100 and 100 images respectively; the ImageBind attack cohort is 100 images. Table II, III and V report at the best α⋆, while Table IV and VI report multiple fixed thresholds.
    • Defense evaluation: Sec. IV-E includes embedding stability under six input augmentations, and captioning after JPEG quality 75 preprocessing; neither attack adjusts its objective for these transformations.
    • Determination method: captioning and image generation use the CLIP class top-ten rule, without human or LLM review; the paper does not report human agreement, statistical significance tests or independent repetition counts.
    • Efficiency information: Sec. IV-F gives O(d) arithmetic per iteration for the axial term, no additional encoder forward pass, and centroid estimation and calibration as one-time costs; the paper does not report specific query counts or time costs.
  6. Summarize the main content of the paper

    GapAttack incorporates modality-axis position into the attack objective; gains are concentrated in generative consumers and vary with the task.

    GapAttack is a targeted input perturbation method for shared multimodal encoders, investigating whether, beyond target alignment, the position of adversarial embeddings relative to modality regions affects downstream attacks.

    • Problem and setting: the attacker has white-box access to a fixed encoder, can only apply image perturbations with ℓ∞≤32/255, and does not know the identity, parameters or outputs of downstream consumers during construction; the goal is to steer the outputs of multiple consumers toward a specified semantics.
    • Method highlights: the axis is defined by the modality centroid difference of clean reference samples, and a signed position term is added to the target similarity; λ is calibrated through encoder outputs, and perturbations are then generated with up to 7,500 PGD iterations, without querying downstream consumers.
    • OpenCLIP results: in Table II, GapAttack's best α⋆ success rates on ImageNet-V2 are 57.4% for ClipCap-COCO and 64.9% for ClipCap-CC, and targeted zero-shot classification is 100.0% on all three datasets. The authors state that the four captioning results improve by 1.0–9.2 percentage points over the strongest external baseline.
    • ImageBind results: in Table IV, at α=0.7 joint alignment captioning is 56.0% versus 45.0% for alignment-only; BindDiffusion at α=0.5 is 82.0% versus 69.0% respectively.
    • Exceptions and defenses: in Table VI, Retrieval@1 is higher at only three of nine thresholds, and at α=0.9 the joint method is 2.0% versus 57.0% for the control. After JPEG, the five-threshold mean is 23.2% versus 23.4%, despite a peak of 35.0% versus 31.0%.
    • Authors' conclusion: the authors argue that evaluating attacks on shared representations cannot look only at target alignment, and that embedding position is another relevant factor; its gains vary with downstream consumer and preprocessing conditions, and high-threshold results also need to be understood together with threshold attainment rates.

Research lineage

Connected via shared benchmarks in library
Explore in knowledge graph →

Related papers

Show 3 more papers
Read originalarxiv.org