betaFeedback

WorksComputer Science

Multiple Importance Sampling for Guided Speculative Inference

Abstract

We study an extension of the Guided Speculative Inference (GSI) algorithm for test-time-scaling of large language models (LLMs) to a novel setting where an ensemble of smaller LLMs proposes draft reasoning steps which are later verified by a larger base model and a process reward model. Using the established framework of multiple importance sampling (MIS), we introduce weighting schemes to aggregate samples from a diverse collection of proposal distributions. We provide new bounds on the KL divergence from the optimal reward-tilted target distribution and the expected reward degradation, then demonstrate that the well-known balance heuristic is optimal. Compared to GSI with a single well-tuned drafter, combining several diverse LLMs while retaining the same total number of samples maintains competitive pass-at-NN downstream performance while being mathematically robust to situations where the support of a single draft model does not cover that of the target, where GSI may fail.

Introduction

Scaling computation in the pretraining phase, by increasing both the number of parameters and the size of training data, has driven remarkable improvements in the performance of large language models (LLMs) and achieved state-of-the-art results in many generative natural language tasks [2, 3]. However, as limits to both computational resources and the data available for pretraining become apparent, test-time scaling has emerged as a complementary approach for further improving the performance of an already-trained model by increasing the amount of computation at inference time [4, 5, 6]. While numerous approaches to test-time scaling exist, most may be categorized as either sequential, parallel or hybrid methods [6]. In sequential approaches, a response is refined iteratively, with later computations building upon previous steps. On the other hand, parallel methods generate several full responses in a single batch and return the best one as determined by an aggregation function. Hybrid approaches attempt to combine the best of both worlds by generating multiple candidates at each iteration of a sequential process, then determining the most promising path by means of a search algorithm.

Best-of-NN (BoN) sampling is a straightforward scaling approach that can be used in both the parallel and hybrid regimes [7, 8]. It involves drawing NN samples from the model, evaluating a score for each, and choosing whichever sample has the highest score. Despite its simplicity, BoN remains popular in practice by virtue of mapping readily to efficient prompt batching, and enjoys desirable theoretical properties while being competitive with more involved and computationally expensive test-time strategies [9]. As NN grows large however, the cost of BoN sampling may itself become prohibitive, which has motivated the search for methods that perform repeated sampling from a cheaper proxy model coupled with parallel verification by the original, large model to obtain comparable performance with reduced latency, analogous to speculative decoding in standard inference [1, 10, 11, 12]. Guided Speculative Inference (GSI) [1] is a recent algorithm that uses a small LLM to generate candidates for verification, weighting them in such a way that the output distribution becomes close to the target. However, as it relies on the fragile assumption that a single drafter’s support can cover the target distribution, GSI remains vulnerable to lower acceptance rates during verification and degraded performance if the draft model is chosen poorly. In this work we motivate the use of an ensemble of draft models to increase robustness, relaxing the coverage requirement to one on the union of the drafters’ supports by introducing a principled multiple importance sampling (MIS) [13] framework for resampling the proposal sequences.

Problem Setup and Related Work

In this work, following the setting considered in [1], we deal with multi-step reasoning models that structure their response to a prompt as a sequence of reasoning steps leading to a final answer. Assuming a vocabulary X\mathcal{X}, we let the set of all finite-length token sequences be X∗={x=(x1,…,xn):n∈N,xi∈X}\mathcal{X}^{*} = \{x = (x_{1}, \ldots, x_{n}) : n \in\mathbb{N}, x_{i} \in\mathcal{X}\} and the set of probability distributions on X∗\mathcal{X}^{*} be P(X∗)\mathcal{P}(\mathcal{X}^{*}). Given a prompt c∈X∗c \in\mathcal{X}^{*}, the model furnishes the distribution π(⋅∣c)∈P(X∗)\pi(\cdot\mid c) \in\mathcal{P}(\mathcal{X}^{*}) which can be used to sample the first reasoning step. In practice, sampling from the block-level distribution π(⋅∣c)\pi(\cdot\mid c) is done autoregressively, outputting one token at a time in each forward pass. After sampling the first reasoning step X1X_{1}, we append it to the prompt and sample subsequent blocks X2∼π(⋅∣c,X1)X_{2} \sim\pi(\cdot\mid c, X_{1}), X3∼π(⋅∣c,X1,X2)X_{3} \sim\pi(\cdot\mid c, X_{1}, X_{2}) and so on until the end of the full output sequence, which will be signposted by an end-of-sequence token EOS. We assume the complete response comprises TT reasoning steps in total, where TT is finite, and the complete response is then the sequence (X1,…,XT)(X_{1}, \ldots, X_{T}).

Furthermore, to score the reasoning steps emitted by the LLM, we require the existence of a process reward model (PRM), which acts as a step-level proxy for gauging the accuracy of and human preference for the model’s outputs [14] The PRM is modeled as a mapping r:X∗×X∗→[0,R]r:\mathcal{X}^{*}\times\mathcal{X}^{*}\to[0,R] which, given a potentially incomplete sequence of reasoning steps (X1,…,Xt)(X_{1},\ldots,X_{t}) and a prompt cc, computes a reward r(X1,…,Xt∣c)r(X_{1},\ldots,X_{t}\mid c). In practice, the PRM is typically implemented as an additional neural network, and is considered to be an approximation for an underlying true reward function or gold reward r∗:X∗×X∗→Rr^{*}:\mathcal{X}^{*}\times\mathcal{X}^{*}\to\mathbb{R} which perfectly captures the desirability of the output [7]. We focus on devising and analyzing hybrid best-of-NN policies which, given NN blocks of tokens Xt(1),…,Xt(N)X_{t}^{(1)},\ldots,X_{t}^{(N)} computed at step tt and the associated rewards, aggregate these into a single sample XtX_t which forms part of the input to the next reasoning step; the distribution over the policy’s outputs is denoted as π~\tilde{\pi}.

Hard BoN Sampling

The hard BoN, or simply BoN, strategy runs the PRM on each sample and outputs the sample with the maximum reward [9]. Formally, at time 1≤t≤T1\le t\le T and given previously chosen reasoning steps X1,…,Xt−1X_1,\ldots,X_{t-1}, we sample Xt(1),…,Xt(N)X_t^{(1)},\ldots,X_t^{(N)} iid from π(⋅∣c,X1,…,Xt−1)\pi(\cdot\mid c,X_1,\ldots,X_{t-1}) and use the PRM to select

Xt=arg⁡max⁡1≤i≤N r(X1,…,Xt−1,Xt(i)∣c).(1)X_t=\underset{1\le i\le N}{\arg\max}\ r(X_1,\ldots,X_{t-1},X_t^{(i)}\mid c). \tag*{(1)}

While this is a surprisingly effective model alignment strategy [7, 15] when it comes to increasing the accuracy of a model’s outputs, it can suffer from a phenomenon known as reward hacking. Since any real-world PRM is an imperfect approximation of the true reward, it is often possible for a model to exploit these imperfections and generate responses that score highly under the PRM but are otherwise low in quality [16]. As NN increases, hard BoN becomes more susceptible to such failure modes, limiting its ability to scale to large NN without eventually degrading performance [17].

Soft BoN Sampling

A popular and theoretically grounded approach to devising a policy is to solve a KL-regularized reward optimization problem over π~\tilde{\pi}, which may help prevent reward hacking compared to hard BoN [18, 19]. Without loss of generality, we focus in all that follows on generating the first reasoning step X1X_1; for later steps, the partial response can be concatenated with the prompt cc and the same procedure repeated using the updated conditional distributions. Furthermore, we let the conditioning on cc be implicit for brevity and omit it. We solve

max⁡π~∈P(X∗)[EX∼π~[r(X)]−DKL(π~∥π)β](2)\max_{\tilde{\pi}\in\mathcal{P}(\mathcal{X}^{*})}\left[\mathbb{E}_{X\sim\tilde{\pi}}[r(X)]-\frac{D_{\mathrm{KL}}(\tilde{\pi}\Vert\pi)}{\beta}\right] \tag*{(2)}

and the objective is therefore to maximize the expected reward while keeping the policy close to the base model π\pi in a KL sense, with β>0\beta>0 controlling the strength of the KL regularization. The optimal policy is to sample X1X_1 following the reward-tilted distribution

π∗(x)=π(x)eβr(x)/Z(3)\pi^{*}(x)=\pi(x)e^{\beta r(x)}/Z \tag*{(3)}

where Z=EX∼π[eβr(X)]Z=\mathbb{E}_{X\sim\pi}[e^{\beta r(X)}] [20]. However, apart from the special case of sampling exactly one token at a time, we do not have a direct way to sample exactly from (3). Soft BoN sampling [18] proposes to approximate the reward-tilted distribution by taking NN reasoning steps X1(1),…,X1(N)X_1^{(1)},\ldots,X_1^{(N)} iid from π\pi, as in hard BoN, and selecting one probabilistically via importance resampling [21, 22]. The iith sample is assigned a weight WiW_i and an index SS is selected from {1,…,N}\{1,\ldots,N\} with probabilities proportional to W1,…,WNW_1,\ldots,W_N respectively. The chosen block is then X1=X1(S)X_1=X_1^{(S)}. Since the samples are iid from π\pi, the resampling weights should satisfy [18]

Wi∝π∗(X1(i))π(X1(i))=eβr(X1(i))/Z.(4)W_i\propto\frac{\pi^{*}(X_1^{(i)})}{\pi(X_1^{(i)})}=e^{\beta r(X_1^{(i)})}/Z. \tag*{(4)}

The importance resampling step may also be framed as sampling based on the temperature-weighted softmax probability distribution of the rewards. It was shown in [18] that the KL divergence between the soft BoN policy and the reward tilted distribution satisfies

DKL(π∗∥π~)≤log⁡(1+Var⁡X∼π(eβr(X))N(EX∼π[eβr(X)])2)(5)D_{\mathrm{KL}}(\pi^{*}\Vert\tilde{\pi})\le\log\left(1+\frac{\operatorname{Var}_{X\sim\pi}(e^{\beta r(X)})}{N(\mathbb{E}_{X\sim\pi}[e^{\beta r(X)}])^{2}}\right) \tag*{(5)}

whereas hard BoN does not have such a guarantee.

Guided Speculative Inference

Inspired by speculative decoding, GSI [1] aims to accelerate soft BoN by sampling from a smaller draft model πs\pi_s, then verifying all the samples simultaneously with a larger model πb\pi_b instead of sampling from the latter directly. Since (3), with the base model being π=πb\pi=\pi_b, can be rewritten as

π∗(x)=πs(x)Zexp⁡(βr(x)+log⁡(πb(x)πs(x)))(6)\pi^{*}(x)=\frac{\pi_s(x)}{Z}\exp\left(\beta r(x)+\log\left(\frac{\pi_b(x)}{\pi_s(x)}\right)\right) \tag*{(6)}

the tilted distribution may also be approximated by taking NN iid samples from πs\pi_s and using the resampling weights

Wi∝π∗(X1(i))πs(X1(i))=1Zexp⁡(βr(X1(i))+log⁡(πb(X1(i))πs(X1(i)))).(7)W_i\propto\frac{\pi^{*}(X_1^{(i)})}{\pi_s(X_1^{(i)})}=\frac{1}{Z}\exp\left(\beta r(X_1^{(i)})+\log\left(\frac{\pi_b(X_1^{(i)})}{\pi_s(X_1^{(i)})}\right)\right). \tag*{(7)}

However, we can only hope to approximate π∗\pi^{*} in this manner if the coverage assumption supp⁡πb⊆supp⁡πs\operatorname{supp}\pi_b\subseteq\operatorname{supp}\pi_s is satisfied. Under this assumption, as was shown in [1],

DKL(π∗∥π~)≤log⁡(e2βRVar⁡X∼πs(eβr(X)πb(X)/πs(X))+1N+N−1N).(8)D_{\mathrm{KL}}(\pi^{*}\Vert\tilde{\pi})\le\log\left(\frac{e^{2\beta R}\operatorname{Var}_{X\sim\pi_s}(e^{\beta r(X)}\pi_b(X)/\pi_s(X))+1}{N}+\frac{N-1}{N}\right). \tag*{(8)}

Soft Best-of-N with Multiple Draft Models

We now introduce a novel technique for extending GSI to an ensemble of draft models via MIS [13, 23]. Assume initially that there are NN draft models πs(1),…,πs(N)\pi_s^{(1)},\ldots,\pi_s^{(N)} and the number of draft models is therefore equal to the number of importance samples, which is also NN. It is straightforward to extend this to the case where the number of draft models is KK and MM samples are drawn from each, giving N=MKN=MK. Later, we will consider the more general case where the sample allocation is not required to be uniform. The main advantage of the MIS approach is that it allows the coverage assumption to be relaxed; by weighting the samples appropriately, one only requires

supp⁡πb⊆⋃1≤i≤Nsupp⁡πs(i).(9)\operatorname{supp}\pi_b\subseteq\bigcup_{1\le i\le N}\operatorname{supp}\pi_s^{(i)}. \tag*{(9)}

In practice, this may help avoid the possibility of ending up in a situation where the importance sampling approximation fails to converge to the target distribution. Furthermore, we expect to see prompts that favor different draft models; some prompts for example may suit a drafter fine-tuned on math while others may better fit one fine-tuned on code, making the idea of combining an ensemble of draft models appealing.

Besides MIS, any number of approaches could be used to combine the drafts. For example, majority voting [24] might be one alternative choice. In contrast, our method directly extends the GSI resampling strategy described in § 1.1-C by using standard MIS resampling weights [25]

Wi∝mi(X1(i))π∗(X1(i))πs(i)(X1(i))(10)W_i \propto\frac{m_i\left(X_1^{(i)}\right)\pi^*\left(X_1^{(i)}\right)}{\pi_s^{(i)}\left(X_1^{(i)}\right)} \tag*{(10)}
=mi(X1(i))Zexp⁡(βr(X1(i))+log⁡(πb(X1(i))πs(i)(X1(i))))(11)= \frac{m_i\left(X_1^{(i)}\right)}{Z}\exp\left(\beta r\left(X_1^{(i)}\right)+\log\left(\frac{\pi_b\left(X_1^{(i)}\right)}{\pi_s^{(i)}\left(X_1^{(i)}\right)}\right)\right) \tag*{(11)}

where mim_i is referred to as the iith MIS weight and is restricted to be a function of X1(i)X_1^{(i)} only. Otherwise, mim_i can have whatever form we like so long as it satisfies the following canonical requirements for a valid MIS scheme [25, 26]:

πb(x)>0⇒∑i=1Nmi(x)=1(12)\pi_b(x)>0 \mathrel{\Rightarrow} \sum_{i=1}^{N}m_i(x)=1 \tag*{(12)}
πs(i)(x)=0 and πb(x)>0⇒mi(x)=0.(13)\pi_s^{(i)}(x)=0\ \text{and}\ \pi_b(x)>0 \mathrel{\Rightarrow} m_i(x)=0. \tag*{(13)}

After settling on a formula for the MIS weights, we propose the following procedure:

  1. Sample NN reasoning steps X1(1),…,X1(N)X_1^{(1)},\ldots,X_1^{(N)} independently from πs(1),…,πs(N)\pi_s^{(1)},\ldots,\pi_s^{(N)}.

  2. Compute the MIS weights mi(X1(i))m_i(X_1^{(i)}) together with the resampling weights Wi=mi(X1(i))gi(X1(i))W_i=m_i(X_1^{(i)})g_i(X_1^{(i)}) for 1≤i≤N1\le i\le N where

gi(x)=exp⁡(βr(x)+log⁡πb(x)πs(i)(x)).(14)g_i(x)=\exp\left(\beta r(x)+\log\frac{\pi_b(x)}{\pi_s^{(i)}(x)}\right). \tag*{(14)}
  1. Let Pr⁡[S=i∣X1(1),…,X1(N)]=Wi/∑j=1NWj\Pr[S=i\mid X_1^{(1)},\ldots,X_1^{(N)}]=W_i/\sum_{j=1}^{N}W_j and output X1=X1(S)X_1=X_1^{(S)} as the selected reasoning step.

Theoretical Analysis

We set out to show that the MIS schemes enjoy guarantees on the output’s closeness to the optimal tilted distribution π∗\pi^*, similar to the bounds for soft BoN and GSI in (5) and (8) respectively. As a first step, we have the following lemma concerning the output distribution, analogous to [18 Lem. 1]. When presenting our results on MIS, we also adopt the convention that mi(x)/πs(i)(x)=0m_i(x)/\pi_s^{(i)}(x)=0 whenever both are zero. We provide a proof in Appendix A.

Lemma 1: Let π~\tilde{\pi} be the output distribution of a valid MIS scheme with NN samples. Then, for all x∈supp⁡πbx\in\operatorname{supp}\pi_b,

π~(x)≥πb(x)eβr(x)∑i=1Nmi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1.(15)\tilde{\pi}(x)\ge\pi_b(x)e^{\beta r(x)}\sum_{i=1}^{N}m_i(x)\left(m_i(x)g_i(x)+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1}. \tag*{(15)}

Using Lemma 1, we can provide a bound on the KL divergence between π~\tilde{\pi} and the tilted distribution. The proof is given in Appendix B.

Theorem 1: For any valid MIS scheme, the KL divergence from the tilted distribution π∗(x)\pi^*(x) satisfies

DKL(π∗∥π~)≤log⁡(e2βR∑x∈X∗∑i=1Nmi(x)2πb(x)2πs(i)(x)+1).(16)D_{\mathrm{KL}}(\pi^*\Vert\tilde{\pi})\le\log\left(e^{2\beta R}\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{m_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)}+1\right). \tag*{(16)}

Moreover, one may be interested in bounding the expected reward degradation compared to sampling directly from π∗\pi^*, i.e. how much the achieved reward is expected to decrease with respect to an idealized scenario in which exact samples from π∗\pi^* could be realized. By applying Pinsker’s inequality to the bound in Theorem 1 in a similar approach to [27], we arrive at the following result, with the proof found in Appendix C.

Theorem 2: The expected reward degradation satisfies

EX∼π∗[r(X)]−EX∼π~[r(X)]≤R2(log⁡(e2βR∑x∈X∗∑i=1Nmi(x)2πb(x)2πs(i)(x)+1))1/2.(17)\mathbb{E}_{X\sim\pi^*}[r(X)]-\mathbb{E}_{X\sim\tilde{\pi}}[r(X)]\le\frac{R}{\sqrt{2}}\left(\log\left(e^{2\beta R}\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{m_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)}+1\right)\right)^{1/2}. \tag*{(17)}

Choices for the MIS Weights

While the space of possible MIS weights is vast, we highlight two specific choices that have been widely adopted in the literature.

  1. The Choice of mi(X)=1/Nm_i(X)=1/N: While this choice does not necessarily respect the requirements (12)–(13) for a valid MIS scheme unless we impose the stricter coverage assumption that supp⁡πb⊆supp⁡πs\operatorname{supp}\pi_b\subseteq\operatorname{supp}\pi_s for all ii, it remains popular due to its computational simplicity as neither additional proposal nor target evaluations are needed to compute the weights. In the MIS taxonomy proposed in [13], this choice is referred to as scheme N1. The KL bound in (16) simplifies to

DKL(π∗∥π~)≤log⁡(e2βR(χˉ2+1)N+1).(18)D_{\mathrm{KL}}(\pi^*\Vert\tilde{\pi})\le\log\left(\frac{e^{2\beta R}(\bar{\chi}^2+1)}{N}+1\right). \tag*{(18)}

where

χˉ2=1N∑i=1Nχ2(πb∥πs(i)).(19)\bar{\chi}^2=\frac{1}{N}\sum_{i=1}^{N}\chi^2(\pi_b\Vert\pi_s^{(i)}). \tag*{(19)}

is the mean χ2\chi^2-divergence between the base and draft models.

  1. The Balance Heuristic: Another popular choice is the balance heuristic, also called scheme N3 in [13], which has long been known to be near-optimal when applying MIS to variance reduction in Monte Carlo integration [28]. The balance heuristic uses mi(x)=πs(i)(x)/∑j=1Nπs(j)(x)m_i(x)=\pi_s^{(i)}(x)/\sum_{j=1}^{N}\pi_s^{(j)}(x) and therefore requires significantly more computation since the probability of each sample must be evaluated under every proposal distribution. We introduce the mixture distribution

ψ(x)=1N∑i=1Nπs(i)(x)(20)\psi(x)=\frac{1}{N}\sum_{i=1}^{N}\pi_s^{(i)}(x) \tag*{(20)}

after which we can write mi(x)=πs(i)(x)/Nψ(x)m_i(x)=\pi_s^{(i)}(x)/N\psi(x). The KL divergence bound becomes

DKL(π∗∥π~)≤log⁡(e2βR(χ2(πb∥ψ)+1)N+1).(21)D_{\mathrm{KL}}(\pi^* \Vert\tilde{\pi}) \le\log\left(\frac{e^{2\beta R}\left(\chi^2(\pi_b\Vert\psi)+1\right)}{N}+1\right). \tag*{(21)}

Comparing (21) with (18) shows that the balance heuristic enjoys an upper bound that is at least as tight as the uniform weight scheme, by the convexity of the χ2\chi^2 divergence. In fact, we assert that it is the minimizer of the upper bound.

Theorem 3. The balance heuristic minimizes the KL divergence bound in (16) over all valid choices of MIS weights, provided that an equal number of samples is drawn from each draft model.

Proof. The proof makes use of a perturbation argument. Let the balance heuristic weights be mˉi(x)\bar{m}_i(x). For arbitrary valid MIS weights mi(x)m_i(x), we can always write mi(x)=mˉi(x)+δi(x)m_i(x)=\bar{m}_i(x)+\delta_i(x) and, as the weights must sum to one wherever πb(x)>0\pi_b(x)>0,

∑i=1Nmi(x)=∑i=1Nmˉi(x)+∑i=1Nδi(x)⟹∑i=1Nδi(x)=0(22)\sum_{i=1}^{N}m_i(x)=\sum_{i=1}^{N}\bar{m}_i(x)+\sum_{i=1}^{N}\delta_i(x)\Longrightarrow\sum_{i=1}^{N}\delta_i(x)=0 \tag*{(22)}

for any x∈X∗x\in\mathcal{X}^* such that πb(x)>0\pi_b(x)>0. Furthermore, by (13), δi(x)=0\delta_i(x)=0 for any such xx with πs(i)(x)=0\pi_s^{(i)}(x)=0. The only term in (16) that depends on the choice of MIS weights is

V:=∑x∈X∗∑i=1Nmi(x)2πb(x)2πs(i)(x).(23)V:=\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{m_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)}. \tag*{(23)}

Substituting mi(x)=mˉi(x)+δi(x)m_i(x)=\bar{m}_i(x)+\delta_i(x) into VV gives

V=∑x∈X∗∑i=1N(mˉi(x)+δi(x))2πb(x)2πs(i)(x)(24)V=\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{\left(\bar{m}_i(x)+\delta_i(x)\right)^2\pi_b(x)^2}{\pi_s^{(i)}(x)} \tag*{(24)}
=∑x∈X∗∑i=1Nmˉi(x)2πb(x)2πs(i)(x)+2∑x∈X∗∑i=1Nmˉi(x)δi(x)πb(x)2πs(i)(x)+∑x∈X∗∑i=1Nδi(x)2πb(x)2πs(i)(x)(25)\begin{aligned} &=\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{\bar{m}_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)} +2\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{\bar{m}_i(x)\delta_i(x)\pi_b(x)^2}{\pi_s^{(i)}(x)}\\ &\quad+\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{\delta_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)} \tag*{(25)} \end{aligned}
=Vˉ+2∑x∈X∗∑i=1Nmˉi(x)δi(x)πb(x)2πs(i)(x)+Δ(26)= \bar{V}+2\sum_{x\in\mathcal{X}^*}\sum_{i=1}^{N}\frac{\bar{m}_i(x)\delta_i(x)\pi_b(x)^2}{\pi_s^{(i)}(x)}+\Delta \tag*{(26)}

where Vˉ\bar{V} is the value of VV achieved by the balance heuristic and Δ≥0\Delta\ge0. Now, the formula for mˉi(x)\bar{m}_i(x) can be substituted into the second term to see that

∑i=1Nmˉi(x)δi(x)πb(x)2πs(i)(x)=πb(x)2Nψ(x)∑i=1Nδi(x)=0.(27)\sum_{i=1}^{N}\frac{\bar{m}_i(x)\delta_i(x)\pi_b(x)^2}{\pi_s^{(i)}(x)} =\frac{\pi_b(x)^2}{N\psi(x)}\sum_{i=1}^{N}\delta_i(x)=0. \tag*{(27)}

Thus we have shown that for any valid MIS scheme, V≥VˉV\ge\bar{V}. However, we stress that minimizing the upper bound in (16) does not mean that the KL divergence itself is minimized. ■

Optimizing the Sample Allocation

Recent work has proposed training a router to interpret the prompt and dynamically decide which model should generate the samples in BoN framework with multiple LLMs [29]. As an intuitive example, if a particular question involves mathematical reasoning, it should be assigned to a drafter fine-tuned on similar problems. We can incorporate this notion into the MIS framework by adopting the established strategy of taking a different number of samples from each proposal distribution [30, 31], which can be viewed in our setting as a prior on which drafter will be more effective. To be precise, let the total number of samples remain as NN but now we have K≤NK\le N draft models, where model jj contributes NjN_j iid samples.

The results stated previously can immediately be extended to this new configuration, since it was not assumed that πs(1),…,πs(N)\pi_s^{(1)},\ldots,\pi_s^{(N)} had to be different. To this end, let the proposal distributions be p1,…,pKp_1,\ldots,p_K. Let πs(i)=pj\pi_s^{(i)}=p_j for all N<j+1≤i≤N<j+NjN_{<j}+1\le i\le N_{<j}+N_j, where N<j=∑k<jNkN_{<j}=\sum_{k<j}N_k is the total number of samples from all proposal distributions preceding pjp_j. Theorems 1 to 3 then all hold without modification. Specifically, the tightest upper bound on the KL divergence remains (21) and is still achieved by the balance heuristic, with the mixture distribution now ψα(x)=∑j=1Kαjpj(x)\psi_\alpha(x)=\sum_{j=1}^{K}\alpha_jp_j(x).

Here, we let α=[α1 ⋯ αK]T\alpha=[\alpha_1\ \cdots\ \alpha_K]^{\mathsf{T}} and note that in effect, αj=Nj/N\alpha_j=N_j/N and the NjN_j are drawn from pjp_j. The upper bound is minimized by making the χ2\chi^2 divergence between the mixture distribution and the base model πb\pi_b as small as possible; if we relax the problem by allowing α\alpha to take any value in the probability simplex, this becomes equivalent to the convex optimization problem

minimize⁡x∈X∗∑x∈X∗πb(x)2∑j=1Kαjpj(x)(28)\underset{x\in\mathcal{X}^*}{\operatorname{minimize}}\quad\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)^2}{\sum_{j=1}^{K}\alpha_jp_j(x)} \tag*{(28)}
subject to⁡∑i=1Kαk=1,αk≥0.(29)\operatorname{subject\ to}\quad\sum_{i=1}^{K}\alpha_k=1,\quad\alpha_k\ge0. \tag*{(29)}

However, the fixed uniform allocation described in Section III-B2 is likely to be of greater practical relevance. First, the χ2\chi^2 divergence over X∗\mathcal{X}^* cannot be computed exactly. Second, the proposal and target distributions are expected to vary across different reasoning steps, making it difficult to apply adaptive importance sampling methods [23, 30]. Third, in many real-world systems the overall latency will be determined by that of the slowest model; if all drafters have a similar number of parameters, this will typically be whichever one has the largest batch size, favoring a uniform allocation. Nevertheless, in heterogeneous environments where the drafters have different computational costs, varying the sample allocation may become useful. We leave the study of this setting to future work.

Experiments

We perform experiments on the Qwen2.5 series [32] using Qwen2.5-Math 7B as the target model and Qwen2.5-Math, Instruct and Coder 1.5B as the draft models with a uniform sample allocation. For GSI, all samples are from Qwen2.5-Math 1.5B. The PRM is Qwen2.5-Math-PRM 7B [33], which is fine-tuned on mathematics. Each draft model is run on a separate L40S GPU, with 3 GPUs being used in total. Our experiments focus on reasoning tasks and evaluate 100 prompts each from the MMLU-Pro [34] and MATH-500 [14] datasets, with each response capped at 40 steps and 4096 tokens.

Hyperparameter Selection

Following the choice made in [1], we fix the KL regularization to be β=20\beta= 20. Moreover, for GSI, MIS-N1 and MIS-N3, we introduce a rejection threshold of α=0.5\alpha= 0.5, which was also used in [1] to empirically increase reasoning performance. If the tilted reward of the selected draft reasoning step is less than α\alpha, we reject it and fall back to vanilla soft BoN sampling from the target model. This step guards against rare cases where the draft model is misaligned with the target such that importance resampling does not reasonably approximate π∗\pi^*.

Results on Reasoning Tasks

The primary metric for reasoning accuracy is the pass-at-NN rate, i.e. the fraction of prompts for which a correct answer is given when taking NN samples. Across both datasets, test-time scaling with speculative inference increases downstream performance compared to one-shot reasoning using the target model alone, which achieves accuracies of 0.27 and 0.79 on MMLU-Pro and MATH-500 respectively. As seen in Table I however, increasing NN further provides relatively little gain, suggesting that sampling a small pool of reasoning steps is sufficient. Even though the MIS strategies take only one-third as many samples compared to single-model GSI from the fine-tuned Qwen2.5-Math drafter, which is expected to align best with the chosen PRM and target model, they achieve comparable pass-at-NN rates across a variety of sample counts, with MIS-N3 in particular demonstrating strong performance.

NNMMLU-ProMATH-500
GSIMIS-N1MIS-N3GSIMIS-N1MIS-N3
30.400.390.420.880.840.82
60.400.420.420.860.850.85
120.440.490.450.860.860.85
240.490.450.480.870.840.86
480.440.430.520.890.820.89
960.470.420.440.890.840.87
1920.520.510.440.870.830.87

Table I. Pass-at-NN rates of the GSI, MIS-N1 and MIS-N3 speculative test-time scaling strategies.

The advantage of the MIS approach becomes more apparent when moving beyond the narrow domain of MATH-500 into the more diverse MMLU-Pro dataset. While pass-at-NN rates can saturate due to imperfections in PRM-based scoring [7], the tilted reward improves compared to GSI, as seen in Figure 1, especially when NN is small. MIS-N3 also consistently outperforms MIS-N1 in terms of tilted reward on MMLU-Pro, validating its theoretical optimality from Theorem 3 and demonstrating the advantage of combining diverse samples with principled weightings in more challenging reasoning settings.

Average tilted reward achieved by draft responses on MMLU-Pro and MATH-500

Figure 1. Average tilted reward achieved by draft responses on MMLU-Pro (above) and MATH-500 (below).

Comparative Runtime

We show the average time per reasoning step in Table II for the most computationally expensive settings of N=96N = 96 and N=192N = 192; the overhead compared to GSI ranges from 3 % in the best case to a modest 10 % at worst, indicating that MIS-N3 with the balance heuristic remains viable as a test-time scaling framework despite requiring additional proposal evaluations.

NNMMLU-ProMATH-500
GSIMIS-N1MIS-N3GSIMIS-N1MIS-N3
969.939.4110.1910.6911.4911.81
19216.5515.6017.4815.4115.7316.86

Table II. Seconds per step for speculative test-time-scaling.

Conclusion

We have extended PRM-guided speculative reasoning to an ensemble setting by introducing a principled framework based on MIS, which satisfies new theoretical guarantees on the KL divergence from the optimal tilted distribution. Our approach bypasses the constraint that a single drafter’s support must fully cover the target distribution and maintains competitive pass-at-NN rates with comparable inference speed. The theoretical results for general MIS schemes and the balance heuristic lay a foundation for future work which may incorporate routers to intelligently allocate compute across diverse experts, explore sources of drafter diversity other than fine-tuned variants of the same base model, or expand the framework beyond multi-step reasoning into domains such as creative writing or code generation.

Acknowledgments

Resources used for this research were provided in part by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute (www.vectorinstitute.ai/partnerships/current-partners/).

Proof of Lemma 1

The proof extends that of [18 Lem. 1], and we begin by directly computing the probability of choosing X1=xX_1=x as the output, which is

π~(x)=∑i=1NPr⁡[X1=x,S=i](30)\widetilde{\pi}(x)=\sum_{i=1}^{N}\Pr[X_1=x,S=i] \tag*{(30)}
=∑i=1NPr⁡[X1(i)=x,S=i](31)=\sum_{i=1}^{N}\Pr[X_1^{(i)}=x,S=i] \tag*{(31)}
=∑i∈S(x)Pr⁡[X1(i)=x,S=i](32)=\sum_{i\in S(x)}\Pr[X_1^{(i)}=x,S=i] \tag*{(32)}
=∑i∈S(x)πs(i)(x)Pr⁡[S=i∣X1(i)=x].(33)=\sum_{i\in S(x)}\pi_s^{(i)}(x)\Pr[S=i\mid X_1^{(i)}=x]. \tag*{(33)}

where we have defined S(x)={i∈{1,…,N}:πs(i)(x)>0}\mathcal{S}(x)=\{i\in\{1,\ldots,N\}:\pi_s^{(i)}(x)>0\}. The analysis will be the same for each ii, so let us focus on computing Pr⁡[S=1∣X1(1)=x]\Pr[S=1\mid X_1^{(1)}=x].

Pr⁡[S=1∣X1(1)=x]=∑x2∈X∗⋯∑xN∈X∗Pr⁡[S=1∣X1(1)=x,X1(2)=x2,…,X1(N)=xN]Pr⁡[X1(2)=x2,…,X1(N)=xN](34)\Pr[S=1\mid X_1^{(1)}=x] =\sum_{x_2\in\mathcal{X}^*}\cdots\sum_{x_N\in\mathcal{X}^*}\Pr[S=1\mid X_1^{(1)}=x,X_1^{(2)}=x_2,\ldots,X_1^{(N)}=x_N]\Pr[X_1^{(2)}=x_2,\ldots,X_1^{(N)}=x_N] \tag*{(34)}
=∑x2∈X∗⋯∑xN∈X∗m1(x)g1(x)m1(x)g1(x)+∑j=2Nmj(xj)gj(xj)∏j=2Nπs(j)(xj)(35)=\sum_{x_2\in\mathcal{X}^*}\cdots\sum_{x_N\in\mathcal{X}^*}\frac{m_1(x)g_1(x)}{m_1(x)g_1(x)+\sum_{j=2}^{N}m_j(x_j)g_j(x_j)}\prod_{j=2}^{N}\pi_s^{(j)}(x_j) \tag*{(35)}
=E[m1(x)g1(x)m1(x)g1(x)+∑j=2Nmj(X1(j))gj(X1(j))].(36)=\mathbb{E}\left[\frac{m_1(x)g_1(x)}{m_1(x)g_1(x)+\sum_{j=2}^{N}m_j(X_1^{(j)})g_j(X_1^{(j)})}\right]. \tag*{(36)}

Generalizing to S=iS=i for any 1≤i≤N1\leq i\leq N and substituting into (A4),

π~(x)=∑i∈S(x)πs(i)(x)E[mi(x)gi(x)mi(x)gi(x)+∑j≠imj(X1(j))gj(X1(j))](37)\widetilde{\pi}(x)=\sum_{i\in S(x)}\pi_s^{(i)}(x)\mathbb{E}\left[\frac{m_i(x)g_i(x)}{m_i(x)g_i(x)+\sum_{j\ne i}m_j(X_1^{(j)})g_j(X_1^{(j)})}\right] \tag*{(37)}
=∑i∈S(x)πs(i)(x)mi(x)gi(x)E[(mi(x)gi(x)+∑j≠imj(X1(j))gj(X1(j)))−1](38)=\sum_{i\in S(x)}\pi_s^{(i)}(x)m_i(x)g_i(x)\mathbb{E}\left[\left(m_i(x)g_i(x)+\sum_{j\ne i}m_j(X_1^{(j)})g_j(X_1^{(j)})\right)^{-1}\right] \tag*{(38)}
≥∑i∈S(x)πs(i)(x)mi(x)gi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1(39)\geq\sum_{i\in S(x)}\pi_s^{(i)}(x)m_i(x)g_i(x)\left(m_i(x)g_i(x)+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1} \tag*{(39)}
=πb(x)eβr(x)∑i∈S(x)mi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1(40)=\pi_b(x)e^{\beta r(x)}\sum_{i\in S(x)}m_i(x)\left(m_i(x)g_i(x)+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1} \tag*{(40)}

where (a) is by Jensen’s inequality. Because we consider a valid MIS scheme according to the conditions in (12)–(13), mi(x)=0m_i(x)=0 for all i∉S(x)i\notin S(x); adopting the convention that in such cases mi(x)/πs(i)(x)=0m_i(x)/\pi_s^{(i)}(x)=0 gives mi(x)gi(x)=0m_i(x)g_i(x)=0. Moreover, for such an ii,

∑j≠iEX∼πs(j)[mj(X)gj(X)]≥∑j∈S(x)EX∼πs(j)[mj(X)gj(X)](41)\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\geq\sum_{j\in S(x)}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)] \tag*{(41)}
≥πb(x)eβr(x)∑j∈S(x)mj(x)(42)\geq\pi_b(x)e^{\beta r(x)}\sum_{j\in S(x)}m_j(x) \tag*{(42)}
=πb(x)eβr(x)>0(43)=\pi_b(x)e^{\beta r(x)}>0 \tag*{(43)}

where (a) is again by (12). Therefore, expanding the summation in (A11) to include all 1≤i≤N1\leq i\leq N does not affect the result, which yields

π~(x)≥πb(x)eβr(x)∑i=1Nmi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1.(44)\widetilde{\pi}(x)\geq\pi_b(x)e^{\beta r(x)}\sum_{i=1}^{N}m_i(x)\left(m_i(x)g_i(x)+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1}. \tag*{(44)}

Proof of Theorem 1

Similar to the approach used to prove [1 Th. 1], we start from the definition of the KL divergence. To avoid dealing with terms where πs(i)(x)=0\pi_s^{(i)}(x)=0, we use the form of Lemma 1 in (A11), where the sum is restricted to S(x)={i∈{1,…,N}:πs(i)(x)>0}S(x)=\{i\in\{1,\ldots,N\}:\pi_s^{(i)}(x)>0\}. Then,

DKL(π∗∥π~)=∑x∈X∗π∗(x)log⁡π∗(x)π~(x)(45)D_{\mathrm{KL}}(\pi^* \mathbin\Vert\widetilde{\pi}) = \sum_{x\in\mathcal{X}^*}\pi^*(x)\log\frac{\pi^*(x)}{\widetilde{\pi}(x)} \tag*{(45)}
≤∑x∈X∗πb(x)eβr(x)EX∼πb[eβr(X)]log⁡(πb(x)eβr(x)EX∼πb[eβr(X)][πb(x)eβr(x)∑i∈S(x)mi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1]−1)(46)\begin{aligned} &\leq\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]} \log\left(\frac{\pi_b(x)e^{\beta r(x)}}{\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]} \left[\pi_b(x)e^{\beta r(x)}\sum_{i\in S(x)}m_i(x)\left(m_i(x)g_i(x)\right.\right.\right.\\ &\qquad\left.\left.\left.+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1}\right]^{-1}\right) \tag*{(46)} \end{aligned}
DKL(π∗∥π~)=∑x∈X∗πb(x)eβr(x)EX∼πb[eβr(X)]log⁡(1EX∼πb[eβr(X)][∑i∈S(x)mi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1]−1)(47)\begin{aligned} D_{\mathrm{KL}}(\pi^*\mathbin\Vert\widetilde{\pi}) &=\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]} \log\left(\frac{1}{\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]} \left[\sum_{i\in S(x)}m_i(x)\left(m_i(x)g_i(x)\right.\right.\right.\\ &\qquad\left.\left.\left.+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1}\right]^{-1}\right) \tag*{(47)} \end{aligned}
≤log⁡(∑x∈X∗πb(x)eβr(x)(EX∼πb[eβr(X)])2[∑i∈S(x)mi(x)(mi(x)gi(x)+∑j≠iEX∼πs(j)[mj(X)gj(X)])−1]−1)(48)\begin{aligned} &\leq\log\left(\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\left(\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)^2} \left[\sum_{i\in S(x)}m_i(x)\left(m_i(x)g_i(x)\right.\right.\right.\\ &\qquad\left.\left.\left.+\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)]\right)^{-1}\right]^{-1}\right) \tag*{(48)} \end{aligned}

where (a) is by Lemma 1 and (b) is by Jensen’s inequality. Next we bound

∑j≠iEX∼πs(j)[mj(X)gj(X)]=∑j≠iEX∼πs(j)[mj(X)πb(X)eβr(X)πs(j)(X)](49)\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}[m_j(X)g_j(X)] =\sum_{j\ne i}\mathbb{E}_{X\sim\pi_s^{(j)}}\left[\frac{m_j(X)\pi_b(X)e^{\beta r(X)}}{\pi_s^{(j)}(X)}\right] \tag*{(49)}
=∑j≠i∑x∈supp⁡πs(j)mj(x)πb(x)eβr(x)(50)=\sum_{j\ne i}\sum_{x\in\operatorname{supp}\pi_s^{(j)}}m_j(x)\pi_b(x)e^{\beta r(x)} \tag*{(50)}
≤∑j≠iEX∼πb[mj(X)eβr(X)](51)\leq\sum_{j\ne i}\mathbb{E}_{X\sim\pi_b}[m_j(X)e^{\beta r(X)}] \tag*{(51)}
=∑j=1NEX∼πb[mj(X)eβr(X)]−EX∼πb[mi(X)eβr(X)](52)=\sum_{j=1}^{N}\mathbb{E}_{X\sim\pi_b}[m_j(X)e^{\beta r(X)}]-\mathbb{E}_{X\sim\pi_b}[m_i(X)e^{\beta r(X)}] \tag*{(52)}
≤EX∼πb[eβr(X)∑j=1Nmj(X)]=(b)EX∼πb[eβr(X)](53)\leq\mathbb{E}_{X\sim\pi_b}\left[e^{\beta r(X)}\sum_{j=1}^{N}m_j(X)\right] \mathrel{\overset{(b)}{=}}\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}] \tag*{(53)}

where (a) follows by expanding the inner summation to be over all x∈X∗x\in\mathcal{X}^*, as all terms involved are nonnegative, and (b) makes use of the first canonical requirement for a valid MIS scheme stated in (12). Going back to (A19) and the KL divergence,

DKL(π∗∥π~)≤log⁡(∑x∈X∗πb(x)eβr(x)(EX∼πb[eβr(X)])2[∑i∈S(x)mi(x)(mi(x)πb(x)eβr(x)πs(i)(x)+EX∼πb[eβr(X)])−1]−1)(54)\begin{aligned} D_{\mathrm{KL}}(\pi^*\mathbin\Vert\widetilde{\pi}) &\leq\log\left(\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\left(\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)^2} \left[\sum_{i\in S(x)}m_i(x)\left(\frac{m_i(x)\pi_b(x)e^{\beta r(x)}}{\pi_s^{(i)}(x)} +\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)^{-1}\right]^{-1}\right) \tag*{(54)} \end{aligned}
≤log⁡(∑x∈X∗πb(x)eβr(x)(EX∼πb[eβr(X)])2∑i∈S(x)mi(x)(mi(x)πb(x)eβr(x)πs(i)(x)+EX∼πb[eβr(X)]))(55)\begin{aligned} &\leq\log\left(\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\left(\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)^2} \sum_{i\in S(x)}m_i(x)\left(\frac{m_i(x)\pi_b(x)e^{\beta r(x)}}{\pi_s^{(i)}(x)} +\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)\right) \tag*{(55)} \end{aligned}
=log⁡(∑x∈X∗πb(x)eβr(x)(EX∼πb[eβr(X)])2(∑i∈S(x)mi(x)2πb(x)eβr(x)πs(i)(x)+EX∼πb[eβr(X)]))(56)\begin{aligned} &=\log\left(\sum_{x\in\mathcal{X}^*}\frac{\pi_b(x)e^{\beta r(x)}}{\left(\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)^2} \left(\sum_{i\in S(x)}\frac{m_i(x)^2\pi_b(x)e^{\beta r(x)}}{\pi_s^{(i)}(x)} +\mathbb{E}_{X\sim\pi_b}[e^{\beta r(X)}]\right)\right) \tag*{(56)} \end{aligned}
≤log⁡(e2βR∑x∈X∗∑i∈S(x)mi(x)2πb(x)2πs(i)(x)+1).(57)\leq\log\left(e^{2\beta R}\sum_{x\in\mathcal{X}^*}\sum_{i\in S(x)} \frac{m_i(x)^2\pi_b(x)^2}{\pi_s^{(i)}(x)}+1\right). \tag*{(57)}

where (a) follows by the weighted arithmetic-harmonic mean inequality [35] and (b) uses the fact that eβr(x)≥1e^{\beta r(x)}\geq1 for all x∈X∗x\in\mathcal{X}^*.

While it is permitted that some of the mi(x)m_i(x)’s be zero even when i∈S(x)i\in S(x), for any valid MIS scheme the subset in which each mi(x)>0m_i(x)>0 must nevertheless form a partition of unity wherever x∈supp⁡πbx\in\operatorname{supp}\pi_b, as required by (12)–(13). Therefore the weighted arithmetic-harmonic mean inequality still holds, as the sum can be safely restricted to this subset. Applying our convention that mi(x)/πs(i)(x)=0m_i(x)/\pi_s^{(i)}(x)=0 when both the numerator and denominator are zero finally affords the form of the bound in (16).

Proof of Theorem 2

To start, we have the following variational representation of the total variation distance between measures PP and QQ on X∗\mathcal{X}^{*}, see for example [36 Th. 7.7]:

DTV(P,Q)=12sup⁡f∈F[EX∼P[f(X)]−EX∼Q[f(X)]](58)D_{\mathrm{TV}}(P,Q)=\frac{1}{2}\sup_{f\in\mathcal{F}}\left[\mathbb{E}_{X\sim P}[f(X)]-\mathbb{E}_{X\sim Q}[f(X)]\right] \tag*{(58)}

where F={f:X∗→R,∥f∥∞≤1}\mathcal{F}=\{f:\mathcal{X}^{*}\to\mathbb{R},\lVert f\rVert_{\infty}\le1\}. Since 0≤r(x)≤R0\le r(x)\le R, we use the function

f(x)=2R(r(x)−R2),x∈X∗(59)f(x)=\frac{2}{R}\left(r(x)-\frac{R}{2}\right),\quad x\in\mathcal{X}^{*} \tag*{(59)}

which has ∥f∥∞=1\lVert f\rVert_{\infty}=1. We get

EX∼π∗[f(X)]−EX∼π~[f(X)]=2R∑x∈X∗((r(x)−R2)π∗(x)−(r(x)−R2)π~(x))(60)\begin{aligned} \mathbb{E}_{X\sim\pi^{*}}[f(X)]-\mathbb{E}_{X\sim\widetilde{\pi}}[f(X)] &=\frac{2}{R}\sum_{x\in\mathcal{X}^{*}}\left(\left(r(x)-\frac{R}{2}\right)\pi^{*}(x)-\left(r(x)-\frac{R}{2}\right)\widetilde{\pi}(x)\right) \tag*{(60)} \end{aligned}
=2R(EX∼π∗[r(X)]−EX∼π~[r(X)])+∑x∈X∗(π~(x)−π∗(x))(61)\begin{aligned} &=\frac{2}{R}\left(\mathbb{E}_{X\sim\pi^{*}}[r(X)]-\mathbb{E}_{X\sim\widetilde{\pi}}[r(X)]\right)+\sum_{x\in\mathcal{X}^{*}}\left(\widetilde{\pi}(x)-\pi^{*}(x)\right) \tag*{(61)} \end{aligned}
=2R(EX∼π∗[r(X)]−EX∼π~[r(X)])(62)\begin{aligned} &=\frac{2}{R}\left(\mathbb{E}_{X\sim\pi^{*}}[r(X)]-\mathbb{E}_{X\sim\widetilde{\pi}}[r(X)]\right) \tag*{(62)} \end{aligned}
≤2DTV(π∗,π~).(63)\le2D_{\mathrm{TV}}(\pi^{*},\widetilde{\pi}). \tag*{(63)}

Therefore, applying Pinsker’s inequality,

EX∼π∗[r(X)]−EX∼π~[r(X)]≤RDTV(π∗,π~)≤R12DKL(π∗∥π~).(64)\mathbb{E}_{X\sim\pi^{*}}[r(X)]-\mathbb{E}_{X\sim\widetilde{\pi}}[r(X)]\le R D_{\mathrm{TV}}(\pi^{*},\widetilde{\pi})\le R\sqrt{\frac{1}{2}D_{\mathrm{KL}}(\pi^{*}\mathbin{\|}\widetilde{\pi})}. \tag*{(64)}

Bounding DKL(π∗∥π~)D_{\mathrm{KL}}(\pi^{*}\mathbin{\|}\widetilde{\pi}) using Theorem 1 then gives the desired bound.

References

  1. [1]J. Geuter, Y. Mroueh, and D. Alvarez-Melis, “Guided speculative inference for efficient test-time alignment of LLMs,” in Proc. 14th Int. Conf. Learn. Representations, 2026.arxiv.org/abs/2506.04118
  2. [2]J. Kaplan et al., “Scaling laws for neural language models,” 2020. [Online]. Available: https://arxiv.org/abs/2001.08361
  3. [3]J. Hoffmann et al., “An empirical analysis of compute-optimal large language model training,” in Advances Neural Inf. Process. Syst., vol. 36, 2022, pp. 30 016–30 030.arxiv.org/abs/2203.15556
  4. [4]N. Muennighoff et al., “s1: simple test-time scaling,” in Proc. 2025 Conf. Empirical Methods Natural Lang. Process., 2025, pp. 20 275–20 321.arxiv.org/abs/2501.19393
  5. [5]C. V. Snell, J. Lee, K. Xu, and A. Kumar, “Scaling LLM test-time compute optimally can be more effective than scaling parameters for reasoning,” in Proc. 13th Int. Conf. Learn. Representations, 2025.arxiv.org/abs/2408.03314
  6. [6]Q. Zhang et al., “What, how, where, and how will? a survey on test-time scaling in large language models,” 2025. [Online]. Available: https://arxiv.org/abs/2503.24235
  7. [7]L. Gao, J. Schulman, and J. Hilton, “Scaling laws for reward model overoptimization,” in Proc. 40th Int. Conf. Mach. Learn., 2023, pp. 10 835–10 866.arxiv.org/abs/2210.10760
  8. [8]Y. Song, G. Wang, S. Li, and B. Y. Lin, “The good, the bad, and the greedy: evaluation of LLMs should not ignore non-determinism,” in Proc. 2025 Conf. Nations Americas Chapter Assoc. Comput. Linguistics: Human Lang. Technologies, 2025, pp. 4 195–4 206.arxiv.org/abs/2407.10457
  9. [9]A. Beirami et al., “Theoretical guarantees on the best-of-n alignment policy,” in Proc. 42nd Int. Conf. Mach. Learn., 2025, pp. 3580–3602.arxiv.org/abs/2401.01879
  10. [10]Y. Leviathan, M. Kalman, and Y. Matias, “Fast inference from transformers via speculative decoding,” in Proc. 40th Int. Conf. Mach. Learn., 2023, pp. 19 274–19 286.
  11. [11]B. Liao et al., “Reward-guided speculative decoding for efficient LLM reasoning,” in Proc. 42nd Int. Conf. Mach. Learn., 2025, pp. 37 555–37 572.arxiv.org/abs/2501.19324
  12. [12]M. Cemri et al., “SPECS: Faster test-time scaling through speculative drafts,” in ES-FoMo III: 3rd Workshop on Efficient Systems for Foundation Models, 2025.arxiv.org/abs/2506.15733
  13. [13]V. Elvira, L. Martino, D. Luengo, and M. F. Bugallo, “Generalized multiple importance sampling,” Statistical Sci., vol. 34, no. 1, pp. 129–155, 2019.DOI
  14. [14]H. Lightman et al., “Let’s verify step-by-step,” in Proc. 12th Int. Conf. Learn. Representations, 2024.arxiv.org/abs/2305.20050
  15. [15]J. Eisenstein et al., “Helping or herding? reward model ensembles mitigate but do not eliminate reward hacking,” in Proc. 1st Conf. Lang. Model., 2024.arxiv.org/abs/2312.09244
  16. [16]J. Skalse, N. Howe, D. Krasheninnikov, and D. Krueger, “Defining and characterizing reward gaming,” in Advances Neural Inf. Process. Syst., vol. 36, 2022, pp. 9 460–9 471.arxiv.org/abs/2209.13085
  17. [17]A. Huang, A. Block, Q. Liu, N. Jiang, A. Krishnamurthy, and D. J. Foster, “Is best-of-n the best of them? Coverage, scaling, and optimality in inference-time alignment,” in Proc. 42nd Int. Conf. Mach. Learn., 2025.arxiv.org/abs/2503.21878
  18. [18]C. M. Verdun, A. Oesterling, H. Lakkaraju, and F. P. Calmon, “Soft best-of-n sampling for model alignment,” in Proc. IEEE Int. Symp. Inf. Theory, 2025, pp. 1–6.arxiv.org/abs/2505.03156
  19. [19]G. Aminian, I. Shenfeld, A. R. Asadi, A. Beirami, and Y. Mroueh, “Best-of-n through the smoothing lens: KL divergence and regret analysis,” in Proc. 14th Int. Conf. Learn. Representations, 2026.arxiv.org/abs/2507.05913
  20. [20]T. Korbak, E. Perez, and C. Buckley, “RL with KL penalties is better viewed as Bayesian inference,” in Findings Assoc. Comput. Linguistics, 2022, pp. 1083–1091.arxiv.org/abs/2205.11275
  21. [21]D. B. Rubin, “A nonnarrative sampling/importance resampling alternative to the data augmentation algorithm for creating a few imputations when fractions of missing information are modest: the SIR algorithm,” Journal of the American Statistical Association, vol. 82, no. 398, pp. 543–546, 1987.DOI
  22. [22]A. Gelman, J. B. Carlin, H. S. Stern, D. B. Dunson, A. Vehtari, and D. B. Rubin, Bayesian data analysis, 3rd ed. Boca Raton: Chapman and Hall/CRC, 2013.
  23. [23]M. F. Bugallo, V. Elvira, L. Martino, D. Luengo, J. Miguez, and P. M. Djurić, “Adaptive importance sampling: the past, the present, and the future,” IEEE Signal Process. Mag., vol. 34, no. 4, pp. 60–79, 2017.DOI
  24. [24]X. Wang et al., “Self-consistency improves chain of thought reasoning in language models,” in Proc. 11th Int. Conf. Learn. Representations, 2023.arxiv.org/abs/2203.11171
  25. [25]C. Wyman et al., “A gentle introduction to ReSTIR: path reuse in real-time,” in ACM SIGGRAPH 2023 Courses, 2023.DOI
  26. [26]J. Kondapaneni, P. Veodla, P. Grittmann, T. Skřivan, P. Slusallek, and J. Křivánek, “Optimal multiple importance sampling,” ACM Trans. Graph., vol. 38, no. 4, 2019.
  27. [27]Y. Mroueh and A. Nitsure, “Information theoretic guarantees for policy alignment in large language models,” Trans. Mach. Learn. Res., 2025.arxiv.org/abs/2406.05883
  28. [28]E. Veach, “Robust Monte Carlo methods for light transport simulation,” Ph.D. dissertation, Stanford University, 1998.
  29. [29]J. Geuter and G. Kornhardt, “RoBoN: routed online best-of-n for test-time scaling with multiple LLMs,” 2025. [Online]. Available: https://arxiv.org/abs/2512.05542
  30. [30]H. Y. He and A. B. Owen, “Optimal mixture weights in multiple importance sampling,” 2014. [Online]. Available: https://arxiv.org/abs/1411.3954
  31. [31]V. Havran and M. Sbert, “Optimal combination of techniques in multiple importance sampling,” in Proc. 13th ACM SIGGRAPH Int. Conf. Virtual-Reality Continuum Appl. Industry, 2014, pp. 141–150.DOI
  32. [32]Qwen Team, “Qwen2.5: a party of foundation models,” 2024. [Online]. Available: https://qwenlm.github.io/blog/qwen2.5/
  33. [33]Z. Zhang et al., “The lessons of developing process reward models in mathematical reasoning,” 2025. [Online]. Available: https://arxiv.org/abs/2501.07301
  34. [34]Y. Wang et al., “MMLU-Pro: a more robust and challenging multi-task language understanding benchmark,” in Advances Neural Inf. Process. Syst., vol. 38, 2024, pp. 95 266–95 290.arxiv.org/abs/2406.01574
  35. [35]J. M. Steele, The Cauchy-Schwarz master class. Cambridge: Cambridge University Press, 2004.
  36. [36]Y. Polyanskiy and Y. Wu, Information theory: from coding to learning. Cambridge: Cambridge University Press, 2023.

Paper details

vlnc:W_eegnc82p
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents