Table of Contents
Fetching ...

Talking with Verifiers: Automatic Specification Generation for Neural Network Verification

Yizhak Y. Elboher, Reuven Peleg, Zhouxing Shi, Guy Katz, Jan Křetínský

TL;DR

The framework enables users to formulate specifications in natural language, which are then automatically analyzed and translated into formal verification queries compatible with state-of-the-art neural network verifiers, and successfully verifies complex semantic specifications that were previously inaccessible.

Abstract

Neural network verification tools currently support only a narrow class of specifications, typically expressed as low-level constraints over raw inputs and outputs. This limitation significantly hinders their adoption and practical applicability across diverse application domains where correctness requirements are naturally expressed at a higher semantic level. This challenge is rooted in the inherent nature of deep neural networks, which learn internal representations that lack an explicit mapping to human-understandable features. To address this, we bridge this gap by introducing a novel component to the verification pipeline, making existing verification tools applicable to a broader range of domains and specification styles. Our framework enables users to formulate specifications in natural language, which are then automatically analyzed and translated into formal verification queries compatible with state-of-the-art neural network verifiers. We evaluate our approach on both structured and unstructured datasets, demonstrating that it successfully verifies complex semantic specifications that were previously inaccessible. Our results show that this translation process maintains high fidelity to user intent while incurring low computational overhead, thereby substantially extending the applicability of formal DNN verification to real-world, high-level requirements.

Talking with Verifiers: Automatic Specification Generation for Neural Network Verification

TL;DR

The framework enables users to formulate specifications in natural language, which are then automatically analyzed and translated into formal verification queries compatible with state-of-the-art neural network verifiers, and successfully verifies complex semantic specifications that were previously inaccessible.

Abstract

Neural network verification tools currently support only a narrow class of specifications, typically expressed as low-level constraints over raw inputs and outputs. This limitation significantly hinders their adoption and practical applicability across diverse application domains where correctness requirements are naturally expressed at a higher semantic level. This challenge is rooted in the inherent nature of deep neural networks, which learn internal representations that lack an explicit mapping to human-understandable features. To address this, we bridge this gap by introducing a novel component to the verification pipeline, making existing verification tools applicable to a broader range of domains and specification styles. Our framework enables users to formulate specifications in natural language, which are then automatically analyzed and translated into formal verification queries compatible with state-of-the-art neural network verifiers. We evaluate our approach on both structured and unstructured datasets, demonstrating that it successfully verifies complex semantic specifications that were previously inaccessible. Our results show that this translation process maintains high fidelity to user intent while incurring low computational overhead, thereby substantially extending the applicability of formal DNN verification to real-world, high-level requirements.
Paper Structure (27 sections, 3 equations, 5 figures, 4 tables, 1 algorithm)

This paper contains 27 sections, 3 equations, 5 figures, 4 tables, 1 algorithm.

Figures (5)

  • Figure 1: Semantic grounding pipelines for different input modalities. (a) Image-based specification grounding using LLM and open-vocabulary vision-language models. (b) Sound-based specification grounding using LLM and open-vocabulary sound event detection (SED) models.
  • Figure 2: Qualitative demonstration of specification grounding in the full verification process. The user description (a) is parsed into a grounding query (b). The semantic detector applies this query to the image (d) to identify the relevant semantic region (e) and generate a counterexample (f).
  • Figure 3: Multiple objects are to be detected by both parser and detector.
  • Figure 4: Verification pipeline. Given a network $\mathcal{N}$, a high-level specification $P$, and a reference input $x$, a parser extracts semantic objects and an operation to apply on them from $P$. An object detector localizes these objects in $x$, producing coordinates. A specification generator builds a grounded specification $P_x$ from these coordinates and $x$. Finally, a verifier checks the grounded specification on $nn$, returning SAFE or UNSAFE.
  • Figure 5: Illustrative example for sound event detection.