Calibrated Language Models and How to Find Them with Label Smoothing

Published: 01 May 2025, Last Modified: 18 Jun 2025ICML 2025 posterEveryoneRevisionsBibTeXCC BY-NC-SA 4.0
TL;DR: Label smoothing helps calibration but is less effective for large vocabulary LLMs, therefore we identify the root causes and provide a custom kernel for better training with label smoothing.
Abstract: Recent advances in natural language processing (NLP) have opened up greater opportunities to enable fine-tuned large language models (LLMs) to behave as more powerful interactive agents through improved instruction-following ability. However, understanding how this impacts confidence calibration for reliable model output has not been researched in full. In this work, we examine various open-sourced LLMs, identifying significant calibration degradation after instruction tuning in each. Seeking a practical solution, we look towards label smoothing, which has been shown as an effective method to regularize for overconfident predictions but has yet to be widely adopted in the supervised fine-tuning (SFT) of LLMs. We first provide insight as to why label smoothing is sufficient to maintain calibration throughout the SFT process. However, settings remain where the effectiveness of smoothing is severely diminished, in particular the case of large vocabulary LLMs (LV-LLMs). We posit the cause to stem from the ability to become over-confident, which has a direct relationship with the hidden size and vocabulary size, and justify this theoretically and experimentally. Finally, we address an outstanding issue regarding the memory footprint of the cross-entropy loss computation in the label smoothed loss setting, designing a customized kernel to dramatically reduce memory consumption without sacrificing speed or performance in comparison to existing solutions for non-smoothed losses.
Lay Summary: LLMs, despite their abilities in various real-world language tasks, have significant underlying issues where they are highly overconfident in their response, which can lead to problematic behaviour. In this work, we research why this occurs, examining various open LLMs from which we identify a recurring pattern of confidence calibration issues. We then examine label smoothing, a widely used technique, and observe that it can significantly reduce overconfidence while retaining accuracy. In particular, we observe its benefits when instruction-tuning LLMs. Thus we provide greater insight into this behaviour and when it can be useful. In addition, we address an outstanding issue regarding the memory footprint of the cross-entropy loss computation in the label smoothed loss setting, designing a customized kernel to dramatically reduce memory consumption without sacrificing speed or performance in comparison to existing solutions for non-smoothed losses.
Link To Code: https://github.com/jhuang265/Calibrating-LLMs-with-Label-Smoothing
Primary Area: Deep Learning->Large Language Models
Keywords: model calibration, label smoothing, large vocabulary large language models
Submission Number: 6634
Loading