Towards Objective Fine-tuning: How LLMs' Prior Knowledge Causes Potential Poor Calibration?
Ziming Wang, Zeyu Shi, Haoyi Zhou, Shiqi Gao, Qingyun Sun, Jianxin Li
TL;DR
The paper addresses calibration degradation in fine-tuned LLMs caused by overlaps between pretraining knowledge and downstream data. It introduces CogCalib, a cognition-aware fine-tuning framework that uses an $L_{ m NLL}$-based knowledge-bias detector and adaptive calibration losses (e.g., Label Smoothing, Margin-based Label Smoothing, ECP) with style adaptation to differentiate handling of known versus unknown data. Across 7 tasks and 3 model families, CogCalib consistently improves calibration while preserving performance, achieving an average reduction of $57%$ in $ECE$ on Llama3-8B compared with standard fine-tuning, and it generalizes to out-of-domain tasks. The approach offers practical benefits for domain-specific LLMs in safety-critical human-AI interactions by enhancing objectivity without adding deployment cost, though limitations remain for very large-scale models and calibration strategies may evolve with future calibration terms.
Abstract
Fine-tuned Large Language Models (LLMs) often demonstrate poor calibration, with their confidence scores misaligned with actual performance. While calibration has been extensively studied in models trained from scratch, the impact of LLMs' prior knowledge on calibration during fine-tuning remains understudied. Our research reveals that LLMs' prior knowledge causes potential poor calibration due to the ubiquitous presence of known data in real-world fine-tuning, which appears harmful for calibration. Specifically, data aligned with LLMs' prior knowledge would induce overconfidence, while new knowledge improves calibration. Our findings expose a tension: LLMs' encyclopedic knowledge, while enabling task versatility, undermines calibration through unavoidable knowledge overlaps. To address this, we propose CogCalib, a cognition-aware framework that applies targeted learning strategies according to the model's prior knowledge. Experiments across 7 tasks using 3 LLM families prove that CogCalib significantly improves calibration while maintaining performance, achieving an average 57\% reduction in ECE compared to standard fine-tuning in Llama3-8B. These improvements generalize well to out-of-domain tasks, enhancing the objectivity and reliability of domain-specific LLMs, and making them more trustworthy for critical human-AI interaction applications.
