arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.13016cs.CL

迭代前向调优提升语言模型中的上下文学习

Iterative Forward Tuning Boosts In-Context Learning in Language Models

Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);University of Chinese Academy of Sciences(中国科学院大学);Alibaba Group(阿里巴巴集团);MIT CSAIL(麻省理工学院计算机科学与人工智能实验室);Shanghai AI Laboratory(上海人工智能实验室)

Jiaxi Yang, Binyuan Hui, Min Yang, Bailin Wang, Bowen Li, Binhua Li, Fei Huang, Yongbin Li

AI总结:

提出两阶段Deep-Thinking框架,通过无需训练的迭代增强注意力机制多次处理示例,显著提升LLMs的上下文学习效果。

摘要:

尽管大型语言模型(LLMs)在上下文学习(ICL)方面取得了进展,但当前研究主要集中在特定的提示工程上,例如示例选择,并期望单次迭代的示例处理能够有效地泛化到给定的测试样本。然而,这种观点忽略了涉及示例的多次迭代可能带来的潜在益处,这种做法更贴近人类通过类比进行学习的迭代决策过程。在本研究中,我们引入了一个新颖的两阶段框架来提升LLMs中的ICL。具体而言,我们的框架将ICL过程划分为两个不同阶段:Deep-Thinking阶段和测试阶段。Deep-Thinking阶段结合了一种独特的注意力机制,即迭代增强注意力,它允许多轮信息积累。该机制通过在无需训练的情况下操纵Key-Value矩阵来运作,通过多次思考示例来培养LLMs更强的理解能力。我们在一系列基准测试和LLMs上评估了Deep-Thinking,展示了其优于普通ICL方法的性能,以及在示例选择不可行的挑战性任务中的有效性。

英文摘要:

Despite the advancements in in-context learning (ICL) for large language models (LLMs), current research centers on specific prompt engineering, such as demonstration selection, with the expectation that a single iteration of demonstrations processing can generalize effectively to a given test sample. However, this perspective overlooks the potential benefits derived from multiple iterations involving demonstrations, a practice aligning more closely with the iterative decision-making process exhibited by humans, who often learn through analogy. In this study, we introduce a novel two-stage framework to boost ICL in LLMs. Specifically, our framework delineates the ICL process into two distinct stages: Deep-Thinking and test stages. The Deep-Thinking stage incorporates a unique attention mechanism, i.e., iterative enhanced attention, which enables multiple rounds of information accumulation. This mechanism operates by manipulating the Key-Value matrices without training, fostering enhanced understanding capabilities in LLMs by thinking demonstrations multiple times. We evaluated Deep-Thinking across a range of benchmarks and LLMs, showing its superior performance over vanilla ICL methods and its effectiveness in challenging tasks where demonstration selection is infeasible.

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

↑