TRANSMISSION // 2512.05439v3
BEAVER Maps More of an LLM’s Risky Output Tail
Source published
BEAVER explores language-model outputs to bound the chance of violating a specified safety check. In tests, it classified more prompts as risky than sampling under the same budget—but its guarantees depend on the check and setup.

A model can look safe in a handful of sampled replies and still assign some probability to a harmful one. BEAVER is a method for estimating that probability with sound bounds, by systematically exploring likely outputs rather than relying only on random samples.
Sampling a language model can reveal how it behaves, but it may miss rare responses. That matters when the question is not whether a model usually answers safely, but whether a particular prompt could produce an output that violates a safety rule—and how much probability the model assigns to such outputs.
In BEAVER: An Efficient Deterministic LLM Verifier, Nalin Wadhwa and colleagues introduce a method for bounding that probability. Instead of drawing replies at random, BEAVER explores the model’s possible next-token choices in order of likelihood. Its goal is not to prove that an AI system is safe in every sense. It calculates bounds relative to a specified, deterministic check: for example, a rule that flags a known email address, an insecure-code pattern, or a toxicity-classifier score above a chosen threshold.
Exploring a response tree
A language model assigns probabilities to possible next tokens, then continues generating until it reaches the end of a response. BEAVER records these possibilities in a “token trie”: a branching tree in which each path represents a response prefix and its probability. A companion structure, the frontier, tracks which branches have been checked and which remain unresolved.
When BEAVER reaches a complete response, it passes it to the chosen check, or oracle. For a partial response, it can expand that branch by querying the model for next-token probabilities. The method keeps two bounds on the probability of satisfying the check. The lower bound counts responses already confirmed to satisfy it; the upper bound also includes unresolved probability mass, which might still lead to a satisfying response. As the search proceeds, these bounds tighten. The authors prove that they remain sound at every step, meaning the actual probability stays within the reported interval.
BEAVER prioritizes the unresolved branch with the greatest probability. The paper proves that this “Max-μ” strategy uses the fewest model forward passes among approaches that expand one branch per pass to reach a given probability tolerance. In practice, the implementation also prunes low-probability branches and tracks their combined mass conservatively, preserving the bounds.
More risky prompts certified in the tests
The authors tested five open-weight models on three tasks: privacy leakage, insecure code generation and toxicity. They used 300 prompts per task, including adversarially framed prompts, and compared BEAVER with a sampling-based verifier under the same forward-pass budget. A prompt was counted as risky when the upper bound on the probability of a satisfying response fell below a set threshold—in other words, when the check indicated a sufficiently high chance of violation.
In the reported experiments, BEAVER classified more prompts as risky than sampling. The difference varied by task: on secure code, it certified 1.2 times as many risky prompts; on toxicity, 7.6 times as many. It also used fewer forward passes in those comparisons. For short privacy responses, the two methods reached similar classifications, while the sampling verifier used about 13 times as many forward passes.
The paper also applies per-prompt bounds to sampled distributions of prompts. With 95% confidence, the authors report that at least 42% of the tested adversarial contexts in their privacy prompt distribution were risky across the evaluated models. This is a statistical result about that constructed distribution—not a claim about every possible prompt. In a separate experiment with two reasoning models, they found that answers could be certified as risky even when the preceding reasoning chain appeared safe, particularly in the secure-code task.
What the guarantee covers—and what it doesn’t
The guarantee is only as meaningful as the oracle it uses. BEAVER can soundly calculate bounds for a deterministic check, but that does not establish that the check captures every harmful, private or insecure output. For instance, the toxicity test relied on Detoxify, a learned classifier; any outputs it misclassifies are outside the guarantee. The authors explicitly frame their results as relative to the chosen specification.
The tests also cover particular models, benchmarks, prompt distributions and response-length limits. The main experiments assessed the raw temperature-1 model distribution; different decoding settings can change the distribution and its risk profile. BEAVER requires access to next-token probabilities, so it does not directly apply to a model available only through an API. Longer responses and higher output diversity can also make the search more costly, and some probability mass remains unresolved when the run stops at a nonzero tolerance.
The paper describes the work as a pre-deployment verification approach, not a replacement for broader safety evaluation. Its results suggest a way to make uncertainty about model outputs more explicit: rather than treating a finite batch of samples as a complete picture, report bounds tied to a defined test. The paper is an arXiv preprint (version 3, posted December 5, 2025); its claims should be read as the authors’ reported methods and results, not as independent confirmation or evidence of peer-reviewed acceptance. Read the paper.
- large language models
- AI safety
- formal verification
- BEAVER
- probability bounds
- model evaluation
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Language models write small neural policies—and model checking tests their promises
Source published
Shared keywords: ai safety, formal verification, large language models
AI Child-Safety Checks May Depend on a Few Words
Source published
Shared keywords: ai safety, large language models, model evaluation
When an AI’s World Model Runs, Does It Describe the Right World?
Source published
Shared keywords: ai safety, large language models, model evaluation
Why AI persuasion scores depend on the test
Source published
Shared keywords: ai safety, large language models, model evaluation
Biomedical fine-tuning often reduced AI models’ caution in paired audit
Source published
Shared keywords: ai safety, model evaluation