Learning Data-free Universal Adversarial Perturbation with Hybrid Priors and Gradient-Guided Sharpness Regularization

Zhi Tan, Jiazheng Cui, Wenwen Zhang, Yiran Liu, Guodong Liu, Chris Ding, Di MingNeurIPS 2026

TL;DR

Deep neural networks can be systematically fooled by a single, nearly invisible "master key" noise pattern called a Universal Adversarial Perturbation (UAP)—even when the attacker has zero access to real training data. Existing data-free attacks get stuck in narrow blind spots because they train on only one type of synthetic noise and optimize Toward unstable, jagged regions of the loss landscape. This paper introduces HPSR-UAP, a framework that dynamically blends multiple synthetic noise types and smooths out the optimization path, creating structured, highly transferable perturbations that break unseen black-box models far more reliably.

What Problem Does This Paper Address?

To test the security of vision models, researchers craft Universal Adversarial Perturbations (UAPs): a single, image-agnostic layer of faint static that, when pasted over almost any photograph, causes a neural network to misclassify it. Because attackers in the wild rarely have access to a target model’s massive training dataset, data-free UAPs were invented. Instead of real photos, they feed the model synthetic "priors"—like Gaussian static or colorful jigsaw puzzles—and tune the UAP to maximally scramble the network's internal layer activations.

However, current data-free methods suffer from two major blind spots:

  1. Single-Prior Tunnel Vision: Existing methods pick one synthetic prior and stick with it. This biases the UAP toward a narrow slice of features and forces researchers to run costly trial-and-error experiments to figure out which noise type works best for a given architecture.
  2. Jagged Landscapes: Standard training uses Stochastic Gradient Ascent (SGA), which wildly oscillates when fed synthetic noise. Consequently, the UAP settles into "sharp" peaks in the loss landscape—meaning it overfits to the surrogate model it was trained on and fails to transfer to unseen black-box models.
Figure 1: Single-Prior vs. Hybrid-Prior Data-Free UAPs. (a–b) Comparison of Single- and Hybrid- Prior Designs. Conventional data-free UAPs rely on a single prior (e.g., P1, P2, · · ·, PK) in isolation, limiting feature diversity and leading to irregular, less structured perturbations. In contrast, the proposed hybrid-prior strategy jointly leverages multiple priors (e.g., P1 ∪P2 ∪· · · ∪PK), enabling richer feature exploration and yielding more structured and highly repetitive UAPs. (c) Gradient Direction Consistency. By penalizing sharpness through gradient-guided exploration, HPSR-UAP maintains higher cosine similarity between consecutive gradients compared to existing UAP methods, indicating more stable updates and reduced oscillation during training. (d) UAP Evolution. Benefiting from hybrid priors and sharpness regularization, HPSR-UAP (w/PSP) progressively generates more regular and structured multi-scale patterns than PSP-UAP over 1600 iterations.

Methods

The authors propose HPSR-UAP, a plug-and-play training framework built on two complementary ideas:

  • Adaptive Hybrid-Prior Reweighting (HP): Instead of relying on one synthetic noise type, the framework simultaneously draws from multiple heterogeneous priors (Gaussian noise, Jigsaw images, and Perlin noise). Because naive equal weighting causes gradients from different priors to clash and cancel out, the authors introduce a discrepancy-driven weighting scheme. At each step, they measure how much the current UAP changes the model's output for each prior (using metrics like KL divergence). They then dynamically assign higher weights to priors sitting near the medium (average) difficulty level, using an entropy regularizer so no single prior monopolizes training.
  • Gradient-Guided Sharpness Regularization (SR): Inspired by Sharpness-Aware Minimization (SAM), the authors want the UAP to land on a flat plateau of high loss rather than a sharp needle. Instead of probing the local loss neighborhood with random noise—which destroys the delicate spatial structure of the UAP—they take a single lookahead step along the previous iteration's gradient direction. By penalizing the gap between the current loss and this neighborhood loss, the optimizer steers updates toward smoother, more generalizable directions.
Figure 2: Overview of the proposed HPSR-UAP framework. ①Multiple prior groups are constructed from diverse prior distributions. ②Guided by the previous gradient, neighborhood perturbations are generated and combined with clean priors to form adversarial prior groups. ③Clean and adversarial groups are fed into the model to compute discrepancy-based adaptive weights across prior groups. ④The resulting weights are applied to both current and neighborhood perturbations to obtain weighted losses. ⑤A sharpness-aware regularization term, defined as the gap between the averaged neighborhood loss and the current loss, is incorporated into the final objective for updating UAPs.

Datasets

  • Training: Completely data-free. Optimization uses only synthetic prior distributions (Gaussian, Jigsaw, and Perlin noise)—zero real images or labels.
  • Evaluation: Attack effectiveness (fooling rate) is evaluated on the ImageNet validation set and CIFAR-10 across 11 CNN architectures (e.g., AlexNet, VGG16/19, ResNet50/152, GoogleNet, MobileNet-v3) as well as vision-language models (BLIP, GIT, ViT-GPT2) for cross-task image captioning attacks. No new dataset benchmarks are introduced, though the authors propose a new multi-granularity block-wise similarity metric to measure UAP spatial structure.

Key Insights and Ideas

  • The "Goldilocks" Principle of Synthetic Priors: Focusing on the easiest priors (largest prediction shifts) or hardest priors (smallest shifts) traps optimization in cramped corners of feature space. Anchoring weights to medium-difficulty priors yields broad, uniform feature coverage and smoother decision boundaries.
  • Flatness Tames Hybrid Variance: Mixing diverse priors naturally injects extra variance into gradient updates. Sharpness regularization acts as a stabilizer—post-hoc sensitivity tests show it reduces local loss sharpness by 10.79% to 77.45%, proving the two modules work synergistically rather than just additively.
  • Geometry Breeds Hypnotic Symmetry: Visualized across iterations, HPSR-UAPs rapidly self-organize into crisp, repetitive, multi-scale textures (see the zoomed-in patches in the first figure). Quantitative spatial analysis reveals a strong correlation between this structural regularity and black-box attack success.
Figure 3: Visualization of prior distributions under different difficulty-aware selection strategies. At each iteration, heterogeneous priors are generated, evaluated by a pretrained UAP, and grouped by difficulty. Panels (a)-(c) show feature-space distributions for easy-, medium-, and hard-focused strategies, respectively. Medium-focused selection achieves more balanced and diverse coverage, while easy and hard strategies concentrate on limited regions.

Key Results

Because HPSR-UAP is a general optimization wrapper, the authors plugged it into three popular data-free baselines: GD-UAP, TRM-UAP, and PSP-UAP (under standard $\ell_\infty$ perturbation budget $\epsilon = 10/255$).

  • White-Box Fooling Rates: On ImageNet, HPSR boosts average white-box fooling rates across five standard CNNs by +4.76% (GD-UAP), +2.74% (TRM-UAP), and +2.05% (PSP-UAP). Notably, HPSR-UAP(w/PSP) reaches a 91.07% average fooling rate (96.51% on VGG16; 85.88% on ResNet152).
  • Black-Box Transferability: Pure black-box transfer fooling rates jump by +6.18% for GD-UAP, +3.93% for TRM-UAP, and +3.41% for PSP-UAP, establishing a new state of the art across unseen architectures.

Limitations and Future Work

  • Computational Cost of Neighborhood Probing: Evaluating multiple neighborhood points requires repeated forward and backward passes across all prior groups. Increasing neighborhood samples from 1 to 5 nearly doubles training time (1837s to 3548s) for a modest fooling rate gain (66.35% to 67.55%), forcing a practical compromise of a single-point approximation.
  • Per-Backbone Hyperparameter Tuning: While HPSR eliminates the need to manually search for the best synthetic prior per model, key hyperparameters—the prior trade-off ($\alpha$), neighborhood step size ($\gamma$), and sharpness penalty ($\lambda$)—still require tuning for each surrogate backbone.

Summary updated

Abstract

Universal adversarial perturbations (UAPs) aim to learn a single input-agnostic perturbation that consistently induces misclassification across diverse inputs, exposing systemic vulnerabilities of deep models. To enhance practical applicability, data-free UAP methods replace real data with samples drawn from handcrafted synthetic priors and optimize UAPs via activation maximization. However, existing approaches rely on a single synthetic prior throughout training, which biases optimization toward a narrow feature subspace and necessitates costly per-prior tuning. Moreover, the commonly used stochastic gradient ascent (SGA) updates are inherently unstable and tend to converge to sharp regions of the loss landscape, weakening black-box transferability. To overcome these limitations, we propose HPSR-UAP, a data-free framework that couples hybrid-prior reweighting with gradient-guided sharpness regularization. Specifically, we develop a dynamic reweighting mechanism over multiple synthetic priors to mitigate prior bias and avoid overfitting to any single distribution. Building upon this, we introduce a gradient-guided sharpness regularization that smooths the prior-weighted activation loss landscape within a local perturbation neighborhood, promoting updates towards flatter and more transferable directions. Extensive experiments on ImageNet demonstrate that HPSR-UAP outperforms state-of-the-art methods in both white-box and black-box data-free attack settings. We further introduce a multi-granularity block-wise similarity metric that quantifies spatial repetitiveness within UAPs, revealing a strong correlation between structural regularity and attack performance. Code is available at https://github.com/AdvML-Group/HPSR-UAP.
BibTeX
@inproceedings{tan2026learning,
  author = {Zhi Tan and Jiazheng Cui and Wenwen Zhang and Yiran Liu and Guodong Liu and Chris Ding and Di Ming},
  title = {{Learning Data-free Universal Adversarial Perturbation with Hybrid Priors and Gradient-Guided Sharpness Regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=63Fv6QZl1d},
}
Figure