Introduction
Formal verification represents the gold standard for safety-critical artificial intelligence, offering mathematical proof that a system adheres to specific properties across all possible inputs. However, a significant "specification bottleneck" currently limits the application of formal verification in deep neural networks (DNNs). While existing tools can verify simple mathematical constraints—such as adversarial robustness within a small pixel-level perturbation—they struggle to define and verify complex, real-world semantic properties. This paper introduces NESAL, a neuro-symbolic assertion language designed to bridge the gap between low-level mathematical constraints and high-level semantic reasoning.
The Specification Bottleneck
Traditional verification tools require properties to be expressed as first-order logic constraints. For example, a common property is: "the output should not change if any pixel is tweaked by a value less than $\epsilon$." While useful for checking robustness against noise, this approach fails for semantic concepts. It is virtually impossible to write a pure mathematical formula that captures every possible pixel-level variation of a "stop sign" or a "pedestrian."
Because high-level concepts cannot be formally defined with pure mathematics, developers cannot verify if a controller behaves correctly in their presence. Furthermore, standard verification often yields "garbage" counterexamples—random noise that technically violates a property but would never occur in a real-world environment. These counterexamples provide little to no diagnostic value for developers.
The NESAL Framework
To address these limitations, the authors propose a neuro-symbolic framework that utilizes neural networks themselves as part of the logical specification. The framework consists of four key components:
- Specification Networks: Instead of defining a concept like "stop sign" through manual logic, the framework uses a specialized neural network trained for that specific task. This network acts as a "proxy" for the semantic concept within the formal proof.
- Neuro-Symbolic Assertion Language (NESAL): Inspired by Hoare logic, NESAL follows a
{pre-condition} assignments {post-condition}structure. Crucially, the "assignments" phase can include calls to multiple different neural networks, allowing for complex relational properties. - Reduction to Deductive Verification: The framework demonstrates that a NESAL property involving multiple networks can be "unrolled" into a single, large logical formula, known as a verification condition.
- Neuro-Symbolic Verifier (NSV): The authors implemented a prototype by extending Marabou, a high-performance SMT-based (Satisfiability Modulo Theories) neural network verifier. This demonstrates that neuro-symbolic verification can be integrated into existing verification infrastructure.
Experimental Evaluation
The framework was evaluated using two standard benchmarks: the MNIST dataset of handwritten digits and the GTSRB (German Traffic Sign Recognition Benchmark). To maintain computational tractability, the researchers focused on the first ten classes of GTSRB and resized images to 16x16 pixels.
In addition to classification tasks, the researchers utilized Autoencoders as specification networks. These autoencoders were used to capture the underlying data distribution, effectively filtering out "out-of-distribution" inputs during the verification process. This ensures that the verifier only considers realistic inputs when searching for property violations.
Key Results and Insights
The authors successfully verified 2,200 distinct tasks across the two datasets. A primary achievement was the proof of semantic properties, such as: "If the specification network detects class $c$, the network under verification must also output class $c$."
One of the most significant advantages of this approach is the quality of debugging information. In head-to-head comparisons, standard verification produced counterexamples resembling random static. In contrast, the neuro-symbolic approach—leveraging autoencoder distribution checks—produced counterexamples that were clearly recognizable as digits or signs. This allows developers to see exactly where a model's logic fails on realistic data, enabling more effective model refinement.
Furthermore, the framework supports modular verification. This separation of concerns allows one team to develop a highly accurate perception specification network, which can then be used by another team to verify the safety of a downstream control system.
Limitations and Future Work
Despite its promise, neuro-symbolic verification faces several challenges:
- Scalability: Formal verification is computationally intensive. To achieve results within a 1,800-second timeout, the study used relatively small networks and low-resolution images. Scaling to production-grade, high-resolution models remains an open research question.
- Trust in Specification Networks: The validity of the verification is dependent on the accuracy of the specification network. If the "proxy" for a concept is flawed, the resulting safety proof is also compromised.
- Future Directions: The authors suggest extending the framework to hybrid systems that combine neural networks with traditional software and hardware. Additionally, they propose developing more efficient algorithms, such as those based on abstract interpretation, specifically optimized for neuro-symbolic properties.
Summary updated