NoisyICL: A Little Noise in Model Parameters Calibrates In-context Learning
Yufeng Zhao, Yoshihiro Sakai, Naoya Inoue
TL;DR
This paper addresses calibration and performance gaps in In-Context Learning (ICL) by proposing NoisyICL, a lightweight approach that perturbs pre-trained model parameters with Gaussian noise before performing ICL. The perturbation follows $\theta_i' = (1-\lambda)\theta_i + \lambda \mathcal{N}(0,\sigma^2)$, and links higher noise to increased token entropy, suggesting fairer predictions. Evaluated on GPT-2 and GPT-J across 12 classification datasets, NoisyICL yields about a 10% average improvement in ICL performance and yields more calibrated outputs, with reductions in miscalibration metrics such as $ECE_1$ by roughly 25% in many cases. The findings imply that NoisyICL acts as a calibration bridge between pre-training and ICL, offering a low-cost alternative to fine-tuning and guiding future work on noise scheduling and layer-wise perturbations.
Abstract
In-Context Learning (ICL) is suffering from unsatisfactory performance and under-calibration due to high prior bias and unfaithful confidence. Some previous works fine-tuned language models for better ICL performance with enormous datasets and computing costs. In this paper, we propose NoisyICL, simply perturbing the model parameters by random noises to strive for better performance and calibration. Our experiments on two models and 12 downstream datasets show that NoisyICL can help ICL produce more accurate predictions. Our further analysis indicates that NoisyICL enables the model to provide more fair predictions, and also with more faithful confidence. Therefore, we believe that NoisyICL is an effective calibration of ICL. Our experimental code is uploaded to Github.
