PEREGRiNN: Penalized-Relaxation Greedy Neural Network Verifier

Haitham Khedr, James Ferlez, Yasser ShoukryCAV 2021

Introduction

As neural networks (NNs) are increasingly deployed in safety-critical domains such as autonomous driving and medical diagnostics, traditional "black-box" testing is no longer sufficient. Ensuring the reliability of these systems requires formal verification—mathematical proof that a network will never produce a hazardous output within a defined range of inputs.

However, verifying networks with ReLU (Rectified Linear Unit) activations is computationally expensive. Each ReLU can exist in two states—"on" (linear) or "off" (zero)—leading to a combinatorial explosion of $2^N$ possible activation patterns for a network with $N$ neurons. This makes the verification problem NP-complete. While existing tools use linear relaxations to simplify the search space, these often introduce significant "noise," resulting in slow search times or inconclusive results.

PEREGRiNN (Penalized-Relaxation Greedy Neural Network Verifier) addresses these challenges by transforming the standard feasibility check into a guided convex optimization problem. The system architecture is divided into two primary modules: an Inference Component and a Search Component.

The PEREGRiNN system architecture, showing the interaction between inference and search components.

The Sum-of-Slacks Penalty

The core innovation of PEREGRiNN is the "Sum-of-Slacks" penalty. Unlike traditional verifiers that use convex solvers merely to check for feasibility, PEREGRiNN introduces an objective function that minimizes "slack"—the distance between a neuron's relaxed state and its true ReLU behavior. By minimizing the $L_1$-norm of these slacks, the solver is incentivized to find "sparse" solutions where neurons naturally align with valid ReLU states.

Layer-wise Weighting and Max-Slack Priority

To further optimize the search, PEREGRiNN employs two heuristic strategies:

  1. Layer-wise Weighting: Higher penalty weights are assigned to neurons closer to the input layer. This forces the optimization to resolve ambiguities in early layers first, aligning the solver's behavior with the verifier's layer-by-layer branching strategy.
  2. Max-Slack Conditioning: When the verifier must branch (testing both "on" and "off" states), it prioritizes the neuron with the highest slack. This "greedy" approach targets the most problematic neurons first, effectively pruning the search space.

Additionally, PEREGRiNN utilizes polytopic sampling via the Volesti library to rapidly identify counterexamples (proofs of unsafety) by sampling uniformly within complex input constraints.

Experimental Evaluation

The researchers evaluated PEREGRiNN using the MNIST dataset, focusing on adversarial robustness benchmarks from the VNN-COMP 2020 competition. The performance was tested across three fully-connected ReLU architectures of increasing complexity.

Architectural details of the MNIST models used for benchmarking.

Key Results

In head-to-head comparisons with state-of-the-art verifiers—including Neurify, Venus, nnenum, and Marabou—PEREGRiNN demonstrated superior performance:

  • Efficiency: PEREGRiNN achieved an average speedup of 1.15x to 1.65x over its competitors.
  • Verification Power: Within a 600-second timeout, PEREGRiNN successfully proved 190 properties, outperforming nnenum (172), Venus (159), Neurify (149), and Marabou (125).
  • Reliability: While some tools performed faster on simple cases, PEREGRiNN exhibited greater consistency across varying levels of difficulty, making it a robust general-purpose verifier.

Conclusion and Future Directions

PEREGRiNN demonstrates that treating "slack" as a diagnostic signal rather than a mathematical byproduct can significantly accelerate neural network verification. By aligning the convex solver's objective with the high-level search strategy, the tool effectively navigates the combinatorial complexity of ReLU networks.

Future work will focus on refining hyperparameter tuning for deeper architectures, extending the penalized-relaxation logic to other non-linear activations (e.g., Sigmoid or Tanh), and scaling the implementation to handle large-scale Convolutional Neural Networks (CNNs).

Summary updated

BibTeX
@inproceedings{khedr2021peregrinn,
  author = {Haitham Khedr and James Ferlez and Yasser Shoukry},
  title = {{PEREGRiNN: Penalized-Relaxation Greedy Neural Network Verifier}},
  booktitle = {CAV},
  year = {2021},
  doi = {10.1007/978-3-030-81685-8\_13},
}
Figure