Towards Certifying L-infinity Robustness using Neural Networks with L-inf-dist Neurons

Bohang Zhang, Tianle Cai, Zhou Lu, Di He, Liwei WangICML 2021

Introduction

Deep neural networks are notoriously fragile; a tiny, imperceptible "adversarial perturbation" to an input image can easily flip a model's prediction. To address this, researchers have traditionally relied on two main approaches: empirical defenses (like training against specific attacks such as PGD) and certified defenses. While empirical defenses work well in practice, they offer no formal guarantees against future, stronger attacks. Certified defenses use mathematical proofs to guarantee a model is robust within a certain radius, but existing methods (like Interval Bound Propagation or CROWN) are often computationally expensive, difficult to scale, or produce "loose" bounds that underestimate the model's true robustness.

This paper introduces a novel, principled neural network architecture built from $\ell_\infty$-dist neurons. By using $\ell_\infty$-distance instead of dot products as their core operation, these networks are naturally 1-Lipschitz with respect to the $\ell_\infty$-norm. This allows for fast, scalable, and tight certification of adversarial robustness through a simple forward pass, achieving state-of-the-art certified accuracy on standard benchmarks.

The $\ell_\infty$-Distance Neuron

The core innovation of this work is the $\ell_\infty$-dist neuron. Unlike a standard neuron that performs a linear transformation followed by an activation function (e.g., $y = \sigma(w^Tx + b)$), this proposed neuron calculates the $\ell_\infty$-distance between the input $x$ and a weight vector $w$:

$$y = \|x - w\|_\infty + b$$

Comparison of a standard neuron and an L-infinity distance neuron.

Because the $\ell_\infty$-distance is inherently non-linear, these neurons do not require traditional activation functions. The authors mathematically prove that a network composed entirely of these neurons is naturally 1-Lipschitz.

Key Technical Contributions

  • Theoretical Guarantees: The authors prove these networks are "Lipschitz-universal approximators," meaning they can represent any 1-Lipschitz function given sufficient width.
  • Certification via Margin: Because the network is strictly 1-Lipschitz, the "certified radius" (the maximum distance an attacker can move the input without changing the class) is simply half the margin between the top two prediction outputs. This makes certification as fast and straightforward as a standard forward pass.
  • Training Strategy: Training $\ell_\infty$-norm networks is notoriously difficult because the gradient is "sparse" (only the maximum element is updated at a time). To overcome this, the authors utilize Smoothed Approximated Gradients: training begins with an $\ell_p$-norm where $p$ is small, and $p$ is gradually annealed to infinity. They also introduce specialized identity-mapping initialization and $\ell_p$-norm weight decay to stabilize deeper models.

Key Insights

  • Distance as Similarity: Standard neurons use dot products to measure how "aligned" an input is with a weight vector. In contrast, $\ell_\infty$-dist neurons use distance to measure how "close" they are. This shift fundamentally alters the geometry of the decision boundaries, making them inherently more robust to box-like ($\ell_\infty$) perturbations.
  • Overcoming the Curse of Dimensionality: Unlike randomized smoothing (another popular certification method), the generalization bounds for $\ell_\infty$-dist networks do not depend on the input dimension. This makes them significantly better suited for high-resolution images.
  • Hybrid Architectures: The authors discovered that using an $\ell_\infty$-dist network as a "robust feature extractor," followed by a small, standard MLP (certified via Interval Bound Propagation), provides an optimal balance of standard accuracy and provable robustness.

Results and Performance

The authors evaluated their approach on standard computer vision benchmarks, including MNIST ($\epsilon = 0.3$), Fashion-MNIST ($\epsilon = 0.1$), CIFAR-10 ($\epsilon = 8/255$), and TinyImageNet ($\epsilon = 1/255$). The proposed models consistently outperformed previous state-of-the-art certified defenses.

Performance comparison on MNIST, Fashion-MNIST, and CIFAR-10.
  • MNIST: Achieved 93.09% certified accuracy, significantly higher than previous Lipschitz-based methods.
  • CIFAR-10: Reached 35.42% certified accuracy, beating the previous best (CROWN-IBP) by over 2% while requiring fewer FLOPs.
  • TinyImageNet: Achieved 16.31% certified accuracy, notably outperforming a WideResNet model that was 33 times larger in terms of computational cost.
  • Efficiency: Training is vastly faster than complex relaxation methods. On CIFAR-10, their per-epoch training time was approximately 20 seconds, compared to roughly 112 seconds for CROWN-IBP.

Limitations and Future Work

While promising, the architecture does come with optimization complexities. The "smoothed gradient" trick is effective, but the training process remains more sensitive to hyperparameters (such as the annealing schedule for $p$) than standard networks. Furthermore, while the authors demonstrated success on TinyImageNet, scaling this architecture to full-scale ImageNet remains a challenge due to the unique optimization landscape of distance-based neurons. Future work exploring convolutional variants of $\ell_\infty$-dist neurons could further boost performance and scalability.

Summary updated

BibTeX
@inproceedings{zhang2021towards,
  author = {Bohang Zhang and Tianle Cai and Zhou Lu and Di He and Liwei Wang},
  title = {{Towards Certifying L-infinity Robustness using Neural Networks with L-inf-dist Neurons}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=r8N1LW103pc},
}
Figure