arXiv:2508.00264cs.LGcs.AI2025-08ICML被引 6

标签平滑可有效防止指令微调后模型过度自信,提升输出可靠性。

Calibrated Language Models and How to Find Them with Label Smoothing

  • 用标签平滑技术维持大模型指令微调时的置信度校准
  • 发现大词汇量模型在微调后校准能力显著下降
  • 设计专用内核降低损失计算内存开销,性能不降

近期自然语言处理进展使得微调后的大型语言模型(LLMs)具备更强的指令遵循能力,但其置信度校准问题尚未充分研究。本文分析多个开源LLM,发现指令微调后普遍存在校准性能下降。为解决此问题,研究引入标签平滑(label smoothing),该方法已被证明能缓解过度自信现象,但在大词汇量模型(LV-LLMs)中效果减弱。我们从理论与实验两方面证明,模型隐藏层大小和词汇量是导致校准失效的关键因素。此外,针对标签平滑下交叉熵损失计算带来的内存开销问题,提出一种定制化内核,在不牺牲速度和性能的前提下大幅降低内存使用。

原文摘要 · Abstract (English)

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.

语言模型校准标签平滑

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。