Efficient Neural Network Verification via Layer-based Semidefinite Relaxations and Linear Cuts

Ben Batten, Panagiotis Kouvaros, Alessio Lomuscio, Yang Zheng

Introduction

Deep neural networks (DNNs) are increasingly deployed in safety-critical domains, yet they remain notoriously vulnerable to adversarial attacks—small, often imperceptible input perturbations that can trigger incorrect predictions. To ensure reliability, researchers use formal verification to mathematically prove that no perturbation within a specific range can alter a model's output.

Verification methods typically face a trade-off between speed and tightness. Linear Programming (LP) relaxations are fast but often too "loose" to provide meaningful proofs for complex networks. Conversely, Semidefinite Programming (SDP) offers a tighter approximation but traditionally suffers from poor scalability, treating the entire network as a single, massive optimization problem. This paper introduces LayerSDP, a framework that bridges this gap by making SDP verification both more accurate and significantly faster.

Methodology

The authors propose two primary innovations to enhance the efficiency and tightness of SDP-based verification: Linear Cuts and Layer-based Decomposition.

Linear Cuts

A key observation in this work is that standard SDP relaxations are not always superior to LP relaxations. For "stable" neurons—those that are always active or inactive within a given perturbation range—standard SDP can actually be looser than simple triangular LP relaxations. By injecting "linear cuts" (constraints derived from LP) into the SDP formulation, the authors ensure the resulting model is strictly tighter than both previous SDP and LP methods.

Comparison of feasible regions: Triangular LP relaxation vs. Standard SDP relaxation. The linear cuts help tighten the SDP bound where it is naturally loose.

Layer-based Decomposition

Standard SDPs use a single large matrix to represent the entire network, which scales poorly as depth increases. The authors leverage chordal graph decomposition to exploit the sequential, layer-wise structure of neural networks. This allows them to break the global optimization problem into a sequence of much smaller matrices—one for each layer—without sacrificing mathematical rigor. They also introduced FastSDP, a streamlined version that omits certain inter-layer consistency constraints to achieve even higher speeds while maintaining better tightness than LP.

Experimental Results

The researchers evaluated LayerSDP on several ReLU-based Multi-Layer Perceptrons (MLPs) trained on the MNIST dataset, including deep architectures known to be challenging for existing verifiers.

Performance comparison across various models and verification methods, highlighting verified accuracy and computation time.

Key findings include:

  • Significant Speedup: LayerSDP achieved a two-order-of-magnitude speedup over the previous state-of-the-art SDP method (SDP-IP). For instance, on a benchmark where SDP-IP required nearly 4,000 seconds per image, LayerSDP completed the task in roughly 160 seconds.
  • Improved Tightness: On a 6-layer network with 100 neurons per layer, LayerSDP verified 75% of images, a dramatic improvement over the 21% achieved by standard LP methods.
  • Pruning Efficiency: By using linear cuts to identify stable neurons early, the authors could prune them from the SDP matrix, further reducing dimensionality before the solver begins.

Conclusion and Future Work

LayerSDP demonstrates that exploiting network topology through chordal decomposition and integrating LP-based linear cuts can make SDP verification a practical tool for medium-sized networks. While currently focused on fully connected ReLU networks, the authors note that the decomposition approach is theoretically applicable to Convolutional Neural Networks (CNNs). Future research will focus on developing customized first-order algorithms to further reduce dependence on expensive off-the-shelf solvers like MOSEK, potentially scaling these proofs to even larger architectures.

Summary updated

BibTeX
@inproceedings{batten2021efficient,
  author = {Ben Batten and Panagiotis Kouvaros and Alessio Lomuscio and Yang Zheng},
  title = {{Efficient Neural Network Verification via Layer-based Semidefinite Relaxations and Linear Cuts}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/301},
}
Figure