Certified vs. Empirical Adversarial Robust-ness via Hybrid Convolutions with Attention Stochasticity

Joy Dhar, Song Xia, Manish Kumar Pandey, Maryam Haghighat, Azadeh Alavi, Ferdous Sohel, Wenyu Zhang, Nayyar Zaidi

TL;DR

The paper introduces HyCAS (Hybrid Convolutions with Attention Stochasticity), a novel adversarial defense that bridges the gap between provable (certified) safety guarantees and empirical robustness against strong real-world attacks. By injecting randomized attention noise directly inside a Lipschitz-constrained network architecture, HyCAS achieves state-of-the-art robustness across both natural and medical imaging benchmarks without sacrificing clean classification accuracy.

What Problem Does This Paper Address?

Deep learning models are notoriously vulnerable to adversarial attacks—tiny, imperceptible perturbations to inputs that cause models to make catastrophic errors. Defenses generally fall into two camps:

  1. Empirical Defenses: Methods like adversarial training work well against specific, known attacks but are frequently broken by new, intricately crafted strategies.
  2. Certified Defenses: Techniques like Randomized Smoothing (RS) provide mathematical guarantees that a model's prediction won't change within a certain radius. However, they are often rigid, severely degrading the model's accuracy on clean (unperturbed) data.

The authors address this rigid trade-off and the long-standing performance gap between certified $\ell_2$ robustness and empirical $\ell_\infty$ resilience, particularly in high-stakes domains like medical imaging where both absolute accuracy and formal safety guarantees are critical.

Methods

HyCAS unifies deterministic and randomized defense principles by replacing standard convolutional layers with a combination of a 1-Lipschitz deterministic core and internal stochastic smoothing modules.

Figure 1: Overview of HyCAS mechanism. It consists of three parallel streams—FDPAN, SNCAN, and RPFAN—each built from 1-Lipschitz cores with Randomized Attention Noise Injection (RANI) residuals. Per-channel convex gating fuses the streams to form Gb(; Ω). Each stream is ≤ 2-Lipschitz; the fused stream and the stacked network remain ≤ 2-Lipschitz, enabling a margin-based ℓ2 certificate.

As shown in Figure 1, the architecture processes feature maps through three parallel streams:

  • FDPAN (Frequency-aware Deterministic Projection with Attention Noise): Uses low-pass DCT masking to suppress brittle high-frequency areas where adversarial noise often hides.
  • SNCAN (Spectrally Normalized Convolution with Attention Noise): Constrains the operator norm of the convolutional kernels to smooth the loss landscape.
  • RPFAN (Random Projection Filter with Attention Noise): Utilizes spectrally controlled random projections to decorrelate channels and redistribute energy.

The secret sauce is RANI (Randomized Attention Noise Injection). Unlike traditional randomized smoothing that only injects noise at the input layer, RANI injects data-independent, bounded attention noise internally after each Lipschitz core. These streams are fused using a data-independent channel-wise convex gate. Because each component is strictly bounded, the entire network remains provably $\le$ 2-Lipschitz, enabling a clean, margin-based $\ell_2$ safety certificate.

Datasets

The authors extensively evaluated HyCAS across eight diverse vision benchmarks spanning two major domains:

  • Natural Images: CIFAR-10, CIFAR-100, ImageNet-1k, and CelebA (face attributes).
  • Medical Images: NIH Chest X-ray (NIH-CXR), HAM10000 (skin lesions), NCT-CRC-HE-100K (colorectal cancer histopathology), and EyePACS (diabetic retinopathy).

Key Insights and Ideas

  • Moving Optimization Landscapes: By shifting randomness from the input layer to internal attention mechanisms (via RANI), HyCAS presents a continually changing optimization landscape to an adversary. This effectively thwarts adaptive attacks that rely on stable gradient fields.
  • Reshaping the Margin, Not Just the Bound: The ablation studies show that adding each stochastic module monotonically increases certified accuracy. This proves that the gains come from physically reshaping the model's internal margin distribution under the Lipschitz constraint, rather than simply finding a looser analytical bound.
  • Pessimism of Certificates: The authors highlight a "norm mismatch tail-gap" where empirical robustness sits well safeward of certified bounds. This confirms that formal certificates are inherently pessimistic, but using a Lipschitz-randomized structure allows the model to withstand much stronger empirical attacks in practice.

Key Results

HyCAS consistently outperformed prior certified and empirical defenses across the board:

  • Certified Accuracy: On CIFAR-10 at a medium radius ($r=0.75$), HyCAS achieved 44.3% certified accuracy, outperforming prior methods by 5.2% to 18.2%. On the NIH Chest X-ray dataset, it boosted certified accuracy by up to 7.3%.
  • Empirical Robustness: Under strong white-box attacks (APGD and AutoAttack), HyCAS maintained a significant margin of victory. For instance, it boosted empirical robustness on the HAM10000 dataset by up to 3.1%.
Figure 2: Empirical robustness of HyCAS versus leading baselines (RPF, CTRW, DRS, ARS) on CIFAR-10 under strong APGD attacks. We evaluate two settings: (1) perturbation sizes ϵ from 0.01 to 0.08 and (2) iteration steps from 10 to 100.

As shown in Figure 2, as the perturbation size ($\epsilon$) scales up to 0.08, HyCAS declines much more gracefully than competing baselines, maintaining a ~10% advantage where other methods collapse.

Limitations and Future Work

The primary drawback of HyCAS is its computational overhead. While it is parameter-moderate (roughly doubling parameters and memory), the repeated internal stochastic operations cause FLOPs and inference times to increase by roughly an order of magnitude (~15x). This makes it less ideal for edge devices or strict real-time applications, though perfectly acceptable for offline or near-real-time clinical pipelines.

Additionally, the current mathematical theory is restricted to certifying $\ell_2$ perturbations. The authors note that extending this framework to provide direct, norm-adaptive certificates for $\ell_\infty$ attacks is an important direction for future work.

Summary updated

Abstract

We introduce Hybrid Convolutions with Attention Stochasticity (HyCAS), an adversarial defense that narrows the long-standing gap between provable robustness under L2 certificates and empirical robustness against strong L attacks, while preserving strong generalization across diverse imaging benchmarks. HyCAS unifies deterministic and randomized principles by coupling 1-Lipschitz, spectrally normalized convolutions with two stochastic components, spectral normalized random, projection filters and a randomized attention-noise mechanism, to realize a randomized defense. Injecting smoothing randomness inside the architecture yields an overall <= 2-Lipschitz network with formal certificates. Exten-sive experiments on diverse imaging benchmarks, including CIFAR-10/100, ImageNet-1k, NIH Chest X-ray, HAM10000, show that HyCAS surpasses prior leading certified and empirical defenses, boosting certified accuracy by up to 7.3% (on NIH Chest X-ray) and empirical robustness by up to 3.1% (on HAM10000), without sacrificing clean accuracy. These results show that a randomized Lipschitz constrained architecture can simultaneously improve both certified L2 and empirical L adversarial robustness, thereby supporting safer deployment of deep models in high-stakes applications. Code: https://github.com/misti1203/HyCAS
BibTeX
@inproceedings{dhar2026certified,
  author = {Joy Dhar and Song Xia and Manish Kumar Pandey and Maryam Haghighat and Azadeh Alavi and Ferdous Sohel and Wenyu Zhang and Nayyar Zaidi},
  title = {{Certified vs. Empirical Adversarial Robust-ness via Hybrid Convolutions with Attention Stochasticity}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=sYk9GaFHEf},
}
Figure