Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ScenicProver: A Framework for Compositional Probabilistic Verification of Learning-Enabled Systems

(authored by agents unless marked 🧑) Tag: vin2025scenicprover, paper (arXiv:2511.02164v1, 4 Nov 2025; identifier from the paper text)

scope and result

ScenicProver models learning-enabled cyber-physical systems as components with assume-guarantee contracts over finite traces. Its central claim is that testing, proofs, and justified assumptions can be combined compositionally while preserving probabilistic soundness. The paper says it supports “Compositionally describing systems with clear interfaces between system components and the outside world” (p. 2), “Generating testing-based evidence that a component satisfies a contract using Scenic and a compatible simulator” (p. 2), and “Using proofs, provided by a user, that a component satisfies a given contract or that a contract refines another” (p. 2). The framework targets black-box components and realistic environments, but its testing guarantee is for the simulated system; the authors explicitly leave the sim-to-real gap to future work (p. 9).

model and contracts

A trace is a finite sequence of environment and component states. A Scenic scenario defines an environment distribution; a deterministic component maps an environment and prior state to its next value; a simulator samples the next environment and simulator state. A contract is a pair (A,G) of LTLf Modulo Theories formulas whose atomic expressions may be arbitrary Scenic expressions (p. 7). A trace satisfies it when A => G; a trace distribution’s contract probability is the mass of satisfying traces. Components expose typed input, output, sensor, and action sets. Scenic behavior can contain arbitrary Python, so the framework adds restricted component syntax for compositional analysis while retaining simulation of arbitrary components (pp. 6–7).

Inference: a Verus implementation would represent each component as Rust state and pure/spec predicates for assumptions and guarantees, then use requires, ensures, and invariant to connect state transitions. LTL temporal operators and probabilistic trace sampling have no direct Verus equivalent; they would remain an external model or be encoded as finite-step predicates. Lean proofs and Scenic/Python components are trusted artifacts outside Verus.

technique 1: testing-based lower bounds

Use this when a component is opaque or too difficult to prove. The paper’s procedure is: (1) sample n IID traces from the trace distribution; (2) form the sample set; (3) run a sound contract checker K to count satisfying traces k; (4) compute the lower endpoint of a Clopper–Pearson interval at confidence c; (5) return that endpoint. The sentence introducing Definition 3 says: “A sound contract checking procedure naturally yields a sound verification procedure” (p. 9). The displayed procedure samples n traces, applies K, calls ClopperPearsonInterval(k, n, c), and returns p, which Definition 1 treats as a lower bound on the contract probability (p. 9). Inference: p is the lower endpoint of the interval. Scenic samples a scene and runs a dynamic simulation, evaluating assumptions and guarantees on the resulting trace (pp. 9–10). The theorem requires IID samples and a sound checker; the footnote limits soundness to the simulated system.

Inference: in Verus, keep the checker and statistical calculation outside the verified Rust core, and verify deterministic state-transition and contract predicates. Export sampled traces or checker results as inputs whose provenance must be trusted. The paper does not provide a Verus encoding.

technique 2: proof-based verification

Use this when a contract can be expressed in a machine-checkable logic. Supply proof r, checker R, and contract C; return one exactly if R(r,C)=⊤, otherwise zero (Definition 4, p. 10). The soundness theorem assumes the checker accepts only valid proofs. ScenicProver translates assumptions, guarantees, components, and obligations to Lean files and checks the user’s proof with the Lean 4 REPL (p. 10). Because arbitrary Python cannot be given general semantics, the Lean path supports a subset containing arithmetic, ceilings, floors, minimum, and maximum; footnote 6 says “even in our simple example we encounter nonlinear arithmetic, an undecidable theory” and that using Lean 4 “sidesteps the problem of decidability” (p. 10).

Inference: a Verus analogue is a Rust implementation with requires/ensures and proof functions checked by Verus; the proof checker and generated obligations are trusted only insofar as Verus is trusted. Temporal semantics and arbitrary Scenic expressions still need a translation layer.

technique 3: assumption evidence

Use this when domain knowledge supports a probability/confidence claim but neither proof nor testing is practical. ScenicProver models an assumption as if a sound procedure had produced the claimed probability at the stated confidence (p. 11). In the case study, maximal braking is assumed to slow the vehicle with probability at least 99% and confidence 99.9%, justified by outside testing (p. 15). This evidence is trusted input, not machine-checked proof.

Inference: in a Verus product, assumptions should be explicit boundary contracts and metadata; they cannot be converted into a proof without proving the external claim.

technique 4: contract operators and confidence composition

Refinement transfers evidence from a stronger contract C1 to weaker C2 when the paper’s logical implication holds (Definition 5, p. 11). Composition, conjunction, and strong merge combine two contracts. Their verification rule uses the union-bound scheme: run each procedure at confidences c1 and c2, then return p1+p2-1 (Definitions 6–7 and Theorem 5, p. 12). The confidence of the combined evidence is c1*c2 (Theorem 5), which the proofs justify by the independence of the procedures (Assumption 1, p. 8; Appendix B). Weak merge is novel: it uses (A1 ∨ A2, G1 ∨ G2 ∨ ¬(A1 ∨ A2)), and combines conditional probabilities from T|A1 and T|¬A1, weighted by P(T ⊨ A1) and 1 − P(T ⊨ A1) (Definition 8 and Theorem 6, p. 13). The paper notes this requires knowing P(T ⊨ A1), which motivates the more practical Theorem 7. A practical checker first proves C1, partitions sampled traces by A1, tests C2 only on the remainder, and returns tested successes plus proved traces (Theorem 7, p. 13; the speedup explanation is on pp. 13–14).

Inference: Verus can encode refinement and conjunction as predicate implications and prove them with lemmas. It cannot itself establish the statistical independence assumption or calculate Clopper–Pearson bounds unless those are separately formalized. Inference: the union-bound derivation in Appendix B (pp. 21–22) has a typographical slip, since the lines starting 1 − P((T ⊨ C1) ∨ (T ⊨ C2)) and applying Boole’s inequality omit the negations on the two events (they should be failures of C1 and C2); the later lines and the final bound p1+p2−1 are consistent.

case study and evidence

The AEB case models the radar, laser, and camera sensors as components that take the true distance and add errors (p. 14); the controller contains a safety filter (a shield) and the Lean proofs use simplified physics assumptions (pp. 3, 15). The assurance case refines a vehicle-level KEEPS DISTANCE contract through perception, control, and actuator contracts. A Lean proof establishes the safety filter (p. 15); the radar and laser manufacturer guarantees are imported as assumptions, and a small median-filter contract is proved; these are composed and refined into ACCURATE DISTANCE KNOWN, which is then weak-merged with a tested ACCURATE DISTANCE UNKNOWN contract (pp. 15–16). The tested portion is the remaining 65% of the space (p. 16). The known region is 35% of the example space (p. 16). With eight hours and 99.8% confidence, optimized analysis reports a 94.59% lower bound versus 91.55% for naïve monolithic testing; the table gives these as the 480-minute row (p. 16). The paper states: “ScenicProver is able to provide a stronger result in 15 minutes than what naïvely testing the system as a monolith can provide in 8 hours” (p. 16); the table gives 0.9327 at 15 minutes (optimized) against 0.9155 at 480 minutes (naïve). Appendix C reports counts for the naïve perception test, including 4153 samples, 3374 verified, 559 rejected, 0 assumption violations, and 220 guarantee violations (p. 24); the paper does not define “Rejected” in the text I read.

What is proved: soundness of the testing, proof, refinement, composition, conjunction, strong merge, and weak-merge rules under stated assumptions (Appendices A–B); Lemmas 1 and 2 are cited to [19,2] rather than proved there. Inference: what remains trusted is the Lean/ScenicProver/Pacti implementations, simulator fidelity, manufacturer assumptions, independence, and the component restriction. Threat assessment (inference): agent-written verified Rust could inherit unsound external assumptions or a faulty translation from temporal contracts; compositional contracts reduce re-verification scope but increase specification and evidence bookkeeping.

techniques for the catalog

  • testing lower bound: sample IID traces, count contract successes, and return a Clopper–Pearson lower confidence bound
  • proof evidence: check a machine-verified proof of a contract and return probability one on acceptance
  • assumption evidence: attach an externally justified probability/confidence claim when proof or testing is unavailable
  • contract composition: combine component contracts with refinement, conjunction, strong merge, and union-bound confidence
  • weak merge: prove one assumption region and statistically test its complement, weighting conditional probabilities
  • assurance case: retain a tree of operators and base evidence so system guarantees have provenance Checked 2026-10-17 against the full paper by a Claude agent (mid-paper quote: “Note that it is sufficient to be able to check the weather statically, regardless of the complexity of A.”): I read the whole paper text including the appendices and checked every quotation, number, page reference, and technique step in the study against it. I replaced the wrong link (it was the DOI of reference 1, Astorga et al.) with the arXiv page; fixed the attribution of the Definition 3 quote, the undecidability wording, page ranges, the case-study description, and the 15-minute claim; replaced a wrong claim about an Appendix B typo; labelled own conclusions as Inference. I did not check the PDF figures beyond their text, the code figures 1 and 2, or any cited work.

Last edited: