Provable Bounds on the Hessian of Neural Networks: Derivative-Preserving Reachability Analysis

Sina Sharifi, Mahyar FazlyabarXiv 2024 · DOI

TL;DR

This research introduces a novel reachability analysis method for neural networks with differentiable activations (e.g., tanh, sigmoid) using second-order Taylor expansions. By efficiently bounding the network's Hessian, the authors create a "derivative-preserving" abstraction that significantly improves safety verification accuracy and speed compared to traditional zeroth-order methods.

What Problem Does This Paper Address?

As neural networks are increasingly deployed in safety-critical systems—such as autonomous drones or medical devices—formal "reachability analysis" is required to guarantee safety. Reachability analysis determines the worst-case range of outputs for a given set of possible inputs.

Reachability analysis aims to find the range of outputs for a given input range using bounding functions.

While verification tools for ReLU-based networks are well-established due to their piecewise linearity, networks with differentiable activations like tanh or sigmoid are harder to verify. They are non-linear everywhere, often leading existing methods to produce "over-approximations" so loose that safety certificates become meaningless—a phenomenon known as the "wrapping effect." This paper addresses this by incorporating local "curvature" (the Hessian) to provide much tighter, provable bounds.

Methods

The proposed framework utilizes a first-order Taylor abstraction with a bounded remainder. Unlike standard methods that only bound the output values (zeroth-order), this approach preserves the local gradient and accounts for how it changes.

Comparison of zeroth-order and first-order bounds, showing how the first-order approach provides significantly tighter approximations.

The core technical contributions include:

  1. Hessian Bounding: The authors derived analytical bounds for the Hessian of multi-layer networks, allowing them to bound the remainder term in Taylor's theorem.
  2. Local LipLT: An efficient algorithm to compute local Lipschitz constants. It balances accuracy and speed, outperforming naive layer-norm multiplication while remaining more scalable than Semidefinite Programming (SDP) solvers.
  3. Loop Transformation: A technique to exploit the monotonicity of activation functions, leading to tighter analytical bounds on gradient propagation.
  4. Derivative-Informed Branch and Bound (BnB): This enhanced BnB framework uses gradient and Hessian information to prioritize input space splitting, leading to faster convergence.

Key Results and Insights

  • Curvature Matters: By preserving the gradient at the center of an input set, the Taylor abstraction captures local behavior accurately. The Hessian ensures the function doesn't deviate too far from its linear approximation, resulting in tighter bounds as input sets shrink.
  • Efficiency Gains: In a 6D Quadrotor benchmark, the first-order method required only 0.93 million branches to verify safety, a massive reduction from the 4.89 million branches needed by the zeroth-order baseline.
  • Speedup: The approach was nearly 2x faster in total execution time for complex tasks (385s vs 678s), proving that the extra computation for Hessian bounds pays off in reduced branching.
  • Scalability: The Hessian bounding algorithm scales linearly with the number of layers, making it practical for deep networks where previous formal methods would time out.

Limitations and Future Work

Currently, the method focuses on fully connected feed-forward architectures. Future work aims to extend these curvature-based bounds to Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). Additionally, while the paper focuses on control systems, these Hessian bounds could significantly improve the formal verification of adversarial robustness in image classifiers.

Summary updated

BibTeX
@misc{sharifi2024provable,
  author = {Sina Sharifi and Mahyar Fazlyab},
  title = {{Provable Bounds on the Hessian of Neural Networks: Derivative-Preserving Reachability Analysis}},
  year = {2024},
  eprint = {2406.04476},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.04476},
}
Figure