Abstract
We investigate the effect of explicitly enforcing the Lipschitz continuity of neural networks with respect to their inputs. To this end, we provide a simple technique for computing an upper bound to the Lipschitz constant—for multiple $p$-norms—of a feed forward neural network composed of commonly used layer types. Our technique is then used to formulate training a neural network with a bounded Lipschitz constant as a constrained optimisation problem that can be solved using projected stochastic gradient methods. Our evaluation study shows that the performance of the resulting models exceeds that of models trained with other common regularisers. We also provide evidence that the hyperparameters are intuitive to tune, demonstrate how the choice of norm for computing the Lipschitz constant impacts the resulting model, and show that the performance gains provided by our method are particularly noticeable when only a small amount of training data is available.
Introduction
In the quest for neural networks that generalise better to unseen data, researchers often turn to regularisation—techniques designed to prevent models from becoming overly complex and memorising the training set. While popular methods like Dropout or weight decay are effective, they are largely heuristic and do not directly control the smoothness of the learned function. This research explores a more principled approach by explicitly constraining the Lipschitz constant of a network.
The Lipschitz constant is a mathematical measure of a function's maximum rate of change. A function with a small Lipschitz constant is inherently stable: small perturbations in the input lead to bounded changes in the output. While theoretical work has long suggested that models with smaller Lipschitz constants should generalise better, enforcing this constraint during training—especially for complex architectures like Convolutional Neural Networks (CNNs)—has historically been computationally expensive or mathematically imprecise.
Methodology: Lipschitz Constant Constraint (LCC)
The proposed framework, Lipschitz Constant Constraint (LCC), relies on two main pillars: modular bound computation and projected stochastic gradient descent.
1. Modular Bound Computation
The authors exploit the property that the Lipschitz constant of a sequence of operations (layers) is at most the product of the Lipschitz constants of each individual layer. They derive efficient ways to compute or bound these constants for several standard components:
- Fully Connected Layers: Calculated via the operator norm of the weight matrix.
- Convolutional Layers: The authors provide exact formulas for $\ell_1$ and $\ell_\infty$ norms and an efficient "power method" adaptation for the $\ell_2$ (spectral) norm that utilizes standard forward and backward passes.
- Residual Blocks: Specific bounds are derived for skip-connections to ensure the entire block remains within the desired limit.
- Batch Normalisation: The method demonstrates how to constrain scaling parameters ($\gamma$) to maintain the global Lipschitz bound.
2. Projected Stochastic Gradient Descent
Unlike standard regularisation that adds a penalty term to the loss function (a "soft" constraint), LCC employs a "hard" constraint. During training, after every weight update, the algorithm checks if a layer's Lipschitz constant exceeds a user-defined threshold $\lambda$. If it does, the weights are "projected" (scaled down) back to the allowed limit. This ensures the model never exceeds the specified "speed limit" of change.
Experimental Evaluation
The authors conducted an extensive evaluation across diverse data types and architectures to validate the efficacy of LCC.
Image Classification
Testing on benchmarks such as CIFAR-10, CIFAR-100, MNIST, and SVHN, the LCC method consistently outperformed standard baselines. For instance, a VGG19 architecture on CIFAR-10 using the $\ell_2$ norm achieved 92.57% accuracy, significantly higher than the unregularised baseline (90.43%) and Dropout (90.46%). On CIFAR-100, a Wide Residual Network combining LCC with Dropout reached 79.45% accuracy.
To ensure statistical rigor, the authors used the Scaled ImageNet Subset (SINS-10), consisting of 100,000 images. LCC provided statistically significant improvements over standard Dropout and Spectral Decay in almost every configuration tested.
Tabular Data
The study also applied LCC to 10 diverse datasets from the UCI repository. A key insight was the power of the $\ell_\infty$ norm; while most previous research focused on the $\ell_2$ (spectral) norm, the $\ell_\infty$ variant proved exceptionally effective for tabular data, outperforming other regularisers on 8 out of 10 datasets.
Discussion and Insights
One of the most significant findings is the method's sample efficiency. In low-data regimes—such as training on only a small fraction of CIFAR-10—LCC maintained significantly higher accuracy than Dropout. This suggests that Lipschitz continuity serves as a powerful "inductive bias," providing the model with a necessary structure when the available data is insufficient to guide the learning process.
Furthermore, LCC's hyperparameters are more intuitive than those of heuristic methods. The threshold $\lambda$ directly corresponds to model capacity: smaller values enforce smoother functions (lower capacity), while larger values allow for greater complexity. This predictable behavior simplifies the tuning process compared to the often finicky nature of Dropout rates.
Limitations and Future Work
Despite its success, LCC requires careful hyperparameter selection, as the optimal $\lambda$ varies between architectures. Additionally, this study applied uniform constraints across all layers of the same type. Future research could explore non-uniform allocation of modelling capacity, allowing different layers to have different Lipschitz bounds. Finally, extending these efficient bounds to Recurrent Neural Networks (RNNs) remains an open challenge.
Conclusion
By transforming Lipschitz continuity from a theoretical ideal into a practical constraint, LCC offers a robust, principled alternative to heuristic regularisation. Its success across image and tabular datasets, particularly in data-scarce environments, marks it as a valuable tool for developing stable and generalisable deep learning models.
Summary updated