Abstract
Deep Neural Network (DNN) verifiers are essential for ensuring the safety of AI-driven systems, yet their internal complexity often leads to "soundness bugs"—errors where a verifier incorrectly validates a property. Debugging these tools is notoriously difficult because the input networks typically contain thousands of neurons, making it impossible to isolate the root cause of a failure manually. This paper presents DelBugV, an automated tool that applies delta-debugging techniques to neural networks. By iteratively simplifying network structures while preserving bug-triggering behavior, DelBugV reduces the size of problematic verification queries by an average of 96.8%, transforming opaque, massive models into minimal reproducible examples for developers.
Introduction
As deep neural networks are increasingly deployed in safety-critical domains such as autonomous flight and medical diagnostics, the reliability of DNN verifiers becomes paramount. These verifiers use formal methods to prove that a network will not violate specific safety properties. However, verifiers are themselves complex software systems involving intricate floating-point arithmetic and logical branching. When a verifier fails—either by claiming a safe network is unsafe or vice versa—engineers are left with a massive network that provides little insight into the underlying software bug.
DelBugV addresses this "needle in a haystack" problem. By borrowing the concept of delta debugging from classical software engineering, the tool systematically shrinks the input neural network until it reaches a minimal state that still triggers the verifier's error. This process allows developers to focus on a handful of neurons and layers rather than thousands.
Methodology
DelBugV operates by taking a "faulty" verifier and an "oracle" (a verifier known to be correct for the specific query) and applying three primary simplification strategies:
- ReLU Linearization (Fully-Connected Layers): The tool uses a counter-example to identify which ReLU units are consistently "active" or "inactive." By fixing these units to their observed state, they become simple linear functions. This allows DelBugV to mathematically collapse multiple adjacent layers into a single, simpler layer.
- Convolutional Layer Linearization: Complex convolutional layers are first converted into equivalent fully connected layers, which are then subjected to the linearization and collapsing process mentioned above.
- Neuron Merging: The tool identifies pairs of neurons with similar behavioral patterns. It merges these into a single neuron and adjusts weights and biases to minimize the impact on the network's overall output, ensuring the bug remains reproducible.
The algorithm follows a strategic order, attempting to merge layers first (working backward from the output to the input) before moving to individual neuron merging. This top-down approach ensures that large-scale simplifications are prioritized.
Experimental Evaluation
The authors evaluated DelBugV using real-world discrepancies identified during the VNN-COMP’21 (Neural Network Verification Competition). The evaluation targeted four prominent verification engines:
- Marabou
- NNV
- NeuralVerification.jl (NV.jl)
- nnenum
The benchmarks spanned diverse datasets, including ACAS-Xu (airborne collision avoidance), MNIST (digit recognition), and Oval21.
Key Results and Insights
DelBugV demonstrated remarkable efficiency in reducing the complexity of verification queries across all tested solvers:
- Massive Size Reduction: On average, the tool reduced the number of neurons in error-triggering queries by 96.8%. In several instances, the reduction exceeded 99%. For example, one network was successfully shrunk from 1,306 neurons across 4 layers to just 11 neurons and 2 layers while still triggering the same bug.
- The Dominance of ReLU Linearization: The study found that ReLU linearization was the "workhorse" of the process, accounting for approximately 66% of the total size reduction. This suggests that converting non-linear activations into linear ones is the most effective way to simplify a network for debugging.
- Directional Efficiency: The researchers observed that simplifying the network by working backward from the output layer toward the input layer is significantly more effective than a forward-pass approach.
- Single-Solver Mode: While DelBugV typically requires an oracle, it can function independently if a verifier produces an incorrect "counter-example" (a witness that does not actually violate the property). As long as the verifier continues to produce that faulty witness, DelBugV can simplify the query.
Discussion and Future Work
While DelBugV represents a significant step forward in automated debugging for formal verification, it has limitations. The tool currently relies heavily on an oracle verifier, which may not always be available for cutting-edge or highly specialized queries. Additionally, the current implementation focuses almost exclusively on simplifying the neural network structure rather than the safety property constraints themselves.
Future work could involve adapting standard network compression techniques—originally designed for mobile optimization—as new simplification rules within the DelBugV framework. Furthermore, extending the tool to simplify the mathematical properties being verified could lead to even smaller and more understandable minimal reproducible examples.
Summary updated