IC-559Contextual calibration is most effective for prompt classification while temperature scaling is more effective for response classification, but no single post-hoc method fully resolves miscalibration
Hongfu Liu, Hengguan Huang, Xiangming Gu, Hao Wang, Ye Wang
Three post-hoc calibration methods (temperature scaling, contextual calibration, batch calibration) are applied to all 9 guard models. Contextual calibration reduces prompt classification ECE for most models (e.g., Llama-Guard2 from 26.8% to 15.3%, Aegis-Guard-D from 22.7% to 12.4%), while temperature scaling reduces response classification ECE (e.g., HarmBench-Mistral from 17.8% to 14.6%, WildGuard from 15.9% to 16.5%). Batch calibration underperforms both. The authors note that contextual calibration struggles with multi-sentence response classification and that no method generalizes across all models and datasets.
Temperature scaling optimized on XSTest validation set (potentially different distribution from target); contextual calibration uses space token for bias estimation; batch calibration assumes access to full test set; no single method generalizes to all models and datasets