[Paper Review] Fully Automatic Neural Network Reduction for Formal Verification
This paper proposes a fully automatic, specification-driven neural network reduction method that conservatively merges neurons with similar outputs during on-the-fly verification, enabling scalable formal verification of large networks. By leveraging interval arithmetic to compute output bounds and dynamically grouping neurons into tolerance-based buckets, the approach reduces networks to under 5% of their original size while preserving formal verification guarantees across ReLU, sigmoid, and tanh activations.
Formal verification of neural networks is essential before their deployment in safety-critical applications. However, existing methods for formally verifying neural networks are not yet scalable enough to handle practical problems under strict time constraints. We address this challenge by introducing a fully automatic and sound reduction of neural networks using reachability analysis. The soundness ensures that the verification of the reduced network entails the verification of the original network. Our sound reduction approach is applicable to neural networks with any type of element-wise activation function, such as ReLU, sigmoid, and tanh. The network reduction is computed on the fly while simultaneously verifying the original network and its specification. All parameters are automatically tuned to minimize the network size without compromising verifiability. We further show the applicability of our approach to convolutional neural networks by explicitly exploiting similar neighboring pixels. Our evaluation shows that our approach reduces large neural networks to a fraction of the original number of neurons and thus shortens the verification time to a similar degree.
Motivation & Objective
- To address the scalability limitations of formal neural network verification in safety-critical applications.
- To develop a conservative reduction technique that preserves formal verification guarantees for the original network.
- To enable on-the-fly reduction during verification, minimizing computational overhead.
- To support a wide range of activation functions, including ReLU, sigmoid, and tanh.
- To dynamically adapt merge buckets based on input-specific neuron similarity, improving reduction effectiveness.
Proposed method
- The method computes output bounds of neurons in nonlinear layers using interval arithmetic, projecting forward to the next nonlinear layer.
- Neurons are grouped into dynamic or static merge buckets based on their output bounds and a user-defined tolerance δ.
- Neurons within the same bucket are merged into a single representative neuron, conservatively approximating the original network's behavior.
- The reduction is constructed on-the-fly during verification, ensuring minimal runtime overhead.
- The approach is orthogonal to existing verification engines and integrates with set-based methods like zonotopes, Taylor models, and polynomial zonotopes.
- Dynamic bucket creation adapts to input-specific neuron similarity, especially effective for image data where neighboring pixels yield similar outputs.
Experimental results
Research questions
- RQ1Can a conservative neural network reduction technique be developed that preserves formal verification guarantees for the original network?
- RQ2How can neuron merging be performed on-the-fly during verification without pre-processing or retraining?
- RQ3To what extent can network size be reduced while maintaining formal correctness for diverse activation functions?
- RQ4How does dynamic bucketing based on input-specific output similarity improve reduction effectiveness compared to static approaches?
- RQ5Can the method scale to large, high-dimensional networks such as those used in image classification (e.g., CIFAR-10, MNIST)?
Key findings
- The proposed method reduces neural networks to less than 5% of their original number of neurons on multiple benchmarks, including MNIST and CIFAR-10.
- Verification time is reduced by a factor of three or more when using δ ≥ 0.01, with 85% of images verified in under one-third of the original time.
- Dynamic merge bucket creation significantly improves reduction performance, especially for image-based networks where spatially adjacent neurons produce similar outputs.
- The method achieves high reduction ratios even on large networks, such as the Cifar2020 benchmark, where up to 75% of neurons were removed while maintaining correctness.
- The over-approximation of the output set increases only marginally, as it is strictly bounded by the tolerance δ used in merging.
- The approach is effective across multiple activation functions, including ReLU, sigmoid, and tanh, and is compatible with various verification engines like zonotopes and Taylor models.
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.