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

A Mixed Integer Programming Approach for Verifying Properties of Binarized Neural Networks

Christopher Lazarus, Mykel J. Kochenderfer

Abstract

Formal verification of deep neural networks is essential for safety-critical applications but remains computationally expensive. This paper presents a Mixed Integer Programming (MIP) framework specifically designed for Binarized Neural Networks (BNNs). By exploiting the discrete nature of BNNs, the proposed method achieves verification runtimes 10x to 20x faster than traditional full-precision networks, offering a practical path toward formal certification in high-stakes environments.

Introduction

Deep neural networks are susceptible to adversarial attacks, where small, intentional input perturbations lead to incorrect outputs. In safety-critical domains like autonomous flight or medical diagnostics, empirical testing is insufficient; formal verification is required to mathematically guarantee that a model remains safe within a defined input range. However, verification is NP-hard, and the continuous search space of standard full-precision networks often leads to scalability issues. This research investigates whether Binarized Neural Networks (BNNs)—networks with weights and activations restricted to $\{-1, +1\}$—can simplify the verification process without significantly compromising predictive performance.

Methods

The authors translate BNN architectures into a set of linear constraints for a Mixed Integer Programming (MIP) solver. This approach is both sound and complete, ensuring that a counterexample will be found if one exists.

Key components of the formulation include:

  • Linear Encoding: Components such as linear layers, Batch Normalization, and Sign or ReLU activations are represented as linear inequalities.
  • Discrete Search Space: The binary nature of BNN activations aligns naturally with the binary variables in MIP solvers, significantly reducing the search space compared to continuous models.
  • Verification as Infeasibility: The solver searches for an input $x$ in a valid set $\mathcal{X}$ that produces an unsafe output $y$. If the solver proves no such input exists (infeasibility), the property is verified.

Results and Evaluation

The framework was evaluated on two benchmarks: MNIST (adversarial robustness) and the ACAS Xu (Airborne Collision Avoidance System) controller.

MNIST Robustness

On the MNIST dataset, the MIP approach demonstrated significant speedups. BNNs were verified approximately 10x faster than equivalent full-precision networks (DNNs). Notably, the BNN models achieved 0% timeouts within a 120-second limit, whereas DNNs frequently timed out.

Table 1: Comparison of verification performance on MNIST for BNNs and DNNs across different perturbation levels.

ACAS Xu Safety Verification

For the ACAS Xu benchmark, the BNN version of the controller was verified roughly 20x faster than the standard version. A property that required 41 seconds to verify on a full-precision network was resolved in just over 2 seconds using the BNN-MIP approach.

Table 2: Verification results for the ACAS Xu benchmark, comparing full-precision and 8-bit quantized BNNs against standard DNNs.

Discussion

The primary insight is a "verifiability trade-off": the non-differentiable sign functions that complicate BNN training actually facilitate verification by acting as a natural pruning mechanism for the search tree. While BNNs may exhibit a slight decrease in raw accuracy (e.g., ~95% vs ~98% on MNIST), the order-of-magnitude gains in verification efficiency make them highly attractive for systems with strict safety requirements.

Limitations and Future Work

Despite these gains, challenges remain. Continuous sensor data often requires quantization (e.g., 8-bit) to work effectively with BNNs, adding complexity to the input layers. Furthermore, BNNs require specialized training techniques like straight-through estimators due to gradient flow issues. Future work could involve developing MIP solvers tailored specifically for BNN structures or extending the framework to Ternary Neural Networks to further reduce solver overhead through sparsity.

Summary updated

BibTeX
@inproceedings{lazarus2021mixed,
  author = {Christopher Lazarus and Mykel J. Kochenderfer},
  title = {{A Mixed Integer Programming Approach for Verifying Properties of Binarized Neural Networks}},
  booktitle = {AISafety @ IJCAI},
  year = {2021},
}
Figure