In-context learning (ICL) is a new paradigm for natural language processing that utilizes Generative Pre-trained Transformer (GPT)-like models. This approach uses prompts that include in-context demonstrations to generate the corresponding output for a new query input. However, applying ICL in real cases does not scale with the number of samples, and lacks robustness to different prompt templates and demonstration permutations. In this paper, we first show that GPT-like models using ICL result in unreliable predictions based on a new metric based on Shannon entropy. Then, to solve this problem, we propose a new technique called the Linear Probe Calibration (LinC), a method that calibrates the model's output probabilities, resulting in reliable predictions and improved performance, while requiring only minimal additional samples (as few as five labeled data samples). LinC significantly enhances the ICL test performance of GPT models on various benchmark datasets, with an average improvement of up to 21%, and up to a 50% improvement in some cases, and significantly boosts the performance of PEFT methods, especially in the low resource regime. Moreover, LinC achieves lower expected calibration error, and is highly robust to varying label proportions, prompt templates, and demonstration permutations. Our code is available at \url{https://github.com/mominabbass/LinC}.
Graph-based Confidence Calibration for Large Language Models
Department of Computer Science Tufts University(塔夫茨大学计算机科学系);Department of Computer Science Virginia Tech(弗吉尼亚理工大学计算机科学系);Department of Computer Science Virginia Tech, University of California, Davis(弗吉尼亚理工大学计算机科学系,加州大学戴维斯分校计算机科学系)
Optimizing Estimators of Squared Calibration Errors in Classification
German Cancer Consortium (DKTK)(德国癌症联盟(DKTK));German Cancer Research Center (DKFZ)(德国癌症研究中心(DKFZ));Goethe University Frankfurt(法兰克福大学);Inria(法国国家信息与自动化研究所);Ecole Normale Supérieure(巴黎高等师范学院);PSL Research University(巴黎文理研究大学)
Towards Objective Fine-tuning: How LLMs' Prior Knowledge Causes Potential Poor Calibration?
SKLCCSE, School of Computer Science and Engineering, Beihang University(SKLCCSE,计算机科学与工程学院,北航);School of Software, Beihang University(软件学院,北航);Zhongguancun Laboratory, Beijing(中关村实验室,北京)
Attention-Based Synthetic Data Generation for Calibration-Enhanced Survival Analysis: A Case Study for Chronic Kidney Disease Using Electronic Health Records
Centre for Big Data Research in Health (CBDRH)(健康大数据研究中心);The University of New South Wales(新南威尔士大学)