---
title: Reward-Shifted Speculative Sampling
url: https://www.emergentmind.com/topics/reward-shifted-speculative-sampling-sss
type: topic
---

# Reward-Shifted Speculative Sampling

Reward-Shifted Speculative Sampling (SSS) is a decoding algorithm for test-time weak-to-strong alignment in which a small draft model is aligned with human preferences, the large target model remains unchanged, and speculative sampling is modified so that generation follows a reward-shifted, RLHF-optimal distribution rather than the target model’s original distribution [2508.15044]. In this construction, the aligned draft model supplies the reward shift, the unchanged target model supplies large-model likelihoods, and the acceptance rule plus bonus-token distribution are redesigned so that preference alignment is performed at inference time without post-training the large target model and without querying an external reward model during decoding.

## 1. Formal objective and alignment setting

SSS is formulated in a KL-regularized RLHF setting. The underlying objective is
\[
\max_{\bm{\theta}} \mathbb{E}_{x\in\mathcal{D}_p,\, y\sim\pi_{\bm{\theta}}(\cdot|x)} r(x,y) - \lambda \cdot \mathbf{KL}(\pi_{\bm{\theta}} \| \pi_{\text{ref}}),
\]
whose optimal solution is
\[
\pi^\star(y|x) \propto \pi_{\text{ref}}(y|x)\cdot\exp\left(\frac{1}{\beta}r(x,y)\right).
\]
SSS takes this RLHF-optimal policy as its target distribution rather than the base target model’s native autoregressive law [2508.15044].

The method is explicitly framed as test-time weak-to-strong alignment. The weak model is a small draft model, denoted \(\pi_{\text{draft}^r}\), which is first SFT-trained on chosen preference responses and then aligned with DPO. The strong model is a larger target model, denoted \(\pi_{\text{ref}}\), which remains unchanged. The central claim is that the distributional shift between the aligned draft and the unaligned target can be exploited to recover the RLHF-optimal aligned distribution of the strong model without directly aligning that strong model [2508.15044].

A crucial modeling assumption is that the aligned draft approximately follows the same reward tilt relative to its SFT checkpoint:
\[
\pi_{\text{draft}^r}(y|x) \approx \pi_{\text{draft}^{\text{SFT}}}(y|x)\cdot\exp\left(\frac{1}{\beta}r(x,y)\right).
\]
In the theorem, this approximation is strengthened to equality. This assumption is what makes it possible to infer the missing reward factor from the gap between \(\pi_{\text{draft}^r}\), \(\pi_{\text{draft}^{\text{SFT}}}\), and \(\pi_{\text{ref}}\) [2508.15044].

## 2. Relation to standard speculative sampling

Classical speculative sampling uses a cheap draft model \(p\) and an expensive target model \(q\), accepts a drafted token with probability
\[
\min\left(1,\frac{q(\tilde x_i \mid \text{prefix})}{p(\tilde x_i \mid \text{prefix})}\right),
\]
and, on rejection, samples from the residual
\[
(q(\cdot\mid \text{prefix})-p(\cdot\mid \text{prefix}))_+,
\]
thereby preserving the target model distribution exactly, up to hardware numerics [2302.01318]. Standard speculative sampling is therefore an exact acceleration method for the unshifted target distribution.

SSS preserves the draft-and-verify structure but changes the objective. If one naively replaces the standard draft with an aligned draft while keeping the usual verifier unchanged, standard speculative sampling still attempts to recover the unaligned target distribution \(\pi_{\text{ref}}\), not the aligned distribution \(\pi^\star\). The paper also reports a severe acceptance-rate collapse in that naive setting: for OPT-6.7B target / OPT-125M draft, standard draft acceptance is \(0.33\) while aligned draft acceptance is \(0.08\) (\(\downarrow 76\%\)); for OPT-13B target / OPT-350M draft, standard draft acceptance is \(0.42\) while aligned draft acceptance is \(0.13\) (\(\downarrow 69\%\)) [2508.15044].

SSS resolves this by keeping proposals from the aligned draft \(\pi_{\text{draft}^r}\) but comparing them against \(\pi_{\text{draft}^{\text{SFT}}}\) in the acceptance ratio, rather than against \(\pi_{\text{draft}^r}\) itself. This is the decisive departure from standard speculative sampling. It is not merely a reward-guided reranking layer on top of ordinary speculation; it is a shifted-target verifier construction whose correction terms are intended to recover \(\pi^\star\) rather than \(\pi_{\text{ref}}\) [2508.15044].

## 3. Acceptance rule, bonus distribution, and decoding procedure

The SSS acceptance probability for a drafted token \(\hat{y}_t\) is
\[
p_{\text{accept}}(t) = \min\left(1, \frac{\pi_{\text{ref}}(\hat{y}_t|x,y_{<t})}{\pi_{\text{draft}^{\text{SFT}}}(\hat{y}_t|x,y_{<t})}\right).
\]
This is the core algorithmic change. Proposals are sampled from \(\pi_{\text{draft}^r}\), but acceptance is calibrated against the SFT draft and the unchanged target [2508.15044].

When rejection occurs after \(K'\) accepted draft tokens, the replacement token is drawn from the reward-shifted bonus distribution
\[
\pi_{\text{bonus}^r}(\cdot|x,y_{<t+K'}) =
\left(\pi_{\text{draft}^r}(\cdot|x,y_{<t+K'}) \left(\frac{\pi_{\text{ref}}(\cdot|x,y_{<t+K'})}{\pi_{\text{draft}^{\text{SFT}}}(\cdot|x,y_{<t+K'})} - 1\right)\right)_+.
\]
Under the aligned-draft assumption, this becomes
\[
\left(\pi^\star(\cdot|x,y_{<t+K'}) - \pi_{\text{draft}^r}(\cdot|x,y_{<t+K'})\right)_+,
\]
which clarifies its role as a residual correction relative to the RLHF-optimal target [2508.15044].

Operationally, SSS proceeds as follows. It initializes \(y\gets\emptyset\) and repeatedly samples a lookahead block of \(K\) draft tokens
\[
\hat{y}_{t+k} \sim \pi_{\text{draft}^r}(\cdot|x,y_{<t},\hat{y}_{t:t+k-1}), \qquad k=1,\dots,K.
\]
The target model then evaluates likelihoods for the drafted block. Each drafted token is tested with the modified acceptance criterion. Accepted tokens are appended to the output. At the first rejection, a replacement is sampled from \(\pi_{\text{bonus}^r}\), later speculative tokens in the block are discarded, and drafting restarts from the corrected prefix [2508.15044].

One subtle but important difference from standard speculative sampling is that SSS omits the usual “extra token” from the target model when all \(K\) draft tokens are accepted. The paper states that no additional token is sampled from the target model once all draft tokens are accepted, since the objective is not the target model distribution [2508.15044].

## 4. Exactness result and its assumptions

The paper’s main theorem states that, under the assumption
\[
\pi_{\text{draft}^r}(y|x) = \pi_{\text{draft}^{\text{SFT}}}(y|x)\cdot\exp\left(\frac{1}{\beta}r(x,y)\right),
\]
the probability that SSS generates response \(y\) given prompt \(x\) is exactly
\[
\mathbf{P}(Y=y|x) \equiv \pi^\star(y|x).
\]
Thus, the method is presented as an exact sampler for the RLHF-optimal reward-shifted target, not as a heuristic preference-guided decoder [2508.15044].

The proof mirrors the standard speculative-sampling argument. A token can arise either from an accepted draft proposal or from bonus-token correction after rejection. For the accepted part,
\[
\pi_{\text{draft}^r}(x)\cdot
\min\left(1,\frac{\pi_{\text{ref}}(x)}{\pi_{\text{draft}^{\text{SFT}}}(x)}\right)
=
\min\left(\pi_{\text{draft}^r}(x), \pi^\star(x)\right).
\]
The rejection mass is then
\[
\sum_{x'} \max\left(0,\pi^\star(x')-\pi_{\text{draft}^r}(x')\right),
\]
and the bonus distribution contributes
\[
\max\left(0,\pi^\star(x)-\pi_{\text{draft}^r}(x)\right).
\]
Combining these two pieces yields
\[
\mathbf{P}(X=x)=
\min\left(\pi_{\text{draft}^r}(x), \pi^\star(x)\right)
+
\max\left(0,\pi^\star(x)-\pi_{\text{draft}^r}(x)\right)
=
\pi^\star(x).
\]
The sequential autoregressive extension then gives the full response law [2508.15044].

This exactness claim depends on several conditions. The paper relies on the KL-regularized RLHF form \(\pi^\star \propto \pi_{\text{ref}}\exp(r/\beta)\), on the well-aligned draft assumption, on implicit shared-support conditions so that ratios such as \(\pi_{\text{ref}}/\pi_{\text{draft}^{\text{SFT}}}\) are well-defined, and on a shared reward signal linking the aligned draft and the notional aligned target [2508.15044]. The paper also acknowledges that the aligned-draft assumption is difficult to verify in practice because the true reward \(r(x,y)\) is not directly known. This motivates a softened empirical variant in which the bonus term is modified to
\[
\left(\pi_{\text{draft}^r}(\cdot|x,y_{<t+K'})^\gamma
\left(\frac{\pi_{\text{ref}}(\cdot|x,y_{<t+K'})}{\pi_{\text{draft}^{\text{SFT}}}(\cdot|x,y_{<t+K'})} - 1\right)\right)_+,
\]
with \(\gamma=1\) recovering the original SSS [2508.15044].

The central theoretical insight is that the mismatch between the aligned draft and the unaligned target is treated as a resource rather than a liability. Because both the aligned draft and the desired aligned target contain the same exponential reward tilt, the product
\[
\pi_{\text{draft}^r}\cdot \frac{\pi_{\text{ref}}}{\pi_{\text{draft}^{\text{SFT}}}}
\]
recovers the desired reward-shifted large-model distribution up to normalization. This suggests that SSS is best understood as a shifted-target speculative sampler, not as ordinary speculative decoding with a reward-biased draft.

## 5. Experimental evidence and efficiency profile

The reported experiments use the HH-RLHF dataset, draft–target pairs with shared vocabulary and similar distributions, and draft post-training by SFT followed by DPO. The evaluated pairs are Qwama-0.5B \(\rightarrow\) Llama-3-8B, OPT-125M \(\rightarrow\) OPT-6.7B, and OPT-350M \(\rightarrow\) OPT-13B. Gold reward is measured by a “LLaMA 7B Reward Model” trained on HH-RLHF. Inference uses temperature \(0.8\), max sequence length \(128\), and one NVIDIA L40S GPU [2508.15044].

The main reported results are summarized below.

| Target model | SSS result | Notable comparator |
|---|---|---|
| Llama-3-8B | Gold R \(6.14\), 86.2 calls, 10.7 s, \(5.4\times\) over BoN | BoN-10: \(6.37\), 1280 calls, 58.0 s |
| OPT-6.7B | Gold R \(3.88\), 115 calls, 7.8 s, \(2.9\times\) over BoN | BoN-5: \(3.28\), 640 calls, 22.7 s |
| OPT-13B | Gold R \(4.06\), 112.5 calls, 13.6 s, \(5.1\times\) over BoN | BoN-5: \(3.49\), 640 calls, 69.4 s |

On Llama-3-8B, SSS improves substantially over vanilla decoding and vanilla speculative decoding while using far fewer calls than BoN, TreeBoN, or CARDS; its Gold R \(6.14\) remains below TreeBoN’s \(6.44\) and CARDS’s \(6.41\), but its latency and call profile are much smaller [2508.15044]. On OPT-6.7B, SSS attains the best gold reward among the compared methods: vanilla \(3.21\), BoN-5 \(3.28\), TreeBoN \(3.27\), CARDS \(2.93\), vanilla SD \(2.00\), and SSS \(3.88\) [2508.15044]. On OPT-13B, SSS again attains the best reported gold reward: vanilla \(3.13\), BoN-5 \(3.49\), TreeBoN \(3.61\), CARDS \(3.35\), vanilla SD \(3.85\), and SSS \(4.06\) [2508.15044].

These results support two distinct claims. First, SSS can produce substantially better reward than vanilla decoding and vanilla speculative decoding. Second, it often offers a markedly better reward–latency tradeoff than BoN-style and reward-model-in-the-loop baselines, because it avoids runtime reward-model calls and still amortizes strong-model verification over speculative blocks [2508.15044].

The paper also reports that the practical softened variant can outperform the theorem-matched \(\gamma=1\) setting when the aligned-draft assumption is imperfect. On OPT-13B/OPT-350M, the best performance occurs for \(\gamma < 0.5\). This indicates that theoretical exactness and empirical best performance need not coincide when the aligned draft is only approximately reward-shifted [2508.15044].

## 6. Conceptual position, related methods, and limitations

SSS sits at a distinct point within the speculative-decoding literature. Standard speculative sampling is an exact accelerator for an unchanged target distribution [2302.01318]. By contrast, SSS explicitly changes the target to a reward-shifted law and adjusts both acceptance and correction so that the new target, rather than the verifier distribution, is recovered [2508.15044]. This places SSS closer to a shifted-target speculative sampler than to a pure systems acceleration method.

It also differs from reward-guided speculative or speculative-like methods that do not define or recover an explicit reward-shifted target. “Fast Best-of-N Decoding via Speculative Rejection” is a sequence-level rejection and pruning scheme designed to accelerate Best-of-\(N\); it does not specify a target distribution, does not introduce a reward-shifted law such as \(p_\beta(y\mid x)\propto p_0(y\mid x)e^{\beta r(x,y)}\), and has no exactness theorem of that kind [2410.20290]. “Reward-Guided Speculative Decoding for Efficient LLM Reasoning” intentionally abandons exact target-distribution preservation in favor of a reward-conditioned mixture policy with process-reward gating; its guarantees are about expected reward under budget constraints, not exact recovery of a reward-tilted sequence law [2501.19324]. “Cactus” is particularly relevant because it formalizes speculative sampling for an arbitrary target distribution \(h\) and derives acceptance/recovery rules under a divergence-constrained target shift, but its concrete shift is acceptance-optimized rather than reward-defined [2604.04987]. This suggests that SSS belongs to the family of shifted-target speculative methods, but with a specifically RLHF-derived target.

Several common misconceptions follow from these distinctions. SSS is not simply “standard speculative sampling with an aligned draft,” because naive substitution both preserves the wrong target and sharply lowers acceptance. It is not Best-of-\(N\) acceleration, since it does not search over completed samples and rerank them with a reward model. It is also not a runtime reward-model decoding method, because the reward shift is encoded in the aligned draft and no external reward model is queried during generation [2508.15044].

The method’s main limitations are equally explicit. It depends on a well-aligned draft satisfying
\[
\pi_{\text{draft}^r}(y|x) \approx \pi_{\text{draft}^{\text{SFT}}}(y|x)\cdot\exp\left(\frac{1}{\beta}r(x,y)\right),
\]
yet the true reward function is unknown, so this assumption cannot be directly verified. Practical performance depends on draft post-training quality and on correction hyperparameters such as \(\gamma\). Generalization is also a concern, since a small draft aligned for one task may not transfer cleanly to others [2508.15044].

A plausible implication is that SSS is strongest when a small draft can reliably internalize the desired reward tilt and when one wants a serving-time aligner that avoids both large-model post-training and runtime reward evaluation. Under those conditions, it functions as an exact or near-exact weak-to-strong alignment mechanism at decoding time; when those conditions fail, its behavior becomes increasingly dependent on approximation quality rather than theorem-level guarantees.

Source: https://www.emergentmind.com/topics/reward-shifted-speculative-sampling-sss