Let’s Learn Step by Step: Enhancing In-Context Learning Ability with Curriculum Learning
Yinpeng Liu, Jiawei Liu, Xiang Shi, Qikai Cheng, Yong Huang Wei Lu School of Information Management, Wuhan University, China Information Retrieval and Knowledge Mining Laboratory, Wuhan University, China {yinpengliu, laujames2017, coding, chengqikai, yonghuang1991,
Abstract
Demonstration ordering, which is an important strategy for in-context learning (ICL), can significantly affects the performance of large language models (LLMs). However, most of the current approaches of ordering require high computational costs to introduce the priori knowledge. In this paper, inspired by the human learning process, we propose a simple but effective demonstration ordering method for ICL, named the few-shot In-Context Curriculum Learning (ICCL). The ICCL implies gradually increasing the complexity of prompt demonstrations during the inference process. The difficulty can be assessed by human experts or LLMs-driven metrics, such as perplexity. Then we design extensive experiments to discuss the effectiveness of the ICCL at both corpus-level and instance-level. Moreover, we also investigate the formation mechanism of LLM’s ICCL capability. Experimental results demonstrate that ICCL, developed during the instruction-tuning stage, is effective for representative open-source LLMs. To facilitate further research and applications by other scholars, we make the code publicly available111https://github.com/61peng/curri_learning.
中文速览
大语言模型(LLM)在上下文学习(In-Context Learning,ICL)中对示例的排列顺序非常敏感,但现有的排序方法往往需要较高的计算代价或先验知识。受人类循序渐进学习过程的启发,研究者提出了一种名为"上下文课程学习"(In-Context Curriculum Learning,ICCL)的方法,核心思路是在推理时将提示示例按照从易到难的顺序排列,难度可由人类专家判断,也可用困惑度(perplexity)自动度量。在三个科学文本数据集、多个主流开源LLM上的实验表明,ICCL在语料库级和实例级均优于随机排序及多种现有方法,平均提升约5%–9%,且稳定性更好。进一步分析发现,LLM对课程顺序的敏感性主要在指令微调(instruction-tuning)阶段形成,而非预训练阶段,这一发现对未来如何培养模型的ICL能力具有重要的指导意义。
原文 arXiv:2402.10738;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2402.10738v2