[Paper Review] Exact Adversarial Attack to Image Captioning via Structured Output Learning with Latent Variables
This paper proposes the first exact adversarial attack framework for image captioning systems that targets partial captions—where only some words in the caption are specified—by formulating the attack as structured output learning with latent variables. Using generalized expectation maximization (GEM) and structural SVMs with latent variables, the method generates imperceptible adversarial noises that successfully force state-of-the-art CNN+RNN models to generate targeted, often irrelevant, captions, revealing critical gaps in their linguistic and structural understanding compared to human captioning.
In this work, we study the robustness of a CNN+RNN based image captioning system being subjected to adversarial noises. We propose to fool an image captioning system to generate some targeted partial captions for an image polluted by adversarial noises, even the targeted captions are totally irrelevant to the image content. A partial caption indicates that the words at some locations in this caption are observed, while words at other locations are not restricted.It is the first work to study exact adversarial attacks of targeted partial captions. Due to the sequential dependencies among words in a caption, we formulate the generation of adversarial noises for targeted partial captions as a structured output learning problem with latent variables. Both the generalized expectation maximization algorithm and structural SVMs with latent variables are then adopted to optimize the problem. The proposed methods generate very successful at-tacks to three popular CNN+RNN based image captioning models. Furthermore, the proposed attack methods are used to understand the inner mechanism of image captioning systems, providing the guidance to further improve automatic image captioning systems towards human captioning.
Motivation & Objective
- To investigate the robustness of CNN+RNN-based image captioning models against targeted adversarial attacks on partial captions.
- To address the challenge of generating adversarial noise that enforces specific word sequences at certain positions while maintaining natural language structure.
- To develop a systematic framework for exact attacks on structured outputs, which are not easily amenable to gradient-based methods.
- To use the attack method as a probe to analyze and understand the inner mechanisms of image captioning models.
- To reveal limitations in current models' ability to generate diverse linguistic styles, such as passive voice or attributive clauses.
Proposed method
- Formulates the targeted partial caption attack as a structured output learning problem with latent variables, where unobserved words are treated as latent variables.
- Employs the generalized expectation maximization (GEM) algorithm to maximize the log marginal likelihood of the targeted partial caption under the model.
- Applies structural SVMs with latent variables to maximize the margin between the targeted caption and all other possible captions at the same positions.
- Optimizes for adversarial noise that minimizes the L2 norm while maximizing the likelihood or margin of the targeted caption.
- The framework is architecture-agnostic and applicable to any CNN+RNN image captioning model.
- Uses projected gradient descent for untargeted attacks to compare model behavior under different attack types.
Experimental results
Research questions
- RQ1Can adversarial noise be generated to force a CNN+RNN image captioning model to produce a specific partial caption, even when it is semantically unrelated to the image?
- RQ2How does the structured output learning with latent variables framework enable exact attacks on sequential, structured outputs like captions?
- RQ3To what extent can current image captioning models generate diverse linguistic structures such as passive voice or attributive clauses under adversarial conditions?
- RQ4What do the success and failure patterns of attacks reveal about the linguistic and compositional understanding of deep learning models in image captioning?
- RQ5How do untargeted attacks compare to targeted attacks in terms of semantic coherence and grammatical validity?
Key findings
- The proposed GEM and latent SSVM methods successfully generated adversarial attacks on three state-of-the-art image captioning models: Show-And-Tell, Show-Attend-And-Tell, and SCST.
- The average L2 norm of adversarial noise was as low as 1.5202 (GEM), indicating imperceptibility to human observers.
- Attack success rate (SR) reached 65.86% with GEM, significantly outperforming Show-and-Fool in both SR and precision (0.8009 vs. 0.7239).
- Only the Show-Attend-and-Tell model could generate passive sentences under attack, while all models failed to produce attributive clauses, indicating limited linguistic flexibility.
- Untargeted attacks produced non-grammatical, meaningless captions, suggesting that current models have not learned the underlying grammar of natural language.
- The attack framework effectively exposed that current models are far from human-level captioning in terms of linguistic diversity and structural understanding.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.