In-context learning has shown great success in i.i.d semantic parsing splits, where the training and test sets are drawn from the same distribution. In this setup, models are typically prompted with demonstrations that are similar to the input question. However, in the setup of compositional generalization, where models are tested on outputs with structures that are absent from the training set, selecting similar demonstrations is insufficient, as often no example will be similar enough to the input. In this work, we propose a method to select diverse demonstrations that aims to collectively cover all of the structures required in the output program, in order to encourage the model to generalize to new structures from these demonstrations. We empirically show that combining diverse demonstrations with in-context learning substantially improves performance across three compositional generalization semantic parsing datasets in the pure in-context learning setup and when combined with finetuning.
翻译:内特学习在语义分解( 语义分解) 中取得了巨大成功, 培训和测试组来自相同的分布。 在这种设置中, 模型通常以与输入问题相似的演示形式产生。 但是, 在构思概括化的设置中, 模型在输出结果上测试, 其结构没有从培训集中找到, 选择类似的演示是不够的, 因为通常没有实例能与输入相类似。 在这项工作中, 我们建议了一种方法来选择不同的演示, 以集体覆盖产出方案所需的所有结构, 目的是鼓励模型将这些演示集成为新结构。 我们从经验上表明, 将多种演示与文内学习相结合, 极大地改善了三个拼写概括式的语义分解功能, 在纯文字学习组中对数据集进行分解, 并结合微调 。