论文标题
反事实食谱生成:在现实场景中探索组成概括
Counterfactual Recipe Generation: Exploring Compositional Generalization in a Realistic Scenario
论文作者
论文摘要
人们可以通过阅读以无监督的方式获取知识,并撰写知识以制作新颖的组合。在本文中,我们研究了验证的语言模型是否可以在现实的环境中执行组成概括:食谱生成。我们设计了反事实食谱生成任务,该任务要求模型根据成分的更改修改基本食谱。此任务需要在两个层面上的组成概括:将新成分纳入基础配方的表面水平,以及与不断变化的成分相关的调整动作的更深层次。我们在中文中收集了一个大规模的食谱数据集,以供模型学习烹饪知识,以及一部分动作级的细颗粒注释以进行评估。我们在食谱语料库上进行了预算的语言模型,并使用无监督的反事实生成方法来生成修改后的配方。结果表明,现有模型在保留原始文本样式的同时修改成分时遇到困难,并且通常会错过需要调整的操作。尽管预审前的语言模型可以产生流利的食谱文本,但它们无法真正以组成的方式学习和使用烹饪知识。代码和数据可从https://github.com/xxxiaol/counterfactual-recipe-generation获得。
People can acquire knowledge in an unsupervised manner by reading, and compose the knowledge to make novel combinations. In this paper, we investigate whether pretrained language models can perform compositional generalization in a realistic setting: recipe generation. We design the counterfactual recipe generation task, which asks models to modify a base recipe according to the change of an ingredient. This task requires compositional generalization at two levels: the surface level of incorporating the new ingredient into the base recipe, and the deeper level of adjusting actions related to the changing ingredient. We collect a large-scale recipe dataset in Chinese for models to learn culinary knowledge, and a subset of action-level fine-grained annotations for evaluation. We finetune pretrained language models on the recipe corpus, and use unsupervised counterfactual generation methods to generate modified recipes. Results show that existing models have difficulties in modifying the ingredients while preserving the original text style, and often miss actions that need to be adjusted. Although pretrained language models can generate fluent recipe texts, they fail to truly learn and use the culinary knowledge in a compositional way. Code and data are available at https://github.com/xxxiaol/counterfactual-recipe-generation.