Calibrating LLMs with Semantic-level Reward
Abstract
As large language models (LLMs) are deployed in consequential settings such as medical question answering and legal reasoning, the ability to estimate when their outputs are likely to be correct is essential for safe and reliable use and requires well-calibrated uncertainty. Standard reinforcement learning with verifiable rewards (RLVR) trains models with a binary correctness reward that is indifferent to confidence, providing no penalty for confident but wrong predictions and thereby degrading calibration. Recent work addresses this by training models to produce verbalized confidence scores alongside answers and rewarding agreement with correctness. However, verbalized confidence is tied to surface text and thus varies across textual variations with the same semantic meaning. We propose Calibration with Semantic Reward (CSR), a framework that calibrates language models directly in semantic space without a verbalized confidence interface. CSR is a training-time policy intervention: instead of eliciting a confidence score, it shapes the policy so that a fixed post-hoc semantic-uncertainty estimator becomes reliable. CSR combines the correctness reward with a novel semantic calibration reward that encourages exploitation among correct rollouts by promoting semantic agreement, and exploration among incorrect ones by discouraging spurious consistency. Across three model families and four open-ended QA datasets, one in-distribution and three out-of-distribution, CSR lowers four-dataset average ECE by up to 57% and raises average AUROC by up to 12% over the base model, and by up to 45% and 23% over the verbalized-confidence baselines. The code is available at https://github.com/Rose-STL-Lab/Semantic_Calibration.