Lune

ACL2023顶会

Diverse Demonstrations Improve In-context Compositional Generalization

Itay Levy, Ben Bogin, Jonathan Berant

2023年份
51被引次数
51顶会引用

摘要

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 utterance. 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. 1 * Equal contribution 1 Our code is available at: https://github.com/itayle/ diverse-demonstrations Question: What is the most populous state through which the mississippi runs? Q: What are the major cities in states through which the mississippi runs? A: major(city(loc_2( state(traverse_1(riverid('mississippi')))) )) Q: What are the cities in states through which the mississippi runs? A: city(loc_2( state(traverse_1(riverid('mississippi'))) )) Q: What is the most populous state through which the mississippi runs? (Output) most_populous( state(traverse_1(riverid('mississippi'))) ) (a) Similarity-Based Prompting Q: What are the major cities in states through which the mississippi runs? A: major(city(loc_2( state(traverse_1(riverid('mississippi')))) )) Q: What rivers flow through the state with the largest population? A: river(traverse_2( largest_one(population_1(state (all))))) Q: What is the most populous state through which the mississippi runs? (Output) largest_one(population_1(state(traverse_1(riverid('mississippi'))) )) (b) Diversity-Based Prompting (Ours)

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

引用它的顶会 Paper51

问问它们各自怎么用它

它引用的顶会 Paper16

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖