Boosting the Certified Robustness of L-infinity Distance Nets

Bohang Zhang, Du Jiang, Di He, Liwei Wang

Abstract

Recently, Zhang et al. (2021) developed a new neural network architecture based on $\ell_\infty$-distance functions, which naturally possesses certified $\ell_\infty$ robustness by its construction. Despite the novel design and theoretical foundation, so far the model only achieved comparable performance to conventional networks. In this paper, we make the following two contributions: (i) We demonstrate that $\ell_\infty$-distance nets enjoy a fundamental advantage in certified robustness over conventional networks (under typical certification approaches); (ii) With an improved training process we are able to significantly boost the certified accuracy of $\ell_\infty$-distance nets. Our training approach largely alleviates the optimization problem that arose in the previous training scheme, in particular, the unexpected large Lipschitz constant due to the use of a crucial trick called $\ell_p$-relaxation. The core of our training approach is a novel objective function that combines scaled cross-entropy loss and clipped hinge loss with a decaying mixing coefficient. Experiments show that using the proposed training strategy, the certified accuracy of $\ell_\infty$-distance net can be dramatically improved from 33.30% to 40.06% on CIFAR-10 ($\epsilon=8/255$), meanwhile outperforming other approaches in this area by a large margin. Our results clearly demonstrate the effectiveness and potential of $\ell_\infty$-distance net for certified robustness.

Introduction

Deep learning models are notoriously vulnerable to adversarial attacks—tiny, imperceptible perturbations to an input that can trick a model into misclassification. While many heuristic defenses exist, they are often broken by stronger attacks. Certified robustness addresses this by providing mathematical guarantees that a model's prediction remains constant within a specific perturbation radius ($\epsilon$).

$\ell_\infty$-distance networks are a promising architecture for this task. Unlike standard networks that use dot products, these nets use distance-based neurons, making the entire network inherently 1-Lipschitz. This property allows for "automatic" certification if the margin between the top two output scores is sufficiently large. However, previous training methods for these networks resulted in mediocre performance. This paper identifies the theoretical advantages of these nets and introduces a training strategy to unlock their full potential.

Theoretical Expressivity

A key contribution of this work is the proof that $\ell_\infty$-distance nets possess a fundamental architectural advantage. The authors demonstrate that even a simple two-layer $\ell_\infty$-distance net can achieve 100% certified robustness on any dataset where classes are separated by a sufficient distance. Crucially, they show that standard networks using common certification methods, such as Interval Bound Propagation (IBP), are physically incapable of achieving this level of robustness. This proves that $\ell_\infty$-distance nets are inherently better suited for distance-based classification tasks.

Overcoming Training Challenges

Despite their theoretical promise, $\ell_\infty$-distance nets are difficult to optimize. Previous research employed $\ell_p$-relaxation to smooth the non-smooth distance functions. However, the authors discovered that this trick causes the network's Lipschitz constant to explode early in training, destroying the very property that enables robustness.

Optimization challenges: (a) shows the explosion of the Lipschitz constant during training with $\ell_p$-relaxation; (b) illustrates the sensitivity of certified accuracy to the hinge threshold.

To address this, the paper proposes a novel hybrid objective function:

  1. Scaled Cross-Entropy: Utilizes a learnable temperature parameter to provide stable gradients even when the distance functions produce sparse signals.
  2. Clipped Hinge Loss: Focuses exclusively on correctly classified samples to maximize the robust margin without being distracted by outliers.
  3. Decaying Mixing Coefficient: The training starts by prioritizing classification (cross-entropy) and gradually shifts focus toward maximizing the robust margin (hinge loss).

Experimental Results

The proposed training strategy was evaluated on MNIST and CIFAR-10 benchmarks. The results show a significant leap in performance over existing state-of-the-art (SOTA) methods.

Comparison of certified accuracy across different datasets and perturbation levels. The proposed method achieves a new SOTA on CIFAR-10.

On CIFAR-10 with $\epsilon=8/255$, the model achieved a certified accuracy of 40.06%, a substantial improvement over the previous best of 33.30% for this architecture and surpassing other methods like CROWN-IBP (33.06%). Even at a larger perturbation of $\epsilon=16/255$, the model maintained 29.04% accuracy, significantly higher than the ~20% typical of other approaches. On MNIST ($\epsilon=0.3$), the model reached 93.20% certified accuracy, matching or exceeding more complex specialized architectures.

Conclusion

This work demonstrates that $\ell_\infty$-distance nets are not just a theoretical curiosity but a powerful tool for certified robustness. By identifying and fixing the optimization issues associated with $\ell_p$-relaxation, the authors have set a new benchmark for robust accuracy. While challenges remain in scaling these architectures to massive datasets like ImageNet and handling very small perturbation radii where standard nets still excel, these results highlight the significant potential of distance-based neural architectures.

Summary updated

BibTeX
@inproceedings{zhang2022boosting,
  author = {Bohang Zhang and Du Jiang and Di He and Liwei Wang},
  title = {{Boosting the Certified Robustness of L-infinity Distance Nets}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=Qb4C1JJsV4o},
}
Figure