CDTA: A Cross-Domain Transfer-Based Attack with Contrastive Learning

Zihan Li, Weibin Wu, Yuxin Su, Zibin Zheng, Michael R. Lyu

Introduction

Deep neural networks (DNNs) have demonstrated remarkable performance across various computer vision tasks but remain notoriously vulnerable to adversarial attacks. Most existing "black-box" attacks rely on the transferability of adversarial examples from a known surrogate model to an unknown target model. However, these methods often assume the attacker has access to the target model's training data distribution or label space—a scenario rarely encountered in real-world applications involving proprietary systems.

This paper introduces the Cross-Domain Transfer-Based Attack (CDTA), designed for the strict cross-domain setting. In this environment, the attacker possesses zero knowledge of the target model's architecture, parameters, training data, or label space. CDTA leverages a self-supervised feature extractor to generate highly transferable perturbations that disrupt semantic features, significantly outperforming current state-of-the-art methods.

Methodology

The CDTA framework operates in two distinct phases: Contrastive Spectral Training and Feature-Space Attack Generation.

Contrastive Spectral Training

Unlike traditional supervised surrogates, CDTA employs a feature extractor trained via self-supervised contrastive learning. To enhance domain-agnosticism, the authors introduce two key modifications to the standard SimSiam-style training:

  1. Weakened Augmentations: Texture-heavy augmentations (e.g., grayscale) are removed to prevent the model from over-relying on domain-specific textures, thereby balancing shape and texture biases.
  2. Spectral Pooling: An FFT-based spectral pooling layer is integrated to filter out high-frequency noise, forcing the network to prioritize high-level structural semantic information.
The CDTA framework utilizing contrastive spectral training and feature-space disruption.

Feature-Space Attack Generation

Since the target label space is unknown, CDTA avoids attacking specific classification boundaries. Instead, it employs a custom loss function ($L_{efd+cos}$) to maximize disruption across both intermediate layers and the final output representation. The optimization process incorporates momentum, Gaussian kernel smoothing, and random transformations to ensure the generated perturbations do not overfit to the surrogate model.

Experimental Evaluation

The surrogate model was trained on ImageNet, while evaluation was conducted across four diverse target domains: Oxford 102 Flower, Food-101, BIRDS-400, and Comic Books. These datasets represent a wide spectrum of styles and subjects, providing a rigorous test for cross-domain transferability.

Key Results

CDTA was tested against 16 target architectures, including ResNet-34, DenseNet-161, Inception-v3, and VGG16bn. The method achieved an average Attack Success Rate (ASR) improvement of 11.45% over leading baselines like CDA and BIA. Notably, on the BIRDS-400 dataset, CDTA reached an ASR of 91.2% against a ResNet-34 target, compared to the 74.9% achieved by the best previous baseline.

Attack Success Rate (ASR) across different target datasets and architectures as a function of optimization iterations.

Discussion and Insights

A critical finding of this research is that standard self-supervised learning is not inherently superior for cross-domain attacks. Vanilla contrastive learning often introduces biases that hinder transferability. By deliberately weakening texture-related augmentations, CDTA learns more generalized features. Furthermore, the results suggest that corrupting fundamental semantic features is a more robust strategy than attempting to navigate unknown decision boundaries in a black-box setting.

Conclusion and Future Work

CDTA establishes a new benchmark for evaluating model robustness in realistic, strict black-box scenarios. While highly effective, the authors observed that excessive optimization iterations can lead to overfitting on the surrogate model, particularly for architectures like Inception-v3. Future research should focus on developing defensive strategies capable of mitigating these feature-disruptive, cross-domain attacks.

Summary updated

Abstract

Despite the excellent performance, deep neural networks (DNNs) have been shown to be vulnerable to adversarial examples. Besides, these examples are often transferable among different models. In other words, the same adversarial example can fool multiple models with different architectures at the same time. Based on this property, many black-box transfer-based attack techniques have been developed. However, current transfer-based attacks generally focus on the cross-architecture setting, where the attacker has access to the training data of the target model, which is not guaranteed in realistic situations. In this paper, we design a Cross-Domain Transfer-Based Attack (CDTA), which works in the cross-domain scenario. In this setting, attackers have no information about the target model, such as its architecture and training data. Specifically, we propose a contrastive spectral training method to train a feature extractor on a source domain (e.g., ImageNet) and use it to craft adversarial examples on target domains (e.g., Oxford 102 Flower). Our method corrupts the semantic information of the benign image by scrambling the outputs of both the intermediate feature layers and the final layer of the feature extractor. We evaluate CDTA with 16 target deep models on four datasets with widely varying styles. The results confirm that, in terms of the attack success rate, our approach can consistently outperform the state-of-the-art baselines by an average of 11.45% across all target models. Our code is available at https://github.com/LiulietLee/CDTA.
BibTeX
@inproceedings{li2023cdta,
  author = {Zihan Li and Weibin Wu and Yuxin Su and Zibin Zheng and Michael R. Lyu},
  title = {{CDTA: A Cross-Domain Transfer-Based Attack with Contrastive Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i2.25239},
}
Figure