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

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

18 Feb 2021NeurIPS 2021 12arXiv:2102.09479archive 2025-07-28

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

Most real world applications require dealing with stochasticity like sensor noise or predictive uncertainty, where formal specifications of desired behavior are inherently probabilistic. Despite the promise of formal verification in ensuring the reliability of neural networks, progress in the direction of probabilistic specifications has been limited. In this direction, we first introduce a general formulation of probabilistic specifications for neural networks, which captures both probabilistic networks (e.g., Bayesian neural networks, MC-Dropout networks) and uncertain inputs (distributions over inputs arising from sensor noise or other perturbations). We then propose a general technique to verify such specifications by generalizing the notion of Lagrangian duality, replacing standard Lagrangian multipliers with "functional multipliers" that can be arbitrary functions of the activations at a given layer. We show that an optimal choice of functional multipliers leads to exact verification (i.e., sound and complete verification), and for specific forms of multipliers, we develop tractable practical verification algorithms. We empirically validate our algorithms by applying them to Bayesian Neural Networks (BNNs) and MC Dropout Networks, and certifying properties such as adversarial robustness and robust detection of out-of-distribution (OOD) data. On these tasks we are able to provide significantly stronger guarantees when compared to prior work -- for instance, for a VGG-64 MC-Dropout CNN trained on CIFAR-10, we improve the certified AUC (a verified lower bound on the true AUC) for robust OOD detection (on CIFAR-100) from 0% →29%. Similarly, for a BNN trained on MNIST, we improve on the robust accuracy from 60.2% →74.6%. Further, on a novel specification -- distributionally robust OOD detection -- we improve the certified AUC from 5% →23%.

PaperPDFConference PDFCodeMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Syntology holds a reference implementation of A Framework for Verifying Probabilistic Specifications, generated from the paper text (not the authors' code), at level 3 on Syntology's ladder: V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” (quoted from Syntology's server card). No rung compares this code against the authors' implementation. For agents: get_reference_implementation(name='A Framework for Verifying Probabilistic Specifications') (how to connect); the free check have('2102.09479') needs no token.

For agents, on Syntology's MCP service (how to connect):

Code

deepmind/jax_verify officialmentioned in papermentioned on GitHubjaxSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. For a generated assembly, an independent peer is a second implementation generated separately from the same paper text; neither implementation read the authors' code. At level 2 the two agreed numerically on the fixture's inputs; level 3 is recorded when property tests derived from the paper also passed on both, and each level 3 card prints how many its report lists. A generated assembly's label was set when its code was generated for the method, and no model judged it; its card prints it as "by construction" or "not judged by a model". Where an assembly's phrase has no constructed figure, a brick that ran is not among the harvested samples this build reads, and whether a brick's run only constructed an object is read from that brick's harvested sample, so the figure was not counted; it does not say there were none.

1 assembly on this paper: 0 harvested, 1 generated.

generated Assembly for A Framework for Verifying Probabilistic Specifications (graph method: A Framework for Verifying Probabilistic Specifications), generated from the paper text, not the repository's code. 1 brick; individually on a fixture: 1 ran (1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. Ran end-to-end against an independent peer (level 3; 5 property tests passed on both).

label matches by construction: the code was generated for this method (not judged by a model)

  1. softmax_objective entry · level 3 · ran · honoured contract · 7c202dc4e3619fb9265dccd20e9176da5480f705e7839a21d4a357a5cca1dd13

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2102.09479") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Adversarial RobustnessOut of Distribution (OOD) Detection

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Dropout

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections