Boosting Randomized Smoothing with Variance Reduced Classifiers

Miklós Z. Horváth, Mark Niklas Müller, Marc Fischer, Martin T. Vechev

Deep neural networks are notoriously fragile. Tiny, imperceptible perturbations—often called adversarial attacks—can easily flip a correct prediction to a wrong one. Randomized Smoothing (RS) has emerged as a leading technique to provide provable robustness guarantees against these attacks. It works by adding random noise to an input multiple times and taking a majority vote of the predictions.

However, RS faces two major hurdles: the variance problem and computational cost. This paper demonstrates that using ensembles as base models for RS significantly increases provable robustness by reducing prediction variance under noise. To overcome the added computational cost of ensembles, the authors introduce an adaptive sampling scheme that speeds up the certification process by up to 55x, achieving new state-of-the-art results on CIFAR10 and ImageNet.

The Bottlenecks of Randomized Smoothing

To understand the paper's contribution, we must first look at why RS struggles in practice:

  1. The Variance Problem: The "certified radius" (the maximum safe distance around an input where the prediction is guaranteed not to change) depends heavily on how consistently the base model predicts the correct class under noise. If a model is "shaky" and has high variance in its decision boundaries, the resulting robustness certificates are weak.
  2. The Computational Cost: To get a statistically sound certificate, RS typically requires tens of thousands of forward passes per image. This makes it incredibly slow, especially if the base model is large or complex.

The Solution: Soft-Ensembling and Adaptive Sampling

The authors tackle these issues with a two-pronged approach that addresses both robustness and efficiency.

1. Soft-Ensembling for Variance Reduction

Instead of ensembling already "smoothed" classifiers, the authors ensemble the base models by averaging their pre-softmax logits. They provide a theoretical framework showing that ensembling reduces the variance of the classification margins.

Decision boundaries of individual models versus an ensemble. The ensemble smooths the boundary, increasing the prediction probability of the majority class under noise.

Visually, individual models might have jagged, highly variable decision boundaries that lower the confidence of the majority vote. By ensembling, the decision boundary is smoothed out. This pushes the prediction probability of the majority class ($p_A$) higher, which mathematically translates to a much larger certified radius.

2. Computational Optimizations

To make ensembling practical, the authors introduce two key optimizations:

  • Adaptive Sampling (CERTIFYADP): Most images are either very easy or very hard to certify. Rather than using a fixed, massive number of samples (e.g., 100,000) for every image, this scheme samples in stages. If a sample can be certified (or rejected) with high confidence early on, the algorithm stops. They use the Bonferroni correction to ensure these early exits don't compromise the rigorous statistical guarantees.
  • K-Consensus Aggregation: For an ensemble of size $k$, they first check if a subset of $K$ models agrees. If they do, they skip the remaining models, saving significant inference time.

Key Insights and Results

The core insight of this work is that ensembling isn't just for boosting standard accuracy; it is a powerful tool specifically tailored for the noise-heavy environment of Randomized Smoothing.

Interestingly, the theory and experiments show that you don't need a massive ensemble to see gains. Small ensembles of just 3 to 10 models capture the majority of the robustness benefits. In fact, an ensemble of small models (like ResNet20) can achieve better certified robustness than a single, much larger model (like ResNet110), often with fewer total parameters.

Effect of ensemble size on success probability and certified radius. Notice the diminishing returns as the number of classifiers increases beyond 10.

By combining these insights, the authors achieved impressive empirical results:

  • State-of-the-Art Robustness: A new state-of-the-art Average Certified Radius (ACR) of 0.86 on CIFAR10 and 1.11 on ImageNet.
  • Consistent Gains: Ensembles improved the ACR by 5% to 21% compared to the best individual model within the ensemble.
  • Massive Speedups: The adaptive sampling scheme reduced the sample complexity by up to 55x for predetermined radii without losing the "provable" nature of the results.

Limitations and Future Work

While the paper significantly advances the state of the art, some limitations remain. Most notably, while inference and certification are sped up, training 10 separate models still requires 10x the training budget. Future work could explore reusing existing models or using more efficient ensembling techniques like sub-networks. Additionally, the theoretical variance reduction model assumes a multivariate Gaussian distribution for the logits, which may not hold for all possible architectures or non-Gaussian noise types.

Summary updated

BibTeX
@inproceedings{horvath2022boosting,
  author = {Miklós Z. Horváth and Mark Niklas Müller and Marc Fischer and Martin T. Vechev},
  title = {{Boosting Randomized Smoothing with Variance Reduced Classifiers}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=32_Sdbdahb},
}
Figure