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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- DiNeR: A Large Realistic Dataset for Evaluating Compositional Generalization cites Learning Compositional Rules via Neural Program Synthesis
- DiNeR: A Large Realistic Dataset for Evaluating Compositional Generalization cites COGS: A Compositional Generalization Challenge Based on Semantic Interpretation
- DiNeR: A Large Realistic Dataset for Evaluating Compositional Generalization cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
- COGS: A Compositional Generalization Challenge Based on Semantic Interpretation cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
Cited 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 on11
- 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
- Improving Cross-Modal Recipe Retrieval with Component-Aware Prompted CLIP EmbeddingXu Huang, Jin Liu, Zhizhong Zhang, Yuan XieACM MM 2023 · 11 citations
- Substance over Style: Document-Level Targeted Content TransferAllison Hegel, Sudha Rao, Asli Celikyilmaz, Bill DolanEMNLP 2020
- Compositional Generalization with Grounded Language ModelsSondre Wold, Étienne Simon, Lucas Georges Gabriel Charpentier, Egor V. Kostylev et al.ACL Findings 2024
- Fine-tuned Language Models are Continual LearnersThomas Scialom, Tuhin Chakrabarty, Smaranda MuresanEMNLP 2022 · 46 citations
