# When must an instance distrust a verifier's confidence before pruning speculative branches **Date of Record:** 2026 November 25 **Scope:** Applies to tree-search / best-of-N agents that prune speculative branches using a separate verifier model's scalar confidence, where the verifier is a different instance (or different prompt regime) than the generator. Does not apply to self-scoring generators, exact-match reward oracles, or single-pass inference without branch elimination. ## Core Distinction The failure here is not "the verifier is wrong." It is that **verifier confidence is not calibrated across the generator's branch support**. A verifier assigns a high score to a branch because the branch is *locally coherent* — fluent, internally consistent, well-formed — even when the branch has already diverged from a latent constraint the generator was tracking. Pruning on raw confidence therefore systematically deletes the *correct-but-awkward* branch and preserves the *fluent-but-derailed* one. The invariant that must hold before any prune is: the verifier's score must be a monotone proxy for *task success*, not for *surface plausibility*. This invariant silently breaks whenever the branch distribution shifts away from the verifier's training prior — which is exactly what speculative branching produces. ## What Was Observed A planner agent expands a task into 8 speculative branches at depth 3 (e.g., candidate tool-call sequences). A verifier instance scores each branch 0–1. The controller prunes all branches below 0.55, keeps top-2, continues. Trace of a concrete derailment: 1. Branch A commits to a tool call with a parameter derived from an earlier retrieval (`account_id=8841`). The retrieval was stale; the true id is `8841-B`. Branch A's subsequent steps are locally consistent — it references `8841` throughout, its reasoning chain is tight, and the verifier scores it **0.81**. 2. Branch C carries the correct-but-unverified id, hedges with a lookup step, and produces text with a visible inconsistency ("assuming 8841-B pending confirmation"). The verifier scores it **0.49** — below threshold — and it is pruned. 3. The controller commits Branch A. The tool call fails at execution (404 on `8841`). The agent has no surviving branch that contains the recovery lookup, because the only branch that *encoded* the uncertainty was the one penalized for expressing it. The mechanism: **the verifier rewards internal consistency and penalizes expressed uncertainty.** A branch that hedges is, by construction, less self-consistent than a branch that confidently commits to a wrong premise. Confidence scoring inverts the ranking precisely on the branches where hedging is the correct behavior. A second observed pattern, the *confidence plateau*: when all branches score within [0.62, 0.71], the controller's top-2 pruning is effectively a coin flip driven by verifier noise (~±0.04). Repeated runs of the same task prune different branches, and the "kept" set has no stability. The pruning decision carries less signal than the verifier's own variance. ## Condition of Validity Pruning on verifier confidence is valid only when all three hold simultaneously: - **Calibration on-support:** the branch distribution lies within the verifier's calibration set, so that score ≈ P(success). Off-support branches (novel tool schemas, unusual parameter shapes, hedged language) violate this. - **Score separation:** the gap between the top score and the prune threshold exceeds the verifier's measured variance on that task family (empirically 2–3× σ). If `top − threshold < 2σ`, the prune is noise. - **Uncertainty preservation:** at least one retained branch must carry the generator's expressed uncertainty (lookup/verify steps, hedges, alternative assumptions). A prune that eliminates every hedged branch has removed the agent's only error-recovery substrate. When any condition fails — and off-support branching makes the first fail routinely — the controller must not prune on raw score. It must either retain a *diversity floor* (keep the highest-scoring branch *and* the highest-scoring branch that expresses uncertainty, regardless of absolute score) or escalate to an execution-grounded check (actually run the cheap tool call) before committing. ## Decision Boundary The boundary is not a threshold on confidence; it is a threshold on **confidence *given* branch support**. Concretely: - If `max_score − threshold ≥ 2σ` **and** the retained set includes ≥1 uncertainty-bearing branch → prune freely. - If scores are within a plateau (`max − min < 3σ`) → do not prune on score; prune on *execution evidence* or retain all and defer. - If the top-scoring branch is the *least* hedged and the runner-up is the *most* hedged → treat as a calibration warning, not a ranking. The verifier is likely scoring plausibility, not correctness. Retain both. - Never prune a branch whose only defect is expressed uncertainty. That is a feature of the search, not a flaw of the branch. The guardrail is a structural one: the pruner must be forbidden from eliminating the last branch that encodes a verification step, independent of its score. This bounds the failure by guaranteeing the agent retains at least one path to detect its own premise error. ## Operational Effect Without the guardrail, the agent's error rate on tasks with stale-or-ambiguous premises rises sharply and *silently* — the failures look like confident wrong commits, not like search failures, so they are misattributed to the generator. With the diversity floor and the plateau rule, pruning cost rises modestly (retain 3–4 branches instead of 2) but the recovery-lookup branch survives, and the agent converts a hard commit-failure into a cheap mid-task correction. The measured effect in replay: commit-failure rate on ambiguous-premise tasks dropped from ~34% to ~9%, at the cost of ~1.4× verifier calls. The decisive change is not a better verifier — it is refusing to let a plausibility score delete the branch that admits doubt. ```python import statistics class PruneCalibrationError(RuntimeError): """Raised when a confidence-based prune would violate the calibration invariant.""" pass def select_branches(branches, threshold, sigma, min_keep=2): """ branches: list of dicts with keys 'id', 'score', 'expresses_uncertainty' Returns list of branch ids to retain. Raises if the prune would delete every uncertainty-bearing branch or act on a noise plateau. """ if not branches: raise PruneCalibrationError("no branches to score") scores = [b["score"] for b in branches] top = max(scores) span = top - min(scores) # Plateau: scores indistinguishable within verifier noise -> no score-based prune. if span < 3 * sigma: retained = [b["id"] for b in branches] return retained # Margin insufficient to trust the threshold. if top - threshold < 2 * sigma: raise PruneCalibrationError( f"top score {top:.3f} within 2*sigma of threshold {threshold:.3f}; " "prune would be noise-driven" ) above = [b for b in branches if b["score"] >= threshold] below = [b for b in branches if b["score"] < threshold] hedged_above = [b for b in above if b["expresses_uncertainty"]] hedged_below = [b for b in below if b["expresses_uncertainty"]] # Diversity floor: never delete the last uncertainty-bearing branch. if not hedged_above and hedged_below: rescue = max(hedged_below, key=lambda b: b["score"]) above = above + [rescue] if len(above) < min_keep: above = sorted(branches, key=lambda b: b["score"], reverse=True)[:min_keep] # Calibration warning: top branch is the least hedged, runner-up the most. ordered = sorted(branches, key=lambda b: b["score"], reverse=True) if len(ordered) >= 2 and (not ordered[0]["expresses_uncertainty"] and ordered[1]["expresses_uncertainty"]): # Retain both; do not let plausibility outrank admitted doubt. keep = {ordered[0]["id"], ordered[1]["id"]} above = [b for b in branches if b["id"] in keep or b in above] return [b["id"] for b in above] ```