Efficient Certified Reasoning for Binarized Neural Networks

Jiong Yang, Yong Kiam Tan, Mate Soos, Magnus O. Myreen, Kuldeep S. Meel

Introduction

Binarized Neural Networks (BNNs) represent a specialized class of deep learning models where weights and activations are restricted to Boolean values (+1 or -1). This architecture makes them exceptionally well-suited for low-power, safety-critical hardware, as they essentially function as massive logic circuits. However, verifying the safety and reliability of BNNs—specifically proving their robustness against adversarial attacks—has historically presented a difficult trade-off between computational speed and mathematical certainty.

This paper introduces a novel framework that leverages "native" constraint reasoning to bridge this gap. By moving away from traditional logic translations, the authors achieve a 9× speedup in qualitative verification and a 218× speedup in quantitative reasoning, all while providing formally verifiable proofs for nearly every result.

The Challenge: Scalability and Trustworthiness

Formal methods, such as SAT solvers, are theoretically capable of proving the robustness of BNNs. However, two major hurdles have prevented their widespread adoption:

  1. Scalability and Structural Loss: Existing methods typically translate BNNs into Conjunctive Normal Form (CNF), the standard language of SAT solvers. This translation causes a combinatorial explosion in size and strips away the high-level structure of the neural network, making verification prohibitively slow.
  2. The Trust Gap: Complex solvers are prone to bugs. In safety-critical domains, a simple "yes/no" answer is insufficient; stakeholders require a "certificate" (a formal proof) that can be independently verified. Previous certified methods were too slow for practical use, while faster methods lacked certification.

Methodology: Native BNN Reasoning

The authors propose a departure from generic logic translations in favor of native BNN reasoning. This approach is built on three core pillars:

Native Representation

Instead of decomposing a neuron's summation and thresholding operations into thousands of individual logic gates, the solver treats the entire operation as a single "native" constraint. This allows the solver to maintain the mathematical context of the neuron throughout the reasoning process.

Specialized Solver and Counter

The team developed a custom solver for qualitative reasoning (determining if a specific property holds true) and an approximate model counter for quantitative reasoning (estimating the number of inputs that might violate a property).

Integrated Certified Pipeline

The most significant innovation is the integration of a proof-generation system. As the solver operates, it produces a trace of its logic. The authors extended standard proof formats to support BNN-specific operations, allowing a small, trusted "checker" to verify the solver's conclusions. This ensures that the results are mathematically sound without requiring the user to trust the complex solver itself.

Key Insights

  • Preserving Structure: The primary breakthrough is the realization that preserving the summation-threshold structure of a neuron is significantly more efficient than flattening it into Boolean logic. This structural awareness allows the solver to prune large sections of the search space that a standard SAT solver would otherwise have to explore bit-by-bit.
  • Efficiency through Certification: While certification is usually viewed as a performance tax, this research demonstrates that designing a proof system alongside a native solver can actually enhance efficiency. The proof generation is integrated into the native reasoning process rather than being treated as an afterthought.
  • Quantitative Breakthroughs: Quantitative reasoning—counting failure points—is notoriously difficult to scale. By applying native constraints to an approximate counter, the authors transformed a task that was previously nearly impossible to certify into a highly scalable process.

Results and Performance

The framework was evaluated using a BNN robustness verification benchmark suite, typically involving models trained on datasets like MNIST and CIFAR-10. The performance gains over existing CNF and Pseudo-Boolean (PB) baselines were substantial:

  • Qualitative Verification: The framework achieved a 9× speedup and successfully certified 99% of queries, compared to just 62% for the leading baseline.
  • Quantitative Counting: The framework achieved a 218× speedup, providing certified results for 86% of queries, whereas previous methods managed only 4%.

Limitations and Future Directions

Despite these advancements, several challenges remain for future research:

  • Architectural Scaling: While effective for standard BNNs, scaling these native solvers to more complex architectures, such as Binarized ResNets, remains an open challenge.
  • Input Constraints: The current framework is optimized for binarized or discretized inputs. Handling high-precision floating-point inputs directly within a certified framework requires further development.
  • Proof Management: As networks grow deeper, the generated proofs can become quite large, necessitating research into more compact proof formats or specialized hardware for verification.

Summary updated

BibTeX
@inproceedings{yang2025efficient,
  author = {Jiong Yang and Yong Kiam Tan and Mate Soos and Magnus O. Myreen and Kuldeep S. Meel},
  title = {{Efficient Certified Reasoning for Binarized Neural Networks}},
  booktitle = {SAT},
  year = {2025},
  url = {https://openreview.net/forum?id=0GcTBiBD4m},
}

Loading related content...

Figure