Abstraction based Output Range Analysis for Neural Networks

Pavithra Prabhakar, Zahra Rahimi Afzal

Abstract

In this paper, we consider the problem of output range analysis for feed-forward neural networks with ReLU activation functions. The existing approaches reduce the output range analysis problem to satisfiability and optimization solving, which are NP-hard problems, and whose computational complexity increases with the number of neurons in the network. To tackle the computational complexity, we present a novel abstraction technique that constructs a simpler neural network with fewer neurons, albeit with interval weights called interval neural network (INN), which over-approximates the output range of the given neural network. We reduce the output range analysis on the INNs to solving a mixed integer linear programming problem. Our experimental results highlight the trade-off between the computation time and the precision of the computed output range.

Introduction

As neural networks (NNs) are increasingly deployed in safety-critical systems—such as autonomous vehicles and aircraft collision avoidance—there is a critical need for mathematical guarantees regarding their behavior. A fundamental challenge in this domain is output range analysis: determining the maximum and minimum possible control signals a network might produce given a set of sensor inputs.

For networks utilizing the common ReLU (Rectified Linear Unit) activation function, this problem is known to be NP-hard. Current state-of-the-art methods rely on Mixed Integer Linear Programming (MILP) or Satisfiability Modulo Theories (SMT) solvers. However, these tools often struggle as the number of neurons increases, creating a "complexity wall" that hinders the verification of deep networks used in real-world applications.

Methodology: Abstraction and Interval Neural Networks

To overcome these computational hurdles, we propose a "divide and conquer" approach based on abstraction. Instead of analyzing the original, high-dimensional network, we construct a simplified version with fewer neurons that serves as a sound over-approximation.

Interval Neural Networks (INNs)

We introduce a generalized model where weights and biases are represented as intervals (e.g., $[0.4, 0.6]$) rather than single scalar values. This allows the abstract network to capture the aggregate behavior of multiple original neurons.

The Abstraction Procedure

The core of our method involves partitioning neurons within a layer into groups and merging them into single "abstract" nodes. To ensure the results are sound—meaning the abstract range is guaranteed to contain the true range of the original network—we calculate new interval weights for the edges connecting these abstract nodes.

Visualizing the abstraction of a neural network (left) into an Interval Neural Network (right) by merging neurons and using interval weights.

The Scaling Factor Innovation

A key technical insight of this work is that simply taking the convex hull of weights during merging is insufficient for soundness. To maintain a valid over-approximation, the weights of the abstract edges must be multiplied by a scaling factor equal to the number of merged nodes. Without this adjustment, the abstraction may fail to represent the full range of the original network's dynamics.

An example of an incorrect abstraction, highlighting how simple node merging without proper weight scaling can lead to an unsound representation of the original network.

MILP Reduction

To compute the output range, we translate the INN's behavior into a MILP problem using a "big-M" encoding for the non-linear ReLU functions. This allows industrial-grade solvers like Gurobi to efficiently find the global maximum and minimum outputs of the abstracted model.

Experimental Evaluation

We evaluated our approach using the ACAS Xu benchmarks, a standard suite of neural networks for airborne collision avoidance. These networks, typically consisting of 6 hidden layers with 50 neurons each, often cause traditional verification tools to time out.

Key Results

  • Feasibility: While the standard MILP solver was unable to process the full, un-abstracted ACAS Xu network, it successfully solved the abstracted versions.
  • Efficiency vs. Precision: Our results demonstrate a clear trade-off: as the number of abstract nodes increases (e.g., from 2 to 32), computation time grows, but the over-approximation error decreases significantly.
  • Bound Tightening: In several test cases, increasing the number of abstract nodes led to a drastic reduction in the computed upper bound, providing much tighter and more useful safety guarantees.

Discussion and Future Work

Our abstraction framework provides a tunable "knob" between verification speed and precision. However, several areas for improvement remain:

  • Smart Partitioning: Currently, neurons are partitioned randomly. Future work will explore heuristic strategies, such as grouping neurons with similar activation patterns, to improve precision without increasing complexity.
  • Generalized Activations: Extending this logic to other non-linear functions like Sigmoid or Tanh will require new mathematical proofs for interval weight calculation.
  • Specialized Solvers: Adapting tools like Reluplex to handle interval-based weights directly could further accelerate the verification process.

By choosing how many nodes to merge, engineers can effectively navigate the trade-off between verification speed and the tightness of safety bounds, enabling the analysis of larger-scale neural networks than previously possible.

Summary updated

BibTeX
@inproceedings{prabhakar2019abstraction,
  author = {Pavithra Prabhakar and Zahra Rahimi Afzal},
  title = {{Abstraction based Output Range Analysis for Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure