Kaijing Ma

Paper Notes

Explaining and Improving Contrastive Decoding by Extrapolating the Probabilities of a Huge and Hypothetical LM

Paper Notes

Explore the method

Synthetic teaching values, not paper results. Nothing plays automatically; all steps remain available in the static explanation.

Static explanation and limits

APD asks whether several models from one size-controlled family can improve the next-token distribution of the largest available model.

  1. Input: two models assign probabilities to three possible next tokens. The larger model favors A more strongly.
  2. A straight extension in probability space adds a probability difference. Here it eventually makes C negative. This straight line is a comparison baseline, not APD.
  3. Log-space extension multiplies likelihood ratios and normalizes. Its normalized probabilities remain positive, but it can become very sharp.
  4. APD instead learns an asymptotic probability trend from a family of model sizes. Our bounded curve only illustrates this distinction; it is not the fitted curve in the paper.
  5. Offline probability extrapolation supplies a target for training an amateur. At inference, APD still uses expert and trained-amateur logits. This is not direct access to a huge model.

Haw-Shiuan Chang, Nanyun Peng, Mohit Bansal, Anil Ramakrishna, Tagyoung Chung

Original reading note; cited methods and evidence, not an experimental reproduction. · 2411.01610v1

2411.01610v1 · Author code

What is being extrapolated?

APD asks whether several models from one size-controlled family can improve the next-token distribution of the largest available model.

The target is a hypothetical asymptotic distribution, not the output of an actually trained infinite model.

The paper first interprets contrastive decoding as linear extrapolation in logit space, then replaces that inductive bias with saturating curves in probability space.

An important failure case is an easy answer that both the small and large models already prefer.

Subtracting the small model can suppress this answer and promote a less appropriate token whose probability grew more sharply with scale.

The authors call this obvious blindness, illustrated by Bees versus Invertebrates in Figure 1.

1 / 62411.01610v1

The conditional theorem

With expert logits E and amateur logits A, the paper uses z = E − A/T.

For T > 1, rewrite this as (1 − 1/T)[E + (E − A)/(T − 1)].

z_CD = E − A/T = (1 − 1/T) z_H; log s_H = (T log s_E − log s_A)/(T − 1)

If each token logit is affine in log model size, the bracketed expression is the logit at the extrapolated size s_H.

The multiplicative factor means that CD samples this hypothetical model at temperature T/(T − 1).

This algebra does not establish that real token logits follow a linear scaling law.

Nor does extrapolation beyond observed sizes certify better factuality.

As an independent illustration, T = 2 places the hypothetical model at s_E²/s_A and gives temperature 2.

Taking T toward 1 makes the inferred size diverge, so the formula should not be read as a stable prediction in that limit.

Section 8 says the theory does not cover T larger than 1, which conflicts with Theorem 1 and its own following discussion of smaller T.

The theorem explicitly assumes T > 1; this note follows that statement and flags the apparent textual error.

2 / 62411.01610v1

How the learned correction is trained

APD collects candidate-token probabilities from several model sizes on one million lines of Wikipedia 2021.

The candidates include the expert's top 20 tokens and sampled lower-ranked tokens; each model is normalized over this candidate set.

These are conditional probabilities on a selected vocabulary subset, not untouched full-vocabulary probabilities.

Increasing curves are flipped by p ↦ 1 − p so that one decreasing parameterization can represent both directions.

p_hat(s) = P'_AP + a exp[−max(0, b(s − d))], a,b,d > 0; s = log(model size)

The proposed asymptote comes from softmax(E − A′), where A′ is a trainable copy of the amateur.

A four-layer MLP receives the proposed asymptote and observed probabilities and predicts a, b, and d.

The MLP checks whether that asymptote can explain the observed curve; it is not supervised by an infinite model.

The first loss is a root-mean-square fit to all sizes except the largest.

The second penalizes the positive excess of the fitted curve above the largest model's flipped probability.

Equation 10 takes the square root of the mean positive excess; it does not square that excess.

The third loss limits the drift of A′ from the original amateur logits.

L = L₁ + 10L₂ + λ₃L₃; λ₃ = 0.8 (Pythia), 0.4 (OPT), 1.0 (Qwen1.5)

Only the amateur and curve network are optimized; the expert stays fixed.

At inference the curve network and intermediate models disappear, leaving the expert plus the updated amateur.

Thus the similar inference cost is relative to two-model CD, not to a single-model decoder, and it excludes offline training.

3 / 62411.01610v1

What the experiments actually measure

Figure 4 compares factuality and diversity together rather than reporting one isolated winning score.

NEER measures named entities absent from retrieved Wikipedia evidence, while Dist-2 measures distinct bigrams.

Both retrieval errors and the sampling threshold can influence the apparent factuality gain.

In Table 1, OPT with top-p k20 at p = 0.8 changes NEER from 38.20 for CD to 34.06 for APD.

Dist-2 changes from 44.13 to 45.72, but severe repetition rises from 0.78 to 3.39; all four numbers are percentages.

This is evidence of a useful tradeoff, with a repetition cost that should remain visible.

For Pythia in Table 2, LAMBADA perplexity is 2.237 for CD, 2.132 for APD, and 2.188 for the 12B model.

CommonsenseQA perplexity is 6.176, 5.882, and 8.140 in the same order.

These scores use top-20 filtering, candidate renormalization, and probability smoothing described in Appendix E.3.

They are not standard full-vocabulary perplexities on the complete benchmark.

The QA experiments also report the best temperature directly, so a new deployment should select temperature on separate validation data.

The human evaluation uses 150 continuations with two annotators each; factuality ratings rise from 2.16 for CD + REAL to 2.31 for APD + REAL.

The small sample and modest inter-annotator correlation limit the strength of deployment conclusions.

4 / 62411.01610v1

Limits, reproduction, and interpretation

The main evidence concerns older pretrained model families, with mixed results for OPT and Qwen on some QA tasks.

A shared tokenizer, comparable training data, and a useful range of model sizes make the extrapolation easier to interpret.

The asymptote remains an inductive assumption; finite observations cannot uniquely identify the behavior of an infinite model.

A useful reproduction should preserve candidate filtering, report unfiltered accuracy as well, and separate training cost from inference cost.

The author repository is amazon-science/llm-asymptotic-decoding, linked from the paper.

The key contribution is a learned replacement for a crude extrapolation rule, not proof that a small model literally contains a larger model.

5 / 62411.01610v1

Sources and reading scope

This original note covers the method and selected experimental evidence discussed above. It is not a full-paper translation. No model experiments were run for this note. Source license: https://creativecommons.org/licenses/by/4.0/

Author-code links in the source: https://github.com/amazon-science/llm-asymptotic-decoding

6 / 62411.01610v1

Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.