arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.00385cs.CLcs.AI
收藏

面向上下文学习的动态演示控制器

Dynamic Demonstrations Controller for In-Context Learning

National Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室)

Fei Zhao, Taotian Pang, Zhen Wu, Zheng Ma, Shujian Huang, Xinyu Dai

AI总结:

本研究针对上下文学习中演示样本数量并非越多性能越好的问题,提出D$^2$Controller动态调整演示数量,在多数据集多规模大模型上实现4.6%的相对提升,且扩展到现有ICL模型效果具竞争力。

摘要:

上下文学习(In-context learning, ICL)是自然语言处理(natural language processing, NLP)领域的一种新范式,大语言模型(large language model, LLM)将少量演示样本和一个测试实例作为输入,无需更新模型参数即可直接做出预测。已有研究表明,ICL对演示样本的选择和排序十分敏感。但由于学界普遍认为演示样本数量与模型性能呈正相关,鲜有研究探讨在LLM有限输入长度范围内,演示样本数量对ICL性能的影响。本文发现这一结论并不总是成立。通过预实验我们发现,增加演示样本数量并不一定能提升性能。基于这一洞见,我们提出动态演示控制器(Dynamic Demonstrations Controller, D$^2$Controller),该控制器可通过动态调整演示样本数量来提升ICL性能。实验结果显示,在10个数据集上,D$^2$Controller在10种不同规模的LLM上取得了4.6%的相对提升。此外,我们还将该方法扩展到已有的ICL模型上,取得了具有竞争力的结果。

英文摘要:

In-context learning (ICL) is a new paradigm for natural language processing (NLP), where a large language model (LLM) observes a small number of demonstrations and a test instance as its input, and directly makes predictions without updating model parameters. Previous studies have revealed that ICL is sensitive to the selection and the ordering of demonstrations. However, there are few studies regarding the impact of the demonstration number on the ICL performance within a limited input length of LLM, because it is commonly believed that the number of demonstrations is positively correlated with model performance. In this paper, we found this conclusion does not always hold true. Through pilot experiments, we discover that increasing the number of demonstrations does not necessarily lead to improved performance. Building upon this insight, we propose a Dynamic Demonstrations Controller (D$^2$Controller), which can improve the ICL performance by adjusting the number of demonstrations dynamically. The experimental results show that D$^2$Controller yields a 4.6% relative improvement on ten different sizes of LLMs across ten datasets. Moreover, we also extend our method to previous ICL models and achieve competitive results.

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

↑