TL;DR
Fooling an image classifier without seeing its internal weights usually means training an attack on a substitute "surrogate" model and hoping it transfers—a clumsy process that often ruins image quality or misses the target entirely. By weaving classic query-based black-box attacks directly into the denoising loop of a diffusion model, the authors steer images smoothly across a target model's true decision boundary using only its output probabilities. The result? Adversarial images that look remarkably natural while fooling classifiers—even hardened, adversarially trained ones—far more reliably than transfer-based methods.
What Problem Does This Paper Address?
Classic adversarial attacks add tiny, mathematically bounded pixel static ($\ell_p$-norm perturbations) to trick neural networks. Lately, researchers have shifted toward unrestricted adversarial examples (UAEs): using generative priors like diffusion models to create natural, photorealistic tweaks (subtle shifts in texture or lighting) that fool classifiers while looking completely benign to human eyes.
In a realistic black-box setting—where you don't have access to the victim model's architecture or gradients—existing diffusion attacks rely on transferability. You craft the adversarial image against a white-box surrogate model you do own, hoping it also fools the hidden victim.
As illustrated above, this has three major headaches:
- Boundary mismatch: Pushing an image across a surrogate's decision boundary doesn't guarantee it crosses the victim's, especially if one is a CNN and the other is a Vision Transformer.
- Visual artifacts: Cranking up the optimization pressure to force transferability often warps the image's semantics or introduces bizarre visual glitches.
- Underused diffusion priors: To keep the image faithful to the original, existing methods lock the diffusion prompt to the original label, leaving the diffusion model's rich knowledge of other classes sitting on the bench.
Methods
Instead of guessing with a surrogate, the authors bring score-based black-box attacks—methods that estimate gradients by querying the victim and observing its output class probabilities—inside the reverse denoising trajectory of Stable Diffusion v2.0.
Here is how the pipeline works:
- Latent Score-Based Sampling: A clean image is encoded and partially inverted into a noisy latent representation ($x_T$) over the final $T=5$ DDIM steps. As the model denoises step-by-step back to a clean image, the authors pause at each step, run a score-based attack (evaluating six classics like NES, ZOsignSGD, and Square Attack) in the latent space using at most $Q$ queries to the victim, and nudge the latent vector toward misclassification. Subsequent denoising steps naturally polish these latent nudges into realistic textures.
- Adaptive-Target Guidance (ATG): Under tight query budgets, latent nudges alone might fall short. ATG taps into classifier-free guidance: it spends just one extra query per step to identify the victim's current "runner-up" class, then blends that competing class prompt into the denoising step to actively pull the image toward the decision boundary.
- Target-Search Guidance (TSG): Pushing too hard toward a competing class with ATG can bleed unwanted features into the image. TSG solves this by keeping the prompt close to home: it uses a score-based attack ($Q_c$ queries) to find a tiny perturbation right around the original prompt embedding, boosting attack power without altering the scene's semantics.
Datasets
The framework is evaluated on the standard ImageNet-Compatible Dataset, consisting of 1,000 validation images. No new datasets are introduced; instead, the authors test across a diverse gauntlet of 15 victim models—five CNNs (e.g., ResNet-50, ConvNeXt), four Vision Transformers (e.g., ViT-B, Swin-B), two MLP-Mixers, and four adversarially trained models.
Key Insights and Ideas
- Dense beats sparse in diffusion latent space: Score-based attacks that perturb all latent coordinates simultaneously (like ZOsignSGD and NES) vastly outperform sparse or local methods like SimBA (which tweaks one coordinate at a time). In a compressed latent space under tight query limits, broad directional estimates do much heavier lifting.
- Denoising acts as a natural regularizer: Updating latents inside the reverse process lets the diffusion prior heal adversarial artifacts on the fly. Even without pixel-level $\ell_p$ constraints, image quality (measured by FID, where lower means more natural) stays remarkably close to clean images.
- Prompt perturbations give stealthy leverage: Ablations reveal that while condition guidance (ATG or TSG) cannot reliably fool models on its own, pairing TSG with latent perturbations gives a massive boost in attack success while adding almost zero perceptual degradation (increasing FID by at most 0.7).
Key Results
Note that in adversarial attacks, lower victim top-1 accuracy means a stronger attack:
- Unguided Latent Attacks: With 720 max queries per image ($Q=120$ over 5 steps plus initial $x_T$), unguided
Latent-ZOsignSGDdrops average accuracy across 11 standard models from 89.4% down to 12.1% with an FID of 59.6, handily beating the strongest transfer baseline, APA-GC (17.7% accuracy, 72.0 FID). - Guidance Variants: Adding ATG ($s=2.5$) drives
Latent-ZOsignSGDvictim accuracy down to a remarkable 6.1% (at 67.4 FID). Meanwhile, TSG at a tighter latent budget ($Q=60, Q_c=60$) hits 15.4% accuracy while keeping FID at a crisp 60.1. - Defended & Decision-Based Comparisons: Against four adversarially trained models,
Latent-ZOsignSGD+ ATG drops average accuracy from 83.2% to 5.5% (versus 16.5% for APA-GC). On ResNet-50,Latent-ZOsignSGDat 360 queries (20.8% acc, 59.6 FID) outperforms the decision-basedLatent-HSJAeven when the latter is given 10$\times$ to 20$\times$ the query budget (45.2% acc at 7,200 queries).
Qualitatively, transfer baselines like ACA hallucinate extra airplanes or rewrite backgrounds, and APA-GC leaves scribble-like artifacts on racetracks. The authors' method preserves object identity and pose, limiting changes to subtle textures like grass or license plates.
Limitations and Future Work
While the paper does not feature a dedicated "Limitations and Future Work" section, several practical trade-offs emerge directly from the authors' analysis:
- Effectiveness vs. Stealthiness in ATG: Cranking up the guidance scale in ATG significantly boosts attack success, but explicitly pulling toward a runner-up class inevitably degrades image quality (raising FID by up to 9.3 points) and introduces stronger texture shifts.
- Computational and Query Overhead in TSG: While TSG preserves visual fidelity, searching the prompt embedding space is not free—it requires $T(Q_c + 1)$ additional victim queries and $O(T Q_c)$ extra diffusion noise predictions per image.
- Access Assumptions: Unlike transfer-based attacks (which require zero queries to the victim at test time) or decision-based attacks (which only need the final top-1 label), this framework assumes the attacker can repeatedly query the victim model and read its continuous output probability scores.
Summary updated