Skip to main content
QUICK REVIEW

[Paper Review] I See Dead People: Gray-Box Adversarial Attack on Image-To-Text Models

Raz Lapid, Moshe Sipper|arXiv (Cornell University)|Jun 13, 2023
Adversarial Robustness in Machine LearningComputer Science3 citations
TL;DR

This paper proposes a gray-box adversarial attack on image-to-text models that generates imperceptible perturbations using only the image encoder, bypassing the need for decoder knowledge. The method achieves high success rates in both untargeted and targeted attacks, fooling models—including those hosted on Hugging Face—by exploiting vulnerabilities in the vision transformer encoder.

ABSTRACT

Modern image-to-text systems typically adopt the encoder-decoder framework, which comprises two main components: an image encoder, responsible for extracting image features, and a transformer-based decoder, used for generating captions. Taking inspiration from the analysis of neural networks' robustness against adversarial perturbations, we propose a novel gray-box algorithm for creating adversarial examples in image-to-text models. Unlike image classification tasks that have a finite set of class labels, finding visually similar adversarial examples in an image-to-text task poses greater challenges because the captioning system allows for a virtually infinite space of possible captions. In this paper, we present a gray-box adversarial attack on image-to-text, both untargeted and targeted. We formulate the process of discovering adversarial perturbations as an optimization problem that uses only the image-encoder component, meaning the proposed attack is language-model agnostic. Through experiments conducted on the ViT-GPT2 model, which is the most-used image-to-text model in Hugging Face, and the Flickr30k dataset, we demonstrate that our proposed attack successfully generates visually similar adversarial examples, both with untargeted and targeted captions. Notably, our attack operates in a gray-box manner, requiring no knowledge about the decoder module. We also show that our attacks fool the popular open-source platform Hugging Face.

Motivation & Objective

  • To address the vulnerability of image-to-text models to adversarial attacks, particularly in the context of pretrained multimodal models.
  • To develop a gray-box attack that operates without access to the decoder module, relying solely on the image encoder.
  • To generate visually similar adversarial examples that induce incorrect or targeted captions in image-to-text systems.
  • To demonstrate transferability of the attack to real-world deployed models, such as those on Hugging Face’s inference API.
  • To highlight the risks of adversarial robustness in safety-critical applications like assistive technologies and content moderation.

Proposed method

  • The attack formulates adversarial perturbation generation as an optimization problem using only the image encoder, without querying the full end-to-end model.
  • Perturbations are optimized to minimize the CLIP image-text similarity loss while maintaining visual similarity to the original image (bounded by ε = 0.05).
  • For targeted attacks, the method uses a target caption loss to steer the model toward generating a specific, desired caption.
  • The optimization process is performed in the latent space of the vision transformer (ViT) encoder, ensuring the attack remains efficient and transferable.
  • The method is language-model agnostic, as it does not require gradients or knowledge of the decoder architecture.
  • Adversarial examples are evaluated on the full image-to-text pipeline after generation, confirming successful evasion of the end-to-end model.

Experimental results

Research questions

  • RQ1Can a gray-box adversarial attack be constructed that only accesses the image encoder and still successfully generate adversarial examples for image-to-text models?
  • RQ2To what extent can adversarial perturbations remain visually imperceptible while causing significant captioning errors in image-to-text models?
  • RQ3Does the attack transfer effectively to deployed models, such as those hosted on Hugging Face’s inference API, without knowledge of their deployment or quantization?
  • RQ4How effective is the attack in both untargeted and targeted scenarios, particularly in terms of caption fidelity and model deception?
  • RQ5Can the attack be applied to a widely used model like ViT-GPT2 without requiring access to the decoder or fine-tuning?

Key findings

  • The proposed gray-box attack achieved a success rate of 100% in targeted attacks on the ViT-GPT2 model, consistently generating the exact target captions.
  • The attack achieved a minimum CLIP score of 0.134 in the targeted setting, indicating high semantic divergence between the original and adversarial captions.
  • The attack successfully transferred to the Hugging Face-hosted inference API, generating identical adversarial captions as in local evaluations, despite no knowledge of deployment specifics.
  • Adversarial examples were visually similar to the original images, with perturbations remaining imperceptible under ε = 0.05, confirming visual stealthiness.
  • The method demonstrated robustness across diverse image-caption pairs, including complex scenes like people, animals, and urban environments.
  • The attack remained effective even when the decoder was a black-box, proving that the vulnerability lies primarily in the image encoder’s sensitivity to perturbations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.