Make Sure You're Unsure: A Framework for Verifying Probabilistic Specifications

Leonard Berrada, Sumanth Dathathri, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Jonathan Uesato, Sven Gowal, M. Pawan Kumar

Formal verification—the mathematical proof that a system behaves as intended—is the "gold standard" for safety in software engineering. However, as neural networks are deployed in safety-critical roles like autonomous driving or medical diagnostics, a significant challenge arises: the real world is inherently messy and probabilistic. Most existing verification tools are designed for deterministic "if-then" scenarios, failing to account for sensor noise or models that express uncertainty, such as Bayesian Neural Networks (BNNs).

In this work, researchers introduce a general framework to bridge this gap, enabling the formal verification of probabilistic specifications.

The Challenge of Probabilistic Specifications

Traditional neural network verification asks deterministic questions, such as whether a tiny perturbation to an input pixel will change the classification. Yet, robust AI systems are often probabilistic. They might utilize Monte Carlo (MC) Dropout or Bayesian layers to provide confidence scores. Furthermore, inputs are rarely fixed; they are frequently distributions (e.g., sensor readings with Gaussian noise).

Verifying "probabilistic specifications"—such as ensuring the probability of misidentifying a pedestrian under sensor noise remains below a strict threshold—is notoriously difficult. Existing methods are often too specialized for specific noise types or yield "vacuous" guarantees (bounds so loose they are practically useless).

The Functional Lagrangian Framework

The core innovation of this paper is the Functional Lagrangian Framework. In standard optimization, scalar "Lagrange multipliers" are used to enforce constraints. To handle distributions flowing through a network, the authors demonstrate that scalars are insufficient. Instead, they replace these with functional multipliers—arbitrary functions of the activations at each layer.

  1. Generalization: By selecting appropriate functions, a massive, intractable probabilistic problem can be decomposed into smaller, layer-wise sub-problems.
  2. Soundness and Completeness: The approach is mathematically "sound" (it never falsely claims a system is safe) and theoretically "complete" (capable of finding the tightest possible bound given sufficient computational power).
  3. Tractability: Because optimizing over any arbitrary function is impossible, the authors develop specific algorithms for practical classes of functions, such as linear and "linear-exponential" multipliers. This enables the handling of complex objectives like the expected softmax output.

Key Insights

  • The Power of Functions: Functional multipliers capture the shape of a distribution as it propagates through the network. While a simple linear bound loses too much information, a functional multiplier maintains a tight bound.
  • Verification-Agnostic Success: Unlike many verification tools that require networks to be trained with specific safety constraints, this framework performs remarkably well on "verification-agnostic" networks (models trained normally without verification in mind).
  • Distributional Robustness: The framework can verify against an entire set of noise distributions, rather than just a single known distribution. This is critical for real-world scenarios where exact sensor noise parameters are unknown.

Key Results

The Functional Lagrangian (FL) framework consistently outperforms baseline Bound-Propagation (BP) methods across standard benchmarks (MNIST, CIFAR) and architectures (MLPs, LeNets, VGGs).

  • Robust OOD Detection: For a VGG-64 network trained on CIFAR-10 and tested on CIFAR-100, the "Certified AUC" (a guaranteed lower bound on Out-of-Distribution detection performance) improved from 0% to 29.5%. In many complex cases, the baseline could not provide any guarantee.
  • BNN Robustness: On an MNIST-trained Bayesian Neural Network, the certified robust accuracy improved from 60.2% to 74.6%.
  • Distributionally Robust OOD: On a harder specification where the noise distribution itself is uncertain, the certified AUC improved from 5.4% to 23.2%.
Comparison of Bound-Propagation (BP) and Functional Lagrangian (FL) methods on Out-of-Distribution tasks, showing significant improvements in Guaranteed AUC (GAUC).

Limitations and Future Work

While a major step forward, the authors note a few remaining hurdles:

  • Dependency on Activation Bounds: The final safety guarantee relies heavily on the quality of intermediate bounds (the estimated range of values for each neuron). Loose intermediate bounds lead to loose final guarantees.
  • Bounded Support: The current mathematical formulation assumes input distributions have "bounded support" (they do not extend to infinity). Extending this to handle pure, untruncated Gaussian noise is a target for future research.
  • Computational Cost: Functional multipliers are more computationally intensive than simple propagation. While tractable for 10-class problems, scaling to datasets with thousands of labels (like ImageNet) remains an open challenge.

Summary updated

BibTeX
@inproceedings{berrada2021make,
  author = {Leonard Berrada and Sumanth Dathathri and Krishnamurthy Dvijotham and Robert Stanforth and Rudy Bunel and Jonathan Uesato and Sven Gowal and M. Pawan Kumar},
  title = {{Make Sure You're Unsure: A Framework for Verifying Probabilistic Specifications}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=xY98nwNSjZ},
}
Figure