Fast accurate method estimates neural network smoothness for large models
FLIP: Fast and Accurate Global Lipschitz Estimation for Large Feedforward Networks
Machine LearningArtificial Intelligence
Summary
Measuring the smoothness of a neural network, known as the Lipschitz constant, is important for making sure AI models behave safely and learn well. Existing ways to find this smoothness are either very slow or give rough guesses, especially for big networks. The authors developed FLIP, a new fast technique that breaks the problem into smaller pieces and solves them efficiently, making it much quicker and more precise. This method works well even on networks with up to 100 million parameters and runs in just a few seconds.
What this means in practice
- •For machine learning engineers: Quickly calculate tight smoothness bounds to improve training stability and robustness of large feedforward neural networks.
- •For control system designers: Estimate Lipschitz constants rapidly for large neural controllers to enhance system safety and reliability during operation.
Authors
Hongbo Chen, Zihao Ren
Abstract
The Lipschitz constant of neural networks is widely used in robustness, control, generalization bounds, and training stability. As modern neural networks continue to scale, existing methods for Lipschitz estimation are either very time-consuming or overly loose. In this work, we focus on both fast and accurate Lipschitz estimation for large feedforward neural networks. We first reformulate the well-known semidefinite program (SDP) framework into an explicit recursive form, and introduce a key theoretical result, bound backpropagation: the SDP objective has upper and lower bounds that can be propagated backward along the recursive computation graph and depend only on partial variables. Leveraging this property, we decompose the original SDP into a sequence of small subproblems, each minimizing a combination of upper and lower bounds over partial variables. We prove that each subproblem is one-dimensional and convex, enabling fast solution via the secant method. Finally, we present the full FLIP algorithm and its complexity, yielding fast and tight Lipschitz estimation for large feedforward networks. Experiments on both randomly generated and trained networks show that FLIP improves speed and tightness by several orders of magnitude over prior methods, giving the tightest Lipschitz estimates for 100M-parameter networks in seconds. Our code is available at: https://github.com/hongboc616/FLIP.