Large language models often express high confidence in wrong answers, a problem called miscalibration. Existing fixes need labeled data for training, which is unavailable when the model is deployed on a new task. This paper presents a method called Test-Time Calibration Learning (TTCL) that works on unlabeled data at test time.
TTCL generates several answers for each test question and uses the most frequent answer as a pseudo-correct signal. It then adjusts the model’s confidence based on how consistently the same answer appears across the generated responses. The method jointly improves answer accuracy and the calibration of the confidence scores.
Across math and fact-based question-answering tasks, TTCL improved accuracy by 40.13% and reduced calibration error (ECE) by 70.80% on base models. It also helped models that were already calibrated on source data when they faced new target domains, improving accuracy by 20.35% and reducing ECE by 53.83% under domain shift.