Estimating the Probabilities of Rare Outputs in Language Models

Gabriel Wu, Jacob Hilton
2/12/2026

No official code found. Best implementation: alignment-research-center/low-probability-estimation (9 stars, MIT, last commit 2024-10-23).

Abstract

We consider the problem of low probability estimation: given a machine learning model and a formally-specified input distribution, how can we estimate the probability of a binary property of the model's output, even when that probability is too small to estimate by random sampling? This problem is motivated by the need to improve worst-case performance, which distribution shift can make much more likely. We study low probability estimation in the context of argmax sampling from small transformer language models. We compare two types of methods: importance sampling, which involves searching for inputs giving rise to the rare output, and activation extrapolation, which involves extrapolating a probability distribution fit to the model's logits. We find that importance sampling outperforms activation extrapolation, but both outperform naive sampling. Finally, we explain how minimizing the probability estimate of an undesirable behavior generalizes adversarial training, and argue that new methods for low probability estimation are needed to provide stronger guarantees about worst-case performance.

View on arXivView PDF

Code Implementations(1)

MIT

Public code to accompany Low Probability Estimation paper.

91Python, Jupyter NotebookOct 9, 20241 years agoMIT

Similar Papers

Cite this paper

@article{wu2026estimating,
  title  = {Estimating the Probabilities of Rare Outputs in Language Models},
  author = {Gabriel Wu and Jacob Hilton},
  year   = {2026},
  eprint = {2410.13211},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.13211},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.13211.svg)](https://codeofpaper.com/paper/2410.13211)

Discussion