PREMAP: A Unifying PREiMage APproximation Framework for Neural Networks

Xiyue Zhang, Benjie Wang, Marta Kwiatkowska, Huan Zhang · DOI

Introduction

Understanding the behavior of neural networks often requires solving the "inverse" problem: identifying the set of all inputs that lead to a specific output. This set is known as the preimage. While forward image bounding (determining the range of outputs for a given input set) is a staple of neural network verification, computing the preimage is significantly more challenging.

PREMAP introduces a unifying framework for efficiently computing both symbolic under- and over-approximations of a neural network's preimage. By leveraging linear relaxations and a novel volume-aware refinement strategy, PREMAP scales preimage analysis to high-dimensional tasks like MNIST, achieving orders-of-magnitude speedups over existing exact methods.

The Preimage Challenge

Calculating an exact preimage is computationally intractable (NP-hard) because the number of linear regions in a ReLU network grows exponentially with the number of neurons. Previous methods were either limited to tiny networks or could only provide loose over-approximations. This gap prevents "quantitative verification"—the ability to calculate the exact probability or proportion of an input space that satisfies a safety property, such as an autonomous vehicle correctly identifying a "clear of conflict" path.

The PREMAP Framework

PREMAP represents preimage approximations as a Disjoint Union of Polytopes (DUP). The framework is built on four technical pillars:

1. Linear Relaxations (LiRPA)

Instead of tackling the non-linear activation functions directly, PREMAP uses efficient linear bounds to "sandwich" the network's behavior. This transforms the preimage problem into a set of manageable linear constraints.

Linear relaxations for ReLU neurons in different input regimes: inactive (left), active (middle), and unstable (right).

2. Anytime Refinement

The algorithm employs an iterative "split-and-bound" approach. It starts with a coarse approximation and progressively refines it by partitioning the input space or intermediate neuron states. This "anytime" property allows users to stop the computation and retrieve the best approximation found within a given time budget.

3. Volume-Aware Heuristics

A key innovation in PREMAP is its splitting heuristic. Traditional verification tools often split on the longest edge of an input box. In contrast, PREMAP uses a "smoothed" splitting heuristic that prioritizes regions most likely to significantly increase the volume of the under-approximation or decrease the over-approximation.

Conceptual illustration of the relationship between a candidate polytope (square) and the target preimage set C (blue).

4. Differentiable Optimization

PREMAP formulates a loss function based on the estimated volume of the preimage. It uses gradient descent to optimize linear relaxation parameters (alpha) and Lagrangian multipliers (beta), allowing for tighter bounds that are optimized directly on the GPU without the need for expensive traditional solvers.

Key Results and Scalability

The framework was evaluated across diverse benchmarks, including safety-critical systems like the Vertical Collision Avoidance System (VCAS) and high-dimensional image classification (MNIST).

  • Efficiency: PREMAP achieved speedups of up to three orders of magnitude compared to exact solvers. For instance, on a vehicle parking task, computation time dropped from ~3000 seconds to just 1 second.
  • High-Dimensional Scaling: PREMAP is the first tool capable of generating preimage under-approximations for MNIST classifiers (784-dimensional inputs), a task previously considered out of reach for preimage methods.
  • Quantitative Verification: The authors demonstrated that PREMAP could prove specific safety probabilities. For the VCAS system, they verified that 90.8% of a specific input region correctly resulted in a safe advisory.

Conclusion

PREMAP represents a significant step forward in neural network interpretability and verification. By shifting the focus from "worst-case" adversarial analysis to "average-case" volume estimation, it enables a deeper understanding of the global behavior of complex models. Future work aims to extend these techniques to more complex architectures like Transformers and deep Convolutional Neural Networks.

Summary updated

BibTeX
@misc{zhang2024premap,
  author = {Xiyue Zhang and Benjie Wang and Marta Kwiatkowska and Huan Zhang},
  title = {{PREMAP: A Unifying PREiMage APproximation Framework for Neural Networks}},
  year = {2024},
  eprint = {2408.09262},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.09262},
}
Figure