[Paper Review] Verification of Binarized Neural Networks via Inter-Neuron Factoring
This paper proposes a formal verification framework for Binarized Neural Networks (BNNs) by leveraging inter-neuron factoring to improve scalability. By reducing BNN verification to SAT solving via circuit encoding and optimizing computation sharing across neurons in the same layer, the method enables verification of BNNs with thousands of neurons—demonstrating significant scalability gains over direct encoding approaches.
We study the problem of formal verification of Binarized Neural Networks (BNN), which have recently been proposed as a energy-efficient alternative to traditional learning networks. The verification of BNNs, using the reduction to hardware verification, can be even more scalable by factoring computations among neurons within the same layer. By proving the NP-hardness of finding optimal factoring as well as the hardness of PTAS approximability, we design polynomial-time search heuristics to generate factoring solutions. The overall framework allows applying verification techniques to moderately-sized BNNs for embedded devices with thousands of neurons and inputs.
Motivation & Objective
- To address the scalability challenge in verifying Binarized Neural Networks (BNNs) for safety-critical embedded applications.
- To develop a verification framework that scales to BNNs with thousands of inputs and hidden nodes, which are common in real-world embedded systems.
- To exploit the binary nature of BNNs to factor shared computations across neurons in the same layer, improving verification efficiency.
- To formally establish the NP-hardness of optimal factoring and inapproximability of PTAS, guiding the design of efficient heuristics.
- To enable formal correctness guarantees for BNNs, supporting safety certification and adversarial example generation.
Proposed method
- Transform BNNs and specifications into a combinational miter, then encode into propositional SAT problems using logic synthesis tools like ABC.
- Introduce inter-neuron factoring by identifying and sharing common computation patterns across neurons within the same layer, exploiting binary weights and activations.
- Design polynomial-time search heuristics for factoring based on theoretical hardness results (NP-hardness and inapproximability of PTAS).
- Use bit-level arithmetic and bipolar representation (±1) to enable efficient encoding of BNN computations into Boolean circuits.
- Leverage SAT solvers to verify whether the BNN satisfies its specification for all possible inputs.
- Support adversarial example generation by extracting counterexamples from failed verification attempts.
Experimental results
Research questions
- RQ1Can inter-neuron factoring significantly improve the scalability of formal verification for BNNs?
- RQ2What is the computational complexity of finding an optimal factoring configuration in BNNs?
- RQ3Can polynomial-time heuristics for factoring achieve practical verification performance on large BNNs?
- RQ4How does the proposed method compare to existing verification techniques for floating-point neural networks?
- RQ5Can the verification framework be extended to support synthesis and incremental updates of BNNs?
Key findings
- The problem of finding an optimal inter-neuron factoring configuration in BNNs is NP-hard, and approximating it within a PTAS is also hard, justifying the use of heuristic approaches.
- The proposed polynomial-time factoring heuristics enable verification of BNNs with thousands of inputs and neurons, which is infeasible with direct encoding.
- The framework achieves scalability by reducing the size of the SAT problem through shared computation across neurons in the same layer.
- The method supports formal verification of BNNs for embedded systems, providing correctness guarantees for safety-critical applications.
- Counterexamples from failed verification attempts can be used to generate adversarial inputs for debugging and retraining.
- The approach is complementary to existing work on single-neuron encoding, focusing instead on cross-neuron optimization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.