L-AutoDA: Large Language Models for Automatically Evolving Decision-based Adversarial Attacks

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

Introduction

Adversarial attacks pose a significant threat to machine learning security by introducing imperceptible perturbations that lead to misclassification. Among these, decision-based attacks are the most challenging as they operate in a "black-box" setting where only the final predicted label is accessible. Historically, designing effective decision-based attacks required extensive human expertise to craft complex heuristics. L-AutoDA addresses this by leveraging Large Language Models (LLMs) to automatically evolve attack algorithms, bypassing the need for manual design or specialized Domain-Specific Languages (DSLs).

Methodology: Algorithm Evolution using LLMs

The L-AutoDA framework utilizes the principle of Algorithm Evolution using LLM (AEL) to discover high-performance attack strategies. The core of the attack is a generate() function within a "Random Walk" template, which proposes new adversarial candidates based on the current and original images.

The L-AutoDA framework overview, illustrating the LLM-driven evolutionary loop (top) and the decision-based adversarial attack template (bottom).

The evolutionary process consists of four main stages:

  1. Initialization: An LLM (specifically GPT-3.5-turbo) generates an initial population of diverse attack algorithms.
  2. Evaluation: Each algorithm is assessed on a subset of images, with "fitness" defined by the minimization of perturbation size while maintaining successful misclassification.
  3. Crossover & Mutation: The LLM acts as a genetic operator, analyzing the code of top-performing algorithms to produce offspring through semantic crossover and mutation.
  4. Hyperparameter Tuning: An automated feedback loop adjusts parameters like "step size" to maintain efficiency as the attack approaches the decision boundary.

Experimental Setup

The framework was evaluated on the CIFAR-10 dataset using a ResNet-18 target model. Testing was conducted on a representative subset of 100 images per class. L-AutoDA was compared against established baselines: the Boundary Attack and HopSkipJumpAttack (HSJA).

Results and Discussion

The evolved algorithm, L-AutoDA-20 (from the 20th generation), demonstrated superior performance in both success rate and perturbation quality at higher query budgets.

Quantitative comparison of L-AutoDA-20 against Boundary Attack and HSJA variants. L-AutoDA-20 achieves the lowest distance and highest success rate at 10,000 queries.

Key Findings:

  • Superior Success Rates: At a budget of 10,000 queries, L-AutoDA-20 achieved an 80.3% success rate, significantly outperforming the Boundary Attack (65.5%) and HSJA (24.6%).
  • Enhanced Stealth: L-AutoDA-20 produced the smallest perturbations, with a mean $\ell_2$ distance of 0.3445, compared to 0.4495 for the Boundary Attack. This indicates a more "stealthy" attack that is harder for humans to detect.
  • Efficiency Gains: The entire evolution process required only 1-2 days, a drastic reduction from the 1-2 months typically required for manual design or traditional automated synthesis.
  • Query Sensitivity: Interestingly, L-AutoDA-20 showed lower success at low query counts (2,500) compared to the Boundary Attack. This suggests the evolved strategy prioritizes finding high-quality, subtle perturbations over quick, noisy successes.
  • Algorithmic Convergence: Performance variance decreased over generations, indicating that the LLM successfully converged on stable, effective attack strategies rather than relying on stochastic success.

Conclusion

L-AutoDA demonstrates that LLMs can serve as effective automated algorithm designers in the domain of adversarial security. By treating code as a genetic medium, the framework evolves attacks that surpass human-handcrafted methods in both effectiveness and efficiency. Future work will explore expanding the search space to allow LLMs to design entire attack frameworks from scratch and testing on higher-resolution datasets like ImageNet.

Summary updated

Abstract

In the rapidly evolving field of machine learning, adversarial attacks pose a significant threat to the robustness and security of models. Amongst these, decision-based attacks are particularly insidious due to their nature of requiring only the model's decision output, which makes them notably challenging to counteract. This paper presents L-AutoDA (Large Language Model-based Automated Decision-based Adversarial Attacks), an innovative methodology that harnesses the generative capabilities of large language models (LLMs) to streamline the creation of such attacks. L-AutoDA employs an evolutionary strategy, where iterative interactions with LLMs lead to the autonomous generation of potent attack algorithms, thereby reducing human intervention. The performance of L-AutoDA was evaluated on the CIFAR-10 dataset, where it demonstrated substantial superiority over existing baseline methods in terms of success rate and computational efficiency. Ultimately, our results highlight the formidable utility of language models in crafting adversarial attacks and reveal promising directions for constructing more resilient AI systems.
BibTeX
@inproceedings{guo2024l,
  author = {Ping Guo and Fei Liu and Xi Lin and Qingchuan Zhao and Qingfu Zhang},
  title = {{L-AutoDA: Large Language Models for Automatically Evolving Decision-based Adversarial Attacks}},
  booktitle = {GECCO Companion},
  year = {2024},
  doi = {10.1145/3638530.3664121},
}
Figure