Exact Probability Powering from Samples Alone at the Collision Scale
Abstract
Temperature sampling normally needs the probability distribution, yet many systems, from simulators to language models reasoning toward a final answer, provide only *samples*. We ask how to sample exactly at temperature from samples alone, drawing each outcome with probability proportional to , the th power of its probability, for a fixed integer (probability powering). Known approaches face a trade-off between speed and exactness. Classical rejection sampling, which keeps an outcome only when fresh samples agree, is exact but slow: with equally likely outcomes, it needs samples. The first-collision shortcut, which returns the first outcome to appear times among all samples drawn so far (a -fold collision), is fast—needing only samples—but biased. Refined collision-based methods reduce this bias but remain approximate. In this work, we show that this trade-off is unnecessary. We define the *collision map*, a random update built from one collision and the other outcomes seen before it, and prove that it preserves the target distribution. Our sampler, **Collision-map CFTP**, composes these maps backward in time (coupling from the past) *without knowing* the probabilities or which outcomes are possible. It returns an *exact* output after a bounded expected number of collisions, needing only samples instead of rejection's . Conversely, every sampler that is exact for every distribution must see its output times before returning it, so none can beat this method on *any* input by more than a factor depending only on (instance optimality). *Exactness thus costs only a constant factor over the biased shortcut*, e.g., for squaring, we prove that this factor is below on every input and tends to on large uniform inputs. Simulations match the predicted costs and output distributions. At temperature over a million equally likely outcomes, our Collision-map CFTP uses about 3,400 samples per output on average, whereas rejection needs about 2,100,000. All theorems are formally verified in Lean 4.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.