Knowing When to Ask for Help: Bayesian Self-Escalation in Hierarchical LLM Agents
Summary
This paper introduces a Bayesian framework for hierarchical LLM agents to decide when to escalate to stronger models during reasoning, formulating it as an optimal-stopping problem and providing theoretical guarantees on performance.
View Cached Full Text
Cached at: 08/26/26, 09:33 AM
# Knowing When to Ask for Help:Bayesian Self-Escalation in Hierarchical LLM Agents
Source: [https://arxiv.org/html/2608.24087](https://arxiv.org/html/2608.24087)
## Knowing When to Ask for Help: Bayesian Self\-Escalation in Hierarchical LLM AgentsThanks:Version 1\.1\. Version 1 \(DOI:[10\.5281/zenodo\.21330788](https://doi.org/10.5281/zenodo.21330788)\) reported no real\-model results and pre\-registered an evaluation protocol in their place\. This version adds a first execution of that protocol on aQwen2\.5\-Coder1\.51\.5B→\\to77B code cascade \(Section[8](https://arxiv.org/html/2608.24087#S8)\), confirming two of its three predictions; the theoretical results are unchanged, and the constant\-threshold instantiation tested does not exercise the optimal\-stopping dynamic program\.
Nadeem ShaikhAffiliation:Independent ResearcherAffiliation:Melbourne, AustraliaEmail:[nadeem@nadeemshaikh\.net](mailto:)
August 25, 2026
###### Abstract
Current LLM agent systems decide delegation*before*reasoning begins \(a router picks a model\) or*after*a response is complete \(a verifier scores it and may retry\)\. We study a third regime: an agent that recognises,*during*its own reasoning, that it is unlikely to succeed and transfers control to a stronger model\. Our contribution is not the observation that agents can defer to other agents—that is well established—but a decision\-theoretic formulation of*intra\-generation*delegation as an optimal\-stopping problem over an online estimate of the agent’s eventual task success\. The junior agent maintains a*competence posterior*: an abstract Bayesian state whose sufficient statistics are*learned*from labelled trajectories, not read off raw entropy\. It escalates when the expected cost of continuing exceeds the expected cost of deferral\. We derive the myopic escalation threshold in closed form, characterise the optimal policy via dynamic programming, and prove—using monotonicity alone, without any concavity argument—that under a conditional\-independence signal model the optimal policy is a time\-varying threshold on the competence posterior, with no monotone\-likelihood or other shape assumption on the raw signal\. We further prove that the oracle belief separates at the Chernoff\-information rate of the signal, and give a finite\-sample guarantee: withnnlabelled calibration trajectories of lengthTT, the deployed plug\-in policy’s regret over the oracle isO\(LtlogK/\(nT\)\)O\\big\(Lt\\sqrt\{\\log K/\(nT\)\}\\big\)with high probability\. Our central message is a regret bound showing that excess cost is controlled by the*calibration*of that posterior: better calibration matters more than a smarter router, and “confidently wrong” predictions are the binding failure mode\. A simulation study with a known data\-generating process confirms each prediction of the theory\. A pre\-registered protocol yields falsifiable predictions; in this revised version we report a first execution of that protocol on aQwen2\.5\-Coder1\.51\.5B→\\to77B code cascade, confirming two of its three predictions: the escalation frontier dominates post\-hoc routing at equal cost, and the cumulative competence belief’s discrimination rises over the course of generation\. The theoretical results are unchanged\.
Keywords:LLM agents; hierarchical inference; model cascades; optimal stopping; uncertainty quantification; calibration; selective prediction; learning to defer\.
## 1Introduction
The economics of large language model \(LLM\) deployment increasingly favour*hierarchies*: a small, fast model handles the bulk of traffic while a larger, more capable—and considerably more expensive—model is invoked only when needed\. Model cascades and routers realise this idea and can cut inference cost by large factors without sacrificing quality\[[1](https://arxiv.org/html/2608.24087#bib.bib1),[19](https://arxiv.org/html/2608.24087#bib.bib19),[10](https://arxiv.org/html/2608.24087#bib.bib10)\]\. Almost all such systems, however, make the routing decision either*before*inference \(a router inspects the query and picks a model\) or*after*a full generation \(a verifier scores the completed output and may retry\)\. Neither option lets the working model notice, partway through a difficult chain of reasoning, that it has left the region of competence and should hand off\.
Many systems already let an agent hand work to another agent or to itself: self\-reflection and critic/debate models, verifier\-guided generation and best\-of\-nnreranking, speculative decoding with fallback, and adaptive\-compute and test\-time\-scaling methods all revisit or reallocate computation\. What is missing across these is a*principled, sequential*account of*when*, mid\-generation, to stop and defer\. We do not claim to introduce agent delegation\. We introduce adecision\-theoretic formulation of intra\-generation delegation in which escalation is an optimal\-stopping problem over an online estimate of eventual task success\. We refer to the mechanism asself\-escalation\.
A point we make central rather than incidental: the framework does*not*assume that raw uncertainty metrics are calibrated\. High entropy is not failure and low entropy is not correctness—a model can be confidently wrong\. The Bayesian state is therefore an*abstract competence posterior*whose sufficient statistics \(the mapping from a signal history to a probability of success\) are*learned from labelled trajectories*\. Per\-token entropy or the next\-token margin serve only as raw evidence into that learned map, never as the posterior itself\. This distinction is what makes the theory meaningful, and it turns out to be the crux: our main result is that the method’s cost is governed by how well that posterior is calibrated\.
#### Contributions\.
1. 1\.Formulation\.We cast intra\-generation self\-escalation as a Bayesian optimal\-stopping problem over the junior agent’s eventual success \(Section[3](https://arxiv.org/html/2608.24087#S3)\), separating a*learned*competence\-posterior component from the decision component\.
2. 2\.Policy and theory\.We derive the myopic escalation threshold in closed form, characterise the optimal policy via dynamic programming, and prove \(i\) that the competence posterior is a martingale, \(ii\) that the optimal policy is a time\-varying threshold—proved*via monotonicity alone, with no concavity argument and no monotone\-likelihood assumption on the raw signal*—\(iii\) a regret bound linking excess cost to posterior miscalibration, \(iv\) exponential separation of the oracle belief at the Chernoff\-information rate of the signal, and \(v\) a finite\-sample regret guarantee for the plug\-in policy, decaying as1/n1/\\sqrt\{n\}in the number of labelled calibration trajectories \(Sections[4](https://arxiv.org/html/2608.24087#S4)–[5](https://arxiv.org/html/2608.24087#S5)\)\.
3. 3\.Calibration as the binding constraint\.We elevate the regret bound to a design principle: for self\-escalation, improving the calibration of the competence posterior dominates improving the decision rule \(Section[5\.4](https://arxiv.org/html/2608.24087#S5.SS4)\)\.
4. 4\.Algorithm\.We give a streaming inference algorithm and an offline backward\-induction procedure for the threshold schedule, with a text\-level \(not hidden\-state\) context handoff \(Section[6](https://arxiv.org/html/2608.24087#S6)\)\.
5. 5\.Simulation, protocol, and real\-model validation\.On a model with a*known*data\-generating process we confirm each prediction of the theory \(Section[7](https://arxiv.org/html/2608.24087#S7)\); we pre\-register a falsifiable protocol \(Section[9](https://arxiv.org/html/2608.24087#S9)\); and we execute a first instance of it on aQwen2\.5\-Codercode cascade, confirming two of its predictions \(Section[8](https://arxiv.org/html/2608.24087#S8)\)\.
## 2Related Work
#### Selective prediction and learning to defer\.
The option to abstain rather than predict has a long history as*selective prediction*or classification with a reject option\[[2](https://arxiv.org/html/2608.24087#bib.bib2),[5](https://arxiv.org/html/2608.24087#bib.bib5),[6](https://arxiv.org/html/2608.24087#bib.bib6)\]\.*Learning to defer*generalises abstention by routing the rejected input to an external expert and learning the predictor and the deferral rule jointly\[[17](https://arxiv.org/html/2608.24087#bib.bib17),[18](https://arxiv.org/html/2608.24087#bib.bib18),[24](https://arxiv.org/html/2608.24087#bib.bib24)\]\. Our setting is an instance of deferral in which the “expert” is a stronger model, but with two differences that existing formulations do not address: the deferral decision is made*sequentially within a single generation*rather than once per input, and the object of the posterior is the junior model’s own eventual success rather than a label\.
#### Cascades and routing for LLMs\.
FrugalGPT introduced learned LLM cascades that query models in increasing order of cost and stop when a scorer judges the answer adequate\[[1](https://arxiv.org/html/2608.24087#bib.bib1)\]\. RouteLLM learns a router from preference data\[[19](https://arxiv.org/html/2608.24087#bib.bib19)\]; agreement\- and consistency\-based cascades escalate when cheap models disagree\[[10](https://arxiv.org/html/2608.24087#bib.bib10),[23](https://arxiv.org/html/2608.24087#bib.bib23)\]; and[Jitkrittum et al\. \[8\]](https://arxiv.org/html/2608.24087#bib.bib8)analyse when confidence\-based deferral in a cascade is and is not sufficient\. These methods act at the granularity of a whole response and typically require at least one completed cheap generation \(and often several samples\) before deciding\. Self\-escalation instead consumes the token\-level signal as it streams and can stop mid\-generation, trading a small amount of bookkeeping for the ability to abort a doomed trajectory early\.
#### Uncertainty quantification in LLMs\.
A large literature estimates LLM uncertainty from output distributions\. Semantic entropy clusters sampled generations by meaning and measures entropy over clusters, giving a strong hallucination signal\[[13](https://arxiv.org/html/2608.24087#bib.bib13),[3](https://arxiv.org/html/2608.24087#bib.bib3)\]; semantic\-entropy probes approximate this from a single forward pass’s hidden states\[[11](https://arxiv.org/html/2608.24087#bib.bib11)\]\. Most of this work targets*post\-hoc*detection on a completed generation\. We use such signals as the*evidence stream*of a sequential decision, and our framework is agnostic to which signal is used: token entropy, next\-token margin, a probe output, or semantic entropy can all serve as the per\-step observationete\_\{t\}\.
#### Self\-revision and adaptive computation\.
A separate line of work reallocates or revisits computation within a single system\. Adaptive computation time lets a network learn how many internal steps to spend per input\[[7](https://arxiv.org/html/2608.24087#bib.bib7)\]; early\-exit decoding such as CALM stops a token’s computation when intermediate confidence suffices\[[21](https://arxiv.org/html/2608.24087#bib.bib21)\]; speculative decoding drafts with a cheap model and verifies with an expensive one, falling back on disagreement\[[14](https://arxiv.org/html/2608.24087#bib.bib14)\]; self\-refinement iterates on a model’s own output with self\-feedback\[[16](https://arxiv.org/html/2608.24087#bib.bib16)\]; and test\-time\-scaling studies how to allocate extra inference compute optimally\[[22](https://arxiv.org/html/2608.24087#bib.bib22)\]\. These share our motivation—spend more effort only when needed—but they revise, rerank, or extend*the same*model’s computation rather than framing a sequential decision to hand off to a*stronger*model, and they generally lack an explicit stopping rule tied to a calibrated estimate of eventual task success\. Relatedly,[Kadavath et al\. \[9\]](https://arxiv.org/html/2608.24087#bib.bib9)show LLMs’ self\-evaluations of correctness carry real signal but are imperfectly calibrated—precisely the regime where Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)says the gains of self\-escalation are won or lost\.
#### Sequential testing\.
The oracle decision core of our problem is a finite\-horizon, cost\-asymmetric relative of Wald’s sequential probability ratio test, which continues sampling until the likelihood ratio exits an interval\[[25](https://arxiv.org/html/2608.24087#bib.bib25)\]and is optimal for the symmetric testing problem\[[26](https://arxiv.org/html/2608.24087#bib.bib26)\]\. We flag this plainly so the reader can locate the classical core: the stopping mathematics is not new\. What the classical theory does not supply—and where this paper works—is the formulation \(deferral to a stronger model as the stopping action, with compute and error costs\), the analysis when the likelihood ratio is*estimated*\(Sections[5\.4](https://arxiv.org/html/2608.24087#S5.SS4)–[5\.5](https://arxiv.org/html/2608.24087#S5.SS5)\), and the systems instantiation\.
#### Optimal stopping\.
The decision component is an optimal\-stopping problem\[[4](https://arxiv.org/html/2608.24087#bib.bib4),[20](https://arxiv.org/html/2608.24087#bib.bib20)\]: at each step, stop\-and\-defer or continue\-and\-observe\. We use standard monotone\-stopping arguments to establish the threshold structure of the optimal policy\. Our framing—an optimal\-stopping rule over a*learned*online estimate of the working model’s own eventual correctness, used to trigger escalation to a stronger model—combines these ingredients in a way we have not seen made explicit for LLM hierarchies, though we make no claim to the underlying stopping theory itself\.
## 3Problem Formulation
Consider a junior agentJJand a senior agentSS\. Given a queryxx, agentJJgenerates a response overTTsteps \(tokens or reasoning steps\)\. LetY∈\{0,1\}Y\\in\\\{0,1\\\}be the latent event thatJJ’s*completed*answer would be correct; writeπ=ℙ\(Y=1\)\\pi=\\mathbb\{P\}\(Y=1\)for the base competence ofJJon the query population\. At each stept∈\{1,…,T\}t\\in\\\{1,\\dots,T\\\}the agent emits a*competence\-evidence*signalet∈ℰe\_\{t\}\\in\\mathcal\{E\}\(a raw statistic such as normalised token entropy or the next\-token margin\)\. Letℱt=σ\(e1,…,et\)\\mathcal\{F\}\_\{t\}=\\sigma\(e\_\{1\},\\dots,e\_\{t\}\)and define the*competence posterior*
Bt=ℙ\(Y=1∣ℱt\)\.B\_\{t\}\\;=\\;\\mathbb\{P\}\(Y=1\\mid\\mathcal\{F\}\_\{t\}\)\.\(1\)
###### Assumption 1\(Conditional independence\)\.
Conditional onY=yY=y, the signals\(et\)t≤T\(e\_\{t\}\)\_\{t\\leq T\}are i\.i\.d\. with densityfyf\_\{y\}, andf0,f1f\_\{0\},f\_\{1\}have common support with finite log\-likelihood ratioλ\(e\)=logf1\(e\)f0\(e\)\\lambda\(e\)=\\log\\frac\{f\_\{1\}\(e\)\}\{f\_\{0\}\(e\)\}\. In practiceλ\\lambdais the learned statistic of Remark[1](https://arxiv.org/html/2608.24087#Thmremark1), not a closed\-form entropy transform\.
Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)is a modelling idealisation; real token signals are correlated and non\-stationary\. We adopt it to obtain a transparent update and discuss its relaxation in Section[10](https://arxiv.org/html/2608.24087#S10)\. Under Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)the belief evolves as a simple log\-odds recursion\.
###### Lemma 1\(Belief update\)\.
Letℓt=logBt1−Bt\\ell\_\{t\}=\\log\\frac\{B\_\{t\}\}\{1\-B\_\{t\}\}andℓ0=logπ1−π\\ell\_\{0\}=\\log\\frac\{\\pi\}\{1\-\\pi\}\. Thenℓt=ℓ0\+∑s=1tλ\(es\)\\ell\_\{t\}=\\ell\_\{0\}\+\\sum\_\{s=1\}^\{t\}\\lambda\(e\_\{s\}\)andBt=σ\(ℓt\)B\_\{t\}=\\sigma\(\\ell\_\{t\}\)withσ\(z\)=\(1\+e−z\)−1\\sigma\(z\)=\(1\+e^\{\-z\}\)^\{\-1\}\.
###### Proof\.
By Bayes’ rule and conditional independence,ℙ\(Y=1∣ℱt\)ℙ\(Y=0∣ℱt\)=π1−π∏s=1tf1\(es\)f0\(es\)\\frac\{\\mathbb\{P\}\(Y=1\\mid\\mathcal\{F\}\_\{t\}\)\}\{\\mathbb\{P\}\(Y=0\\mid\\mathcal\{F\}\_\{t\}\)\}=\\frac\{\\pi\}\{1\-\\pi\}\\prod\_\{s=1\}^\{t\}\\frac\{f\_\{1\}\(e\_\{s\}\)\}\{f\_\{0\}\(e\_\{s\}\)\}; taking logs gives the recursion, and inverting the log\-odds givesBt=σ\(ℓt\)B\_\{t\}=\\sigma\(\\ell\_\{t\}\)\. ∎
#### Costs and actions\.
Letκ\>0\\kappa\>0be the compute cost per junior step,γ\>0\\gamma\>0the one\-off cost of escalation \(senior compute plus added latency\), andL\>0L\>0the cost of a wrong final answer\. The senior returns a correct answer with probabilityq∈\(0,1\)q\\in\(0,1\), assumed \(for the base model\) independent ofℱt\\mathcal\{F\}\_\{t\}\. At each step the agent chooses an actionat∈\{continue,escalate\}a\_\{t\}\\in\\\{\\textsc\{continue\},\\textsc\{escalate\}\\\}\. Escalation is terminal and handsSSthe query together with a distilled context; if the agent never escalates it answers locally at stepTT\. A policyρ\\rhomapsℱt\\mathcal\{F\}\_\{t\}to actions; we seekρ\\rhominimising the expected total cost
𝒞\(ρ\)=𝔼\[κτstop⏟junior compute\+γ1\{escalate\}⏟deferral\+L1\{final answer wrong\}⏟error\],\\mathcal\{C\}\(\\rho\)=\\mathbb\{E\}\\\!\\left\[\\underbrace\{\\kappa\\,\\tau\_\{\\mathrm\{stop\}\}\}\_\{\\text\{junior compute\}\}\+\\underbrace\{\\gamma\\,\\mathbf\{1\}\\\{\\text\{escalate\}\\\}\}\_\{\\text\{deferral\}\}\+\\underbrace\{L\\,\\mathbf\{1\}\\\{\\text\{final answer wrong\}\\\}\}\_\{\\text\{error\}\}\\right\],\(2\)whereτstop\\tau\_\{\\mathrm\{stop\}\}is the number of junior steps taken before stopping\.
## 4The Escalation Policy
### 4\.1Myopic threshold
Consider the decision at stepttwith beliefb=Btb=B\_\{t\}, comparing immediate escalation against*finishing locally*\. The forward cost of escalating isγ\+\(1−q\)L\\gamma\+\(1\-q\)L\(sunk junior steps are ignored\)\. The forward cost of continuing to completion is\(T−t\)κ\+\(1−b\)L\(T\-t\)\\kappa\+\(1\-b\)L\. Escalation is preferred iff
γ\+\(1−q\)L<\(T−t\)κ\+\(1−b\)L\.\\gamma\+\(1\-q\)L\\;<\\;\(T\-t\)\\kappa\+\(1\-b\)L\.\(3\)Rearranging isolates a belief threshold\.
###### Proposition 1\(Myopic escalation threshold\)\.
Under the “finish locally” comparison, escalate at stepttiffBt<τtmyoB\_\{t\}<\\tau\_\{t\}^\{\\mathrm\{myo\}\}, where
τtmyo=q−γL\+\(T−t\)κL\.\\tau\_\{t\}^\{\\mathrm\{myo\}\}\\;=\\;q\-\\frac\{\\gamma\}\{L\}\+\\frac\{\(T\-t\)\\kappa\}\{L\}\.\(4\)In particularτTmyo=q−γ/L\\tau\_\{T\}^\{\\mathrm\{myo\}\}=q\-\\gamma/L, andτtmyo\\tau\_\{t\}^\{\\mathrm\{myo\}\}decreases intt\.
Equation \([4](https://arxiv.org/html/2608.24087#S4.E4)\) is interpretable: one escalates more readily when the senior is reliable \(largeqq\), when errors are costly \(largeLL\), and when escalation is cheap \(smallγ\\gamma\)\. The term\(T−t\)κ/L\(T\-t\)\\kappa/Lsays that with many tokens still to pay for, local completion looks relatively expensive, nudging the threshold up\.
### 4\.2Optimal stopping
The myopic rule ignores the*option value*of continuing: another token yields fresh evidence that may resolve the uncertainty without paying for escalation\. The optimal policy is the solution of the dynamic program with value functionVt\(b\)V\_\{t\}\(b\)equal to the minimal expected cost\-to\-go at stepttwith beliefbb:
VT\(b\)\\displaystyle V\_\{T\}\(b\)=min\{γ\+\(1−q\)L,\(1−b\)L\},\\displaystyle=\\min\\big\\\{\\gamma\+\(1\-q\)L,\\;\(1\-b\)L\\big\\\},\(5\)Vt\(b\)\\displaystyle V\_\{t\}\(b\)=min\{γ\+\(1−q\)L⏟escalate,κ\+𝔼\[Vt\+1\(Bt\+1\)\|Bt=b\]⏟continue\},t<T,\\displaystyle=\\min\\Big\\\{\\;\\underbrace\{\\gamma\+\(1\-q\)L\}\_\{\\text\{escalate\}\},\\;\\underbrace\{\\kappa\+\\mathbb\{E\}\\big\[V\_\{t\+1\}\(B\_\{t\+1\}\)\\,\\big\|\\,B\_\{t\}=b\\big\]\}\_\{\\text\{continue\}\}\\;\\Big\\\},\\quad t<T,\(6\)where the transition is the Bayes update of Lemma[1](https://arxiv.org/html/2608.24087#Thmlemma1)driven by the posterior\-predictive signalet\+1∼bf1\+\(1−b\)f0e\_\{t\+1\}\\sim b\\,f\_\{1\}\+\(1\-b\)f\_\{0\}\. The optimal policy escalates atttiff the escalate branch attains the minimum in \([6](https://arxiv.org/html/2608.24087#S4.E6)\)\.
## 5Theoretical Analysis
### 5\.1The belief is a martingale
###### Theorem 1\(Martingale property\)\.
Under Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1),\(Bt,ℱt\)t≤T\(B\_\{t\},\\mathcal\{F\}\_\{t\}\)\_\{t\\leq T\}is a martingale:𝔼\[Bt\+1∣ℱt\]=Bt\\mathbb\{E\}\[B\_\{t\+1\}\\mid\\mathcal\{F\}\_\{t\}\]=B\_\{t\}\.
###### Proof\.
Bt=ℙ\(Y=1∣ℱt\)=𝔼\[𝟏\{Y=1\}∣ℱt\]B\_\{t\}=\\mathbb\{P\}\(Y=1\\mid\\mathcal\{F\}\_\{t\}\)=\\mathbb\{E\}\[\\mathbf\{1\}\\\{Y=1\\\}\\mid\\mathcal\{F\}\_\{t\}\]\. By the tower property,𝔼\[Bt\+1∣ℱt\]=𝔼\[𝔼\[𝟏\{Y=1\}∣ℱt\+1\]∣ℱt\]=𝔼\[𝟏\{Y=1\}∣ℱt\]=Bt\\mathbb\{E\}\[B\_\{t\+1\}\\mid\\mathcal\{F\}\_\{t\}\]=\\mathbb\{E\}\[\\mathbb\{E\}\[\\mathbf\{1\}\\\{Y=1\\\}\\mid\\mathcal\{F\}\_\{t\+1\}\]\\mid\\mathcal\{F\}\_\{t\}\]=\\mathbb\{E\}\[\\mathbf\{1\}\\\{Y=1\\\}\\mid\\mathcal\{F\}\_\{t\}\]=B\_\{t\}\. ∎
Theorem[1](https://arxiv.org/html/2608.24087#Thmtheorem1)is often misread\. It does*not*say waiting is worthless\. Because the belief is a martingale, waiting does not increase the*expected*belief—but it can increase expected*decision quality*by revealing information, and the value of that information comes precisely from the nonlinearity of the future value𝔼\[V\(Bt\+1\)\]\\mathbb\{E\}\[V\(B\_\{t\+1\}\)\]\. A stock price is a martingale yet options on it have value; likewise here, the option to continue has value even though𝔼\[Bt\+1∣ℱt\]=Bt\\mathbb\{E\}\[B\_\{t\+1\}\\mid\\mathcal\{F\}\_\{t\}\]=B\_\{t\}\. What the martingale property does give us is a clean structural handle for the monotone\-stopping argument below\.
### 5\.2Consistency and separation rate
How quickly does the oracle belief become decisive? The answer is governed by a single scalar property of the signal pair: its Chernoff information\.
###### Proposition 2\(Exponential belief separation\)\.
Assume a finite signal alphabet and let
C=−logmin∑ks∈\[0,1\]f0\(k\)sf1\(k\)1−sC\\;=\\;\-\\log\\ \\min\_\{s\\in\[0,1\]\}\\ \\sum\_\{k\}f\_\{0\}\(k\)^\{s\}f\_\{1\}\(k\)^\{1\-s\}\(7\)be the Chernoff information of\(f0,f1\)\(f\_\{0\},f\_\{1\}\), withC\>0C\>0ifff0≠f1f\_\{0\}\\neq f\_\{1\}\. Then for every fixedτ∈\(0,1\)\\tau\\in\(0,1\)there is a constantAτ<∞A\_\{\\tau\}<\\infty, independent oftt, such that
ℙ\(Bt≤τ∣Y=1\)≤Aτe−tC,ℙ\(Bt≥τ∣Y=0\)≤Aτe−tC\.\\mathbb\{P\}\\big\(B\_\{t\}\\leq\\tau\\mid Y=1\\big\)\\;\\leq\\;A\_\{\\tau\}\\,e^\{\-tC\},\\qquad\\mathbb\{P\}\\big\(B\_\{t\}\\geq\\tau\\mid Y=0\\big\)\\;\\leq\\;A\_\{\\tau\}\\,e^\{\-tC\}\.ConsequentlyBt→𝟏\{Y=1\}B\_\{t\}\\to\\mathbf\{1\}\\\{Y=1\\\}almost surely, and the oracle’s step\-ttthresholded decision errs with probability at mostAτe−tCA\_\{\\tau\}e^\{\-tC\}\.
###### Proof\.
Bt≤τB\_\{t\}\\leq\\tauiff∑s≤tλ\(es\)≤c\\sum\_\{s\\leq t\}\\lambda\(e\_\{s\}\)\\leq cwithc=logτ1−τ−logπ1−πc=\\log\\tfrac\{\\tau\}\{1\-\\tau\}\-\\log\\tfrac\{\\pi\}\{1\-\\pi\}\. For anys\>0s\>0, the Chernoff bound givesℙ\(∑λ≤c∣Y=1\)≤esc\(𝔼f1\[e−sλ\]\)t=esc\(∑kf1\(k\)1−sf0\(k\)s\)t\\mathbb\{P\}\\big\(\\sum\\lambda\\leq c\\mid Y=1\\big\)\\leq e^\{sc\}\\big\(\\mathbb\{E\}\_\{f\_\{1\}\}\[e^\{\-s\\lambda\}\]\\big\)^\{t\}=e^\{sc\}\\big\(\\sum\_\{k\}f\_\{1\}\(k\)^\{1\-s\}f\_\{0\}\(k\)^\{s\}\\big\)^\{t\}\. Minimising the base overs∈\[0,1\]s\\in\[0,1\]yieldse−Ce^\{\-C\}per step, withAτ=es⋆cA\_\{\\tau\}=e^\{s^\{\\star\}c\}at the minimisers⋆s^\{\\star\}\. TheY=0Y=0side is symmetric with𝔼f0\[esλ\]=∑kf0\(k\)1−sf1\(k\)s\\mathbb\{E\}\_\{f\_\{0\}\}\[e^\{s\\lambda\}\]=\\sum\_\{k\}f\_\{0\}\(k\)^\{1\-s\}f\_\{1\}\(k\)^\{s\}, whose minimum overs∈\[0,1\]s\\in\[0,1\]is the samee−Ce^\{\-C\}\. Almost\-sure convergence follows from Borel–Cantelli\. ∎
The practical reading: the number of tokens the oracle needs before its escalation decision is reliable at levelα\\alphaist≳log\(Aτ/α\)/Ct\\gtrsim\\log\(A\_\{\\tau\}/\\alpha\)/C\. “How informative is this uncertainty signal?” is thus answered by one number, computable from the fitted class\-conditionals, and comparable across candidate signals \(entropy vs\. margin vs\. probe output\) before any policy is built\.
### 5\.3Optimality of a threshold policy
The key structural fact is that a larger current belief makes the*next*belief stochastically larger\. This is the step a careful reader will demand a proof of, so we give one\. Notably,*no monotone\-likelihood\-ratio or other shape assumption on the raw signal is needed*: the Bayes update depends oneeonly through its log\-likelihood ratioλ\(e\)\\lambda\(e\), and the law of the likelihood ratio underf1f\_\{1\}stochastically dominates its law underf0f\_\{0\}for*any*pair of densities\. Related belief\-monotonicity results appear in the partially observed MDP literature\[[15](https://arxiv.org/html/2608.24087#bib.bib15),[12](https://arxiv.org/html/2608.24087#bib.bib12)\]\.
###### Lemma 2\(FOSD\-monotone belief transition\)\.
Under Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)alone, the mapb↦Law\(Bt\+1∣Bt=b\)b\\mapsto\\mathrm\{Law\}\(B\_\{t\+1\}\\mid B\_\{t\}=b\)is non\-decreasing in the first\-order stochastic dominance \(FOSD\) order: forb≤b′b\\leq b^\{\\prime\}and every non\-decreasingh:\[0,1\]→ℝh:\[0,1\]\\to\\mathbb\{R\},𝔼\[h\(Bt\+1\)∣Bt=b\]≤𝔼\[h\(Bt\+1\)∣Bt=b′\]\\mathbb\{E\}\[h\(B\_\{t\+1\}\)\\mid B\_\{t\}=b\]\\leq\\mathbb\{E\}\[h\(B\_\{t\+1\}\)\\mid B\_\{t\}=b^\{\\prime\}\]\.
###### Proof\.
Write the update asBt\+1=σ\(logb1−b\+Λ\)B\_\{t\+1\}=\\sigma\\\!\\big\(\\log\\tfrac\{b\}\{1\-b\}\+\\Lambda\\big\)whereΛ=λ\(e\)\\Lambda=\\lambda\(e\)and the incoming signal has posterior\-predictive densitymb=bf1\+\(1−b\)f0m\_\{b\}=bf\_\{1\}\+\(1\-b\)f\_\{0\}\. Three steps\.
\(i\)*The law ofΛ\\Lambdaunderf1f\_\{1\}FOSD\-dominates its law underf0f\_\{0\}\.*LetR=f1\(e\)/f0\(e\)R=f\_\{1\}\(e\)/f\_\{0\}\(e\), soΛ=logR\\Lambda=\\log Rand it suffices to prove the claim forRR\. For anyc≥1c\\geq 1:ℙf1\(R≥c\)=𝔼f0\[R1\{R≥c\}\]≥cℙf0\(R≥c\)≥ℙf0\(R≥c\)\\mathbb\{P\}\_\{f\_\{1\}\}\(R\\geq c\)=\\mathbb\{E\}\_\{f\_\{0\}\}\[R\\,\\mathbf\{1\}\\\{R\\geq c\\\}\]\\geq c\\,\\mathbb\{P\}\_\{f\_\{0\}\}\(R\\geq c\)\\geq\\mathbb\{P\}\_\{f\_\{0\}\}\(R\\geq c\)\. For anyc<1c<1:ℙf1\(R<c\)=𝔼f0\[R1\{R<c\}\]≤cℙf0\(R<c\)≤ℙf0\(R<c\)\\mathbb\{P\}\_\{f\_\{1\}\}\(R<c\)=\\mathbb\{E\}\_\{f\_\{0\}\}\[R\\,\\mathbf\{1\}\\\{R<c\\\}\]\\leq c\\,\\mathbb\{P\}\_\{f\_\{0\}\}\(R<c\)\\leq\\mathbb\{P\}\_\{f\_\{0\}\}\(R<c\), hence againℙf1\(R≥c\)≥ℙf0\(R≥c\)\\mathbb\{P\}\_\{f\_\{1\}\}\(R\\geq c\)\\geq\\mathbb\{P\}\_\{f\_\{0\}\}\(R\\geq c\)\. No assumption onf0,f1f\_\{0\},f\_\{1\}beyond common support was used\.
\(ii\)*The law ofΛ\\Lambdaundermbm\_\{b\}is FOSD\-non\-decreasing inbb\.*For non\-decreasinguu,𝔼mb\[u\(Λ\)\]=b𝔼f1\[u\(Λ\)\]\+\(1−b\)𝔼f0\[u\(Λ\)\]\\mathbb\{E\}\_\{m\_\{b\}\}\[u\(\\Lambda\)\]=b\\,\\mathbb\{E\}\_\{f\_\{1\}\}\[u\(\\Lambda\)\]\+\(1\-b\)\\,\\mathbb\{E\}\_\{f\_\{0\}\}\[u\(\\Lambda\)\]is affine inbbwith slope𝔼f1\[u\]−𝔼f0\[u\]≥0\\mathbb\{E\}\_\{f\_\{1\}\}\[u\]\-\\mathbb\{E\}\_\{f\_\{0\}\}\[u\]\\geq 0by \(i\)\.
\(iii\)*Chaining\.*Bt\+1B\_\{t\+1\}is non\-decreasing inbbfor fixedΛ\\Lambdaand non\-decreasing inΛ\\Lambdafor fixedbb\. For non\-decreasinghh, the mapΛ↦h\(σ\(logb1−b\+Λ\)\)\\Lambda\\mapsto h\\big\(\\sigma\(\\log\\tfrac\{b\}\{1\-b\}\+\\Lambda\)\\big\)is non\-decreasing, so
𝔼mb′\[h\(Bt\+1\(b′,Λ\)\)\]≥𝔼mb′\[h\(Bt\+1\(b,Λ\)\)\]≥𝔼mb\[h\(Bt\+1\(b,Λ\)\)\],\\mathbb\{E\}\_\{m\_\{b^\{\\prime\}\}\}\\\!\\big\[h\(B\_\{t\+1\}\(b^\{\\prime\},\\Lambda\)\)\\big\]\\;\\geq\\;\\mathbb\{E\}\_\{m\_\{b^\{\\prime\}\}\}\\\!\\big\[h\(B\_\{t\+1\}\(b,\\Lambda\)\)\\big\]\\;\\geq\\;\\mathbb\{E\}\_\{m\_\{b\}\}\\\!\\big\[h\(B\_\{t\+1\}\(b,\\Lambda\)\)\\big\],the first inequality by pointwise monotonicity inbb, the second by \(ii\)\. ∎
###### Theorem 2\(Threshold structure\)\.
Under Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1), for eachttthere exists a thresholdτt⋆∈\[0,1\]\\tau\_\{t\}^\{\\star\}\\in\[0,1\]such that the optimal policy escalates at stepttiffBt≤τt⋆B\_\{t\}\\leq\\tau\_\{t\}^\{\\star\}\. At the horizon,τT⋆=q−γ/L\\tau\_\{T\}^\{\\star\}=q\-\\gamma/L\.
###### Proof\.
The argument uses*monotonicity only*; we never invoke concavity, so no concavity\-preservation step is required\. We show by backward induction that eachVtV\_\{t\}is non\-increasing inbb\.
*Base case\.*VT\(b\)=\(1−b\)LV\_\{T\}\(b\)=\(1\-b\)Lis non\-increasing\.
*Inductive step\.*SupposeVt\+1V\_\{t\+1\}is non\-increasing\. The escalate valueγ\+\(1−q\)L\\gamma\+\(1\-q\)Lis a constant, hence non\-increasing\. For the continue valueCt\(b\)=κ\+𝔼\[Vt\+1\(Bt\+1\)∣Bt=b\]C\_\{t\}\(b\)=\\kappa\+\\mathbb\{E\}\[V\_\{t\+1\}\(B\_\{t\+1\}\)\\mid B\_\{t\}=b\], Lemma[2](https://arxiv.org/html/2608.24087#Thmlemma2)gives thatb↦Law\(Bt\+1∣b\)b\\mapsto\\mathrm\{Law\}\(B\_\{t\+1\}\\mid b\)is non\-decreasing in the FOSD order\. SinceVt\+1V\_\{t\+1\}is non\-increasing, its expectation against an FOSD\-larger law is smaller, soCtC\_\{t\}is non\-increasing inbb\. As the pointwise minimum of two non\-increasing functions,Vt=min\{γ\+\(1−q\)L,Ct\}V\_\{t\}=\\min\\\{\\gamma\+\(1\-q\)L,C\_\{t\}\\\}is non\-increasing, closing the induction\.
*Threshold structure\.*Escalation is optimal atbbiffγ\+\(1−q\)L≤Ct\(b\)\\gamma\+\(1\-q\)L\\leq C\_\{t\}\(b\)\. BecauseCtC\_\{t\}is non\-increasing, this set is a lower interval\[0,τt⋆\]\[0,\\tau\_\{t\}^\{\\star\}\]withτt⋆=sup\{b:γ\+\(1−q\)L≤Ct\(b\)\}\\tau\_\{t\}^\{\\star\}=\\sup\\\{b:\\gamma\+\(1\-q\)L\\leq C\_\{t\}\(b\)\\\}\(and∅\\emptysetread asτt⋆=0\\tau\_\{t\}^\{\\star\}=0\), which is exactly a threshold rule\.
*Terminal threshold\.*Att=Tt=Tthere is no continuation: the choice is escalate at costγ\+\(1−q\)L\\gamma\+\(1\-q\)Lor answer at expected cost\(1−b\)L\(1\-b\)L\(Eq\. \([5](https://arxiv.org/html/2608.24087#S4.E5)\)\)\. Escalation is optimal iffγ\+\(1−q\)L≤\(1−b\)L\\gamma\+\(1\-q\)L\\leq\(1\-b\)L, i\.e\.b≤q−γ/Lb\\leq q\-\\gamma/L, matching the myopic value of Proposition[1](https://arxiv.org/html/2608.24087#Thmproposition1)\. ∎
### 5\.4Calibration is the binding constraint
We regard the following as the paper’s central practical message\. The decision rule of Theorem[2](https://arxiv.org/html/2608.24087#Thmtheorem2)is optimal*given*the posterior, but in deployment the posterior is estimated, inducing beliefsB^t\\hat\{B\}\_\{t\}that may differ from the trueBtB\_\{t\}\. The next bound shows the excess cost is controlled entirely by that gap—so, for self\-escalation, effort spent improving the*calibration*of the competence posterior dominates effort spent on a more elaborate router or decision rule\.
###### Proposition 3\(Miscalibration regret\)\.
Fix stepttand a thresholdτ\\tau\. Let the realised decision \(continue to completion vs\. escalate\) useB^t\\hat\{B\}\_\{t\}and the oracle decision use the trueBtB\_\{t\}, both thresholding atτ\\tau\. Letgt\(b\)=\(T−t\)κ\+\(1−b\)L−γ−\(1−q\)Lg\_\{t\}\(b\)=\(T\-t\)\\kappa\+\(1\-b\)L\-\\gamma\-\(1\-q\)Ldenote the forward\-cost difference \(continueminusescalate\) at true beliefbb, and letD=\{Bt,B^ton opposite sides ofτ\}D=\\\{B\_\{t\},\\hat\{B\}\_\{t\}\\text\{ on opposite sides of \}\\tau\\\}be the disagreement event\. Then
Regrett≤L𝔼\[\|Bt−B^t\|\]\+\|gt\(τ\)\|ℙ\(D\)\.\\mathrm\{Regret\}\_\{t\}\\;\\leq\\;L\\,\\mathbb\{E\}\\big\[\\,\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\\,\\big\]\\;\+\\;\|g\_\{t\}\(\\tau\)\|\\;\\mathbb\{P\}\(D\)\.\(8\)In particular, at the myopic thresholdτ=τtmyo\\tau=\\tau\_\{t\}^\{\\mathrm\{myo\}\}of Proposition[1](https://arxiv.org/html/2608.24087#Thmproposition1), wheregtg\_\{t\}vanishes,
Regrett≤L𝔼\[\|Bt−B^t\|\]\.\\mathrm\{Regret\}\_\{t\}\\;\\leq\\;L\\,\\mathbb\{E\}\\big\[\\,\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\\,\\big\]\.\(9\)
###### Proof\.
Excess cost is incurred only onDD, where it equals\|gt\(Bt\)\|\|g\_\{t\}\(B\_\{t\}\)\|\. The functiongtg\_\{t\}is affine with slope−L\-L, so\|gt\(Bt\)\|≤\|gt\(Bt\)−gt\(τ\)\|\+\|gt\(τ\)\|=L\|Bt−τ\|\+\|gt\(τ\)\|\|g\_\{t\}\(B\_\{t\}\)\|\\leq\|g\_\{t\}\(B\_\{t\}\)\-g\_\{t\}\(\\tau\)\|\+\|g\_\{t\}\(\\tau\)\|=L\|B\_\{t\}\-\\tau\|\+\|g\_\{t\}\(\\tau\)\|\. OnDDthe thresholdτ\\taulies betweenBtB\_\{t\}andB^t\\hat\{B\}\_\{t\}, hence\|Bt−τ\|≤\|Bt−B^t\|\|B\_\{t\}\-\\tau\|\\leq\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\. Taking expectations overDDand bounding𝔼\[𝟏D\|Bt−B^t\|\]≤𝔼\|Bt−B^t\|\\mathbb\{E\}\[\\mathbf\{1\}\_\{D\}\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\]\\leq\\mathbb\{E\}\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|gives \([8](https://arxiv.org/html/2608.24087#S5.E8)\);gt\(τtmyo\)=0g\_\{t\}\(\\tau\_\{t\}^\{\\mathrm\{myo\}\}\)=0gives \([9](https://arxiv.org/html/2608.24087#S5.E9)\)\. ∎
Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)formalises the “confidently wrong” failure mode: a query withY=0Y=0whose signals mimic success drivesB^t\\hat\{B\}\_\{t\}high while the trueBtB\_\{t\}is low, producing anO\(L\)O\(L\)regret event precisely when it is most costly\. Two consequences are worth stating plainly\. First,*confidently wrong predictions are the central failure mode of self\-escalation*: no threshold policy on a miscalibrated signal can recover the lost escalations\. Second, the bound is a directive for practitioners—measure and minimise𝔼\|Bt−B^t\|\\mathbb\{E\}\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\(via reliability diagrams and post\-hoc calibration\) before tuning thresholds, because thresholds cannot compensate for a miscalibrated posterior\. Section[7](https://arxiv.org/html/2608.24087#S7)measures this dependence directly\.
The bound as stated involves the unobservable oracle beliefBtB\_\{t\}\. It can be connected to*measurable*calibration quantities in both directions\.
###### Corollary 1\(Excess Brier score controls regret\)\.
LetBS\(Z\)=𝔼\[\(Y−Z\)2\]\\mathrm\{BS\}\(Z\)=\\mathbb\{E\}\[\(Y\-Z\)^\{2\}\]denote the Brier score of a\[0,1\]\[0,1\]\-valued,ℱt\\mathcal\{F\}\_\{t\}\-measurable predictorZZ\. At the myopic thresholdτ=τtmyo\\tau=\\tau\_\{t\}^\{\\mathrm\{myo\}\},
Regrett≤LBS\(B^t\)−BS\(Bt\)\.\\mathrm\{Regret\}\_\{t\}\\;\\leq\\;L\\,\\sqrt\{\\mathrm\{BS\}\(\\hat\{B\}\_\{t\}\)\-\\mathrm\{BS\}\(B\_\{t\}\)\}\.\(10\)
###### Proof\.
SinceBt=𝔼\[Y∣ℱt\]B\_\{t\}=\\mathbb\{E\}\[Y\\mid\\mathcal\{F\}\_\{t\}\]andB^t\\hat\{B\}\_\{t\}isℱt\\mathcal\{F\}\_\{t\}\-measurable, the cross term vanishes in𝔼\[\(Y−B^t\)2\]=𝔼\[\(Y−Bt\)2\]\+𝔼\[\(Bt−B^t\)2\]\\mathbb\{E\}\[\(Y\-\\hat\{B\}\_\{t\}\)^\{2\}\]=\\mathbb\{E\}\[\(Y\-B\_\{t\}\)^\{2\}\]\+\\mathbb\{E\}\[\(B\_\{t\}\-\\hat\{B\}\_\{t\}\)^\{2\}\]\(the calibration–refinement decomposition\), so𝔼\[\(Bt−B^t\)2\]=BS\(B^t\)−BS\(Bt\)\\mathbb\{E\}\[\(B\_\{t\}\-\\hat\{B\}\_\{t\}\)^\{2\}\]=\\mathrm\{BS\}\(\\hat\{B\}\_\{t\}\)\-\\mathrm\{BS\}\(B\_\{t\}\)\. Combine with Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)via𝔼\|Bt−B^t\|≤𝔼\[\(Bt−B^t\)2\]\\mathbb\{E\}\|B\_\{t\}\-\\hat\{B\}\_\{t\}\|\\leq\\sqrt\{\\mathbb\{E\}\[\(B\_\{t\}\-\\hat\{B\}\_\{t\}\)^\{2\}\]\}\(Jensen\)\. ∎
Corollary[1](https://arxiv.org/html/2608.24087#Thmcorollary1)turns the abstract bound into a training objective:BS\(Bt\)\\mathrm\{BS\}\(B\_\{t\}\)is a fixed property of the signal, so*minimising the Brier score of the fitted posterior directly minimises the regret bound*\. This is why the protocol in Section[9](https://arxiv.org/html/2608.24087#S9)reports Brier score as a primary metric rather than a diagnostic afterthought\.
### 5\.5Sample complexity of calibrated self\-escalation
The bounds above take the fitted posterior as given\. We now close the loop: how much labelled calibration data buys how much regret? The following gives a complete, finite\-sample answer for the plug\-in estimator on a discretised signal \(discretisation is standard in implementations;KKis the number of bins\)\.
###### Theorem 3\(Finite\-sample regret of the plug\-in policy\)\.
Assume a finite signal alphabet of sizeKKwithfy\(k\)≥εf\_\{y\}\(k\)\\geq\\varepsilonfor allk,yk,y, and a labelled calibration set containingmym\_\{y\}token observations of classyy; letm=min\(m0,m1\)m=\\min\(m\_\{0\},m\_\{1\}\)and supposem≥\(2/ε2\)log\(4K/δ\)m\\geq\(2/\\varepsilon^\{2\}\)\\log\(4K/\\delta\)\. Letλ^\\hat\{\\lambda\}be the plug\-in log\-likelihood ratio of the empirical bin frequencies, with the priorπ\\piknown, and letB^t\\hat\{B\}\_\{t\}be the resulting beliefs\. Then with probability at least1−δ1\-\\deltaover the calibration set, simultaneously for allt≤Tt\\leq T,
𝔼\[\|B^t−Bt\|\]≤tεlog\(4K/δ\)2m,and hence, at the myopic threshold,Regrett≤Ltεlog\(4K/δ\)2m\.\\mathbb\{E\}\\big\[\\,\|\\hat\{B\}\_\{t\}\-B\_\{t\}\|\\,\\big\]\\;\\leq\\;\\frac\{t\}\{\\varepsilon\}\\sqrt\{\\frac\{\\log\(4K/\\delta\)\}\{2m\}\},\\qquad\\text\{and hence, at the myopic threshold,\}\\qquad\\mathrm\{Regret\}\_\{t\}\\;\\leq\\;\\frac\{L\\,t\}\{\\varepsilon\}\\sqrt\{\\frac\{\\log\(4K/\\delta\)\}\{2m\}\}\.\(11\)
###### Proof\.
Hoeffding’s inequality givesℙ\(\|f^y\(k\)−fy\(k\)\|≥u\)≤2e−2myu2\\mathbb\{P\}\\big\(\|\\hat\{f\}\_\{y\}\(k\)\-f\_\{y\}\(k\)\|\\geq u\\big\)\\leq 2e^\{\-2m\_\{y\}u^\{2\}\}per bin and class; a union bound over the2K2Kpairs withu=log\(4K/δ\)/\(2m\)u=\\sqrt\{\\log\(4K/\\delta\)/\(2m\)\}leaves failure probability at mostδ\\delta\. On the success event, the hypothesis onmmgivesu≤ε/2u\\leq\\varepsilon/2, sof^y\(k\)≥ε/2\\hat\{f\}\_\{y\}\(k\)\\geq\\varepsilon/2and, sincex↦logxx\\mapsto\\log xis\(2/ε\)\(2/\\varepsilon\)\-Lipschitz on\[ε/2,∞\)\[\\varepsilon/2,\\infty\),\|logf^y\(k\)−logfy\(k\)\|≤2u/ε\|\\log\\hat\{f\}\_\{y\}\(k\)\-\\log f\_\{y\}\(k\)\|\\leq 2u/\\varepsilonfor each class, hence‖λ^−λ‖∞≤4u/ε\\\|\\hat\{\\lambda\}\-\\lambda\\\|\_\{\\infty\}\\leq 4u/\\varepsilon\. The log\-odds error afterttupdates is at mostt⋅4u/εt\\cdot 4u/\\varepsilon\(π\\piknown\), andσ\\sigmais14\\tfrac\{1\}\{4\}\-Lipschitz, so\|B^t−Bt\|≤tu/ε\|\\hat\{B\}\_\{t\}\-B\_\{t\}\|\\leq tu/\\varepsilonpointwise on the success event, hence also in expectation over trajectories\. Combining with Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)at the myopic threshold gives the regret bound\. ∎
Three remarks, in decreasing order of comfort\. First, the rate: regret decays asO\(LtlogK/\(nT\)/ε\)O\\big\(Lt\\sqrt\{\\log K/\(nT\)\}\\,/\\varepsilon\\big\)when the calibration set consists ofnntrajectories of lengthTT\(som≈nTmin\(π,1−π\)m\\approx nT\\min\(\\pi,1\-\\pi\)\); every trajectory contributesTTtoken observations, which is why modest labelled sets suffice in practice\. Second, the linear\-in\-ttcompounding is a worst case of the plug\-in construction; recalibratingB^t\\hat\{B\}\_\{t\}directly at eachtt\(e\.g\. isotonic regression per step\) targets𝔼\|B^t−Bt\|\\mathbb\{E\}\|\\hat\{B\}\_\{t\}\-B\_\{t\}\|without the compounding and is what we recommend in deployment\. Third, the1/ε1/\\varepsilondependence is pessimistic: it charges for accuracy on low\-mass bins that belief trajectories near the threshold rarely visit; a margin\-weighted refinement is left to future work\. Section[7](https://arxiv.org/html/2608.24087#S7)verifies the theorem’s driver empirically: the belief error decays at the predicted1/n1/\\sqrt\{n\}rate, while the realised cost gap sits far below the bound\.
## 6Algorithm
Algorithm[1](https://arxiv.org/html/2608.24087#alg1)is the streaming inference procedure: a single junior forward pass, anO\(1\)O\(1\)belief update per token, and an early exit when the belief crosses the schedule\. Algorithm[2](https://arxiv.org/html/2608.24087#alg2)computes the threshold schedule\{τt⋆\}\\\{\\tau\_\{t\}^\{\\star\}\\\}once, offline, by backward induction on a discretised belief grid, using the calibrated likelihood ratio to Monte\-Carlo the transition\.
#### Context handoff is text, not activations\.
The junior and senior are in general different models—different architectures, tokenizers, and KV\-cache layouts—so the senior cannot ingest the junior’s hidden state\.DistillContexttherefore produces*text\-level*artifacts: the partial reasoning trace generated so far, any scratchpad or intermediate results, the tool\-call history and their returns, and retrieved evidence\. This is a prompt the senior can consume directly, and it keeps the handoff model\-agnostic\. It also means the escalation costγ\\gammashould include the tokens re\-read by the senior, which the protocol in Section[9](https://arxiv.org/html/2608.24087#S9)measures\.
Algorithm 1Bayesian Self\-Escalation \(inference time\)1:query
xx; junior
JJ; senior
SS; thresholds
\{τt\}\\\{\\tau\_\{t\}\\\}; ratio
λ\\lambda; prior log\-odds
ℓ0\\ell\_\{0\}
2:
ℓ←ℓ0\\ell\\leftarrow\\ell\_\{0\}
3:for
t=1t=1to
TTdo
4:
\(tokent,et\)←J\.step\(x\)\(\\text\{token\}\_\{t\},e\_\{t\}\)\\leftarrow J\.\\textsc\{step\}\(x\)⊳\\trianglerightete\_\{t\}: token entropy / margin / probe output
5:
ℓ←ℓ\+λ\(et\)\\ell\\leftarrow\\ell\+\\lambda\(e\_\{t\}\);
B←σ\(ℓ\)B\\leftarrow\\sigma\(\\ell\)⊳\\trianglerightO\(1\)O\(1\)belief update
6:if
B<τtB<\\tau\_\{t\}then
7:
c←DistillContext\(trace1:t,tool\_state,evidence\)c\\leftarrow\\textsc\{DistillContext\}\(\\text\{trace\}\_\{1:t\},\\ \\text\{tool\\\_state\},\\ \\text\{evidence\}\)
8:return
S\.solve\(x,c\)S\.\\textsc\{solve\}\(x,c\)⊳\\trianglerightescalate; hand off*text\-level*artifacts, not hidden state
9:endif
10:endfor
11:return
J\.finalize\(\)J\.\\textsc\{finalize\}\(\)⊳\\trianglerightanswer locally
Algorithm 2Offline threshold schedule \(backward induction\)1:calibrated
λ\\lambda; costs
\(κ,γ,L,q\)\(\\kappa,\\gamma,L,q\); grid
\{bj\}j=1m\\\{b\_\{j\}\\\}\_\{j=1\}^\{m\}; samples
\{e\(k\)\}\\\{e^\{\(k\)\}\\\}
2:
V\(bj\)←min\{γ\+\(1−q\)L,\(1−bj\)L\}V\(b\_\{j\}\)\\leftarrow\\min\\\{\\gamma\+\(1\-q\)L,\\ \(1\-b\_\{j\}\)L\\\}for all
jj⊳\\trianglerightterminal value, Eq\. \([5](https://arxiv.org/html/2608.24087#S4.E5)\)
3:for
t=T−1t=T\-1down to
11do
4:foreach grid point
bjb\_\{j\}do
5:propagate
ℓj=logbj1−bj\\ell\_\{j\}=\\log\\frac\{b\_\{j\}\}\{1\-b\_\{j\}\}by
λ\(e\(k\)\)\\lambda\(e^\{\(k\)\}\)under both classes; form next beliefs
b′\(k\)b^\{\\prime\(k\)\}
6:
C\(bj\)←κ\+bjV\(bY=1′\(k\)\)¯\+\(1−bj\)V\(bY=0′\(k\)\)¯C\(b\_\{j\}\)\\leftarrow\\kappa\+b\_\{j\}\\,\\overline\{V\(b^\{\\prime\(k\)\}\_\{Y=1\}\)\}\+\(1\-b\_\{j\}\)\\,\\overline\{V\(b^\{\\prime\(k\)\}\_\{Y=0\}\)\}
7:
V\(bj\)←min\{γ\+\(1−q\)L,C\(bj\)\}V\(b\_\{j\}\)\\leftarrow\\min\\\{\\gamma\+\(1\-q\)L,\\;C\(b\_\{j\}\)\\\}
8:endfor
9:
τt⋆←max\{bj:γ\+\(1−q\)L≤C\(bj\)\}\\tau\_\{t\}^\{\\star\}\\leftarrow\\max\\\{b\_\{j\}:\\gamma\+\(1\-q\)L\\leq C\(b\_\{j\}\)\\\}
10:endfor
11:return
\{τt⋆\}\\\{\\tau\_\{t\}^\{\\star\}\\\}
#### Fitting the competence posterior\.
The likelihood ratioλ\\lambda\(or, equivalently, a direct map from signal history toBtB\_\{t\}\) is fit offline on a labelled development set: runJJon queries with known correctnessYY, collect signal trajectoriese1:Te\_\{1:T\}, and either \(i\) estimate the class\-conditional densitiesf0,f1f\_\{0\},f\_\{1\}parametrically or by kernel methods and take their log\-ratio, or \(ii\) fit a logistic model mapping cumulative signal features \(running mean entropy, margin trend, spike counts\) toℙ\(Y=1\)\\mathbb\{P\}\(Y=1\), which sidesteps density estimation\. Either way the resulting beliefs are then calibrated post hoc \(isotonic regression or temperature scaling\), targeting the Brier score per Corollary[1](https://arxiv.org/html/2608.24087#Thmcorollary1)\. Reliability diagrams ofB^t\\hat\{B\}\_\{t\}against empirical success at severalttare the basic sanity check\.
#### Why a posterior plus thresholds, not a directly learned policy?
One could instead train a classifier that maps signals straight to escalate/continue\. We prefer the factored design for three reasons\. First,*modularity under changing costs*: the fitted posterior depends only on the model and signal, while\(κ,γ,L,q\)\(\\kappa,\\gamma,L,q\)enter only through Algorithm[2](https://arxiv.org/html/2608.24087#alg2); when prices, latency budgets, or the senior model change, one reruns a cheap backward induction instead of recollecting labels and retraining\. Second,*auditability*:B^t\\hat\{B\}\_\{t\}is an interpretable monitoring statistic \(“the agent currently believes it has a 22% chance of being right”\), useful for logging and human oversight independent of the routing decision\. Third,*statistical efficiency*: the posterior is learned from all trajectories, whereas a direct policy gradient sees the cost signal only at decision boundaries\. The price is model misspecification risk in the belief update, which Section[7](https://arxiv.org/html/2608.24087#S7)probes directly\.
#### Theory versus production instantiation\.
The explicit Bayesian filter is the analyzable idealisation; in production we expect a*learned success predictor*B^t=fθ\(signal history\)\\hat\{B\}\_\{t\}=f\_\{\\theta\}\(\\text\{signal history\}\)to replace it while preserving the decision structure\. A learned predictor handles correlated, non\-stationary signals that violate Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)and can ingest hidden\-state features directly\. The division of labour under this swap is clean: the regret analysis \(Section[5\.4](https://arxiv.org/html/2608.24087#S5.SS4)\) is filter\-agnostic and becomes the*contract*the learned predictor must satisfy—minimise Brier score, verify calibration, then trust the thresholds—while the threshold\-structure guarantee \(Theorem[2](https://arxiv.org/html/2608.24087#Thmtheorem2)\) is what is formally lost, since an arbitrary learned predictor need not inherit the FOSD transition\. Pragmatically one thresholds anyway, computing the schedule by running Algorithm[2](https://arxiv.org/html/2608.24087#alg2)on*empirical*belief transitions from development trajectories rather than the analytic ones\. We caution against going one step further and learning the escalate/continue policy end\-to\-end: that forfeits cost modularity \(price changes then require retraining rather than a cheap backward induction\) and the auditability ofB^t\\hat\{B\}\_\{t\}as a monitoring statistic\.
#### Overhead and task adaptivity\.
At inference the update is anO\(1\)O\(1\)table lookup \(or tiny MLP evaluation\) per token, negligible next to a transformer forward pass; all expensive work \(fitting, calibration, backward induction\) is offline\. The framework also adapts across task types without refitting the signal model: per\-domain priorsπd\\pi\_\{d\}and per\-domain costs yield per\-domain threshold schedules from the same fittedλ\\lambda, again via Algorithm[2](https://arxiv.org/html/2608.24087#alg2)alone\.
## 7Simulation Study
We call this a*simulation study*rather than an experiment, and we are candid about what it can and cannot show\. Because we specify the data\-generating process, this is a world in which the modelling assumptions hold by construction; it is a check that the*derived policy behaves as the theory predicts*, and a diagnostic of how it degrades when an assumption is violated\. It is emphatically not evidence about real LLM token dynamics—that is the role of the protocol in Section[9](https://arxiv.org/html/2608.24087#S9)\. All numbers come from a single reproducible script \(fixed seed\)\.
#### Setup\.
We drawY∼Bernoulli\(π\)Y\\sim\\mathrm\{Bernoulli\}\(\\pi\)withπ=0\.60\\pi=0\.60and, per token \(T=40T=40\), a signalet∼Beta\(2,4\)e\_\{t\}\\sim\\mathrm\{Beta\}\(2,4\)ifY=1Y=1andet∼Beta\(4,2\)e\_\{t\}\\sim\\mathrm\{Beta\}\(4,2\)ifY=0Y=0\(the signal enters the update only through its likelihood ratio, so no shape assumption is needed; Lemma[2](https://arxiv.org/html/2608.24087#Thmlemma2)\)\. The senior succeeds withq=0\.90q=0\.90\. Costs areL=1L=1,κ=0\.002\\kappa=0\.002per token,γ=0\.15\\gamma=0\.15\. We evaluate onN=40,000N=40\{,\}000queries\. We compare:junior\-only;senior\-only;fixed\-rule\(escalate at the first token withet\>θe\_\{t\}\>\\theta\);selective\(generate fully, escalate if final confidence<τ<\\tau, a post\-hoc baseline that always pays full local generation\);Bayesian myopic schedule\(the literal, parameter\-free rule of Eq\. \([4](https://arxiv.org/html/2608.24087#S4.E4)\)\);Bayesian constant threshold\(escalate at the first token withBt<τB\_\{t\}<\\taufor a constantτ\\tau, swept\); andBayesian optimal\-stopping\(Algorithm[2](https://arxiv.org/html/2608.24087#alg2), parameter\-free\)\. Cost per query counts junior tokens plus escalation; accuracy is the fraction of correct final answers\.*Disclosure:*the fixed\-rule, selective, and constant\-threshold policies each have one free parameter, which is swept and reported at the compute\-matched point; the myopic\-schedule and optimal\-stopping rows involve no tuning\.
#### Results\.
Figure[1](https://arxiv.org/html/2608.24087#S7.F1)shows the cost–accuracy frontier\. The Bayesian frontier dominates both baselines: for any compute budget it attains higher accuracy, and the optimal\-stopping operating point \(star\) sits above and to the left of unconditional escalation\. Table[1](https://arxiv.org/html/2608.24087#S7.T1)reports a matched\-compute slice at≈0\.11\\approx 0\.11cost/query\. The Bayesian policy reaches96\.0%96\.0\\%accuracy while escalating on only40%40\\%of queries, versus91\.0%91\.0\\%for the fixed rule and90\.1%90\.1\\%for always escalating to the senior; it also matches the accuracy of the post\-hoc selective baseline at lower cost, because it can abort early rather than always completing the local generation\. That the number nominally exceeds senior\-only accuracy should be given no weight: it is an artifact of the constant\-qqassumption \(the senior’sq=0\.90q=0\.90does not degrade with query difficulty, so keeping the junior’s confidently\-correct easy cases mechanically lifts the mixture\)\. With a realistic difficulty\-dependentq\(x\)q\(x\)the effect shrinks and can vanish\. Throughout, the meaningful comparison is the*ordering and spacing of policies at matched cost*, not any absolute margin over the senior; Section[10](https://arxiv.org/html/2608.24087#S10)returns to this\.
Two further honest readings of Table[1](https://arxiv.org/html/2608.24087#S7.T1)\. First, the*literal*myopic schedule performs poorly: its first\-token thresholdτ1myo=0\.828\\tau\_\{1\}^\{\\mathrm\{myo\}\}=0\.828exceeds the priorπ=0\.60\\pi=0\.60, so it escalates62%62\\%of queries at the very first token \(68%68\\%overall\), reaching only0\.9340\.934accuracy at*higher*cost \(0\.1290\.129\)—a concrete demonstration of the early over\-escalation predicted by Remark[4](https://arxiv.org/html/2608.24087#Thmremark4)\. The strong “Bayesian, constant threshold” row is a*tuned*rule, not Proposition[1](https://arxiv.org/html/2608.24087#Thmproposition1); the untuned policy that performs well is the optimal\-stopping schedule\. Second, the matched\-compute slice flatters the Bayesian–fixed\-rule gap: at slightly higher compute the fixed rule nearly catches up \(θ=0\.85\\theta=0\.85gives0\.9560\.956accuracy at cost0\.1180\.118\)\. The robust claim is that the Bayesian frontier weakly dominates everywhere \(Figure[1](https://arxiv.org/html/2608.24087#S7.F1)\); the size of the point gap depends on where the budget lands on the fixed rule’s steep region\.
Table 1:Matched\-compute comparison \(≈0\.11\\approx 0\.11cost/query\) on the simulation model\. Accuracy is fraction correct; “esc\.” is escalation rate\. Rows marked “tuned” sweep one operating parameter and are reported at the compute\-matched point; the myopic\-schedule and optimal\-stopping rows are parameter\-free\. Numbers are produced by the accompanying simulation\.Figure 1:Cost–accuracy frontier on the simulation model\. The Bayesian policies \(teal\) dominate the fixed\-rule \(orange\) and post\-hoc selective \(grey\) baselines; the optimal\-stopping point \(red star\) beats unconditional escalation on both axes\.
#### Belief dynamics and the threshold schedule\.
Figure[2](https://arxiv.org/html/2608.24087#S7.F2)plots posterior trajectories: beliefs for eventual successes drift up and for eventual failures drift down, so a threshold cleanly separates them within a few tokens\. The computed schedule illustrates Remark[4](https://arxiv.org/html/2608.24087#Thmremark4)’s small\-κ\\kapparegime: interior thresholds stay low \(rising gently from0\.020\.02to0\.080\.08across the generation\)—because escalating one step later costs onlyκ=0\.002\\kappa=0\.002while buying another observation, the option value of waiting keeps interior escalation conservative—and the threshold jumps to the analytic terminal valueq−γ/L=0\.75q\-\\gamma/L=0\.75exactly at the horizon, where no further information can arrive\. The myopic schedule \([4](https://arxiv.org/html/2608.24087#S4.E4)\), by contrast, is*highest*early; in this regime it over\-escalates at the start of generation\.
Figure 2:Posterior success\-belief trajectoriesBtB\_\{t\}for twelve queries\. Eventual successes \(teal\) separate from eventual failures \(orange\) within a few tokens; the dashed line is an illustrative threshold\.
#### Calibration sensitivity\.
To probe Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)we contaminate the stream with “confidently wrong” queries: a fraction ofY=0Y=0cases whose signals are drawn from the success distribution\. Figure[3](https://arxiv.org/html/2608.24087#S7.F3)shows accuracy falling from95\.2%95\.2\\%at0%0\\%contamination to85\.7%85\.7\\%at30%30\\%, while the escalation rate*drops*\(from0\.470\.47to0\.370\.37\) because the contaminated cases look confident and are wrongly kept local\. This is exactly theO\(L\)O\(L\)regret event of Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)and underlines that belief calibration, not the decision rule, is the binding constraint\.
Figure 3:Sensitivity to signal miscalibration\. As confidently\-wrong contamination grows, accuracy degrades and—counter\-productively—the escalation rate falls, because miscalibrated confidence suppresses the very escalations that are needed\.
#### Sample\-complexity check\.
To test Theorem[3](https://arxiv.org/html/2608.24087#Thmtheorem3)’s driver, we discretise the signal intoK=20K=20bins, fit the plug\-inλ^\\hat\{\\lambda\}fromnnlabelled trajectories \(add\-one smoothing\), and compare against the exact binned oracle on a fixed evaluation set, averaging over3030calibration resamples pernn\. The belief error𝔼\|B^10−B10\|\\mathbb\{E\}\|\\hat\{B\}\_\{10\}\-B\_\{10\}\|falls from2\.9×10−32\.9\\times 10^\{\-3\}atn=25n=25to2\.1×10−42\.1\\times 10^\{\-4\}atn=3200n=3200, with log–log slope−0\.53\-0\.53—matching the predicted1/n1/\\sqrt\{n\}rate\. The realised end\-to\-end cost gap is already below0\.00160\.0016\(about1%1\\%of total cost\) atn=25n=25and sits far under the bound at everynn: with a well\-separated signal, beliefs rarely linger near the threshold, so estimation errors rarely flip decisions\. This is the theorem’s pessimism working as intended—the bound is a worst\-case guarantee, and the practical message is that modest labelled sets suffice when the signal is informative\.
#### Robustness across observation models\.
To check that the conclusions are not an artifact of the Beta observation family, we repeat the comparison under two further signal models \(Table[2](https://arxiv.org/html/2608.24087#S7.T2)\): \(i\)*Gaussian*class\-conditionals with equal variance, conditionally i\.i\.d\.; and \(ii\) an*AR\(1\)\-correlated*Gaussian model with the same marginals but lag\-one correlationφ=0\.6\\varphi=0\.6, evaluated while the belief update*still assumes independence*—a deliberate violation of Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)that makes the update overconfident \(it double\-counts correlated evidence\)\. For each model we sweep each policy’s operating parameter and report its best total\-cost point\. The Bayesian rule attains lower total cost than the tuned fixed rule in all three models\. Under misspecification its edge narrows but does not invert \(total cost0\.1580\.158vs\.0\.1660\.166\), and accuracy degrades gracefully \(95\.6%95\.6\\%vs\.95\.8%95\.8\\%in the matched i\.i\.d\. model\): correlation costs performance, consistent with the calibration analysis, but does not break the method\.
Table 2:Robustness across observation models\. Each policy is tuned to its best total\-cost operating point per model; total cost==compute\+\+expected error cost\. AR\(1\) uses the i\.i\.d\. belief update on correlated signals \(misspecified\)\. Numbers produced by the accompanying robustness script\.
## 8Real\-Model Validation
The simulation of Section[7](https://arxiv.org/html/2608.24087#S7)verifies the derived policy in a world where the modelling assumptions hold by construction\. Version 1 of this paper deferred any real\-model evaluation, reporting only the pre\-registered protocol of Section[9](https://arxiv.org/html/2608.24087#S9)\. This section, added in Version 1\.1, takes a first, deliberately narrow step toward that protocol and runs the framework on a real hierarchical system\. We are candid about scope: this is a single code\-generation cascade, one model pair, greedy decoding, a single seed, and—importantly—a*constant\-threshold*instantiation with a belief fit from running signal summaries rather than the recursive filter of Lemma[1](https://arxiv.org/html/2608.24087#Thmlemma1)\. It is evidence that the competence signal and the escalation frontier behave as the theory predicts; it is*not*a test of the optimal\-stopping dynamic program, which we leave to future work \(Section[10](https://arxiv.org/html/2608.24087#S10)\)\. All numbers come from reproducible scripts with fixed seeds\.
#### Setup\.
The junior isQwen2\.5\-Coder\-1\.5B\-Instructand the seniorQwen2\.5\-Coder\-7B\-Instruct, both served locally with token\-level log\-probabilities\. We evaluate on the sanitized MBPP test split \(257257tasks\), definingYYby execution against the task’s unit tests—an unambiguous correctness label\. For each greedy junior generation we log per\-step token entropy, next\-token log\-probability, and top\-2 margin\. The competence posteriorBtB\_\{t\}is a logistic regression on the running \(cumulative\) means of these three signals, evaluated with55\-fold cross\-validation so that every reported belief is out\-of\-fold\. The senior attempts every task once \(greedy\), giving the counterfactual needed to price escalation\.
#### Capability gap and escalation ceiling\.
The junior solves62\.3%62\.3\\%of tasks and the senior80\.9%80\.9\\%\. Of the9797junior failures the senior rescues5454\(55\.7%55\.7\\%\); the remaining4343\(44\.3%44\.3\\%\) are failed by both models and form an irreducible floor no routing policy can cross\. The escalation ceiling— junior successes plus every failure escalated—is therefore214/257=83\.3%214/257=83\.3\\%, not the senior’s marginal80\.9%80\.9\\%\. This shared\-failure floor is the real\-model face of the constant\-qqcaveat in Section[7](https://arxiv.org/html/2608.24087#S7): senior reliability is difficulty\-correlated, so the achievable gain is bounded well below perfect rescue\.
#### The competence signal is informative but imperfect\.
The cross\-validated posterior attains AUROC0\.7580\.758against eventual success\. The per\-step signal separates the classes early—mean entropy on eventual failures exceeds that on successes from∼5%\\sim\\\!5\\%of the generation—but*non\-monotonically*: through the2525–55%55\\%band the instantaneous gap collapses and briefly inverts, precisely where confidently\-wrong failures \(low\-entropy, incorrect\) coincide with hard\-but\-correct successes \(high\-entropy, correct\)\. This is the mechanism of Remark[1](https://arxiv.org/html/2608.24087#Thmremark1)and Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)observed directly: raw entropy is not the posterior, and confident errors are the binding failure mode\.
#### Cumulative belief discrimination rises intt\(prediction \(b\)\)\.
Although the*instantaneous*signal is non\-monotonic, the*cumulative*posteriorBtB\_\{t\}is not: its discrimination increases near\-monotonically over the generation \(Spearmanρ=0\.93\\rho=0\.93between generation fraction and AUROC ofBtB\_\{t\}; AUROC rising from0\.510\.51to0\.760\.76\)\. Through the middle band where the instantaneous signal collapses,BtB\_\{t\}*plateaus*rather than declining— confidently\-wrong tokens stop contributing fresh evidence, but the belief retains what it accumulated earlier—and resumes rising thereafter \(Figure[5](https://arxiv.org/html/2608.24087#S8.F5)\)\. This confirms pre\-registered prediction \(b\) of Section[9](https://arxiv.org/html/2608.24087#S9)and is direct support for the paper’s central design choice: accumulate a calibrated belief rather than react to per\-step uncertainty\. We note the corresponding tension for early action: discrimination peaks at the horizon \(t=Tt\{=\}T\), so any policy that stops early necessarily acts on a weaker\-than\-terminal belief\.
#### The escalation frontier dominates post\-hoc routing \(prediction \(a\)\)\.
We compare a*streaming*policy—escalate at the first step where the running belief falls below a thresholdτ\\tau, aborting the remaining junior generation—against*post\-hoc routing*, which runs the junior to completion and escalates the least\-confident fraction \(the confidence\-cascade family the protocol names as a baseline\)\. Sweeping each policy’s operating parameter traces the cost–accuracy frontier of Figure[4](https://arxiv.org/html/2608.24087#S8.F4)\. Streaming dominates post\-hoc across the frontier: to reach75%75\\%accuracy it uses30\.2%30\.2\\%less total compute \(14,84114\{,\}841vs\.21,27321\{,\}273generated tokens\)\. More strikingly, streaming reaches75%75\\%accuracy—\+12\.7\+12\.7points over the junior alone—at essentially the junior’s own compute \(0\.98×0\.98\\timesjunior\-only tokens\): the tokens saved by aborting doomed generations offset the senior calls added\. Atτ=0\.5\\tau\{=\}0\.5the policy escalates37%37\\%of tasks, catching them at a mean of29%29\\%of the way through generation, for74\.7%74\.7\\%accuracy\. The advantage over post\-hoc is structural: post\-hoc pays every junior generation in full before it can route, whereas streaming stops paying for a generation the moment the belief turns against it\.
Table 3:Real\-model comparison on MBPP \(sanitized test,257257tasks;Qwen2\.5\-Coder1\.51\.5B→\\to77B\)\. Compute is total generated tokens, normalised to junior\-only\. Post\-hoc and streaming are reported at the operating point reaching75%75\\%accuracy; the belief is cross\-validated\. Numbers produced by the accompanying harvest and analysis scripts\.Figure 4:Real\-model cost–accuracy frontier\. Streaming escalation \(purple\) dominates post\-hoc routing \(teal\) everywhere: it climbs from junior to senior accuracy at near\-constant compute, because aborting doomed generations offsets the added senior calls\. Dotted lines mark junior\-only and senior\-only accuracy\.Figure 5:Discrimination of the cumulative beliefBtB\_\{t\}versus generation fraction \(AUROC ofBtB\_\{t\}against eventual success, cross\-validated\)\. The curve rises near\-monotonically \(Spearmanρ=0\.93\\rho=0\.93\) and*plateaus*—rather than declining—through the shaded2525–55%55\\%band where the instantaneous signal collapses, confirming prediction \(b\)\.
#### What this does and does not establish\.
Two of the three pre\-registered predictions are supported on real data: the Bayesian frontier dominates the post\-hoc baseline at equal cost \(a\), and the cumulative belief’s AUROC rises intt\(b\)\. Prediction \(c\)—that the accuracy gap over baselines shrinks as calibration error grows—we do not test here; the simulation’s calibration\- sensitivity study \(Figure[3](https://arxiv.org/html/2608.24087#S7.F3)\) is its controlled analogue\. Three limits bound the reading\. First, the policy evaluated is a*constant*threshold, not the optimal\-stopping schedule of Eqs\. \([5](https://arxiv.org/html/2608.24087#S4.E5)\)–\([6](https://arxiv.org/html/2608.24087#S4.E6)\); by Theorem[2](https://arxiv.org/html/2608.24087#Thmtheorem2)a threshold rule is the right*form*, but the option\-value machinery—the contribution over classical sequential testing—is not exercised, and the empirical margin of the dynamic program over the best constant threshold remains to be measured\. Second, the belief is a running\-mean proxy for the recursive filter of Lemma[1](https://arxiv.org/html/2608.24087#Thmlemma1), as anticipated in Section[6](https://arxiv.org/html/2608.24087#S6)\. Third, this is one benchmark, one model pair, greedy decoding, and a single seed; the protocol’s reasoning and commonsense datasets, and the sampling\-based baselines, remain open\. Within those limits, the framework transfers: the signal is informative, the cumulative belief behaves as predicted, and confidence\-routed escalation is markedly more compute\-efficient than routing after the fact\.
## 9Protocol for Real LLM Systems
We pre\-registered the full evaluation below to make the empirical test falsifiable; it was specified in Version 1 of this paper as a plan, before any real\-model run\. Section[8](https://arxiv.org/html/2608.24087#S8), added in Version 1\.1, reports its first execution on a code\-generation cascade—keeping prediction and test separated in time—and finds two of the three predictions confirmed\.
#### Systems\.
Junior: a small instruction/coding model served with token\-level logit access \(so that entropy and next\-token margin are available at each step\)\. Senior: a substantially stronger reasoning/coding model\. Both served through an inference stack that exposes per\-token log\-probabilities\.
#### Signals\.
Per\-stepete\_\{t\}candidates: token entropy, next\-token probability margin, and a single\-pass semantic\-entropy probe\[[11](https://arxiv.org/html/2608.24087#bib.bib11)\]\. Each is calibrated separately so that comparisons isolate the signal’s quality\.
#### Belief fitting and calibration\.
On a labelled development split, run the junior, record\(e1:T,Y\)\(e\_\{1:T\},Y\), fitλ\\lambda, and calibrateBtB\_\{t\}by isotonic regression\. Report reliability diagrams and expected calibration error \(ECE\) forBtB\_\{t\}at severaltt\.
#### Baselines\.
\(i\) junior\-only; \(ii\) senior\-only; \(iii\) query\-level router\[[19](https://arxiv.org/html/2608.24087#bib.bib19)\]; \(iv\) confidence cascade\[[8](https://arxiv.org/html/2608.24087#bib.bib8)\]; \(v\) sampling\-based semantic\-entropy deferral\[[3](https://arxiv.org/html/2608.24087#bib.bib3)\]; \(vi\) our myopic and optimal\-stopping policies\.
#### Datasets\.
A reasoning set \(e\.g\. multi\-hop QA\), a commonsense set with natural easy/hard structure, and a code set with executable unit tests to defineYYunambiguously; plus an in\-domain deployment set\.
#### Metrics\.
Cost–accuracy Pareto frontier \(primary\); escalation precision/recall; calibration \(ECE, Brier, AUROC ofBtB\_\{t\}vs\.YY\); and decision/end\-to\-end latency, including the cost of computingete\_\{t\}\.
#### Falsifiable predictions\.
If the framework transfers, then \(a\) the Bayesian policy’s frontier should dominate the query\-level router and the confidence cascade at equal cost; \(b\) AUROC ofBtB\_\{t\}should rise monotonically intt; and \(c\) the accuracy gap over baselines should shrink as calibration error grows, per Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)\. Failure of \(a\)–\(c\) would falsify the central claims\.
## 10Limitations
#### Modelling assumptions\.
Assumption[1](https://arxiv.org/html/2608.24087#Thmassumption1)\(conditional\-i\.i\.d\. signals\) is false for real token streams, which are correlated and non\-stationary; the update then becomes an approximation andλ\\lambdashould be replaced by a sequence model of the signal\. \(No shape assumption on the signal densities is needed for the threshold structure itself; Lemma[2](https://arxiv.org/html/2608.24087#Thmlemma2)holds for any density pair\.\)
#### Confidently\-wrong predictions\.
As Proposition[3](https://arxiv.org/html/2608.24087#Thmproposition3)and Figure[3](https://arxiv.org/html/2608.24087#S7.F3)show, the method inherits the calibration of its signal\. Where the junior is confidently wrong, no threshold policy on that signal can help; combining epistemic signals with lightweight cross\-model agreement\[[10](https://arxiv.org/html/2608.24087#bib.bib10)\]is a natural remedy\.
#### Logit access\.
Token\-level signals require an inference stack that exposes log\-probabilities; many managed APIs return them only after generation, or not at all, restricting deployment to self\-hosted or logprob\-exposing endpoints\.
#### Senior independence\.
We treatqqas constant; in practice senior success correlates with query difficulty, and a difficulty\-conditionedq\(x\)q\(x\)would tighten the decision\.
#### Scope of the real\-model study\.
Version 1 flagged the absence of real\-model results as its central limitation; Version 1\.1 partially closes it\. Section[8](https://arxiv.org/html/2608.24087#S8)validates the framework on a single code\-generation cascade, one model pair, greedy decoding, and a single seed\. Three limits bound it: the policy evaluated is a*constant*threshold, not the optimal\-stopping schedule of Eqs\. \([5](https://arxiv.org/html/2608.24087#S4.E5)\)–\([6](https://arxiv.org/html/2608.24087#S4.E6)\), so the option\-value contribution over classical sequential testing is not yet exercised empirically; the belief is a running\-mean proxy for the recursive filter of Lemma[1](https://arxiv.org/html/2608.24087#Thmlemma1); and prediction \(c\) of Section[9](https://arxiv.org/html/2608.24087#S9)remains untested on real models\. The remaining datasets and baselines of the protocol are open\.
## 11Conclusion
We framed the question of*when an agent should ask for help*as Bayesian self\-escalation: a junior model tracks an online posterior over its own eventual success from the uncertainty signals it emits and defers to a stronger model when the expected utility of deferral wins\. The framework yields a closed\-form myopic threshold, an optimal\-stopping characterisation with a proven threshold structure, and a regret bound that pins the method’s success to belief calibration\. A controlled simulation study confirms the predicted behaviour, including the myopic–optimal threshold gap and the calibration\-driven failure mode\. The decisive next step is the real\-system protocol of Section[9](https://arxiv.org/html/2608.24087#S9); whether token\-level signals on current LLMs are calibrated enough to realise these gains is, in the end, an empirical question this paper is designed to make testable\.
#### Reproducibility\.
The simulation study \(Section[7](https://arxiv.org/html/2608.24087#S7)\) is generated by three self\-contained scripts \(main simulation, robustness study, and sample\-complexity experiment\); the real\-model validation \(Section[8](https://arxiv.org/html/2608.24087#S8)\) by a harvest script and three post\-hoc analysis scripts \(separation and frontier, streaming escalation, and theBtB\_\{t\}AUROC test\)\. All are released with this paper\. The paper and simulation scripts are permanently archived at[DOI: 10\.5281/zenodo\.21330787](https://doi.org/10.5281/zenodo.21330787); the full code, including the real\-model pipeline, is at[github\.com/nadeem\-shaikh/llm\-self\-escalation](https://github.com/nadeem-shaikh/llm-self-escalation)\.
## References
- \[1\]L\. Chen, M\. Zaharia, and J\. Zou\.FrugalGPT: How to use large language models while reducing cost and improving performance\.*arXiv:2305\.05176*, 2023\.
- \[2\]C\. K\. Chow\.On optimum recognition error and reject tradeoff\.*IEEE Trans\. Information Theory*, 16\(1\):41–46, 1970\.
- \[3\]S\. Farquhar, J\. Kossen, L\. Kuhn, and Y\. Gal\.Detecting hallucinations in large language models using semantic entropy\.*Nature*, 630:625–630, 2024\.
- \[4\]T\. S\. Ferguson\.*Optimal Stopping and Applications*\.Electronic text, UCLA, 2006\.
- \[5\]Y\. Geifman and R\. El\-Yaniv\.Selective classification for deep neural networks\.In*NeurIPS*, 2017\.
- \[6\]Y\. Geifman and R\. El\-Yaniv\.SelectiveNet: A deep neural network with an integrated reject option\.In*ICML*, 2019\.
- \[7\]A\. Graves\.Adaptive computation time for recurrent neural networks\.*arXiv:1603\.08983*, 2016\.
- \[8\]W\. Jitkrittum, N\. Gupta, A\. K\. Menon, H\. Narasimhan, A\. Rawat, and S\. Kumar\.When does confidence\-based cascade deferral suffice?In*NeurIPS*, 2023\.
- \[9\]S\. Kadavath, T\. Conerly, A\. Askell, et al\.Language models \(mostly\) know what they know\.*arXiv:2207\.05221*, 2022\.
- \[10\]S\. Kolawole, D\. Dennis, A\. Talwalkar, and V\. Smith\.Agreement\-based cascading for efficient inference\.*Transactions on Machine Learning Research*, 2025\.
- \[11\]J\. Kossen, J\. Han, M\. Razzak, L\. Schut, S\. Malik, and Y\. Gal\.Semantic entropy probes: Robust and cheap hallucination detection in LLMs\.*arXiv:2406\.15927*, 2024\.
- \[12\]V\. Krishnamurthy\.*Partially Observed Markov Decision Processes: From Filtering to Controlled Sensing*\.Cambridge University Press, 2016\.
- \[13\]L\. Kuhn, Y\. Gal, and S\. Farquhar\.Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation\.In*ICLR*, 2023\.
- \[14\]Y\. Leviathan, M\. Kalman, and Y\. Matias\.Fast inference from transformers via speculative decoding\.In*ICML*, 2023\.
- \[15\]W\. S\. Lovejoy\.Some monotonicity results for partially observed Markov decision processes\.*Operations Research*, 35\(5\):736–743, 1987\.
- \[16\]A\. Madaan, N\. Tandon, P\. Gupta, et al\.Self\-Refine: Iterative refinement with self\-feedback\.In*NeurIPS*, 2023\.
- \[17\]D\. Madras, T\. Pitassi, and R\. Zemel\.Predict responsibly: Improving fairness and accuracy by learning to defer\.In*NeurIPS*, 2018\.
- \[18\]H\. Mozannar and D\. Sontag\.Consistent estimators for learning to defer to an expert\.In*ICML*, 2020\.
- \[19\]I\. Ong, A\. Almahairi, V\. Wu, W\.\-L\. Chiang, T\. Wu, J\. E\. Gonzalez, M\. W\. Kadous, and I\. Stoica\.RouteLLM: Learning to route LLMs with preference data\.*arXiv:2406\.18665*, 2024\.
- \[20\]G\. Peskir and A\. Shiryaev\.*Optimal Stopping and Free\-Boundary Problems*\.Birkhäuser, 2006\.
- \[21\]T\. Schuster, A\. Fisch, J\. Gupta, M\. Dehghani, D\. Bahri, V\. Q\. Tran, Y\. Tay, and D\. Metzler\.Confident adaptive language modeling\.In*NeurIPS*, 2022\.
- \[22\]C\. Snell, J\. Lee, K\. Xu, and A\. Kumar\.Scaling LLM test\-time compute optimally can be more effective than scaling model parameters\.*arXiv:2408\.03314*, 2024\.
- \[23\]D\. Soiffer, S\. Kolawole, and V\. Smith\.Semantic agreement enables efficient open\-ended LLM cascades\.In*EMNLP \(Industry Track\)*, 2025\.
- \[24\]R\. Verma and E\. Nalisnick\.Calibrated learning to defer with one\-vs\-all classifiers\.In*ICML*, 2022\.
- \[25\]A\. Wald\.Sequential tests of statistical hypotheses\.*Annals of Mathematical Statistics*, 16\(2\):117–186, 1945\.
- \[26\]A\. Wald and J\. Wolfowitz\.Optimum character of the sequential probability ratio test\.*Annals of Mathematical Statistics*, 19\(3\):326–339, 1948\.Similar Articles
Knowing When to Ask: Self-Gated Clarification for Hierarchical Language Agents
This paper proposes ActionRating, a formulation that places clarification inside an agent's action space on a shared ordinal scale with navigation, enabling two information-seeking modes (mandatory and opportunistic). On hierarchical taxonomy classification benchmarks, experiments with 9 LLMs show that opportunistic clarification improves accuracy and information-seeking effectiveness.
Bayesian-Agent: Posterior-Guided Skill Evolution for LLM Agent Harnesses
Bayesian-Agent presents a framework that treats reusable skills and SOPs as hypotheses, using Bayesian inference to guide agent behavior and improve task performance through posterior-guided harness optimization. It achieves significant improvements on multiple benchmarks with deepseek-v4-flash.
@dair_ai: Can an LLM agent actually build a model of an environment it cannot see? This work makes the question gradeable. An age…
A research paper proposes agentic automata learning to evaluate whether LLM agents can infer hidden world models through interaction, finding that performance drops sharply as task complexity increases and that reasoning models outperform non-reasoning ones but still struggle.
Context, Reasoning, and Hierarchy: A Cost-Performance Study of Compound LLM Agent Design in an Adversarial POMDP
A controlled study of compound LLM agent design in an adversarial POMDP (CybORG CAGE-2), systematically varying context, reasoning, and hierarchy across five model families. Key findings: programmatic state abstraction yields large returns per token, hierarchy without deliberation tools achieves best absolute performance, and context engineering is more cost-effective than deeper reasoning.
Uncertainty Decomposition for Clarification Seeking in LLM Agents
This paper proposes a prompt-based uncertainty decomposition method for LLM agents that separates action confidence from request uncertainty, enabling proactive clarification seeking in underspecified tasks. The method is evaluated on new clarification-augmented benchmarks across five LLM backbones, showing significant improvements.