L-AutoDA: Leveraging Large Language Models for Automated Decision-based Adversarial Attacks

Ping Guo, Fei Liu, Xi Lin, Qingchuan Zhao, Qingfu Zhang

Abstract

In the rapidly evolving field of machine learning, adversarial attacks present a significant challenge to model robustness and security. Decision-based attacks, which only require feedback on the decision of a model rather than detailed probabilities or scores, are particularly insidious and difficult to defend against. This work introduces L-AutoDA (Large Language Model-based Automated Decision-based Adversarial Attacks), a novel approach leveraging the generative capabilities of Large Language Models (LLMs) to automate the design of these attacks. By iteratively interacting with LLMs in an evolutionary framework, L-AutoDA automatically designs competitive attack algorithms efficiently without much human effort. We demonstrate the efficacy of L-AutoDA on CIFAR-10 dataset, showing significant improvements over baseline methods in both success rate and computational efficiency. Our findings underscore the potential of language models as tools for adversarial attack generation and highlight new avenues for the development of robust AI systems.

Introduction

In the domain of adversarial machine learning, decision-based attacks represent a significant challenge. Unlike white-box attacks, which assume full knowledge of the model, or score-based attacks, which utilize confidence probabilities, decision-based attackers only observe the final predicted label. This lack of gradient information makes finding minimal perturbations—the "stealthy" changes that flip a label—notoriously difficult. Historically, researchers have spent months hand-crafting complex heuristics and random walk strategies. L-AutoDA addresses this bottleneck by automating the algorithm design process through an autonomous, LLM-driven evolutionary search.

Methodology

The L-AutoDA framework utilizes Algorithm Evolution using LLMs (AEL) to discover high-performing attack strategies. Instead of generating entire frameworks from scratch, the system provides an LLM (GPT-3.5-turbo) with a foundational "random walk" template. The LLM's specific task is to design the generate() function, which dictates how the current image should be perturbed to find a better adversarial candidate.

Overview of the L-AutoDA framework

The evolutionary loop consists of four main stages:

  1. Initialization: The LLM generates an initial population of diverse attack functions.
  2. Evaluation: Each function is tested on a small subset of images, with "fitness" determined by the average $\ell_2$ distance of successful attacks.
  3. Crossover & Mutation: The LLM acts as a genetic operator, combining or modifying high-performing code snippets.
  4. Hyperparameter Tuning: A piece-wise linear feedback loop dynamically adjusts step sizes to maintain search efficiency as the algorithm approaches the decision boundary.

Experimental Setup

The framework was evaluated using the CIFAR-10 benchmark dataset and a ResNet-18 target model. To maintain computational efficiency during the evolutionary phase, a small subset of 8 images was used for fitness evaluation. Final testing was conducted on a larger representative subset of 100 images per class.

Results and Discussion

Experimental results indicate that L-AutoDA significantly outperforms traditional human-designed methods. While early generations produced mediocre algorithms, a breakthrough occurred around the 13th generation, where the evolved strategies began to surpass baselines like the Boundary Attack and HopSkipJumpAttack (HSJA).

Evolution of performance over generations

By the 20th generation, L-AutoDA-20 achieved an 80.3% success rate at 10,000 queries, compared to 65.5% for the Boundary Attack and 24.6% for HSJA. Furthermore, L-AutoDA-20 achieved a mean $\ell_2$ distance of 0.3445, indicating superior perturbation efficiency and stealth. Crucially, this discovery process required only 1-2 days of automated search, compared to the months of expert labor typically required for manual design.

Conclusion

L-AutoDA demonstrates the potential of LLMs to automate the discovery of complex, high-performing adversarial attack algorithms. By leveraging the LLM's understanding of programming and natural language, the framework bypasses the need for specialized domain-specific languages and human-intensive trial-and-error. Future work will focus on expanding the search space and refining prompting strategies to further enhance the robustness of AI testing frameworks.

Summary updated

Abstract

In the rapidly evolving field of machine learning, adversarial attacks present a significant challenge to model robustness and security. Decision-based attacks, which only require feedback on the decision of a model rather than detailed probabilities or scores, are particularly insidious and difficult to defend against. This work introduces L-AutoDA (Large Language Model-based Automated Decision-based Adversarial Attacks), a novel approach leveraging the generative capabilities of Large Language Models (LLMs) to automate the design of these attacks. By iteratively interacting with LLMs in an evolutionary framework, L-AutoDA automatically designs competitive attack algorithms efficiently without much human effort. We demonstrate the efficacy of L-AutoDA on CIFAR-10 dataset, showing significant improvements over baseline methods in both success rate and computational efficiency. Our findings underscore the potential of language models as tools for adversarial attack generation and highlight new avenues for the development of robust AI systems.
BibTeX
@inproceedings{guo2024l,
  author = {Ping Guo and Fei Liu and Xi Lin and Qingchuan Zhao and Qingfu Zhang},
  title = {{L-AutoDA: Leveraging Large Language Models for Automated Decision-based Adversarial Attacks}},
  booktitle = {GECCO Companion},
  year = {2024},
  doi = {10.1145/3638530.3664121},
}
Figure