Source-linked AI summary

Mentored Decoding: Faster Inference meets Boosting

Vivien Tran-Thien, Richard Nock

arXiv:2609.30474v1cs.LG

TL;DR

Exact target matching constrains speculative decoding’s acceptance rate, while formal analysis of jointly improving inference efficiency and output quality was lacking. The paper generalizes mentored decoding across f-divergences, connects its composite outputs to boosting, and develops efficient algorithms. It establishes boosting properties that support assessing drafter–target complementarity from output quality.

  • Problem

    Exact target matching caps speculative decoding’s acceptance rate, and prior work had not formally analyzed jointly improving inference efficiency and output quality.

    Source: §1 · p. 1
  • Method

    The paper generalizes mentored decoding across f-divergences, connects composite outputs to boosting, and develops divergence-independent breakpoint algorithms.

    Source: §1 · pp. 2–3
  • Results

    Mentored-decoding composite outputs hide model combinations with boosting properties, enabling evaluation of drafter–target complementarity from output quality.

    Source: §1 · p. 3
  • Takeaways & Limitations

    Drafter and target models can be assessed for complementarity to guide selection from available model pools.

    Source: §1 · p. 3

    Computing linear correlation coefficients can become costly as the number of models increases.

    Source: §7 · p. 31

Abstract

from arXiv · show

Speculative decoding is a successful technique speeding up inference of a target autoregressive language model via a fast drafter model. Lossy speculative decoding allows a drift with respect to the target to further improve speed. Interestingly, it has been observed experimentally that the resulting model can $\textit{also}$ beat the target $\textit{quality-wise}$. Our paper formally proves how such a feat is possible with a formal approach to lossy speculative decoding called $\textit{mentored decoding}$. To get there, we connect inference to a celebrated ML training theory, $\textit{boosting}$, and proceed via the generalization of mentored decoding to the whole set of $f$-divergences. We uncover key properties of mentored decoding, among which (i) the particularly appealing geometric nature of the total variation case, (ii) simple approximations for any $f$-divergence in direct relation with boosting compliance, and (iii) a $\textit{divergence independent}$ $O(n)$ space and $O(\mathrm{sort}(n))$ time data structure built on drafter and target outputs, which allows to query the optimal parameters of the dual problem in $O(\log n)$ time and constructing optimal mentored distributions in $O(n)$ time for any $f$-divergence.

1 Introduction

The paper addresses speculative decoding’s acceptance-rate ceiling under exact target matching and the lack of formal analysis connecting inference speedups with model-quality gains. It develops mentored decoding through f-divergence optimization, boosting connections, and efficient algorithms.

1 Introduction

  • The paper presents a formal analysis connecting mentored decoding’s inference efficiency with boosting properties of its composite outputs.The authors describe this as the first analysis jointly addressing inference efficiency and model quality in this setting.Source: §1 · p. 2
  • For total variation, optimal solutions form a geometric set that also contains optimal solutions for all strictly convex divergences.The set is the intersection of the probability simplex, the drafter–target coordinate hyperrectangle, and the active divergence constraint.Source: §1 · p. 2
  • For strictly convex f-divergences, the unique optimal mentored distribution has a coordinate-wise clamping form along a trajectory independent of f.The paper also states that the threshold-divergence curve has right-derivative 0 at speculative decoding’s minimal acceptance probability for differentiable generators.Source: §1 · p. 2
  • The paper connects mentored decoding to boosting through composite outputs that hide boosting-compliant model combinations, with compliance depending on output distributions and the models’ edge.This provides a criterion for assessing drafter–target complementarity from output quality.Source: §1 · p. 3
  • A divergence-independent breakpoint data structure supports optimal-parameter queries for any f-divergence, with sorting-time preprocessing and logarithmic-time queries.The paper also describes approximate parameter search and exact dual-problem optimization using precomputed breakpoints.Source: §1 · p. 3

2 Related Work

Related work spans lossless speculative decoding, heuristic lossy variants, formal mentored-decoding optimization, and experimental reports of quality gains. The paper distinguishes its formal joint analysis of inference efficiency and output quality from these prior lines of work.

2 Related Work

  • Lossless speculative decoding developed from greedy sequence drafting to multinomial rejection sampling, for which optimal acceptance under exact target matching was proved.Later approaches include self-speculation, hidden-feature drafting, model-free drafting, and multi-draft or tree verification.Source: §2 · pp. 3–4
  • Many lossy speculative-decoding approaches relax exact matching through heuristic acceptance rules, contrastive penalties, or additional models and pipeline components.The cited examples include lenient, typical-acceptance, fuzzy, and contrastive decoding.Source: §2 · pp. 4–5
  • Formal mentored-decoding work includes reverse-KL constrained optimization, total-variation Pareto-frontier analysis, and forward-KL candidate acceptance approximation.The cited forward-KL approach does not globally control divergence of the resulting joint output distribution.Source: §2 · p. 5
  • Prior reports that allowing drift can improve target quality metrics are experimental; the authors report no known formal analysis of that outcome.The introduction positions this paper as addressing that analytical gap.Source: §2 · p. 5

3 Mentored decoding

This section develops mentored decoding, which chooses a distribution close to the target while maximizing acceptance of drafter tokens, and characterizes its optimal distributions for total variation and convex f-divergences. It relates the general solution’s parameters to acceptance and divergence and identifies conditions under which total variation and f-divergence share optimal solutions.

3.1 One problem, two parameterizations

  • f-MD minimizes a divergence-constrained acceptance objective, and its acceptance/resampling parameterization is equivalent to optimizing over mentored distributions.The objective values are related by pJr = 1 - DTV(π||p); when D = 0, the problem formalizes speculative decoding.Source: §3.1 · p. 6

3.2 Warmup: the special case of the total variation divergence

  • For total variation, the optimal distributions are exactly the simplex points between p and q whose distance from q is D.Equivalently, they lie in the intersection of the simplex, the coordinate-wise interval between p and q, and the TV constraint set.Source: §3.2 · p. 7, Figure 1 · p. 7

3.3 f-mentored decoding: general solution

  • For general convex f-divergences, optimal mentored distributions form an isodivergence set, in bijection with feasible acceptance and resampling pairs.The characterization extends to nondifferentiable convex f using subdifferentials; under strict convexity, the optimal distribution is unique and has a coordinate-wise clamp form.Source: §3.3 · pp. 9–11
  • Theorem 3.12 constructs a mentored distribution by clamping a scaled version of q to [1-b, 1+a] and expresses its f-divergence through mass on A, B, and I.It also specifies parameters for which the resulting divergence is bounded by the expression in equation (31).Source: §3.3 · pp. 11–12
  • When I>1 is nonempty, mentored decoding has higher acceptance probability than speculative decoding because both added terms in its acceptance formula are nonnegative.The increase is aq(A) + p(I>1) - q(I>1); the latter term is positive when I>1 is nonempty.Source: §3.3 · p. 12
  • As a and b approach zero, the divergence approaches f(1)=0 and mentored decoding's acceptance probability approaches speculative decoding's.In this limit, the parameters converge to the speculative-decoding solution.Source: §3.3 · p. 12
  • Under Theorem 3.13's conditions, an optimal solution for an f-divergence is also optimal for total variation, and strictly convex generators share the same optimal mentored distributions.The paper describes the conditions as lightweight and notes that they are satisfied by all strictly convex generators.Source: §3.3 · p. 12

4 Mentored decoding meets boosting

The section connects mentored decoding to a boosting framework for language-model predictions. It develops boosting guarantees and shows how boosted outputs relate to total-variation and general f-divergence mentored decoding.

4 Mentored decoding meets boosting

  • The framework starts from labeled training examples that distinguish potential next tokens from the remaining vocabulary tokens.Each label assigns 1/n_i to potential next tokens and -1/(n-n_i) to the others.Source: §4 · p. 13

4.1 The boosting scheme for general T

  • The general-T scheme updates example weights without a normalization coefficient and combines model predictions into a boosted output.Avoiding normalization simplifies computation and gives the weights a closed form for analysis.Source: §4.1 · p. 14

4.2 Boosting the individual predictions in ˜πT: main theorem

  • Under the weak learning assumption, a rapidly growing share of training examples has a geometric-mean margin ρ>1 between true-next-token and other-token probabilities.The analysis also gives an Ω(T) boosting advantage.Source: §4.2 · p. 15

4.3 Mentored decoding and boosting: the case of total variation

  • The total-variation optimality constraint places the mentored distribution inside the hyperrectangle defined by the drafter and target outputs.The section analyzes whether a boosted output from those distributions complies with that constraint.Source: §4.3 · p. 17
  • When p and q differ, Assumption 3.3 permits qualitative boosting alongside mentored decoding for α in ranges near either endpoint.The passage establishes sufficiently small positive ranges near α=0 and α=1.Source: §4.3 · p. 17
  • For total variation, the construction can yield a mentored output optimal at its induced divergence while its paired boosted model has a guaranteed advantage.The computed α simultaneously provides the TV-MD optimum and the boosted-advantage result.Source: §4.3 · p. 18
  • The TV boosting advantage can depend on ε_pq: as ε_pq approaches zero, the guaranteed gain vanishes to target-level quality.The passage relates this limit to the mentored distribution and the authorized divergence bound converging toward the target.Source: §4.3 · p. 19

4.4 Mentored decoding and boosting: general case

  • For general f-divergences, approximate mentored distributions have boosting properties, and the analysis applies when target and drafter sample edges are positive.The coordinate comparison depends on sample-evaluated parameters; the target and drafter edges need only be positive, a condition described as weaker than the weak learning assumption.Source: §4.4 · pp. 19–20

5 Algorithms and related properties

The section develops breakpoint algorithms for solving mentored-decoding problems across f-divergences, with guarantees on the returned solutions and efficient ways to query them. It also studies how divergence changes with acceptance probability and reports toy simulations of approximate solutions and boosting compliance.

On computing and querying C(p, q)

  • An O(n)-size breakpoint structure, built in O(sort(n)) time from drafter and target outputs, is independent of f and supports later queries for any applicable f-divergence.The breakpoints are ordered pairs in C(p,q), with at most n elements.Source: §5 · p. 20

Properties of the breakpoint set

  • Every queried pair lies in C(p,q), and the queried points form a continuous, strictly increasing curve; strict convexity of f makes the optimal mentored distribution unique.For non-strictly convex f, such as total variation, the algorithms return one of multiple solutions.Source: §5 · p. 21

Finding optimal mentored distributions

  • For f-MD, breakpoint search reaches arbitrary precision in O(n log n), while a conservative divergence-bound approach can find approximate parameters in O(log n).The faster approach uses stored breakpoints and associated qA, qB values.Source: §5 · p. 22
  • The dual problem’s optimal pair can be computed in O(log n) independently of the f-divergence, after which each optimal mentored distribution takes O(n) to construct.With lookup tables or hashtables, the pair query can be reduced to O(1).Source: §5 · p. 23

Guaranteed cheap solutions with better Pacc and small divergence

  • For convex f, the divergence threshold is convex in acceptance probability, and for all simulated generators except TV2 it stays close to zero beyond a 10% increase over Pacc(SD).The toy simulations also show that the bound can be crude for KL, reverse KL, and Hellinger, but informative for Neyman, Pearson, TV2, and Amari α-divergences.Source: §5 · pp. 24–25, Table 2 · p. 25

Toy simulation

  • In the toy simulation, acceptance probability increases by more than 10% while the boosting coefficient k remains close to 1; its dependence on a is nearly linear.A second simulation visualizes mentored distributions for discretized Beta drafter and target distributions with n = 1000 and varying b.Source: §5 · p. 25

6 Discussion

The discussion develops practical top-k restrictions and extensions to boosting, while identifying conditions that limit or alter boosting gains. It also examines how f-divergence bounds and mentored distributions behave in simulations.

Toy simulations

  • The toy simulations show f-divergence behavior across acceptance probabilities from the speculative-decoding value to 25% above it, with Theorem 3.12’s min–max interval indicated.The accompanying discussion says usefulness can extend to a substantial range of acceptance probabilities.Source: Table 3 · p. 26
  • Theorem 4.8’s stated quantity is plotted against acceptance probability P_acc(MD), while k is plotted against a; k remains close to 1 despite a substantial increase versus speculative decoding.Source: §6 · p. 27
  • A second simulation visualizes the mentored distribution and its acceptance probability for discretized Beta-distributed p and q, with coordinates ordered by increasing q_i/p_i.The mentored distribution is shown alongside the function min{π_i, p_i}, whose area gives the acceptance probability.Source: Table 6 · p. 27

Boosting the boosting advantages beyond (WLA)

  • The discussion states that the boosting result extends beyond the mentored-decoding case.The section also presents a framework in which relative performance and correlations among weak models yield an exponential-in-T advantage under the Weak Correlation Assumption.Source: §6 · p. 28

Efficient restriction to top-k decoding

  • With top-k target truncation, mentored decoding needs no extra top-k extraction and reduces sorting from O(n log n) to O(k log k), while retaining higher acceptance rates with negligible wall-clock overhead.An optimal mentored distribution can be restricted to the k retained coordinates.Source: §6 · p. 28

Boosting the boosting advantages beyond (WLA)

  • Under the Weak Correlation Assumption, boosting advantage grows exponentially with T, but the assumption typically holds for fewer iterations than the Weak Learning Assumption.The bound’s geometric edge growth is limited by µ_t ≤ 1; under the stated comparison, the rate dependence can drop from O(1/γ^2) to O(1/γ).Source: §6 · pp. 29–30

Potential (sub)optimality of the greedy boosted sequence

  • A greedy sequence maximizing each classifier’s edge can be locally suboptimal: swapping two successive classifiers may improve boosting advantage under a covariance condition.The condition is expressed using the covariance of the two hypotheses and a threshold ρ that depends on µ_t and the alternative edge.Source: §6 · pp. 30–31

7 Conclusion

The paper shows that mentored decoding can speed inference while producing a higher-quality model than the target. It also characterizes solutions across f-divergences and identifies extending mentored decoding beyond one drafter and one target as an open question.

7 Conclusion

  • Mentored decoding can speed inference while producing a model with better quality than the target.The paper connects mentored decoding with boosting to evaluate the composite model's quality.Source: §7 · p. 31
  • A divergence-independent breakpoint data structure supports logarithmic-time parameter queries for any f-divergence.Constructing breakpoints requires sorting probability ratios; under standard top-k decoding, this overhead is described as practically negligible.Source: §7 · p. 31
  • The total-variation case has varied optimal solutions, and the paper gives simple approximations for optimal solutions under any f-divergence.Some total-variation solutions are convenient for boosting, while others may be relevant under other constraints.Source: §7 · p. 31
  • Extending mentored decoding beyond one drafter and one target remains an open question, and computing model correlations may be costly as the model count grows.The paper says its boosting approach can bypass weight updates and is self-normalized.Source: §7 · p. 31

Appendix

The appendix uses letter-based theorem numbering to distinguish its numbering from the main paper.

Appendix

  • The appendix uses letter-based theorem numbering to distinguish it from the main paper.This is a numbering convention, not a change to the theorem content.Source: Appendix · p. 37

ãÑ Proof of Lemma 4.5

The appendix contents list proofs of Theorems 4.7, 4.8, and 5.1.

ãÑ Proof of Lemma 4.5

ãÑ Proof of Lemma 5.2

The appendix contents list proofs of Lemma 5.3 and Theorem 5.4.

ãÑ Proof of Lemma 5.2

ãÑ Proof of Lemma 6.1

The passage labels page 67 as the proof of Lemma 6.4.

Proof of Lemma 3.2

The proof establishes equivalence between the two formulations by showing that an optimum in either formulation yields an optimum in the other. It also verifies an equivalent expression for s.

  • An optimum of either formulation must be optimal for the other, or a better solution would contradict its defining optimum.The proof uses total-variation distance in one direction and the objective p^T r in the other.Source: Proof of Lemma 3.2 · p. 38
  • The construction gives s_i = max(0, π_i − p_i) for every i.This follows from π_i − p_i r_i = π_i − min(π_i, p_i).Source: Proof of Lemma 3.2 · p. 38

Proof of Lemma 3.6

The proofs establish properties of optimal mentored-decoding solutions, including feasibility and KKT characterizations, bounds and inequalities, and results on breakpoints, continuity, and convexity. They also analyze how top-k masking affects support and characterize conditions for edge progression and greedy-fit ordering.

Proof of Lemma 3.6

  • A strict feasible point with positive s satisfies Slater’s constraint qualification for (f-MD-1).The proof obtains a distinct distribution with divergence at most D, then constructs the strict feasible choice.Source: Proof of Lemma 3.6 · p. 38

Proof of Theorem 3.7 and Lemma 3.8

  • When D < D_f(p||q), the optimum has t != p and λ > 0, and optimal π are clamped between Lβ(-f')q and Lα(-f')q with D_f(π||q) = D.At the optimum α < β; the clamped characterization applies to distributions in the simplex.Source: Proof of Theorem 3.7 and Lemma 3.8 · pp. 39–42

Proof of Lemma 3.9

Proof of Theorem 3.12

  • For any values of a and b as in (25) and (26), the constructed distribution defines an optimum of (f-MD-2) for some computable threshold D̃.The threshold is D̃ = q(A)f(1+a) + q(B)f(1-b) + q(I)f(u), for some u in [1-b, 1+a].Source: Proof of Theorem 3.12 · pp. 43–44

Proof of Theorem 3.13

  • The generalized clamped feasible set is analyzed coordinate-wise in five cases determined by p_i and the level sets of Lβ(-h) and Lα(-g).The proof uses Lβ(-h) ≤ 1 and Lα(-g) ≥ 1 to relate those level sets to q_i.Source: Proof of Theorem 3.13 · p. 44
  • The proof maps optimal f-divergence solutions into total-variation solutions and then to md2, with singleton level sets under strict convexity and generator-independent optimal couples.It establishes the first part of Theorem 3.13 through these set connections; the second part follows from the cited earlier proof and properties of the level sets and couples.Source: Proof of Theorem 3.13 · p. 45

Proof of Theorem 4.2

  • The proof of Theorem 4.2 combines a geometric-average event with the identity sum_t μ_t = E[μ] + Var[μ]/E[μ] to obtain its concluding bound.The argument concludes by applying the displayed identity after processing the event.Source: Proof of Theorem 4.2 · p. 49

Proof of Theorem 4.7

  • For X in an interval [u,v] with positive u and E[X] = 1, the technical lemma derives an expectation bound from a secant inequality for the logarithm, for t in [0,1].The proof then reduces the required condition to an inequality involving the interval endpoints and a mixture weight.Source: Proof of Theorem 4.7 · pp. 51–52
  • Theorem 4.7’s proof derives a guaranteed boosting advantage and bounds D_fTV(v_α||q) by ϱ(p)ε(p).The advantage guarantee is first established for the current drafter and target outputs, then uses a minimal ϱ(p)ε(p) that works for any outputs.Source: Proof of Theorem 4.7 · pp. 55–56

Proof of Theorem 4.8

  • Theorem 4.8’s proof bounds boosting-distribution coordinates across the three mentored-distribution cases and derives the theorem via Theorem 4.2.The coordinate analysis uses the mentored distribution and the assumption that its coordinates are positive.Source: Proof of Theorem 4.8 · pp. 56, 57, 59

Proof of Theorem 5.1

  • Theorem 5.1’s proof assumes distinct p_i/q_i ratios, orders indices by ratio, and constructs breakpoints in strictly increasing order.The supplied proof fragment verifies that the initial breakpoint (0, 0) belongs to C(p, q).Source: Proof of Theorem 5.1 · p. 59
  • Theorem 5.1’s breakpoint cases preserve feasibility while updating the relevant index sets, either one set at a time or simultaneously.In the single-set cases, one index moves into I; in the simultaneous case, the proof preserves the defining equation while updating A, B, and I.Source: Proof of Theorem 5.1 · pp. 60–61

Proof of Lemma 5.3

  • The RHS of (164) varies continuously with b on [0, 1], completing the continuity proof for Lemma 5.3.As b crosses a tick, the expression’s limit matches its value after the corresponding index moves from B into I.Source: Proof of Lemma 5.3 · p. 63

Proof of Theorem 5.4

  • The optimal f-divergence as a function of requested acceptance probability is convex, and is strictly convex when f is strictly convex.The proof constructs a feasible interpolated solution; strictness follows for an interior mixture when f is strictly convex.Source: Proof of Theorem 5.4 · p. 64
  • At Pacc(SD), the right derivative of the optimal f-divergence is max ∂f(1) - min ∂f(1).The proof computes the derivative from a small variation of the optimal solution while its tick sets remain unchanged.Source: Proof of Theorem 5.4 · p. 65
  • With top-k masking and renormalization, if lim f(z)/z = ∞, any candidate with qi = 0 and πi > 0 has infinite divergence and is infeasible.The proof then begins considering the alternative finite-limit case, but the supplied passage does not show its conclusion.Source: Proof of Theorem 5.4 · p. 66
  • Renormalizing q over its top-k coordinates preserves Lemma 3.6’s applicability; the adapted optimization admits an optimal distribution supported on those coordinates.For strictly convex f, the optimal solution has that support; otherwise, an optimal solution with that support exists.Source: Proof of Theorem 5.4 · p. 66
  • The proof derives a sufficient condition on adjacent-edge expectations for geometric progression, then obtains the boosting advantage.The condition is derived from the assumed bound E_t(t+1) ≥ (1−β)μ_t; the supplied passage does not show the resulting advantage formula.Source: Proof of Theorem 5.4 · p. 67

Proof of Lemma 6.4

  • Under greedy fit, the difference is negative exactly when D < 0, which holds for positive b when covariance C lies in (0, ρ) and for negative b when C lies in (−ρ, 0).The proof gives an upper bound ρ < 0.35.Source: Proof of Lemma 6.4 · p. 68
Loading 2609.30474v1…