NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DarkLLM: Learning Language-Driven Adversarial Attacks with Large Language Models

Ye Sun, Xin Wang, Jiaming Zhang, Yifeng Gao, Yixu Wang, Yifan Ding, Qixian Zhang, Henghui Ding, Xingjun Ma, Yu-Gang JiangarXiv 2026

TL;DR

DarkLLM is a novel adversarial attack framework that repurposes a Large Language Model (LLM) to translate natural-language instructions into pixel-level visual perturbations. By unifying targeted, untargeted, segmentation, and multi-model attacks into a single language-conditioned pipeline, a compact 1B-parameter model can successfully deceive diverse foundation models—including CLIP, SAM, and frontier commercial MLLMs like GPT-4o and Gemini.

What Problem Does This Paper Address?

Adversarial attacks expose critical safety vulnerabilities in AI models by introducing imperceptible noise that completely alters model behavior. However, traditional adversarial attacks suffer from a major scalability bottleneck: they operate under a rigid "one-target, one-optimization" paradigm. Each attack is tightly coupled to a specific model, task, or label, requiring a complete pipeline redesign or costly re-optimization whenever the adversarial objective changes.

As modern AI systems increasingly integrate heterogeneous foundation models to handle vision, language, and segmentation simultaneously, we need an attack framework that is both transferable across different architectures and scalable across diverse objectives. The authors of DarkLLM ask an intriguing question: Can we leverage the semantic reasoning capabilities of LLMs to generate visual adversarial perturbations using natural language as the interface?

Traditional vs. Language-Driven Adversarial Attacks

Methods

DarkLLM reformulates adversarial generation as an instruction-conditioned synthesis problem through two main stages: Language-Guided Attack Generation and Surrogate Model Optimization.

Figure 2: The framework of DarkLLM consists of two main stages. 1) Language-Guided Attack Generation, where a LLM controller interprets a user’s instruction and directs a conditional generator to synthesize the perturbation. 2) Surrogate Model Optimization, where the generated adversarial example is optimized using a diverse suite of surrogate models to ensure transferability.
  1. Embedding as Attack: The authors introduce special control tokens (e.g., [VLM_TGT], [SEG_ADV]) directly into the LLM's vocabulary. When a user inputs a natural language instruction (e.g., "Make the vision-language model identify this image as a plane"), the LLM controller (initialized from InternVL2.5-1B) processes the text and outputs the corresponding control token. The final-layer hidden state of this token serves as a latent attack embedding ($E_{adv}$).
  2. Conditional Perturbation Generator: This lightweight decoder network takes the latent attack embedding ($E_{adv}$) and a random noise embedding ($Z$) as inputs. Using a combination of self-attention, cross-attention, and transposed convolutions, it decodes the high-level language intent into a pixel-level adversarial perturbation ($\delta_{adv}$) that is added to the clean image.
Figure 3: A brief illus- tration of our conditional noise generator.

To ensure the generated attacks transfer to unseen black-box models, DarkLLM optimizes its generator across a diverse suite of surrogate models (including multiple CLIP variants and SAM-Base). Furthermore, because joint training can cause fast-converging untargeted attacks to dominate and disrupt targeted performance, the authors implement a Decoupled Progressive Training strategy: first tuning the model on targeted QA-style data via LoRA, and then freezing the targeted generator while jointly training the remaining attack types.

Datasets

DarkLLM was trained and evaluated across an extensive suite of 4 tasks and 13 datasets:

  • Training: ImageNet, CC3M, and the COCO 2017 Caption training set.
  • Zero-Shot Classification: Evaluated across 7 datasets, including CIFAR-10, CIFAR-100, Food-101, GTSRB, ImageNet, Stanford Cars, and STL-10.
  • Image-Text Retrieval: MS-COCO (Karpathy split).
  • Image Captioning: MS-COCO Caption, Flickr30k, and a 100-image subset from the NIPS 2017 Adversarial Attacks and Defenses Competition dataset.
  • Image Segmentation: COCO, ADE20K-val, and Cityscapes-val.

Key Insights and Ideas

  • Language as a Universal Attack Interface: Instead of hardcoding mathematical loss functions for every unique adversarial goal, an LLM can act as a central controller, mapping semantic nuances in text instructions to distinct visual behaviors.
  • Rethinking Segmentation Losses for Transferability: Traditional attacks on the Segment Anything Model (SAM) rely on regression-style losses like Mean Squared Error (MSE). The authors discovered that MSE overfits specific model backbones by forcing the perturbation to match exact activation magnitudes. Switching to a Binary Cross-Entropy (BCE) loss—which simply pushes mask predictions toward an all-background decision boundary—drastically improves cross-backbone transferability.
  • Systemic Cross-Task Vulnerabilities: DarkLLM demonstrates that a single universal perturbation can simultaneously degrade completely different architectures (e.g., disrupting CLIP's text alignment while wiping out SAM's segmentation masks). This reveals that distinct foundation models share deep, systemic semantic vulnerabilities.

Key Results

DarkLLM achieves state-of-the-art performance across all evaluated tasks, demonstrating remarkable black-box transferability:

  • Frontier MLLM Defacement: When targeting commercial, closed-source models, DarkLLM achieves an Attack Success Rate (ASR) of 67.7% on GPT-4o and 60.6% on Gemini-3-Flash (using the InternVL-2B controller setting), outperforming prior universal attack baselines like AnyAttack.
  • Neutralizing Segmentation: Against SAM-Base on the Cityscapes dataset, DarkLLM collapses the mean Intersection over Union (mIoU) from a clean 38.0% down to just 0.4% using point prompts.
  • Defense Robustness: The generated attacks remain highly effective even when images undergo defensive preprocessing transformations, maintaining strong degradation across multiple severity levels of contrast and brightness corruptions.
Ablation Studies on Surrogate Selection, Training Strategy, and Data Scale

Limitations and Future Work

Despite its strengths, the authors note a few scenarios where DarkLLM's performance degrades:

  • Complex Backgrounds: The generated perturbations can be less effective on images with highly complex backgrounds, as the adversarial noise gets naturally "masked" by the image's inherent high-frequency details.
  • Strong Spatial Priors: When dealing with simple, monochromatic objects (like a single orange or car), a box prompt can sometimes provide a spatial prior strong enough to help models like SAM-Huge resist the perturbation.

For future work, the authors suggest exploring synergistic attacks that blend these pixel-level visual perturbations with text-based jailbreak prompts to study multimodal vulnerabilities more deeply.

Summary updated

BibTeX
@misc{sun2026darkllm,
  author = {Ye Sun and Xin Wang and Jiaming Zhang and Yifeng Gao and Yixu Wang and Yifan Ding and Qixian Zhang and Henghui Ding and Xingjun Ma and Yu-Gang Jiang},
  title = {{DarkLLM: Learning Language-Driven Adversarial Attacks with Large Language Models}},
  year = {2026},
  eprint = {2605.18868},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18868},
}
Figure