KitcheNette: Predicting and Ranking Food Ingredient Pairings using Siamese Neural Network

Donghyeon Park, Keonwoo Kim, Yonggyu Park, Jungwoon Shin, Jaewoo Kang

Abstract

As a vast number of ingredients exist in the culinary world, there are countless food ingredient pairings, but only a small number of pairings have been adopted by chefs and studied by food researchers. In this work, we propose KitcheNette which is a model that predicts food ingredient pairing scores and recommends optimal ingredient pairings. KitcheNette employs Siamese neural networks and is trained on our annotated dataset containing 300K scores of pairings generated from numerous ingredients in food recipes. As the results demonstrate, our model not only outperforms other baseline models, but also can recommend complementary food pairings and discover novel ingredient pairings.

Introduction

Historically, discovering complementary food pairings has relied on the subjective, accumulated experience of professional chefs. In the academic realm, researchers have tried to quantify food pairings by analyzing shared chemical flavor compounds (e.g., FlavorDB). However, chemical analysis is tedious, limited to a small subset of natural ingredients, and sometimes results in pairings that share compounds but taste terrible together.

The authors tackle the lack of a large-scale, data-driven approach to food pairing. Because the culinary world contains thousands of ingredients, the vast majority of possible pairings (millions of combinations) have never been formally scored or tried. KitcheNette introduces a machine learning approach to predict the compatibility of these "unknown" pairings based on the latent relationships learned from "known" recipe data.

Methodology

The KitcheNette model combines two distinct neural network architectures to capture the nuances of ingredient compatibility:

  1. Siamese Neural Networks: The model takes two ingredients as input, represented as 300-dimensional word vectors (pre-trained using Word2Vec on recipe instructions). These vectors pass through twin Multi-Layer Perceptrons (MLPs) with shared weights to generate learned representations for each ingredient.
  2. Wide & Deep Learning: Instead of simply calculating the distance (cosine similarity) between the two ingredient vectors—which the authors found performs poorly—they pass the representations into a Wide & Deep component.
  3. The Deep layer concatenates the two vectors to compute a joint semantic representation.
  4. The Wide layer computes the outer product of the two vectors to capture complex, cross-dimensional interactions between the ingredients (sparse features).
The KitcheNette architecture featuring Siamese MLPs and a Wide & Deep prediction layer.

These components are concatenated and passed through a final layer to output a compatibility score ranging from -1 to 1.

Dataset and Scoring

To facilitate deep learning, the authors constructed a massive dataset from the Recipe1M corpus, extracting 3,567 unique ingredients. Compatibility was quantified using Normalized Point-wise Mutual Information (NPMI) for ingredient co-occurrences. NPMI effectively penalizes ubiquitous ingredients (like salt) while rewarding rare but highly complementary pairs (like wasabi and nori).

Out of approximately 6.3 million possible combinations, the authors isolated ~356,000 "known pairings" (those with sufficient co-occurrence for reliable NPMI scores) for training. The remaining ~6 million combinations were treated as "unknown pairings" for the model to predict.

Experimental Results

KitcheNette significantly outperformed all baselines, including Random Forest (RF), Gradient Boosting (GB), and Extra Trees (ET). On the test set, it achieved the lowest Root Mean Square Error (0.0417) and the highest Correlation (0.9266).

Performance evaluation of KitcheNette vs. baselines using NDCG@K and ROC curves.

Key Insights

  • Ranking Performance: As shown in the NDCG@K and ROC curves, KitcheNette is superior at ranking complementary ingredients and classifying good vs. bad pairings compared to traditional machine learning regressors.
  • Semantics over Distance: Ablation studies revealed that simple vector similarity (cosine similarity) is insufficient for predicting food pairings. Ingredients that are linguistically similar do not necessarily taste good together. The Wide & Deep architecture is crucial because it learns the semantic relationship of a pairing rather than just spatial proximity.
  • Analogical Reasoning: The model successfully learns to make predictions based on analogy. For example, if it recognizes that Champagne + Orange Twist is a high-rated pair, and it learns that Prosecco is similar to Champagne, it can accurately predict that the unseen pairing of Prosecco + Orange Wedge will also score highly.

Conclusion

KitcheNette demonstrates that statistical co-occurrence in human recipes provides a robust foundation for predicting culinary compatibility, often yielding more intuitive results than chemical-based models. While currently limited to one-to-one pairings, future work may involve graph-based neural networks to handle complex multi-ingredient interactions and the integration of chemical flavor compound data directly into ingredient embeddings.

Summary updated

Abstract

As a vast number of ingredients exist in the culinary world, there are countless food ingredient pairings, but only a small number of pairings have been adopted by chefs and studied by food researchers. In this work, we propose KitcheNette which is a model that predicts food ingredient pairing scores and recommends optimal ingredient pairings. KitcheNette employs Siamese neural networks and is trained on our annotated dataset containing 300K scores of pairings generated from numerous ingredients in food recipes. As the results demonstrate, our model not only outperforms other baseline models, but also can recommend complementary food pairings and discover novel ingredient pairings.
BibTeX
@inproceedings{park2019kitchenette,
  author = {Donghyeon Park and Keonwoo Kim and Yonggyu Park and Jungwoon Shin and Jaewoo Kang},
  title = {{KitcheNette: Predicting and Ranking Food Ingredient Pairings using Siamese Neural Network}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  url = {https://openreview.net/forum?id=Q2aigdde7X},
}
Figure