Skip to main content
QUICK REVIEW

[Paper Review] On Tractable Representations of Binary Neural Networks

Weijia Shi, Andy Shih|arXiv (Cornell University)|Apr 5, 2020
Adversarial Robustness in Machine LearningComputer Science42 references7 citations
TL;DR

This paper proposes a knowledge compilation approach to represent binary neural networks as tractable Boolean circuits—specifically Ordered Binary Decision Diagrams (OBDDs) and Sentential Decision Diagrams (SDDs)—enabling formal verification and explanation of model behavior. It introduces a pseudo-polynomial time algorithm for compiling individual neurons into compact, tractable representations, demonstrating feasibility and robustness analysis on handwritten digit classification with high accuracy and low memory overhead.

ABSTRACT

We consider the compilation of a binary neural network's decision function into tractable representations such as Ordered Binary Decision Diagrams (OBDDs) and Sentential Decision Diagrams (SDDs). Obtaining this function as an OBDD/SDD facilitates the explanation and formal verification of a neural network's behavior. First, we consider the task of verifying the robustness of a neural network, and show how we can compute the expected robustness of a neural network, given an OBDD/SDD representation of it. Next, we consider a more efficient approach for compiling neural networks, based on a pseudo-polynomial time algorithm for compiling a neuron. We then provide a case study in a handwritten digits dataset, highlighting how two neural networks trained from the same dataset can have very high accuracies, yet have very different levels of robustness. Finally, in experiments, we show that it is feasible to obtain compact representations of neural networks as SDDs.

Motivation & Objective

  • To enable formal verification and explanation of binary neural network decisions by compiling their decision functions into tractable Boolean circuits.
  • To address the challenge of analyzing robustness in binary neural networks through symbolic, knowledge compilation-based methods.
  • To develop an efficient, scalable compilation algorithm for neurons with integer weights and step activation functions.
  • To empirically evaluate the trade-off between model accuracy, robustness, and circuit size in real-world classification tasks.
  • To demonstrate that compact, tractable representations of neural networks are feasible using SDDs, even for complex models.

Proposed method

  • Compiles each neuron in a binary neural network into a Boolean function using step activation and binary inputs, resulting in a purely Boolean computation.
  • Applies a pseudo-polynomial time algorithm to compile individual neurons into OBDDs or SDDs, with time and space complexity bounded by O(nW), where n is input size and W is the maximum weight magnitude.
  • Uses knowledge compilation techniques to transform the neural network’s Boolean function into a tractable circuit format (SDD) that supports efficient queries.
  • Employs dynamic programming over a matrix of sub-classifiers indexed by input position and threshold to construct the OBDD representation efficiently.
  • Introduces new queries for robustness analysis, including instance-based and model-based robustness, leveraging model counting and circuit tractability.
  • Validates the approach on a handwritten digit dataset, comparing two high-accuracy models with differing robustness properties through circuit-based analysis.

Experimental results

Research questions

  • RQ1Can binary neural networks with 0/1 inputs and step activations be compiled into tractable Boolean circuits that support efficient reasoning and verification?
  • RQ2How does the proposed pseudo-polynomial time algorithm for neuron compilation scale with input size and weight precision?
  • RQ3To what extent can tractable circuit representations preserve model accuracy while enabling robustness analysis?
  • RQ4How do two high-accuracy binary neural networks trained on the same dataset differ in robustness when analyzed via compiled circuits?
  • RQ5Is it feasible to construct compact, human-interpretable representations of binary neural networks using SDDs?

Key findings

  • The proposed pseudo-polynomial time algorithm successfully compiles neurons into OBDDs with size bounded by O(nW), enabling tractable representation even for neurons with hundreds of inputs when weight precision is fixed.
  • Experiments show that SDD representations of binary neural networks remain compact and feasible to construct, with successful compilation achieved for 4-digit precision and high accuracy maintained at 97.8%.
  • Two high-accuracy binary neural networks trained on the same dataset exhibited significantly different robustness levels, as revealed by circuit-based analysis, despite similar performance.
  • Increasing weight precision beyond 4 digits caused OBDD construction to fail due to memory overflow, indicating exponential growth in representation size.
  • The method enables model-based robustness queries via model counting, which are more expressive than NP-complete queries like satisfiability, and are tractable in the compiled circuit.
  • The case study confirms that knowledge compilation into SDDs provides a viable path for formal verification and explanation of binary neural networks in practice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.