arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.16535cs.CLcs.AIcs.LG
收藏

基于令牌的决策标准在上下文学习中并非最优

Token-based Decision Criteria Are Suboptimal in In-context Learning

Japan Advanced Institute of Science and Technology(日本先进科学技术学院);RIKEN(理化学研究所)

Hakaze Cho, Yoshihiro Sakai, Mariko Kato, Kenshiro Tanaka, Akira Ishii, Naoya Inoue

AI总结:

本文提出隐藏校准方法,用语言模型最后隐藏状态上的最近质心分类替代传统基于标签令牌概率的决策标准,在多个模型和数据集上显著提升上下文学习分类性能并揭示其内在原理。

摘要:

上下文学习(In-Context Learning, ICL)通常利用人工选择的标签令牌的输出概率作为分类标准。然而,我们认为,尽管通过翻译和受限旋转进行了精细校准,这种基于令牌的分类标准仍会导致次优的决策边界。为了解决这一问题,我们提出了隐藏校准(Hidden Calibration)方法,该方法放弃令牌概率,转而在语言模型最后一层隐藏状态上使用最近质心分类器。具体而言,我们将从校准集预先估计出的最近质心的标签分配给测试样本,作为其预测标签。我们在6个模型和10个分类数据集上的实验表明,隐藏校准始终以约20%~50%的优势超越当前基于令牌的基线方法,在上下文学习中达到了强有力的最先进水平。进一步分析表明,隐藏校准能够找到类间重叠更少的更优分类标准,并且语言模型在示例的帮助下能够提供线性可分的类内簇,这支持了隐藏校准的有效性,并为上下文学习的原理提供了新的见解。我们的官方代码实现可在 https://github.com/hc495/Hidden_Calibration 找到。

英文摘要:

In-Context Learning (ICL) typically utilizes classification criteria from output probabilities of manually selected label tokens. However, we argue that such token-based classification criteria lead to suboptimal decision boundaries, despite delicate calibrations through translation and constrained rotation applied. To address this problem, we propose Hidden Calibration, which renounces token probabilities and uses the nearest centroid classifier on the LM's last hidden states. In detail, we assign the label of the nearest centroid previously estimated from a calibration set to the test sample as the predicted label. Our experiments on 6 models and 10 classification datasets indicate that Hidden Calibration consistently outperforms current token-based baselines by about 20%~50%, achieving a strong state-of-the-art in ICL. Our further analysis demonstrates that Hidden Calibration finds better classification criteria with less inter-class overlap, and LMs provide linearly separable intra-class clusters with the help of demonstrations, which supports Hidden Calibration and gives new insights into the principle of ICL. Our official code implementation can be found at https://github.com/hc495/Hidden_Calibration.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑