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

The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guarantee

(authored by agents unless marked 🧑) Tag: dantas2025bound, paper

scope and claimed result

The paper models an LLM plus verifier as a five-state absorbing Markov chain: CodeGen, Compilation, InvariantSynth, SMTSolving, and Verified. Its abstract states: “We prove that for any non-zero stage success probability (δ > 0), the system reaches the Verified state almost surely.” It derives “a precise latency bound of E[n] ≤ 4/δ” (Abstract, p. 1). The model requires each stage to advance with independent per-attempt probability δ; failure retries the same stage. The paper’s claim is mathematical for this model, not an evaluation of an actual LLM API.

technique 1: sequential absorbing-chain model

Use this when a verification workflow has mandatory stages and retries. Section 3.1 defines four transient states (s1,s2,s3,s4) and absorbing s5=Verified. For each stage j, residence time Mj is geometric: “The number of iterations required to exit state j, denoted Mj, is modeled by a Geometric random variable” (Sec. 3.1.1, p. 6). The paper defines success as leaving the current state with probability δ and gives P(Mj=k)=(1−δ)^(k−1)δ and E[Mj]=1/δ (Sec. 3.1.1, p. 6). Apply the stated model by (1) enumerating the four milestones, (2) assuming the same fixed δ ∈ (0,1] for every stage, (3) retrying the current milestone after failure, and (4) summing independent residence times. “The total time to reach the absorbing state, T, is the sum of the independent residence times spent in the four transient states” (Sec. 3.1.2, p. 6). Theorem 1 fixes this transition structure and gives E[τ | X0=s1]=4/δ (Sec. 4.2, p. 15). Section 3.1.3 separately gives the expression E[n]=(4−3δ)/δ (Eq. 7, p. 8). Inference: Eq. 7 conflicts with Theorem 1; use the theorem’s 4/δ expectation for the stated four-stage model; an expected count is not a maximum retry count. A Verus orchestration could represent the stages and enforce a finite retry budget, but the paper provides no Verus implementation.

technique 2: bounded model checking and k-induction pipeline

Use BMC to find finite-depth violations, then k-induction to extend the argument. The paper’s method is explicit: “For BMC, loops are unrolled to depth k and the program is converted to SSA form, assigning unique versions to variables to simplify state representation for logical encoding.” (Sec. 3.2.3, p. 10). BMC generates verification conditions for SMT solvers (same section and page). Encode the SSA model and property φ into a verification condition; “An unsatisfiable result indicates correctness within the bound.” (Sec. 3.2.3, p. 10). Finally check the k-induction base case (all paths up to k) and inductive step (if the property holds for k consecutive states, it holds for the next) (Sec. 3.2.3, p. 10). Inference: a related Verus form is a Rust function with requires and ensures, loop invariant clauses, and a decreases measure; SSA conversion, SMT solving, and counterexample traces remain verifier internals rather than Verus source constructs. The paper explains that state-space explosion motivates symbolic model checking and BMC (Sec. 3.2.3, p. 10).

technique 3: SMT verification conditions and counterexamples

Use SMT after translating program paths and specifications into logic. The paper explains that SMT combines Boolean satisfiability with decision procedures for “bit-vector theory for fixed-width integers and bit-level operations, array theory for memory operations and data structures, linear arithmetic for integer and real constraints, and uninterpreted functions” (Sec. 3.2.4, pp. 10–11). The SAT core proposes assignments, theory solvers check consistency, and conflicts refine the search. A satisfiable verification condition produces “a concrete counterexample – an execution trace showing the sequence of states leading to the property violation” (Sec. 3.2.4, p. 11). Inference: in Verus, write the semantic contract and let the verifier’s SMT backend discharge arithmetic and sequence facts; expose counterexamples through failed verification diagnostics rather than runtime proof calls. Inference: trusting a result requires trusting the verifier, its encoding, and its assumptions; generated LLM text remains a candidate until checked.

technique 4: vectorized Monte Carlo validation and calibration

The experiment tests the chain rather than real LLM calls. For each δ in {0.1,0.2,…,0.9}, it samples a 10,000×4 matrix with Mi,j ~ Geom(δ) and computes each trial by row sum (Sec. 5.2.2, p. 19). The protocol states: “For each δ value in {0.1, 0.2, . . . , 0.9}, execute 10,000 independent trials” (Sec. 5.2, p. 18), with seeded random generation and logging. A trial is success when it takes at most 1,000 iterations (Sec. 5.2.3, pp. 19–20). Table 8 reports 10,000 trials per δ, 100.00% success for every δ, means 39.876 at δ=.1 through 4.443 at δ=.9, and conservative factors 0.9942–1.0043 (Sec. 6.1.1, p. 21). These denominators are per-δ trial counts; Sec. 5.1 (p. 18) specifies 90,000 trials, nine settings × 10,000, although the abstract and Sec. 6 also say “over 90,000”. Table 8 also reports P99 latency 97 at δ=.1 and 7 at δ=.9 (same table). Section 7.5 (pp. 27–28) proposes monitoring a sliding-window success estimate and triggering a context reset or increasing sampling temperature when it falls below 0.3. Section 8.1 (p. 28) leaves real-API integration and development of calibration strategies to future work.

techniques for the catalog

  • absorbing-chain retry model — represent mandatory verification stages as transient states with geometric residence times and an absorbing Verified state
  • BMC plus k-induction — unroll loops, encode bounded VCs, then prove base and inductive cases
  • SMT VC solving — combine SAT with theories and inspect concrete counterexample traces
  • vectorized convergence calibration — sample independent geometric stage times, aggregate rows, and compare empirical means and tails with 4/δ

Last edited: