EMNLP 2024main13 citations

Calibrating Language Models with Adaptive Temperature Scaling

Johnathan Xie, Annie S Chen, Yoonho Lee, Eric Mitchell, Chelsea Finn

Abstract

The effectiveness of large language models (LLMs) is not only measured by their ability to generate accurate outputs but also by their calibration—how well their confidence scores reflect the probability of their outputs being correct. While unsupervised pre-training has been shown to yield LLMs with well-calibrated conditional probabilities, recent studies have shown that after fine-tuning with reinforcement learning from human feedback (RLHF), the calibration of these models degrades significantly. In this work, we introduce Adaptive Temperature Scaling (ATS), a post-hoc calibration method that predicts a temperature scaling parameter for each token prediction. The predicted temperature values adapt based on token-level features and are fit over a standard supervised fine-tuning (SFT) dataset. The adaptive nature of ATS addresses the varying degrees of calibration shift that can occur after RLHF fine-tuning. ATS improves calibration by over 10-50% across three downstream natural language evaluation benchmarks compared to prior calibration methods and does not impede performance improvements from RLHF.

BibTeX
@inproceedings{xie-etal-2024-calibrating,
    title = "Calibrating Language Models with Adaptive Temperature Scaling",
    author = "Xie, Johnathan  and
      Chen, Annie S  and
      Lee, Yoonho  and
      Mitchell, Eric  and
      Finn, Chelsea",
    editor = "Al-Onaizan, Yaser  and
      Bansal, Mohit  and
      Chen, Yun-Nung",
    booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing",
    month = nov,
    year = "2024",
    address = "Miami, Florida, USA",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.emnlp-main.1007/",
    doi = "10.18653/v1/2024.emnlp-main.1007",
    pages = "18128--18138"
}
Calibrating Language Models with Adaptive Temperature Scaling · EMNLP 2024