Image-to-text models, such as those used for automated captioning and visual question answering, have become integral to modern AI applications. However, their susceptibility to adversarial attacks—subtle, often imperceptible perturbations to input images that lead to incorrect outputs—poses a significant security risk. This paper introduces AAA (Ask, Attend, Attack), a novel framework designed for decision-based black-box targeted attacks, where the attacker lacks access to the model's internal parameters and can only observe the final text output.
Addressing the "Semantic Loss" Problem
Most existing adversarial attacks on image-to-text systems operate in white-box or gray-box settings, requiring access to gradients or image encoders. In more realistic black-box scenarios, targeted attacks often suffer from semantic loss. This occurs when an attacker attempts to force a specific target sentence, but the optimization process results in nonsensical or unrelated output because the target is too far from the model's learned feature space for that image.
The AAA framework addresses this by ensuring the target text is semantically reachable, moving beyond the limitations of previous methods that often produced "semantic mismatches" as shown in the comparison above.
The AAA Methodology
The framework consists of three distinct stages designed to maximize attack success while maintaining semantic coherence:
- Ask (Target Semantic Selection): To prevent semantic loss, the attacker first "asks" the model to identify words already associated with the image. By applying minor perturbations and collecting generated nouns, verbs, and adjectives, a "target semantic dictionary" is built. This ensures the target sentence is grounded in the model's existing understanding of the image features.
- Attend (Search Space Reduction): Modifying every pixel in a high-resolution image is computationally prohibitive for black-box optimization. AAA utilizes a surrogate model (e.g., ResNet-50) to generate a Grad-CAM attention heatmap. This identifies the most influential regions for caption generation, allowing the attack to focus exclusively on these critical pixels.
- Attack (Evolutionary Optimization): The final stage employs a Differential Evolution (DE) algorithm. Using a "Current-To-Best" mutation strategy, the framework iteratively refines the pixels within the attended regions to minimize the distance between the model's output and the target text, using CLIP feature similarity as the objective function.
Key Results and Insights
The authors evaluated AAA using the Flickr30k dataset against two prominent architectures: the Transformer-based VIT-GPT2 and the CNN+RNN-based Show-Attend-Tell.
- Superior Performance: AAA achieved a CLIP similarity score of 0.952 on VIT-GPT2, vastly outperforming black-box adaptations of existing gray-box methods, which achieved scores around 0.65.
- Efficiency through Attention: Ablation studies confirmed that the "Attend" stage is vital. Without it, convergence was significantly slower and success rates dropped, proving that focusing on salient image regions is a key efficiency driver.
- Surrogate Portability: A notable finding is the consistency of attention heatmaps across different architectures. Heatmaps from a simple ResNet-50 surrogate were highly effective even when attacking complex Transformer models.
Conclusion
The AAA framework demonstrates that image-to-text models are highly vulnerable even in the most restrictive black-box settings. By intelligently selecting target semantics and focusing perturbations on high-attention regions, AAA achieves high-fidelity targeted attacks that preserve semantic meaning. These findings underscore the urgent need for more robust defense mechanisms in the development of vision-language models.
Summary updated