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

Defensive Adversarial CAPTCHA: A Semantics-Driven Framework for Natural Adversarial Example Generation

Xia Du, X. Liu, Jizhe Zhou, Lin Zheng, Chi‐Man Pun, Cong Wu, Tao Li, Zhe Chen, Wei Ni, Jun Luo

Introduction

Completely Automated Public Turing Tests to Tell Computers and Humans Apart (CAPTCHAs) serve as a primary defense mechanism against automated bots. However, the rapid advancement of Deep Neural Networks (DNNs) has rendered traditional image-based CAPTCHAs increasingly vulnerable. While researchers have attempted to use adversarial attacks—adding subtle pixel-level perturbations to images—to restore the efficacy of CAPTCHAs, these methods face significant challenges. Specifically, high-intensity noise often degrades visual quality to the point of human unrecognizability, and most methods require a "clean" source image, limiting diversity and raising privacy concerns.

This paper introduces Defensive Adversarial CAPTCHA (DAC), a novel framework that shifts the focus from pixel-level noise to semantic-level generation. By leveraging Large Language Models (LLMs) and Diffusion Models, DAC generates high-fidelity, "unsourced" adversarial images from scratch. These images are designed to be easily interpreted by humans while remaining consistently deceptive to state-of-the-art AI models.

Methodology

The DAC framework operates by generating adversarial examples directly from noise, guided by textual descriptions rather than modifying existing image files. The process is divided into two primary strategies: DAC for white-box scenarios and BP-DAC for black-box scenarios.

LLM-Guided Semantic Prompts

To ensure high visual fidelity and semantic richness, the framework utilizes an LLM to expand simple category labels into descriptive prompts. For instance, instead of a generic "goldfish" label, the LLM might generate "A goldfish swims in a glass bowl with decorative stones." This provides the Diffusion Model with the necessary context to produce realistic, natural-looking scenes.

Latent Pairwise Diffusion Optimization (LPDO)

To maintain stability during the generation process, the authors employ the EDICT (Exact Diffusion Inversion via Coupled Transformations) framework. By maintaining two alternating latent noise sequences ($x_t$ and $y_t$) and optimizing them simultaneously, the system ensures that the final image aligns with the target adversarial class without sacrificing image quality.

Overview of the Defensive Adversarial CAPTCHA (DAC) framework, illustrating the integration of LLM-guided prompts and the bi-path optimization process.

Bi-path Optimization (BP-DAC)

For black-box attacks where the target model is unknown, the BP-DAC framework introduces a bi-path optimization strategy. This method aggregates gradients from multiple proxy models and utilizes a dual-loss function. One loss component pushes the image toward a target misclassification, while the other pulls it away from the second-most likely correct class, creating a robust adversarial path that transfers effectively across different architectures.

Experimental Results

The framework was evaluated using the ImageNet dataset, targeting a wide variety of model architectures including ResNet and MobileNet.

Attack Success and Human Recognition

In white-box testing, DAC achieved a 100% Attack Success Rate (ASR). More impressively, in black-box scenarios, the BP-DAC framework maintained an average ASR of 99.4%. Despite this near-perfect deception of AI, human participants in qualitative studies were able to identify the generated images with 100% accuracy, demonstrating a clear gap between human perception and machine classification.

Examples of generated adversarial CAPTCHAs. While humans easily identify the subjects (e.g., goldfish or sharks), AI models are consistently misled into incorrect classifications.

Robustness to Preprocessing

Unlike traditional adversarial examples that rely on fragile pixel-level noise, DAC's semantic-level perturbations are highly robust. The generated CAPTCHAs remained effective even when subjected to common image transformations such as JPEG compression and bit-depth reduction, which typically neutralize standard adversarial attacks.

Discussion and Conclusion

DAC represents a significant shift in adversarial defense, moving toward "unsourced" generation. By creating images from noise, the system can produce an infinite variety of unique CAPTCHAs, eliminating the need for large image databases and mitigating privacy risks.

While the framework is highly effective, the computational cost of iterative diffusion models remains a hurdle for real-time, high-traffic applications. Future research will focus on optimizing generation speed and exploring more complex semantic scenes to further widen the gap between human and machine vision capabilities.

Summary updated

BibTeX
@article{du2026defensive,
  author = {Xia Du and X. Liu and Jizhe Zhou and Lin Zheng and Chi‐Man Pun and Cong Wu and Tao Li and Zhe Chen and Wei Ni and Jun Luo},
  title = {{Defensive Adversarial CAPTCHA: A Semantics-Driven Framework for Natural Adversarial Example Generation}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2026},
  doi = {10.1109/tdsc.2025.3636741},
}
Figure