Anytime Bounds for Formal Verification

29 concepts19 papers1 proposal

Formal verification aims to prove that a system—whether a deep neural network, a tree ensemble, or a complex decision-making policy—behaves safely under all possible conditions. However, exact verification is notoriously difficult, often scaling exponentially with model size or state space complexity.

Traditional exact solvers suffer from an "all-or-nothing" limitation. As Matt Jordan notes in Provable Certificates for Adversarial Examples: Fitting a Ball in the Union of Polytopes., if an exact computation runs out of time or exceeds its memory budget, it terminates without providing any intermediate safety guarantees. In real-time or safety-critical applications, a timeout is functionally equivalent to a complete failure to certify safety.

To bypass this bottleneck, a powerful paradigm has emerged: anytime verification. Instead of waiting for a single, exact answer, anytime algorithms maintain a running interval of valid mathematical bounds. If you stop the algorithm after a few milliseconds, it provides a conservative but mathematically sound guarantee. If you let it run longer, those bounds progressively tighten toward the exact solution.

The Mechanics of Dual Optimization

How can an algorithm provide a valid mathematical guarantee before it finishes exploring a search space? The secret lies in optimization theory, specifically dual formulations and relaxations.

Consider verifying the adversarial robustness of a neural network. We want to find the minimum perturbation required to alter the network's output. Instead of solving this non-convex, intractable problem directly, we can look at its dual problem. In A Dual Approach to Scalable Verification of Deep Networks, Krishnamurthy Dvijotham et al. demonstrated that any feasible solution to the dual problem provides a guaranteed lower bound on the true objective. By iteratively optimizing the dual objective, the solver generates bounds that are valid at any point during execution and monotonically tighten over time.

To make this approach viable for large networks, Rudy Bunel et al. introduced a Lagrangian Decomposition framework in Lagrangian Decomposition for Neural Network Verification. By splitting variables across layers, the authors turned the global verification problem into highly parallelizable subproblems. Because it relies on iterative dual optimization, it retains the anytime property, allowing branch-and-bound frameworks to rapidly prune away safe regions of the search space long before full convergence is reached.

Sandwiching the Truth

For many verification tasks, tracking a single bound is insufficient; we want to "sandwich" the true value between a lower and an upper bound. This dual-bound approach provides a clear window of uncertainty.

[Lower Bound: Proven Safe Region]  ≤  (True Value)  ≤  [Upper Bound: Best Discovered Attack]
               └─── Progressively Tightens Over Time ───┘

Take the example of verifying tree-based models. In Versatile Verification of Tree Ensembles, Laurens Devos et al. designed an anytime search strategy that maintains an evolving pair of bounds. The upper bound is maintained via a search heuristic (representing the best theoretical safety margin), while the lower bound is derived from concrete counter-examples (actual adversarial inputs found during the search). If the algorithm is cut short, the user still receives a valid confidence interval and actionable counter-examples.

Similarly, in the natural language domain, Siqi Sun et al. developed an anytime framework in TextVerifier: Robustness Verification for Textual Classifiers with Certifiable Guarantees to sandwich the maximal safe radius of a text classifier. As the algorithm progresses, the gap between the proven safe radius (lower bound) and the smallest discovered attack (upper bound) converges. This allows practitioners to obtain a "best-so-far" certificate under strict time constraints.

From Deterministic Safety to Probabilistic Guarantees

The anytime bounding principle extends naturally from deterministic models to probabilistic systems, such as Markov Decision Processes (MDPs) and Large Language Models (LLMs). Here, instead of bounding a physical distance or a loss value, the algorithm bounds probabilities or expected rewards.

In probabilistic verification, algorithms like value iteration traditionally only guarantee convergence in the limit. To transform this into a reliable verification tool, Edon Kelmendi et al. introduced a method in Value Iteration for Simple Stochastic Games: Stopping Criterion and Learning Algorithm to compute simultaneous lower and upper bounds on a game's value. This turns value iteration into an anytime algorithm with an explicit stopping criterion: once the gap between the bounds falls below a desired precision threshold, the algorithm terminates with a guaranteed error margin.

When the underlying system model is unknown or too complex for exact computation, researchers turn to statistical verification. In PAC Statistical Model Checking for Markov Decision Processes and Stochastic Games, Pranav Ashok et al. developed anytime Probably Approximately Correct (PAC) guarantees. By processing simulation samples iteratively, the authors' approach maintains a valid confidence interval at any point, with the error margin shrinking as more data arrives. This concept was expanded to long-run average rewards by Chaitanya Agarwal et al. in PAC statistical model checking of mean payoff in discrete- and continuous-time MDP, providing flexible trade-offs in resource-constrained scenarios.

Even for generative models like LLMs, this intuition holds. In BEAVER: An Efficient Deterministic LLM Verifier, Tarun Suresh et al. developed a framework that computes deterministic, sound probability bounds on whether an LLM's output satisfies specific constraints. By pruning the massive token search space and updating bounds iteratively, it delivers rigorous reliability guarantees even if the search process is interrupted mid-way.

The Power of Flexible Budgets

Anytime verification works because it reframes verification from a binary question ("Is this system safe?") into an optimization problem ("How safe can we prove this system is given our current resources?").

By leveraging dual optimization, tree search heuristics, and interval tracking, these methods ensure that computational effort is never wasted. Whether applied to geometric transformations (Fu Wang et al. in Towards Verifying the Geometric Robustness of Large-Scale Neural Networks), hierarchical models (Sebastian Junges et al. in Abstraction-Refinement for Hierarchical Probabilistic Models), or global reachability analysis (Chi Zhang et al. in Model-Agnostic Reachability Analysis on Deep Neural Networks), anytime bounds bridge the gap between theoretical soundness and real-world computational constraints.

Key Foundational Work

Monte Carlo Tree Search for Verifying Reachability in Markov Decision Processes (2018) — contributed 2 concept elements to this direction.
A Dual Approach to Scalable Verification of Deep Networks (2018) — contributed 1 concept elements to this direction.
A game-based approximate verification of deep neural networks with provable guarantees (2018) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_anytime_verification_bounds_d97a3181,
  title = {anytime verification bounds},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/anytime-verification-bounds/rdr_d97a3181793b4e5889bf13cfadd9ef74},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_anytime_verification_bounds_d97a3181_v1,
  title = {anytime verification bounds},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/anytime-verification-bounds/rdr_d97a3181793b4e5889bf13cfadd9ef74/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake