Papers
Topics
Authors
Recent
Search
2000 character limit reached

Vocabulary-Aware Conformal Prediction (VACP)

Updated 3 January 2026
  • VACP is a framework that enhances next-token prediction by restricting the vocabulary and sharpening probability distributions for efficient uncertainty quantification.
  • It employs structural filtering and temperature scaling on a reduced token set, achieving prediction sets up to 200× smaller than standard APS methods.
  • Empirical results on benchmarks like SQuAD and WikiText-103 validate its near-nominal coverage and significant efficiency improvements over full-vocabulary approaches.

Vocabulary-Aware Conformal Prediction (VACP) is a framework designed for efficient and reliable uncertainty quantification in next-token prediction with LLMs that possess extremely large vocabularies (e.g., |V| ≈ 256,000). While Adaptive Prediction Sets (APS) provide provable marginal coverage guarantees for classification and next-token tasks, their naive application to LLMs results in prediction sets containing hundreds of tokens, which are inefficient and uninformative. VACP addresses this by systematically reducing the effective prediction space and sharpening uncertainty quantification, while maintaining marginal coverage guarantees comparable to standard APS (Kotla et al., 27 Dec 2025).

1. Formal Description of VACP

Let VV denote the full vocabulary of the LLM. Standard APS constructs the prediction set for a new context xx as

CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}

where

sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}

is the cumulative softmax mass up to token yy, with pV(x)yp_V(x)_y the softmax probability for token yy and τ1−α\tau_{1-\alpha} the (1−α)(1+1/n)(1-\alpha)(1+1/n) quantile of calibration scores.

VACP modifies this in three principal steps:

  1. Vocabulary restriction: Select a subset V∗⊂VV^* \subset V such that xx0.
  2. Temperature-adjusted scoring: Apply temperature scaling to sharpen the prediction distribution over xx1, using xx2 for model logits xx3 and temperature xx4.
  3. APS on xx5: Run APS on xx6 with scores xx7 and threshold xx8.

The resulting prediction set

xx9

achieves the same marginal coverage as APS on CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}0 provided CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}1.

2. Algorithmic Workflow

VACP is structured as follows:

Step A: Effective Vocabulary Construction

  • Structural filtering: Remove control tokens (e.g., <pad>, <eos>, <unused...>), non-printables.
  • Empirical filtering: For each CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}2 (remaining), compute CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}3. Remove all CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}4 with CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}5 (CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}6).
  • The surviving set defines CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}7 (e.g., CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}8 for Gemma-2B).

Step B: Temperature Selection

  • For each CV(x)={y∈V:sV(x,y)≤τ1−α}C_V(x) = \{ y \in V : s_V(x, y) \leq \tau_{1-\alpha} \}9 in a grid sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}0:
    • For sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}1:
    • Mask sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}2 for sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}3.
    • Compute sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}4.
    • Compute sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}5.
    • Compute threshold sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}6 as above; select sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}7 giving coverage sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}8 with smallest mean set size.

Step C: Prediction

  • Given new sV(x,y)=∑j:pV(x)(j)≥pV(x)ypV(x)(j)s_V(x, y) = \sum_{j: p_V(x)_{(j)} \geq p_V(x)_y} p_V(x)_{(j)}9, mask logits for yy0.
  • Compute yy1.
  • Form yy2 as above.

3. Mathematical Guarantees and Core Formulas

With yy3, temperature yy4, and nonconformity score yy5 defined as above, VACP sets use the threshold

yy6

Marginal coverage satisfies

yy7

provided yy8. If yy9, coverage is at least pV(x)yp_V(x)_y0.

To bound pV(x)yp_V(x)_y1, Proposition 2 gives pV(x)yp_V(x)_y2, so choosing pV(x)yp_V(x)_y3 yields pV(x)yp_V(x)_y4; structural filtering yields pV(x)yp_V(x)_y5.

4. Theoretical Analysis

Theorem 1 (Marginal Coverage under Vocabulary Restriction):

If pV(x)yp_V(x)_y6 satisfies pV(x)yp_V(x)_y7, then pV(x)yp_V(x)_y8 constructed via APS restricted to pV(x)yp_V(x)_y9 ensures yy0. The proof follows by noting that calibration and prediction are both restricted to yy1, and thus exchangeability holds under the true distribution, preserving the conformal validity argument.

Proposition 2 asserts that empirical filtering controls the size of yy2, with the yy3 bound being worst-case; actual LLM output distributions are even sparser (≈3,200 tokens above yy4 on average). Exact marginal coverage in practice depends on yy5, a property observed empirically on benchmarks such as SQuAD and WikiText.

5. Empirical Results and Efficiency

Experiments on the Gemma-2B model with SQuAD and WikiText-103 benchmarks compared standard APS and VACP for next-token prediction at yy6 (nominal 90% coverage). Key outcomes are summarized below:

Method Empirical Coverage Mean yy7 (tokens) Efficiency Ratio
Standard APS (full yy8) 91.2% ± 1.3% 847 1×
VACP (mask + yy9) 89.7% ± 1.4% 4.3 197×
  • Median prediction set size: standard APS median Ï„1−α\tau_{1-\alpha}0, VACP median Ï„1−α\tau_{1-\alpha}1.
  • Ablations: APS + mask only (coverage 90.8%, mean Ï„1−α\tau_{1-\alpha}2), APS + temperature only (Ï„1−α\tau_{1-\alpha}3; coverage 76.4%, mean Ï„1−α\tau_{1-\alpha}4).
  • On WikiText-103 (no recalibration): coverage 88.4%, mean Ï„1−α\tau_{1-\alpha}5.
  • After recalibration: coverage 90.1%, mean Ï„1−α\tau_{1-\alpha}6.
  • By true-token confidence:
    • Ï„1−α\tau_{1-\alpha}7: coverage 91.3%, mean Ï„1−α\tau_{1-\alpha}8
    • Ï„1−α\tau_{1-\alpha}9: coverage 89.4%, mean (1−α)(1+1/n)(1-\alpha)(1+1/n)0
    • (1−α)(1+1/n)(1-\alpha)(1+1/n)1: coverage 88.1%, mean (1−α)(1+1/n)(1-\alpha)(1+1/n)2

These results show VACP achieves near-nominal coverage rates with prediction sets that are approximately 200× smaller than those from uninformed APS.

6. Significance and Robustness

VACP demonstrates that conformal prediction methods can be made practical for LLM next-token prediction, with substantial improvements in efficiency while maintaining formal statistical guarantees under strong conditions ((1−α)(1+1/n)(1-\alpha)(1+1/n)3). Empirical filtering and structural masking eliminate tokens with negligible probability under practical workloads, ensuring practical set sizes without loss of relevant support for (1−α)(1+1/n)(1-\alpha)(1+1/n)4 in evaluation. Furthermore, VACP transfers effectively to new benchmarks without requiring extensive reparameterization or set recalibration.

The design achieves a balance between computational tractability, interpretability (reasonably small prediction sets), and theoretical rigor in coverage. These aspects support its use in high-stakes LLM deployments requiring calibrated set-based uncertainty quantification (Kotla et al., 27 Dec 2025).

7. Context and Relation to Prior Work

VACP builds on the Adaptive Prediction Sets (APS) framework of Romano et al. (2020), whose direct application in large-vocabulary regimes results in unwieldy prediction sets. By integrating semantic masking and temperature-based distribution sharpening, VACP adapts the conformal prediction toolkit to the unique challenges of LLM architectures. The framework is primarily motivated by deficiencies in softmax calibration for LLMs and the need for uncertainty quantification in open-vocabulary, high-entropy predictive tasks. VACP offers theoretical and algorithmic foundations to extend conformal validity to applications previously impeded by efficiency constraints (Kotla et al., 27 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Vocabulary-Aware Conformal Prediction (VACP).