arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2401.12406cs.CLcs.AIcs.LG
收藏

通过线性探针校准增强上下文学习

Enhancing In-context Learning via Linear Probe Calibration

Rensselaer Polytechnic Institute(伦斯勒理工学院);IBM Research(IBM研究院)

Momin Abbas, Yi Zhou, Parikshit Ram, Nathalie Baracaldo, Horst Samulowitz, Theodoros Salonidis, Tianyi Chen

AI总结:

针对类 GPT 模型 ICL 预测不可靠且对提示与示例排列敏感的问题,提出 LinC 线性探针校准方法,仅需极少标注样本即可显著提升性能、校准度与鲁棒性。

摘要:

上下文学习(ICL)是自然语言处理领域的一种新范式,它利用类似生成式预训练 Transformer(GPT)的模型。该方法使用包含上下文示例的提示,为新的查询输入生成相应输出。然而,在实际场景中应用 ICL 时,其效果无法随样本数量良好扩展,并且对不同提示模板和示例排列缺乏鲁棒性。本文首先基于一种由 Shannon 熵构建的新指标表明,使用 ICL 的类 GPT 模型会产生不可靠的预测。随后,为解决这一问题,我们提出一种名为 Linear Probe Calibration(LinC,线性探针校准)的新技术;该方法校准模型的输出概率,从而获得可靠预测并提升性能,同时只需要极少的额外样本(少至 5 个有标注数据样本)。LinC 在多个基准数据集上显著增强了 GPT 模型的 ICL 测试性能,平均提升最高达 21%,在某些情况下提升最高达 50%,并且显著提高了 PEFT 方法的性能,尤其是在低资源条件下。此外,LinC 实现了更低的期望校准误差,并对变化的标签比例、提示模板和示例排列具有高度鲁棒性。我们的代码可在 https://github.com/mominabbass/LinC 获取。

英文摘要:

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}.

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

↑