Source-linked AI summary

Recipe recommendation using ingredient networks

Chun-Yuen Teng, Yu-Ru Lin, Lada A. Adamic

arXiv:1111.3919v3cs.SIphysics.soc-ph

TL;DR

Online recipe collections provide large-scale evidence about ingredient combinations, modifications, and user preferences, but traditional ingredient lists do not fully capture these relationships. The paper mines recipes and reviews to construct complement and substitute ingredient networks, then uses them with nutrition information to predict ratings. The combined features achieve accuracy .792, with most prediction power coming from ingredient networks.

  • Problem

    The paper asks how online recipes and reviews can reveal ingredient relationships and user preferences beyond the information available from traditional cookbooks.

  • Method

    The paper parses recipes and reviews, constructs complement and substitute ingredient networks, and combines their features with nutrition information for recipe-rating prediction.

  • Results

    Accuracy .792 is achieved for recipe-rating prediction, while ingredient networks provide 84% of the combined feature importance.

  • Takeaways & Limitations

    Structural information from relationships among ingredients predicts recipe preferences better than using a full ingredient list alone.

Abstract

from arXiv · show

The recording and sharing of cooking recipes, a human activity dating back thousands of years, naturally became an early and prominent social use of the web. The resulting online recipe collections are repositories of ingredient combinations and cooking methods whose large-scale and variety yield interesting insights about both the fundamentals of cooking and user preferences. At the level of an individual ingredient we measure whether it tends to be essential or can be dropped or added, and whether its quantity can be modified. We also construct two types of networks to capture the relationships between ingredients. The complement network captures which ingredients tend to co-occur frequently, and is composed of two large communities: one savory, the other sweet. The substitute network, derived from user-generated suggestions for modifications, can be decomposed into many communities of functionally equivalent ingredients, and captures users' preference for healthier variants of a recipe. Our experiments reveal that recipe ratings can be well predicted with features derived from combinations of ingredient networks and nutrition information.

1. INTRODUCTION

Online recipe sharing preserves not only cooking instructions but also user evaluations and modification advice. The paper mines this collective information to model ingredient relationships and predict recipe ratings.

  • 1. INTRODUCTION: Online recipe sites combine shared recipes with ratings, comments, and modification suggestions from users.These variants and reviews provide crowd-sourced evidence about what works and how recipes can be changed.
  • 1. INTRODUCTION: Online recipe collections reveal ingredient pairings, recipe flexibility, substitutability, and user preferences beyond what traditional cookbooks provide.Reviews indicate whether ingredients can be omitted, adjusted, or replaced.
  • 1. INTRODUCTION: The paper mines a popular recipe-sharing website, parses recipes and reviews, and constructs networks representing different ingredient relationships.The networks are designed to capture collective knowledge about combining ingredients.
  • 1. INTRODUCTION: Two complement-network communities correspond to savory and sweet recipes, while substitute-network communities group functionally equivalent ingredients.The substitute network also captures preferences for healthier recipe variants.
  • 1. INTRODUCTION: Recipe ratings can be well predicted using combinations of ingredient-network features and nutrition information.The reported accuracy is .792, with most prediction power coming from ingredient networks.

2. RELATED WORK

Prior recipe-recommendation work commonly uses users’ histories, overlapping ingredients, nutrition, or ingredient availability. This paper instead builds direct complement and substitute ingredient networks and tests their predictive use.

  • 2. RELATED WORK: Prior systems recommend recipes from past ratings, browsing or cooking history, often using ingredient overlap or selected key ingredients.Some prior work represents recipes as graphs built from ingredients and cooking directions.
  • 2. RELATED WORK: Another research branch recommends recipes using nutritional intake, ingredient availability, and personal nutritional needs.Some methods also extract replaceable ingredients to satisfy users’ preferences.
  • 2. RELATED WORK: This paper derives direct ingredient-ingredient networks for both complements and substitutes, then demonstrates their use in predicting which related recipe will be more successful.That predictive evaluation extends beyond merely characterizing ingredient networks.

3. DATASET

The dataset consists of tens of thousands of user-contributed recipes and nearly two million reviews from Allrecipes.com. The study extracts ingredients and cooking processes from recipe text and analyzes regional heating-method preferences.

  • 3. DATASET: Allrecipes.com hosts user-uploaded recipes containing ingredients, preparation instructions, cooking times, servings, nutrition information, directions, and photos.The site supports contributions and ratings from novice and expert cooks.
  • 3. DATASET: 46,337 recipes and 1,976,920 reviews were collected from Allrecipes.com.Reviews include ratings, review text, and counts of users who marked reviews useful.
  • 3. DATASET: Ingredients and cooking methods were extracted from freeform recipe text using text-processing approaches.Ingredient extraction begins by matching recipe lines against ingredient names.
  • 3. DATASET: The finalized ingredient vocabulary contains the 1,000 most common ingredient names, covering 94.9% of ingredient entries.Each selected ingredient appeared in at least 23 recipes.
  • 3. DATASET: Cooking-process extraction identifies heating methods, mechanical processes, and chemical techniques from recipe directions.Examples include baking, boiling, steaming, chopping, grinding, marinating, and brining.
  • 3. DATASET: χ2 test p-value < 0.001 indicates that preferences for six popular cooking methods vary significantly across five US regions.Boiling and simmering are more common in the South and Midwest, while marinating and grilling are relatively more popular in the West and Mountain regions.

4. INGREDIENT COMPLEMENT NETWORK

The ingredient complement network uses recipe co-occurrence to represent which ingredients combine more often than expected by chance. Its structure separates savory and sweet cooking, with a smaller mixed-drink satellite cluster.

  • 4. INGREDIENT COMPLEMENT NETWORK: The paper constructs an ingredient complement network from ingredient occurrences across recipes using pointwise mutual information.PMI compares ingredients’ joint occurrence with their separate occurrence probabilities.
  • 4. INGREDIENT COMPLEMENT NETWORK: Complementary ingredients tend to co-occur far more often than expected by chance.This network is intended to distill users’ knowledge about combining ingredients.
  • 4. INGREDIENT COMPLEMENT NETWORK: The complement network contains two major ingredient communities corresponding to savory and sweet dishes.Network clustering confirms that these clusters contain the vast majority of ingredients.
  • 4. INGREDIENT COMPLEMENT NETWORK: A satellite cluster near the sweet community contains mixed-drink ingredients such as lime, rum, ice, orange, and vodka.The cluster appears as a constellation of small nodes in the network visualization.
  • 4. INGREDIENT COMPLEMENT NETWORK: ρ = 0.09, p-value [truncated] shows that only the maximum pairwise PMI is very slightly positively correlated with recipe ratings.Average and minimum pairwise PMI were uncorrelated with ratings.

5. RECIPE MODIFICATIONS

User reviews reveal how recipe ingredients can be increased, decreased, omitted, added, or replaced, and these relationships support ingredient substitute networks. The resulting networks capture functional substitutions and ingredient preferences relevant to recipe recommendation.

  • Modification patterns: 60.1% of recipe reviews contain modification signals, and reviews mentioning changes have higher average ratings (4.49 vs. 4.39).They also have lower rating variance (0.82 vs. 1.05), suggesting modifications are reported even when users like the recipe.
  • Modification extraction: Quantity modifications are detected with heuristics for increases and decreases, while additions and omissions are identified through action words and ingredient matching.The extracted modification types include adjustment, deletion, and addition; substitutions are analyzed separately.
  • Modification patterns: Ingredients perceived as unhealthy are generally more likely to be modified and decreased, whereas flavor enhancers and toppings tend to be modified and added.Vegetable oil and margarine are exceptions among the unhealthy ingredients discussed.
  • Modification patterns: Recipe frequency is negatively correlated with deletions/recipe (ρ = −0.22), additions/recipe (ρ = −0.25), and increases/recipe (ρ = −0.26).More common ingredients have more opportunities for quantity changes but appear more stable in deletion and addition behavior.
  • Ingredient substitute network: The substitute network is a weighted, directed ingredient graph whose edge weight p(b|a) is the proportion of substitutions from ingredient a to ingredient b.Substitutions occurring fewer than 5 times are removed; the resulting network exhibits strong clustering.
  • Ingredient substitute network: The substitute network correlates strongly with a ratings-based preference network (ρ = 0.72, p < 0.001), indicating that it encodes ingredient preferences.The preference network compares ingredients across similar recipes with different ratings, while directed PMI handles relationship directionality.

6. RECIPE RECOMMENDATION

The study predicts preferences between similar recipes using ingredient-network, nutrition, and baseline features. Network structure substantially outperforms full ingredient lists, while the combined model achieves the strongest reported accuracy.

  • Feature construction: Ingredient-network features encode relationships among ingredients and are used as the main predictors of recipe ratings alongside nutrition and baseline recipe information.Baseline features include cooking methods, preparation time, and servings; the networks are reduced through SVD before prediction.
  • Recipe pair prediction: The task predicts which of two similar recipes has the higher average rating, using pairs selected by ingredient overlap and cosine similarity above 0.2.Pairs are further controlled for reviewer variation by focusing on recipes rated by the same users.
  • Prediction results: .786 accuracy is achieved with ingredient-network features, compared with .712 for the baseline, .746 for full ingredients, and .753 for nutrition information.Network features use substantially fewer dimensions than the full ingredient representation and approach the combined model’s .792 accuracy.
  • Feature importance: 84% of prediction power comes from ingredient networks in the combined feature set, although nutrition items also help distinguish highly rated recipes.The baseline cooking-effort and cooking-method features contribute 8.9% of overall importance.
  • Network structure: The substitution network contributes 39.8% of total network-feature importance and supplies more top-100 influential features than the other networks.Its structural information is described as complementary, whereas the complement network alone is more effective than either co-occurrence or substitution alone.
  • Network structure: Substitution communities, including sweet-and-oil and milk substitutes, are particularly informative for predicting recipe ratings.The network’s strong clustering also supports examining related ingredients when a new recipe has few user suggestions.

7. CONCLUSION

The paper uses collaborative recipe data to characterize ingredient complements, substitutes, regional preferences, and modifiability, while predicting which of two related recipes users will rate more highly. Future work would extend the networks to cooking methods and personalize ratings and interfaces by region, diet, and user interaction.

  • Ingredient networks encode which ingredients complement one another and which can be substituted to obtain superior results.
  • The approach predicts, given a pair of related recipes, which one users will rate more highly.
  • Future work would incorporate cooking methods into ingredient networks and generate region-specific and diet-specific ratings.
  • Additional interface features could support newly submitted or unrated recipes and users browsing a cookbook.
Loading 1111.3919v3…