Scalable Lipschitz Residual Networks with Convex Potential Flows

Laurent Meunier, Blaise Delattre, Alexandre Araujo, Alexandre Allauzen

Abstract

The Lipschitz constant of neural networks has been established as a key quantity to enforce the robustness to adversarial examples. In this paper, we tackle the problem of building $1$-Lipschitz Neural Networks. By studying Residual Networks from a continuous time dynamical system perspective, we provide a generic method to build $1$-Lipschitz Neural Networks and show that some previous approaches are special cases of this framework. Then, we extend this reasoning and show that ResNet flows derived from convex potentials define $1$-Lipschitz transformations, that lead us to define the Convex Potential Layer (CPL). A comprehensive set of experiments on several datasets demonstrates the scalability of our architecture and the benefits as an $\ell_2$-provable defense against adversarial examples.

Introduction

Deep learning models are notoriously fragile. Small, carefully crafted perturbations—known as adversarial examples—can trick state-of-the-art classifiers into making confident, incorrect predictions. To address this, researchers seek certified robustness, where mathematical guarantees ensure a model's prediction remains stable within a specific radius of an input. A primary strategy for achieving this is enforcing a 1-Lipschitz constraint on the network, ensuring that the output change is bounded by the input change: $||f(x) - f(x')|| \leq ||x - x'||$.

Historically, building 1-Lipschitz networks has been challenging. Previous methods often encountered a steep robustness-accuracy tradeoff, where making the model stable rendered it too "stiff" to learn complex patterns, or they failed to scale to the deep architectures required for modern computer vision tasks.

Methods: ResNets as Dynamical Systems

This research reframes Residual Networks (ResNets) through the lens of Ordinary Differential Equations (ODEs). In this framework, passing data through a network is analogous to following the trajectory of a particle in a fluid flow. By analyzing the stability of this flow, the authors derive conditions for the network to remain 1-Lipschitz.

Jacobian Decomposition

To ensure the stability of the "flow," the authors examine the Jacobian of the layer functions. Any matrix can be decomposed into a symmetric part and a skew-symmetric part.

  1. Skew-symmetric parts: These are norm-preserving (similar to a rotation). The authors demonstrate that previous state-of-the-art methods, such as SOC and Cayley layers, are essentially specialized techniques for managing this component.
  2. Symmetric parts: These are more complex to stabilize. The authors propose using Convex Potentials. By defining a layer as the gradient of a convex function, the symmetric part of the Jacobian is guaranteed to have positive eigenvalues, leading to contractive (stable) behavior.

The Convex Potential Layer (CPL)

The authors implement this via the Convex Potential Layer (CPL), a simplified version of an Input Convex Neural Network (ICNN). The resulting layer transformation is defined as: $$z = x - \frac{2}{||W||_2^2} W^T \sigma(Wx + b)$$ To maintain efficiency during training, the Power Iteration Method is used to estimate the spectral norm ($||W||_2$). This allows the architecture to utilize standard convolutions as linear operators while maintaining the Lipschitz constraint.

Experimental Results

The models were evaluated on the CIFAR-10 and CIFAR-100 benchmarks to test classification performance and robustness.

Competitive Accuracy and Robustness

On CIFAR-10, the "CPL-XL" model achieved 78.5% clean accuracy and 33.0% provable accuracy at a perturbation radius of $\epsilon = 108/255$. This performance is competitive with or superior to other 1-Lipschitz architectures like SOC and Cayley. Notably, the CPL approach showed superior empirical robustness; under a 10-iteration PGD attack on CIFAR-10 ($\epsilon = 0.8$), it outperformed the SOC-10 method by more than 10%.

Scalability and Stability

A key insight of this work is the natural stability provided by the CPL. Because the layers are designed to be contractive, they inherently prevent gradient explosion. This allowed the researchers to train a 1,000-layer network on CIFAR-10 without the need for Batch Normalization or gradient clipping—techniques that are typically mandatory for training at such depths. Experiments confirmed that increasing both the depth and width of CPL networks consistently improves performance.

Discussion and Future Work

The dynamical systems perspective provides a unified theory for Lipschitz layers, showing that many existing methods are specific discretizations of stable ODE flows. While CPL offers a tight upper bound on the Lipschitz constant, the authors suggest that other methods might be "too" contractive, which limits their expressivity.

However, limitations remain. The expressivity of CPL layers—specifically what functions they can and cannot represent—is still being explored. Additionally, while inference is efficient, the Power Iteration used during training adds computational overhead. Future research may look to extend these stability principles beyond ResNets to other architectures like Transformers or Recurrent Neural Networks.

Summary updated

Abstract

The Lipschitz constant of neural networks has been established as a key quantity to enforce the robustness to adversarial examples. In this paper, we tackle the problem of building $1$-Lipschitz Neural Networks. By studying Residual Networks from a continuous time dynamical system perspective, we provide a generic method to build $1$-Lipschitz Neural Networks and show that some previous approaches are special cases of this framework. Then, we extend this reasoning and show that ResNet flows derived from convex potentials define $1$-Lipschitz transformations, that lead us to define the {\em Convex Potential Layer} (CPL). A comprehensive set of experiments on several datasets demonstrates the scalability of our architecture and the benefits as an $\ell_2$-provable defense against adversarial examples.
BibTeX
@inproceedings{meunier2022scalable,
  author = {Laurent Meunier and Blaise Delattre and Alexandre Araujo and Alexandre Allauzen},
  title = {{Scalable Lipschitz Residual Networks with Convex Potential Flows}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=PKCNlckCp3},
}
Figure