Models trained with counterfactually augmented data learn representations of the causal structure of tasks, enabling robust generalization. However, high-quality counterfactual data is scarce for most tasks and not easily generated at scale. When crowdsourced, such data is typically limited in scale and diversity; when generated using supervised methods, it is computationally expensive to extend to new counterfactual dimensions. In this work, we introduce DISCO (DIStilled COunterfactual Data), a new method for automatically generating high quality counterfactual data at scale. DISCO engineers prompts to generate phrasal perturbations with a large general language model. Then, a task-specific teacher model filters these generations to distill high-quality counterfactual data. While task-agnostic, we apply our pipeline to the task of natural language inference (NLI) and find that on challenging evaluations such as the NLI stress test, comparatively smaller student models trained with DISCO generated counterfactuals are more robust (6% absolute) and generalize better across distributions (2%) compared to models trained without data augmentation. Furthermore, DISCO augmented models are 10% more consistent between counterfactual pairs on three evaluation sets, demonstrating that DISCO augmentation enables models to more reliably learn causal representations. Our repository is available at: https://github.com/eric11eca/disco
翻译:通过反事实增强数据训练的模型能够学习任务的因果结构表征,从而实现鲁棒泛化。然而,大多数任务中高质量反事实数据稀缺且难以规模化生成。众包方式获取的数据通常在规模与多样性上受限;采用监督方法生成时,扩展到新的反事实维度则计算成本高昂。本研究提出DISCO(DIStilled COunterfactual Data)——一种自动规模化生成高质量反事实数据的新方法。DISCO设计提示词,利用大型通用语言模型生成短语级扰动,再由任务特定的教师模型筛选这些生成结果,蒸馏出高质量反事实数据。该方法虽与任务无关,但我们将其应用于自然语言推理(NLI)任务,并在诸如NLI压力测试等挑战性评估中发现:相较于未使用数据增强的模型,使用DISCO生成反事实数据训练的较小规模学生模型在鲁棒性(绝对提升6%)和跨分布泛化能力(提升2%)上表现更优。此外,在三个评估集上,经DISCO增强的模型在反事实对间一致性提升10%,表明DISCO增强使模型能更可靠地学习因果表征。我们的代码仓库地址为:https://github.com/eric11eca/disco