Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Meituan(美团);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)
Zhongtao Jiang, Yuanzhe Zhang, Cao Liu, Jun Zhao, Kang Liu
As one of the most exciting features of large language models (LLMs), in-context learning is a mixed blessing. While it allows users to fast-prototype a task solver with only a few training examples, the performance is generally sensitive to various configurations of the prompt such as the choice or order of the training examples. In this paper, we for the first time theoretically and empirically identify that such a paradox is mainly due to the label shift of the in-context model to the data distribution, in which LLMs shift the label marginal $p(y)$ while having a good label conditional $p(x|y)$. With this understanding, we can simply calibrate the in-context predictive distribution by adjusting the label marginal, which is estimated via Monte-Carlo sampling over the in-context model, i.e., generation of LLMs. We call our approach as generative calibration. We conduct exhaustive experiments with 12 text classification tasks and 12 LLMs scaling from 774M to 33B, generally find that the proposed method greatly and consistently outperforms the ICL as well as state-of-the-art calibration methods, by up to 27% absolute in macro-F1. Meanwhile, the proposed method is also stable under different prompt configurations.
Assessing Generative Language Models in Classification Tasks: Performance and Self-Evaluation Capabilities in the Environmental and Climate Change Domain
Surprise Calibration for Better In-Context Learning
School of Information Management, Wuhan University(武汉大学信息管理学院);Center for the Studies of Information Resources, Wuhan University(武汉大学信息资源研究中心);School of Economics and Management, Nanjing University of Science and Technology(南京理工大学经济管理学院)
N2C2: Nearest Neighbor Enhanced Confidence Calibration for Cross-Lingual In-Context Learning
School of Informatics, University of Edinburgh(爱丁堡大学信息学院);School of Computer Science and Informatics, Cardiff University(卡迪夫大学计算机科学与信息学院);College of Intelligence and Computing, Tianjin University(天津大学智能与计算学部)
$k$NN Prompting: Beyond-Context Learning with Calibration-Free Nearest Neighbor Inference
University of Science and Technology of China(中国科学技术大学);Beijing University of Posts and Telecommunications(北京邮电大学);Baidu Inc.(百度公司);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥综合性国家科学中心人工智能研究院)
Improving In-context Learning of Multilingual Generative Language Models with Cross-lingual Alignment
State Key Laboratory of Multimodal Artificial Intelligence Systems(多模态人工智能系统国家重点实验室);Institute of Automation, CAS(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
Exploring LGBTQ+ Bias in Generative AI Answers across Different Country and Religious Contexts
Corvinus University of Budapest(布达佩斯考文纽斯大学);Central European University Democracy Institute(中欧大学民主研究所);University of British Columbia Okanagan(不列颠哥伦比亚大学奥肯那根分校);HUN-REN Centre for Social Sciences(匈牙利研究网络社会科学中心)