Efficient Verification of Neural Networks Against LVM-Based Specifications

Harleen Hanspal, Alessio LomuscioCVPR 2023 · OpenReview

Abstract

The deployment of perception systems based on neural networks in safety critical applications requires assurance on their robustness. Deterministic guarantees on network robustness require formal verification. Standard approaches for verifying robustness analyse invariance to analytically defined transformations, but not the diverse and ubiquitous changes involving object pose, scene viewpoint, occlusions, etc. To this end, we present an efficient approach for verifying specifications definable using Latent Variable Models that capture such diverse changes. The approach involves adding an invertible encoding head to the network to be verified, enabling the verification of latent space sets with minimal reconstruction overhead. We report verification experiments for three classes of proposed latent space specifications, each capturing different types of realistic input variations. Differently from previous work in this area, the proposed approach is relatively independent of input dimensionality and scales to a broad class of deep networks and real-world datasets by mitigating the inefficiency and decoder expressivity dependence in the present state-of-the-art.

Introduction

Formal verification is the "gold standard" for safety-critical AI, providing mathematical guarantees that a model behaves correctly under specific conditions. Traditionally, these conditions involve simple pixel-level perturbations, such as $L_p$ balls. However, real-world variations are semantic: a car's angle, a stop sign's occlusion, or lighting changes. These are difficult to define analytically with simple equations.

Previous attempts to verify semantic robustness used generative models like VAEs or GANs to define variations in a "latent space." However, these "Encoder-Decoder-Network" (EDN) approaches suffer from two major flaws: high computational costs due to complex decoders and verification inaccuracies caused by reconstruction errors (e.g., blurry generated images).

Methods

The proposed Semantic Robustness Verification Problem (SRVP) framework introduces a structural change to the network-LVM interaction to overcome these limitations.

The proposed verification pipeline architecture.

Multi-Head Architecture and Invertibility

The target network is split into a Feature Detection Network (FDN) and a Task Head. An invertible encoding head is inserted after the FDN, mapping intermediate features to a low-dimensional latent space. This invertibility allows the verifier to skip the high-dimensional input layers and the complex decoder, verifying the path from the latent space directly to the Task Head. This decoupling ensures that the decoder is only used for training and generating counterexamples, not for the formal proof itself.

Specification Types

The framework supports three types of latent space queries:

  • Segment: Consistency during interpolation between two real images.
  • Axis: Consistency across a specific disentangled dimension (e.g., rotation or attribute change).
  • Region: Robustness within a local latent neighborhood.

Results and Discussion

The approach was evaluated on diverse datasets including CelebA (face attributes), Traffic Signs Recognition (TSRD), and 3D Objects (3DOD) rendered with ground-truth pose labels.

Visualizations of semantic attribute and pose changes captured by the LVM.

Performance and Precision

SRVP demonstrated a 10x speedup over traditional EDN methods. While EDN often timed out or returned "undecided," SRVP provided definitive results. On CelebA gender classification, SRVP verified robustness for 91-99% of queries, compared to under 60% for previous methods. The method also generates high-fidelity counterexamples when verification fails, showing exactly which semantic change caused the model to error.

Conclusion

By leveraging invertible layers and latent space efficiency, SRVP scales formal verification to deeper networks and more complex semantic specifications. While the method depends on the quality of the underlying LVM, it significantly mitigates the inefficiency and reconstruction dependence of prior state-of-the-art approaches. Future work includes extending the framework to object detection and exploring more diverse invertible architectures.

Summary updated

Abstract

The deployment of perception systems based on neural networks in safety critical applications requires assurance on their robustness. Deterministic guarantees on network robustness require formal verification. Standard approaches for verifying robustness analyse invariance to analytically defined transformations, but not the diverse and ubiquitous changes involving object pose, scene viewpoint, occlusions, etc. To this end, we present an efficient approach for verifying specifications definable using Latent Variable Models that capture such diverse changes. The approach involves adding an invertible encoding head to the network to be verified, enabling the verification of latent space sets with minimal reconstruction overhead. We report verification experiments for three classes of proposed latent space specifications, each capturing different types of realistic input variations. Differently from previous work in this area, the proposed approach is relatively independent of input dimensionality and scales to a broad class of deep networks and real-world datasets by mitigating the inefficiency and decoder expressivity dependence in the present state-of-the-art.
BibTeX
@inproceedings{hanspal2023efficient,
  author = {Harleen Hanspal and Alessio Lomuscio},
  title = {{Efficient Verification of Neural Networks Against LVM-Based Specifications}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=p9NBMITpsb},
}
Figure