Domain-Shift-Aware Conformal Prediction for Large Language Models

Zhexiao Lin, Yuanyuan Li, Neeraj Sarna, Yuanyuan Gao, Michael von Gablenz
10/7/2025
stat.MLcs.AIcs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Large language models have achieved impressive performance across diverse tasks. However, their tendency to produce overconfident and factually incorrect outputs, known as hallucinations, poses risks in real world applications. Conformal prediction provides finite-sample, distribution-free coverage guarantees, but standard conformal prediction breaks down under domain shift, often leading to under-coverage and unreliable prediction sets. We propose a new framework called Domain-Shift-Aware Conformal Prediction (DS-CP). Our framework adapts conformal prediction to large language models under domain shift, by systematically reweighting calibration samples based on their proximity to the test prompt, thereby preserving validity while enhancing adaptivity. Our theoretical analysis and experiments on the MMLU benchmark demonstrate that the proposed method delivers more reliable coverage than standard conformal prediction, especially under substantial distribution shifts, while maintaining efficiency. This provides a practical step toward trustworthy uncertainty quantification for large language models in real-world deployment.

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. 2 weaker matches are hidden by default — 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{lin2025domainshiftaware,
  title  = {Domain-Shift-Aware Conformal Prediction for Large Language Models},
  author = {Zhexiao Lin and Yuanyuan Li and Neeraj Sarna and Yuanyuan Gao and Michael von Gablenz},
  year   = {2025},
  eprint = {2510.05566},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.05566v1}
}

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

Discussion