Conformal Language Modeling via Posterior Sampling

Nicolas Emmenegger, Theo X. Olausson, Armando Solar-Lezama, Chara Podimata
6/2/2026
cs.LGstat.ML

No confident code implementation found for this paper.

Abstract

Large Language Models remain plagued by hallucinations. Recent work has sought to tame their prevalence using statistical techniques based on conformal prediction, with both theoretical and empirical success.

Show full abstract

However, these methods operate in a post-hoc fashion, treating the sampling procedure itself as atomic and then surgically altering samples to remove hallucinated claims. This disconnect between filtering and generation can result in samples that are incoherent, inconsistent, or simply unlikely under the model itself. Moreover, post-hoc surgery is unable to shift probability mass towards more useful and helpful responses. To address these issues, we propose to instead sample from approximations to an LLM posterior, where the conditioning event corresponds to a calibrated, high-scoring region. We develop a calibration procedure tailored to the setting of conditional sequential generation that effectively identifies this region and achieves target risk control. Empirically, we apply our method to case studies focused on open-ended biography generation and mathematical problem solving; compared to prior work, we obtain the same statistical guarantees, with higher downstream utility.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{emmenegger2026conformal,
  title  = {Conformal Language Modeling via Posterior Sampling},
  author = {Nicolas Emmenegger and Theo X. Olausson and Armando Solar-Lezama and Chara Podimata},
  year   = {2026},
  eprint = {2606.03731},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.03731v1}
}

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/2606.03731.svg)](https://codeofpaper.com/paper/2606.03731)

Discussion