Globally-Robust Neural Networks

Klas Leino, Zifan Wang, Matt Fredrikson

In the cat-and-mouse game of adversarial machine learning, researchers have long sought "certifiably robust" models—networks that don't just resist attacks, but provide a mathematical guarantee that their predictions won't change within a certain radius of an input. However, these guarantees usually come with a heavy "robustness tax": training is agonizingly slow, and verifying a single image at test time can take orders of magnitude longer than a standard forward pass.

In this paper from ICML 2021, Leino et al. introduce GloRo Nets (Globally-Robust Networks), a framework that achieves state-of-the-art verified accuracy while making the certification process essentially free at inference time.

TL;DR

GloRo Nets achieve deterministic robustness by incorporating global Lipschitz bounds directly into the network architecture. By adding a specialized "abstention" class that triggers when a prediction cannot be guaranteed, these models provide instant certification during a single forward pass, scaling easily to larger datasets like Tiny-ImageNet.

What Problem Does This Paper Address?

Deep neural networks are notoriously sensitive to small, adversarial perturbations. To counter this, "local robustness" certification aims to prove that for a specific input $x$, every point within a small ball (radius $\epsilon$) yields the same prediction.

The challenge is that most certification methods are computationally expensive. Some rely on "local" Lipschitz bounds (calculating how much the output changes near a specific point), which must be recomputed for every new input. Others use "global" bounds, which were historically dismissed as being too loose to provide useful guarantees. This paper challenges that dismissal, asking: Can we train a model to have tight global bounds, making certification as fast as a standard inference?

Methods

The authors introduce the concept of Global Robustness. Instead of certifying points post-hoc, they build a model that is robust by construction.

  1. The $\perp$ (Bottom) Class: A GloRo Net outputs $m+1$ classes. The extra class, $\perp$, acts as a "robustness violation" signal. If the model predicts a standard class, it is mathematically guaranteed to be $\epsilon$-locally robust. If it predicts $\perp$, it is signaling that it cannot guarantee robustness at that point.
  2. Lipschitz Margins: To calculate the logit for the $\perp$ class, the model uses the global Lipschitz constant ($K$) of the network. The $\perp$ logit is essentially a "worst-case" competitor: $y_\perp = \max_{i \neq j} \{y_i + \epsilon(K_i + K_j)\}$. If the predicted class's logit is higher than this margin, no perturbation within radius $\epsilon$ can flip the prediction.
Illustration of GloRo Net logits and the bottom class margin
  1. Efficient Bounding: They estimate the global Lipschitz constant by taking the product of the spectral norms of each layer. During training, they use the power method to keep this estimate updated with minimal overhead.
  2. Training Objective: They optimize the model using a standard cross-entropy loss (or a variant of TRADES) where the $\perp$ class is treated as an incorrect label. This "incentivizes" the network to keep its Lipschitz constant small and its prediction margins large.

Datasets

The authors evaluated GloRo Nets on standard robustness benchmarks:

  • MNIST: Tested at $\epsilon = 0.3$ and a very challenging $\epsilon = 1.58$.
  • CIFAR-10: Tested at $\epsilon = 36/255$.
  • Tiny-ImageNet: Tested at $\epsilon = 36/255$. This is a significant milestone, as many previous deterministic certification methods fail to scale to datasets of this size due to memory constraints.

Key Insights and Ideas

  • The Global-Local Equivalence: The most surprising theoretical contribution is that using a global bound is not inherently limiting. They prove that for any dataset that can be certified with a local bound, there exists a model where that same dataset can be certified using a global bound.
  • Training as Regularization: By including the Lipschitz constant in the loss function, the training process acts as a powerful regularizer. It forces the network to be "flatter" and more uniform, which naturally tightens the global bound and makes it a better proxy for local behavior.
  • Operational Simplicity: Because the certification logic is baked into the forward pass, a GloRo Net can be deployed just like a regular model. There is no need for complex optimization or multi-pass sampling at test time.

Key Results

Experimental results comparing GloRo Nets to other certification methods
  • State-of-the-Art VRA: On CIFAR-10, GloRo Nets achieved a Verified Robust Accuracy (VRA) of 58.4%, outperforming previous deterministic methods like BCP (51.3%) and KW (50.9%).
  • Massive Speedups: Certification for the entire CIFAR-10 test set took just 0.4 seconds for GloRo Nets. For comparison, Randomized Smoothing took over 10 hours, and BCP took nearly 6 seconds.
  • Scalability: GloRo Nets trained on Tiny-ImageNet in a matter of hours, whereas competing methods like KW were unable to scale at all due to memory pressure.
  • Tightness: On MNIST, the estimated global upper bound was within 83% of the actual lower bound, suggesting the training successfully "squashed" the network's sensitivity to a near-optimal level.

Limitations and Future Work

  • $L_\infty$ Norms: The current work focuses primarily on $L_2$ robustness. The authors note that global Lipschitz bounds are currently "loose" in $L_\infty$ space, making this a clear area for future research.
  • Over-approximation: The product of spectral norms is an over-approximation of the true Lipschitz constant. While it works well here, deeper networks might suffer from "vanishing" or "exploding" bounds if not carefully managed.
  • Architectural Constraints: While GloRo Nets work with standard CNNs and ResNets, they require bounded-Lipschitz activations (like ReLU or MinMax), which might limit some architectural choices.

Summary updated

BibTeX
@inproceedings{leino2021globally,
  author = {Klas Leino and Zifan Wang and Matt Fredrikson},
  title = {{Globally-Robust Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure