A Dual Approach to Scalable Verification of Deep Networks

Krishnamurthy Dvijotham, Robert Stanforth, Sven Gowal, Timothy A. Mann, Pushmeet Kohli

Abstract

Formal verification of deep neural networks is essential for safety-critical applications but often suffers from poor scalability and limited support for non-linear activations. We present a framework that treats verification as an optimization problem, utilizing Lagrangian relaxation to compute provable upper bounds on safety violations. This "anytime" algorithm scales to large networks and supports a wide range of activation functions, including Tanh and Sigmoid. Our results on MNIST and CIFAR-10 demonstrate that this dual approach provides tight, non-trivial bounds, significantly outperforming previous semidefinite programming methods.

Introduction

In deep learning, empirical success on test sets is the standard benchmark. However, for safety-critical systems—such as autonomous vehicles or medical diagnostics—statistical averages are insufficient. There is a critical need for formal verification: a mathematical guarantee that small input perturbations will not lead to catastrophic failures. Deep neural networks are notoriously vulnerable to adversarial perturbations—tiny, often imperceptible changes that flip predictions. While adversarial training offers some protection, it remains a reactive strategy. Formal verification provides a proactive proof that for any input within a specified range, the output remains within safe bounds. Historically, this has been hindered by computational complexity (NP-hardness), architectural restrictions (primarily ReLU-based), and limited scalability.

Methodology

The proposed framework reframes the verification task as an optimization problem: finding the input that causes the maximum possible violation of a safety property. Since finding the exact maximum is computationally intractable for large networks, the authors employ Lagrangian relaxation.

By moving the hard constraints of the neural network (weights and activations) into the objective function using dual variables (multipliers), they derive a dual formulation. Solving this dual problem yields a guaranteed upper bound on the violation. Key features of this approach include:

  • Dual Formulation: By solving the "dual" version of the optimization problem, they obtain a guaranteed upper bound on the violation.
  • Anytime Algorithm: The dual objective always provides a valid upper bound, allowing the solver to be stopped at any time with a valid proof. The longer the optimization runs, the tighter the bound becomes.
  • Efficiency: The dual problem is unconstrained and convex, enabling the use of gradient-based optimization techniques similar to standard backpropagation.
  • Generality: Unlike many existing tools restricted to piecewise linear functions, this method is activation-agnostic, working effectively with smooth functions like Tanh and Sigmoid.

Experimental Evaluation

The researchers evaluated the dual approach across several benchmarks:

  • Image Classification: Robustness against adversarial noise was tested on MNIST and CIFAR-10.
  • Classifier Stability: A task using 10,000 GitHub repositories to predict commit milestones.
  • Digit Sum Task: A complex verification scenario involving pairs of MNIST digits to ensure stable sum predictions under perturbation.

Results and Discussion

The dual approach demonstrates significant improvements over existing methods, particularly for smooth activation functions. On Tanh and Sigmoid networks, it outperformed Semidefinite Programming (SDP) methods, which often yield vacuous bounds.

Verified error rates (solid) vs. empirical error rates (dashed) for Sigmoid and Tanh networks on MNIST.

As shown in Figure 3, for small perturbation ranges, the verified upper bounds (solid lines) are remarkably close to the empirical lower bounds found by actual attacks (dashed lines). This indicates a high degree of "tightness" in the mathematical proof. Furthermore, the method provided some of the first non-trivial verification bounds for the CIFAR-10 dataset, maintaining efficiency within a 300-second time budget per example.

Conclusion

This work presents a scalable, sound, and activation-agnostic framework for neural network verification. By shifting from the primal search for adversarial examples to a dual search for proofs, the authors transform a combinatorial challenge into a continuous optimization problem. While the method is "incomplete" (meaning a failure to prove safety doesn't necessarily imply the existence of a counterexample), its scalability and tightness mark a significant step toward provably safe AI. Future work aims to integrate this dual objective directly into the training process to develop models that are robust by design.

Summary updated

BibTeX
@inproceedings{dvijotham2018dual,
  author = {Krishnamurthy Dvijotham and Robert Stanforth and Sven Gowal and Timothy A. Mann and Pushmeet Kohli},
  title = {{A Dual Approach to Scalable Verification of Deep Networks}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2018},
}
Figure