Monte Carlo Temperature: a robust sampling strategy for LLM's uncertainty quantification methods

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cecere, Nicola, Bacciu, Andrea, Tobías, Ignacio Fernández, Mantrach, Amin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915234498740224
author Cecere, Nicola
Bacciu, Andrea
Tobías, Ignacio Fernández
Mantrach, Amin
author_facet Cecere, Nicola
Bacciu, Andrea
Tobías, Ignacio Fernández
Mantrach, Amin
contents Uncertainty quantification (UQ) in Large Language Models (LLMs) is essential for their safe and reliable deployment, particularly in critical applications where incorrect outputs can have serious consequences. Current UQ methods typically rely on querying the model multiple times using non-zero temperature sampling to generate diverse outputs for uncertainty estimation. However, the impact of selecting a given temperature parameter is understudied, and our analysis reveals that temperature plays a fundamental role in the quality of uncertainty estimates. The conventional approach of identifying optimal temperature values requires expensive hyperparameter optimization (HPO) that must be repeated for each new model-dataset combination. We propose Monte Carlo Temperature (MCT), a robust sampling strategy that eliminates the need for temperature calibration. Our analysis reveals that: 1) MCT provides more robust uncertainty estimates across a wide range of temperatures, 2) MCT improves the performance of UQ methods by replacing fixed-temperature strategies that do not rely on HPO, and 3) MCT achieves statistical parity with oracle temperatures, which represent the ideal outcome of a well-tuned but computationally expensive HPO process. These findings demonstrate that effective UQ can be achieved without the computational burden of temperature parameter calibration.
format Preprint
id arxiv_https___arxiv_org_abs_2502_18389
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Monte Carlo Temperature: a robust sampling strategy for LLM's uncertainty quantification methods
Cecere, Nicola
Bacciu, Andrea
Tobías, Ignacio Fernández
Mantrach, Amin
Computation and Language
Uncertainty quantification (UQ) in Large Language Models (LLMs) is essential for their safe and reliable deployment, particularly in critical applications where incorrect outputs can have serious consequences. Current UQ methods typically rely on querying the model multiple times using non-zero temperature sampling to generate diverse outputs for uncertainty estimation. However, the impact of selecting a given temperature parameter is understudied, and our analysis reveals that temperature plays a fundamental role in the quality of uncertainty estimates. The conventional approach of identifying optimal temperature values requires expensive hyperparameter optimization (HPO) that must be repeated for each new model-dataset combination. We propose Monte Carlo Temperature (MCT), a robust sampling strategy that eliminates the need for temperature calibration. Our analysis reveals that: 1) MCT provides more robust uncertainty estimates across a wide range of temperatures, 2) MCT improves the performance of UQ methods by replacing fixed-temperature strategies that do not rely on HPO, and 3) MCT achieves statistical parity with oracle temperatures, which represent the ideal outcome of a well-tuned but computationally expensive HPO process. These findings demonstrate that effective UQ can be achieved without the computational burden of temperature parameter calibration.
title Monte Carlo Temperature: a robust sampling strategy for LLM's uncertainty quantification methods
topic Computation and Language
url https://arxiv.org/abs/2502.18389