NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Neural Network Verification with Branch-and-Bound for General Nonlinearities

Zhouxing Shi, Qirui Jin, Zico Kolter, Suman Jana, Cho-Jui Hsieh, Huan Zhang · DOI

TL;DR

This paper introduces GenBaB, a novel framework for formally verifying neural networks with general nonlinearities, moving beyond the limitations of existing methods that primarily focus on ReLU activations. GenBaB achieves this by introducing a new branching heuristic and a pre-optimization strategy for branching points, significantly improving verification capabilities for complex network architectures.

What Problem Does This Paper Address?

Formal verification of neural networks (NNs) is crucial for ensuring safety and robustness in critical applications. A powerful technique for this is Branch-and-Bound (BaB), which systematically explores the solution space. However, existing BaB methods are largely restricted to NNs with piecewise linear activations, most notably ReLU. This limitation prevents them from verifying a wide range of modern NNs that employ more complex nonlinearities like Sigmoid, Tanh, Sine, GeLU, or involve multi-dimensional operations found in LSTMs and Transformers. The paper addresses this gap by proposing a general BaB framework capable of handling these diverse nonlinearities and architectures.

Methods

The core contribution is the GenBaB framework, which extends BaB to general nonlinearities. Key innovations include:

  • General Branching Framework: Unlike ReLU's fixed branching point at 0, GenBaB supports arbitrary branching points for nonlinear functions.
  • Bound Propagation with Shortcuts (BBPS) Heuristic: This novel heuristic efficiently estimates the potential improvement from branching a neuron by leveraging pre-computed linear bounds as shortcuts, avoiding costly full bound propagation for every branching decision.
  • Pre-optimized Branching Points: To determine optimal branching points for general nonlinearities, the paper proposes a pre-optimization strategy. This involves finding branching points that yield the tightest linear relaxations and storing them in a lookup table for efficient use during verification. This is particularly useful for complex functions like multiplication, sine, and GeLU.
  • Support for General Computational Graphs: GenBaB is designed to handle NNs with complex architectures beyond simple feedforward networks, including those with multiple input nodes for a nonlinearity or multiple nonlinearities sharing an input node.

Datasets

The paper evaluates GenBaB on various datasets and model architectures:

  • MNIST: Used for training and evaluating feedforward networks with Sigmoid and Tanh activations, as well as LSTMs.
  • CIFAR-10: Used for training and evaluating feedforward networks with Sigmoid, Tanh, Sine, and GeLU activations, as well as LSTMs and Vision Transformers (ViTs). Models were trained using PGD adversarial training.
  • AC Optimal Power Flow (ACOPF): A real-world application benchmark used to demonstrate GenBaB's applicability beyond standard classification tasks.

Key Insights and Ideas

  • The "Shortcut" is Key: The BBPS heuristic's clever use of pre-computed linear bounds as shortcuts is a significant efficiency gain. It allows for rapid estimation of branching benefits without recomputing complex bounds from scratch, making BaB more scalable.
  • Pre-optimization Pays Off: For complex nonlinearities, simply branching in the middle is suboptimal. Pre-optimizing branching points, even if done offline, leads to tighter relaxations and demonstrably better verification results.
  • Generality is Achievable: The framework successfully unifies the treatment of diverse nonlinearities, showing that BaB principles can be extended far beyond ReLU networks, opening doors for verifying more sophisticated models.
  • Beyond Simple Activations: The framework's ability to handle multi-dimensional operations like multiplication in LSTMs and ViTs is crucial for verifying modern deep learning architectures.

Key Results

GenBaB consistently outperforms existing baselines, particularly α,β-CROWN without BaB, across various network architectures and nonlinearities.

  • Improved Verification Rates: On CIFAR-10 feedforward networks with various activations (Sigmoid, Tanh, Sine, GeLU), GenBaB verifies significantly more instances than α,β-CROWN without BaB. For example, on a 4x500 Sigmoid network, GenBaB verifies 58 instances compared to 28 for α,β-CROWN.
  • Effectiveness on Complex Architectures: GenBaB shows strong performance on LSTMs and ViTs, outperforming specialized verifiers like PROVER and DeepT. For instance, on an LSTM-4-32 CIFAR-10 model, GenBaB verifies 20 instances, while PROVER verifies 8.
  • Real-world Application: For the ML4ACOPF benchmark, GenBaB verifies 22 instances, while disabling BaB only verifies 16, demonstrating its utility in practical scenarios.
  • Ablation Studies: The BBPS heuristic and pre-optimized branching points both contribute significantly to GenBaB's performance, with BBPS showing substantial improvements over a basic BaB approach, and pre-optimization providing further gains.

Limitations and Future Work

  • Pre-optimization Cost: While the paper argues the pre-optimization cost is negligible due to its one-time nature per model, it can still be computationally intensive for very complex models or a large number of nonlinearities. The paper mentions that for higher-dimensional nonlinearities, the granularity of lookup tables can be adjusted to reduce memory requirements at the cost of slightly less optimal branching points.
  • Backup Score for General Nonlinearities: The paper notes that for ReLU networks, a "backup score" heuristic is often used to complement BaBSR. The authors leave it as future work to study the possibility of designing a similar backup score for general nonlinearities.
  • Commercial Solvers: Some baselines (e.g., VeriNet) rely on commercial LP solvers, which were not accessible for full evaluation.
  • Future Work: The authors suggest combining their BaB framework with improved linear relaxation techniques and exploring more sophisticated branching heuristics, potentially inspired by insights from ReLU-specific methods. They also mention the possibility of using NNs to compress lookup tables for high-dimensional nonlinearities.

Summary updated

BibTeX
@inproceedings{shi2025neural,
  author = {Zhouxing Shi and Qirui Jin and Zico Kolter and Suman Jana and Cho-Jui Hsieh and Huan Zhang},
  title = {{Neural Network Verification with Branch-and-Bound for General Nonlinearities}},
  booktitle = {TACAS},
  year = {2025},
  doi = {10.1007/978-3-031-90643-5\_17},
}
Figure