Estimating the probability of rare outputs in language modelsEstimating the Probabilities of Rare Outputs in Language Models
Translation in progress — untranslated text is omitted.
Gabriel Wu and Jacob Hilton study the problem of low-probability estimation for language models, that is, given a formally defined input distribution, how to estimate the probability that the model's output satisfies some binary property, even when that probability is too small to be estimated by random sampling. The study compares two classes of methods in the argmax sampling setting of small-scale Transformer language models: importance sampling estimates by searching for inputs that elicit rare outputs, while activation extrapolation extrapolates over the distribution obtained from the fitted model's logits. Results show that importance sampling outperforms activation extrapolation, but both outperform naive sampling. The paper also explains that minimizing the estimated probability of undesirable behavior is a generalization of adversarial training, and argues that new low-probability estimation methods are needed to provide stronger guarantees about worst-case performance.
- A model may perform well on average on the training distribution yet still produce undesirable outputs on extremely rare inputs, and distribution shift (e.g., jailbreak) makes these inputs more likely. Naive random sampling almost always yields 0 when the probability is below 1/n, making estimation impossible.
- The authors formalize the low-probability estimation problem and compare two types of methods on small transformers with argmax sampling: importance sampling (ITGIS constructs an independent-token proposal distribution using gradients; MHIS samples non-independent distributions using Metropolis–Hastings) and activation extrapolation (QLD makes an independence assumption on the logit decomposition; GLD fits a Gaussian).
- On 3 models × 8 input distributions, measured by Itakura–Saito loss: the two importance sampling methods outperform QLD, QLD outperforms GLD, and GLD only slightly outperforms the output-optimal constant; ITGIS is better on small models, and MHIS is better on the 4-layer model (Table 3).
- The authors point out two main limitations: the input distributions are restricted to forms decomposable into independent tokens; the behavior is restricted to single-token outputs at temperature 0 (Section 6.4). The experiments cover only 3 small transformers and 8 formalized distributions, and are not evaluated on large models or natural language distributions.