Skip to main content
QUICK REVIEW

[Paper Review] Rare Event Analysis of Large Language Models

Jake McAllister Dorman, Edward Gillman|arXiv (Cornell University)|Feb 6, 2026
Topic ModelingComputer Science0 citations
TL;DR

The paper presents an end-to-end Rare Event Analysis (REA) framework for LLMs, using Rare Event sampling methods (MBAR, TPS, umbrella sampling) to estimate probabilities of rare completions and explore their properties with TinyStories-8M as a case study.

ABSTRACT

Being probabilistic models, during inference large language models (LLMs) display rare events: behaviour that is far from typical but highly significant. By definition all rare events are hard to see, but the enormous scale of LLM usage means that events completely unobserved during development are likely to become prominent in deployment. Here we present an end-to-end framework for the systematic analysis of rare events in LLMs. We provide a practical implementation spanning theory, efficient generation strategies, probability estimation and error analysis, which we illustrate with concrete examples. We outline extensions and applications to other models and contexts, highlighting the generality of the concepts and techniques presented here.

Motivation & Objective

  • Define rare events in LLMs and motivate their importance for deployment and safety.
  • Develop an end-to-end REA framework spanning stochastic modeling, sampling, probability estimation, and exploration.
  • Demonstrate REA on TinyStories-8M focusing on ARI and Log-Prob observables.
  • Provide practical implementation guidance and discuss extensions to larger models and other contexts.

Proposed method

  • Model LLM completions as stochastic trajectories with AR(1) style probability structure.
  • Use importance sampling and umbrella sampling with biased distributions p* and mixture distributions pMix* for efficient rare-event sampling.
  • Apply exponential tilting p_λ(x)=Z(λ)^{-1} e^{-λφ(x)} pM(x) to target rare events and estimate partition functions Z(λ).
  • Employ MBAR to combine samples from multiple biased distributions and direct sampling for robust probability estimates.
  • Use Transition Path Sampling (TPS) with annealing schedules to generate trajectories that explore rare completions.
  • Perform bootstrap and Gelman–Rubin diagnostics to assess estimation convergence and confidence intervals.
Figure 1 : (a) Text generation : Shown is a single “trace” of the text produced by the TPS text generation process. The prompt (orange) remains fixed throughout, while the completion (blue) varies. At each step an edit to the completion is proposed that is either accepted (green), or rejected (red),
Figure 1 : (a) Text generation : Shown is a single “trace” of the text produced by the TPS text generation process. The prompt (orange) remains fixed throughout, while the completion (blue) varies. At each step an edit to the completion is proposed that is either accepted (green), or rejected (red),

Experimental results

Research questions

  • RQ1How likely are rare LLM completions under a given prompt when considering two observables (ARI and Log-Prob)?
  • RQ2What are the properties and structure of these rare events, and how can they be accessed efficiently for analysis?
  • RQ3How can biased sampling and MBAR reconstruction quantify tail probabilities beyond direct sampling capabilities?
  • RQ4What insights can rare completions reveal about model behavior and potential alignment or safety issues?

Key findings

  • Rare completions for ARI and Log-Prob can be estimated orders of magnitude beyond direct sampling using MBAR and TPS.
  • MBAR provides narrower relative confidence intervals in tails than direct histograms, enabling exploration of tail densities far from training data.
  • Direct sampling underestimates tail probabilities and misses rare events, while TPS with exponential tilting successfully samples tails across both observables.
  • Rare ARI completions tend to be highly repetitive and can have high log probabilities, indicating extrapolation behavior outside training distribution.
  • Exploratory data analysis of rare completions reveals patterns useful for safety tooling, such as potential runtime filters to limit undesirable repeats.
Figure 2 : Observables in annealing TPS trajectories . (a) Cummulative average of the ARI along TPS trajectories for the TinyStories LLM. We show both positive (orange) and negative (blue) biases, generated as described in Sect. 4 . The cummulative average resets when the bias changes. The annealing
Figure 2 : Observables in annealing TPS trajectories . (a) Cummulative average of the ARI along TPS trajectories for the TinyStories LLM. We show both positive (orange) and negative (blue) biases, generated as described in Sect. 4 . The cummulative average resets when the bias changes. The annealing

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.