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 evolutionary process consists of four main stages:
- Initialization: An LLM (specifically GPT-3.5-turbo) generates an initial population of diverse attack algorithms.
- Evaluation: Each algorithm is assessed on a subset of images, with "fitness" defined by the minimization of perturbation size while maintaining successful misclassification.
- Crossover & Mutation: The LLM acts as a genetic operator, analyzing the code of top-performing algorithms to produce offspring through semantic crossover and mutation.
- 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.
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