In-context learning is a new learning paradigm where a language model observes a few examples and then straightly outputs the test input's prediction. Previous works have shown that in-context learning is sensitive to the provided examples and randomly sampled examples show significantly unstable performance. In this paper, we propose to find ``supporting examples'' for in-context learning: Given the training dataset, we need to select one permutation of a few examples, which are informative for the task's in-context learning and lead to superior performance. Although in traditional gradient-based learning, e.g., fine-tuning, there are numerous methods to find a ``coreset'' from the entire dataset, they are sub-optimal and not suitable for this problem since in-context learning occurs in the language model's inference without gradients or parameter updates. Additionally, the strong dependence among in-context examples makes this problem an NP-hard combinatorial optimization problem and enumerating all possible permutations is infeasible. Hence we propose a two-stage method to tackle this challenge. First we propose a novel metric to select informative examples based on the language model's feedback, with a progressive filtering strategy. And then we propose a diversity-guided beam search method to refine and evaluate the selected examples, iteratively. The experimental results show our method significantly outperforms a wide range of baselines, and further analyses show the effectiveness of our method and shed light on the properties of supporting examples and in-context learning.
翻译:内文学习是一种新的学习模式, 语言模型可以观察几个例子, 然后直截了当地输出测试输入的预测。 以前的著作已经表明, 内文学习对所提供的示例敏感, 并且随机抽样的示例表现出非常不稳定的性能 。 在本文中, 我们提议寻找“ 支持示例”, 用于内文学习 : 鉴于培训数据集, 我们需要选择几个实例的一处调整, 以便让任务在文中学习, 并导致优异性。 尽管在传统的梯度学习中, 比如微调, 有很多方法从整个数据集中找到“ 核心设置”, 并且随机抽样学习显示非常不稳性 。 在语言模型中, 我们建议采用“ 支持” 内文中学习“ 核心” 的精细度分析, 而不是“ 参数更新” 。 此外, 文中示例的强烈依赖性能使得这一问题成为NP- 硬的组合优化问题, 并且进一步列举所有可能的变现性。 因此, 我们建议用两阶段方法来支持这项挑战的“ 核心性分析, ” 。 首先我们提出一个新的测试性分析方法, 显示一种渐进式的搜索方法, 方法, 以显示我们所选的搜索方法的精细化的方法 。</s>