Abstract
Targeted adversarial attack, which aims to mislead a model to recognize any image as a target object by imperceptible perturbations, has become a mainstream tool for vulnerability assessment of deep neural networks (DNNs). Since existing targeted attackers only learn to attack known target classes, they cannot generalize well to unknown classes. To tackle this issue, we propose Generalized Adversarial attacKER (GAKer), which is able to construct adversarial examples to any target class. The core idea behind GAKer is to craft a latently infected representation during adversarial example generation. To this end, the extracted latent representations of the target object are first injected into intermediate features of an input image in an adversarial generator. Then, the generator is optimized to ensure visual consistency with the input image while being close to the target object in the feature space. Since the GAKer is class-agnostic yet model-agnostic, it can be regarded as a general tool that not only reveals the vulnerability of more DNNs but also identifies deficiencies of DNNs in a wider range of classes. Extensive experiments have demonstrated the effectiveness of our proposed method in generating adversarial examples for both known and unknown classes. Notably, compared with other generative methods, our method achieves an approximately 14.13% higher attack success rate for unknown classes and an approximately 4.23% higher success rate for known classes.
Introduction
Adversarial attacks serve as critical stress tests for the robustness of Deep Neural Networks (DNNs). Among these, targeted attacks—where an attacker attempts to force a model to misclassify a source image as a specific target class—represent a significant security threat. Traditional targeted attacks generally fall into two categories: iteration-based methods, which are computationally expensive and often fail to generalize to black-box models, and generator-based methods, which offer real-time perturbation generation but are typically restricted to a fixed set of "known" classes encountered during training.
As shown in the figure above, existing paradigms (a and b) are limited by their reliance on predefined labels. The proposed Generalized Adversarial attacKER (GAKer) addresses this "generalization gap" by enabling attacks on any target class, whether seen during training or not, without requiring retraining.
The GAKer Framework
The technical core of GAKer is a mechanism termed Generalized Latent Infection. Unlike previous methods that condition the generator on one-hot labels, GAKer utilizes the latent features of a target image.
Architecture and Mechanism
The system employs a UNet-based generator $\mathcal{G}_\theta$ that "infects" the intermediate features of a source image $x_s$ with the latent representations of a target image $x_t$. This process is facilitated by two key components:
- Feature Transform Module (FTM): This module enhances the representational capacity of the target features extracted by a frozen feature extractor $\mathcal{F}_\psi$.
- Dimension Matching Module (DMM): This ensures the target features are dimensionally aligned for integration into the generator's residual blocks.
Optimization Strategy
To achieve class-agnostic generalization, GAKer replaces standard cross-entropy loss with a cosine distance loss. This objective minimizes the distance between the adversarial image's latent features and the target object's features. Simultaneously, the generator is optimized for visual consistency, ensuring that the resulting perturbations remain imperceptible to human observers while dominating the DNN's internal representation.
Experimental Evaluation
The authors evaluated GAKer using the ImageNet dataset, splitting it into 200 "known" classes for training and 800 "unknown" classes for testing. Surrogate models included DenseNet-121, ResNet-50, and VGG-19, while victim models spanned a variety of architectures including Vision Transformers (ViT) and Vision-Language Models (LVLMs).
Key Results
- Superior Generalization: On unknown classes, GAKer achieved an average attack success rate (ASR) of 16.40% (using a ResNet-50 surrogate), a dramatic improvement over the 0.08% achieved by the previous state-of-the-art multi-target attacker (HGN).
- Known Class Performance: GAKer also outperformed existing methods on known classes by approximately 4.23%.
- Cross-Architecture Transferability: Attacks generated via a simple ResNet-50 surrogate successfully fooled advanced LVLMs like LLaVA and Qwen-VL, with targeted success rates exceeding 50%.
- Robustness: The method maintained effectiveness even against defense-hardened models (e.g., Inc-v3_adv) where other generative attackers failed.
Conclusion
GAKer demonstrates that by shifting from label-based to feature-based conditioning, adversarial generators can achieve unprecedented generalization across target classes. While a performance gap remains between known and unknown targets, GAKer provides a robust tool for identifying vulnerabilities in DNNs across a much wider range of semantic concepts than previously possible. Future work will focus on further closing the gap between known and unknown class performance by analyzing the underlying feature space dynamics.
Summary updated