Counterfactual Recipe Generation: Exploring Compositional Generalization in a Realistic Scenario
Xiao Liu, Yansong Feng, Jizhi Tang, Chengang Hu, Dongyan Zhao
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f2dec20a-a73d-4722-bafa-f3e6917b8773Cited by top-tier papers3
- FoodieQA: A Multimodal Dataset for Fine-Grained Understanding of Chinese Food CultureWenyan Li, Xinyu Zhang, Jiaang Li, Qiwei Peng et al.EMNLP 2024 · 5 citations
- Bridging Cultures in the Kitchen: A Framework and Benchmark for Cross-Cultural Recipe RetrievalTianyi Hu, Maria Maistro, Daniel HershcovichEMNLP 2024 · 5 citations
- DiNeR: A Large Realistic Dataset for Evaluating Compositional GeneralizationChengang Hu, Xiao Liu, Yansong FengEMNLP 2023
Builds on10
- Measuring Compositional Generalization: A Comprehensive Method on Realistic DataDaniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman et al.ICLR 2020 · 401 citations
- COGS: A Compositional Generalization Challenge Based on Semantic InterpretationNajoung Kim, Tal LinzenEMNLP 2020 · 149 citations
- Learning Compositional Rules via Neural Program SynthesisMaxwell I. Nye, Armando Solar-Lezama, Josh Tenenbaum, Brenden M. LakeNeurIPS 2020 · 120 citations
- Broaden the Vision: Geo-Diverse Visual Commonsense ReasoningDa Yin, Liunian Harold Li, Ziniu Hu, Nanyun Peng et al.EMNLP 2021 · 32 citations
- Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense ReasoningLianhui Qin, Vered Shwartz, Peter West, Chandra Bhagavatula et al.EMNLP 2020 · 25 citations
Related papers
- A Highly Clean Recipe Dataset with Ingredient States Annotation for State Probing TaskMashiro Toyooka, Kiyoharu Aizawa, Yoko YamakataACM MM 2025
- Substance over Style: Document-Level Targeted Content TransferAllison Hegel, Sudha Rao, Asli Celikyilmaz, Bill DolanEMNLP 2020
- Improving Cross-Modal Recipe Retrieval with Component-Aware Prompted CLIP EmbeddingXu Huang, Jin Liu, Zhizhong Zhang, Yuan XieACM MM 2023 · 11 citations
- Fine-tuned Language Models are Continual LearnersThomas Scialom, Tuhin Chakrabarty, Smaranda MuresanEMNLP 2022 · 46 citations
- Compositional Task Representations for Large Language ModelsNan Shao, Zefan Cai, Hanwei Xu, Chonghua Liao et al.ICLR 2023
