论文标题
通过界传播有效地计算神经网络的本地Lipschitz常数
Efficiently Computing Local Lipschitz Constants of Neural Networks via Bound Propagation
论文作者
论文摘要
Lipschitz常数与神经网络的许多特性有关,例如稳健性,公平性和概括。计算Lipschitz常数的现有方法要么产生相对松散的上限,要么仅限于小型网络。在本文中,我们开发了一个有效的框架,用于通过通过线性结合传播紧密地在Clarke Jacobian的规范上计算神经网络的本地Lipschitz常数。我们在Clarke Jacobian的链条规则引起的高阶向后图上以线性结合的传播过程制定了本地Lipschitz常数的计算。为了实现线性结合的传播,我们得出了克拉克·雅各布(Clarke Jacobian)特定非线性的紧密线性松弛。这种制定的统一了现有的临时方法,例如recurjac,这可以看作是我们放松较弱的特殊情况。绑定的传播框架还使我们能够轻松地从神经网络验证中借用流行的分支和结合方法,从而进一步拧紧Lipschitz常数。实验表明,与无法扩展到稍大的模型相比,我们的方法在微小的模型上产生了可比的界限。在较大的模型上,我们的方法比现有的放松或天真的方法有效地产生更严格的结果,而我们的方法缩放到了以前工作无法处理的更大的实用模型。我们还展示了可证明的单调性分析的应用。代码可从https://github.com/shizhouxing/local-lipschitz-constants获得。
Lipschitz constants are connected to many properties of neural networks, such as robustness, fairness, and generalization. Existing methods for computing Lipschitz constants either produce relatively loose upper bounds or are limited to small networks. In this paper, we develop an efficient framework for computing the $\ell_\infty$ local Lipschitz constant of a neural network by tightly upper bounding the norm of Clarke Jacobian via linear bound propagation. We formulate the computation of local Lipschitz constants with a linear bound propagation process on a high-order backward graph induced by the chain rule of Clarke Jacobian. To enable linear bound propagation, we derive tight linear relaxations for specific nonlinearities in Clarke Jacobian. This formulate unifies existing ad-hoc approaches such as RecurJac, which can be seen as a special case of ours with weaker relaxations. The bound propagation framework also allows us to easily borrow the popular Branch-and-Bound (BaB) approach from neural network verification to further tighten Lipschitz constants. Experiments show that on tiny models, our method produces comparable bounds compared to exact methods that cannot scale to slightly larger models; on larger models, our method efficiently produces tighter results than existing relaxed or naive methods, and our method scales to much larger practical models that previous works could not handle. We also demonstrate an application on provable monotonicity analysis. Code is available at https://github.com/shizhouxing/Local-Lipschitz-Constants.