






























Let’s study best-of- sampling more formally. Suppose we have some sample space (such as the set of possible question-answer pairs), some probability distribution over , a true objective (or “reward”) , and a proxy objective . Let’s say that we somehow optimize and thereby obtain some new distribution . Then:
It turns out that in the case of best-of- sampling, both of these quantities can be estimated efficiently using samples from .
Let’s look at the expectation first. The naive approach is to use a Monte Carlo estimator: run best-of- sampling many times, measure the true objective on those samples, and average the results. However, there is a better estimator. If we have samples from overall, then we can simultaneously consider every possible subset of these samples of size , weight each sample by the number of subsets for which it is the best according to the proxy objective, and then take the weighted average true objective score. This weight is just the binomial coefficient , where is the rank of the sample under the proxy objective, from (worst) up to (best).A
The sum of these weights is , giving a proof of the Hockey-stick identity(opens in a new window). For a formal derivation of the estimator described here, see Appendix I of the WebGPT paper(opens in a new window).
As well as using samples more efficiently, this also allows us to reuse samples for different values of . As for the KL divergence, surprisingly, this turns out to have an exact formula that works for any continuous probability distribution (i.e., as long as has no point masses). One might naively guess that the answer is , since best-of- is doing something like taking the top of the distribution, and this is roughly correct: the exact answer is . B
Together, these estimators allow us to easily analyze how the true objective varies with the amount of optimization applied to the proxy objective.
Here’s a real-life example from WebGPT:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。