Adversarial robustness through Lipschitz-Guided Stochastic Depth in Neural Networks

Laith Nayal, Mahmoud Mousatat, Bader Rasheed · DOI

Abstract

Deep neural networks and Vision Transformers achieve state-of-the-art performance in computer vision but are highly vulnerable to adversarial perturbations. Standard defenses often incur high computational cost or lack formal guarantees. We propose a Lipschitz-guided stochastic depth (DropPath) method, where drop probabilities increase with depth to control the effective Lipschitz constant of the network. This approach regularizes deeper layers, improving robustness while preserving clean accuracy and reducing computation. Experiments on CIFAR-10 with ViT-Tiny show that our custom depth-dependent schedule maintains near-baseline clean accuracy, enhances robustness under FGSM, PGD-20, and AutoAttack, and significantly reduces FLOPs compared to baseline and linear DropPath schedules.

Introduction

Deep neural networks (DNNs) and Vision Transformers (ViTs) are the backbone of modern computer vision, yet they remain notoriously brittle. A minor, imperceptible adversarial perturbation can lead to catastrophic prediction failures. Traditional defenses, such as adversarial training or randomized smoothing, are often computationally prohibitive.

An alternative strategy is "robustness by design," which involves constraining the network's Lipschitz constant—a measure of the model's sensitivity to input changes. However, strict Lipschitz constraints typically degrade clean accuracy or require complex computations. This work explores whether stochastic depth (DropPath), a common regularization technique, can be mathematically guided to control the Lipschitz constant and provide efficient adversarial defense.

Methodology: Lipschitz-Guided Stochastic Depth

The proposed method introduces a novel Lipschitz-guided schedule for Stochastic Depth (DropPath). In standard architectures, the Lipschitz constant compounds multiplicatively as data traverses deeper layers. When a layer is "dropped" in DropPath, it is replaced by an identity mapping, which has a Lipschitz constant of 1, effectively preventing further sensitivity amplification.

The authors derive a depth-dependent drop schedule: $p(l) = 1 - \kappa_{target}^{l/L}$. This formula assigns exponentially higher drop probabilities to deeper layers, which are primarily responsible for the compounding sensitivity of the network. By targeting these layers, the expected effective Lipschitz constant of the entire network is bounded.

Key Results

The custom Lipschitz-guided schedule was evaluated on a ViT-Tiny model using the CIFAR-10 dataset. The results demonstrate a significant improvement in both efficiency and robustness compared to standard baselines.

Performance comparison of the proposed custom stochastic depth schedule against baseline and linear schedules on CIFAR-10.

As shown in Figure 1, the custom schedule achieved a ~75% reduction in computational cost, requiring only 0.273G FLOPs compared to the baseline's 1.075G. Crucially, this efficiency did not come at the cost of performance; clean accuracy remained high at 90.88%. Furthermore, the model showed superior robustness across multiple attack benchmarks, including FGSM (49.2%) and AutoAttack (32.1%), outperforming both the baseline and the standard linear DropPath schedule.

Discussion and Limitations

While the theoretical framework bounds the expected Lipschitz constant, practical verification of the global Lipschitz constant remains challenging. Empirical measurements of local Lipschitz constants indicate that while the median sensitivity remains stable, the maximum sensitivity can still fluctuate.

Local Lipschitz constant statistics (Mean, Median, Max) for different model configurations.

Figure 2 highlights these empirical findings. While the custom schedule maintains a low median sensitivity comparable to the baseline, the maximum local Lipschitz constant is slightly higher than the baseline but lower than the linear stochastic depth approach. Future research will focus on developing tighter empirical estimations and formal verification methods to provide rigorous robustness guarantees.

Summary updated

BibTeX
@misc{nayal2025adversarial,
  author = {Laith Nayal and Mahmoud Mousatat and Bader Rasheed},
  title = {{Adversarial robustness through Lipschitz-Guided Stochastic Depth in Neural Networks}},
  year = {2025},
  eprint = {2509.10298},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.10298},
}
Figure