Abstract
Generating comprehensive recipes from a single food photograph is a complex task requiring the synthesis of procedural text with chronological flow and logical structure. Traditional models often struggle with long-form generation, leading to missing steps or incoherent instructions. This paper presents Decomposed Generation Networks (DGN), a framework that decomposes the generation process by first predicting a high-level global structure and then utilizing specialized sub-generators to produce phase-specific instructions. Experimental results on the Recipe1M dataset demonstrate that DGN significantly improves the coherence, detail, and semantic accuracy of generated recipes compared to state-of-the-art baselines.
Introduction
While computer vision and natural language processing have made significant strides in simple image captioning, generating a full recipe from a single image remains a "marathon" task for AI. Recipes are not merely descriptions; they are procedural texts that require a specific chronological sequence—from preparation to cooking and plating.
Existing models typically treat recipe generation as a single, continuous string of text. This approach often results in a loss of global structure, where the model might suggest garnishing a dish before it is cooked, or omit crucial steps entirely to minimize training loss. The DGN framework addresses these challenges by introducing a "coarse-to-fine" reasoning process that prioritizes the logical sequence of cooking phases.
The DGN Framework
The core innovation of DGN lies in its two-stage decomposition strategy:
- Global Structure Prediction: Instead of generating text immediately, the model analyzes the input image and ingredient list to predict a sequence of "phase labels." These labels act as a roadmap, defining the logical progression of the recipe (e.g., Phase 1: Prep, Phase 2: Cooking, Phase 3: Finishing).
- Sub-Generator Output Component: Based on the predicted roadmap, the system assigns specific sub-generators to handle each phase. This allows the model to specialize its vocabulary and logic for different stages of the cooking process.
Technical Architecture
The DGN system utilizes a Transformer-based backbone designed to balance general language proficiency with phase-specific specialization. To achieve this, the sub-generators share 12 transformer blocks while maintaining 4 independent blocks each. This architecture prevents overfitting while allowing the model to learn the nuances of different procedural stages.
Furthermore, the model incorporates BERT for ingredient encoding. Replacing simple word embeddings with pre-trained semantic representations allowed the model to better understand the relationships between various food items, leading to a substantial performance boost.
Experimental Results
The researchers evaluated DGN using the Recipe1M dataset, which contains over one million recipes with static images and ingredient lists. DGN consistently outperformed state-of-the-art baselines across several key metrics:
- Accuracy: The BLEU score improved from a baseline of 9.29 to 11.83 (using BERT + DGN with attention).
- Recall: ROUGE-L scores increased from 34.8 to 36.6, indicating a better capture of actual human-written cooking steps.
- Diversity: The vocabulary size of generated recipes increased from approximately 4,500 to over 6,500 words, suggesting that DGN produces more descriptive and varied instructions rather than repetitive, "safe" phrases.
Qualitative evaluations further confirmed that DGN-generated recipes are more detailed and logically ordered than those produced by single-decoder models.
Limitations and Future Work
Despite its success, DGN faces challenges with "common sense" reasoning, such as occasionally suggesting unrealistic cooking times. Additionally, the current method relies on heuristic segmentation to divide recipes into phases. Future research will explore more dynamic, semantic-based splitting methods and techniques to reduce "ingredient hallucination," where the model occasionally mentions ingredients not present in the original list.
Summary updated