Probabilistic Verification of ReLU Neural Networks via Characteristic Functions

Joshua Pilipovsky, Vignesh Sivaramakrishnan, Meeko Oishi, Panagiotis Tsiotras · DOI

TL;DR

This paper introduces a novel framework for the probabilistic verification of ReLU neural networks by shifting the problem into the frequency domain. By using Characteristic Functions (CFs) and the Hilbert Transform, the authors analytically propagate probability distributions through deep networks, providing rigorous safety guarantees even for "nasty" distributions (like Cauchy) that lack well-defined moments.

What Problem Does This Paper Address?

As neural networks (NNs) are increasingly deployed in safety-critical systems like autonomous drones or self-driving cars, we need ways to prove they will behave correctly. Traditional exact verification looks at the "worst-case"—if even one point in a possible input set leads to a crash, the network fails. This is often too pessimistic for real-world scenarios where inputs are noisy but generally well-behaved.

Probabilistic verification is more realistic: it asks, "What is the probability that my output stays within a safe set?" However, existing methods often rely on approximations (like ellipsoids) or require the input noise to have specific properties, such as finite moments (mean, variance, etc.). If your sensor noise follows a heavy-tailed distribution like a Cauchy distribution, standard tools break down. This paper aims to provide a verification method that is both analytically exact for ReLU units and flexible enough to handle any continuous distribution.

Methods

The authors treat a feedforward neural network as a discrete-time dynamical system. To track how an input distribution changes as it moves through the layers, they use the Characteristic Function (CF)—essentially the Fourier transform of the probability density function.

The core technical contribution is how they handle the two types of layers in a ReLU NN:

  1. Affine Layers ($Wx + b$): In the frequency domain, linear transformations and shifts are mathematically straightforward to apply to a CF.
  2. ReLU Layers ($\max(0, x)$): This is the non-linear "hard part." The authors derive an analytical way to propagate the CF through a ReLU unit using the Hilbert Transform.

By alternating between these two steps, they can compute the CF of the network's output. Finally, they use the Gil-Pelaez Inversion Theorem to convert that output CF into a Cumulative Distribution Function (CDF). This CDF tells you exactly how much of the output "mass" falls into the safety zone.

Datasets

The paper does not use standard image classification datasets like ImageNet. Instead, it focuses on verifying the architecture itself using synthetic benchmarks common in the verification literature:

  • Example 1: A small network (2 inputs, 10 hidden neurons, 1 output) tested with Cauchy-distributed inputs. This is a "stress test" because Cauchy distributions have no defined mean or variance, making them impossible to analyze with moment-based methods.
  • Example 2: A deeper network (2 inputs, 5 hidden layers with 50 neurons each, 2 outputs) tested with Normally distributed inputs to demonstrate scalability to deeper architectures.

Key Insights and Ideas

  • The "Always Exists" Advantage: Unlike Moment Generating Functions, a Characteristic Function is guaranteed to exist for any random variable. This makes the framework universally applicable to any continuous noise model.
  • ReLU is Frequency-Friendly: Because ReLU is piecewise linear, its effect on a distribution can be captured analytically in the frequency domain. The authors show that the ReLU operation is essentially a specific integral operator related to the Hilbert Transform.
  • Frequency vs. Spatial Domain: Propagating a distribution in the spatial domain (using PDFs) involves complex convolutions at every layer. In the frequency domain, many of these operations become simple multiplications or well-defined integral transforms.

Key Results

  • High Accuracy: The proposed method's results (the black dots in their plots) almost perfectly match the "ground truth" established by brute-force Monte Carlo sampling with $10^4$ to $10^6$ samples.
  • Handling the "Un-verifiable": The method successfully verified networks with Cauchy noise where state-of-the-art methods (like PROVEN or SDP-based approaches) would fail because they require finite moments.
  • Efficiency: For a two-layer network, the verification takes approximately 3 seconds. The authors demonstrate a clear trade-off: increasing the resolution of the frequency grid improves accuracy but increases computation time.
  • Outperforming Scenario Optimization: Compared to sampling-based "scenario optimization," the CF method provided much tighter bounds on the safety set, whereas sampling tended to be overly conservative due to outliers.

Limitations and Future Work

  • Numerical Sensitivity: The Hilbert Transform can be tricky to compute numerically near zero. The authors noted some inaccuracies at the "kink" of the ReLU function ($x=0$), which can propagate through deep layers.
  • Scalability: While it works for 50-neuron layers, very wide or extremely deep networks might face a "curse of dimensionality" in the frequency grid resolution required to maintain accuracy.
  • Activation Functions: Currently, the math is tailored specifically to ReLU. Extending this to other popular functions like Sigmoid, Tanh, or Swish would require deriving new analytical frequency-domain operators.
  • Optimization: The authors suggest that future work could involve "inverse verification"—finding the largest possible input set that keeps the network safe for a given risk level.

Summary updated

BibTeX
@inproceedings{pilipovsky2023probabilistic,
  author = {Joshua Pilipovsky and Vignesh Sivaramakrishnan and Meeko Oishi and Panagiotis Tsiotras},
  title = {{Probabilistic Verification of ReLU Neural Networks via Characteristic Functions}},
  booktitle = {L4dc},
  year = {2023},
}
Figure