Notice: our video recording and writeup can be found in the Try it out google docs link!
Title:
In most cases, dish names are straightforward, like “garlic chicken” or “roast pork”. However, when browsing the menu at a fancy restaurant or food delivery app, the names of the dishes can be sometimes confusing or even misleading, and make people wonder what’s really inside the food – What is “sloppy joes”? And what is “bubble and squeak”? Does “egg cream” have egg and cream in it?
Introduction:
We have weekly group meetings around dinner time, and it is common for us to consider what to eat after the meeting. And thus it is natural for us to think if we can do this through a deep learning method. Also, considering the limited computing power, we try to confine our dataset to plain language strings. Occasionally Siyang is taking an NLP course this semester and it is good to combine what we learned from Deep Learning to apply to NLP, especially through RNNs or transformers. We found some nice open datasets on the Internet and corresponding studies, and we are working on a prediction problem with NLP solutions.
Related Work;
Blog Link: This blog post used Gated Recurrent Unit (GRU)+ Bahdanau Attention and Transformer with Pytorch to predict the most possible ingredients from the input dish name, both in Indonesian.
Dataset:
The dataset we are using is from Kaggle (https://www.kaggle.com/datasets/shuyangli94/foodcom-recipes-with-search-terms-and-tags). It consists of 494963 data points and 10 columns. We will do various kinds of preprocessing. First, since our objective is to predict the ingredients of a dish, we will drop columns that are irrelevant and only keep three columns: id, dish name (input), and ingredients (output). Second, we will use the NLP library spaCy to preprocess the dish names, such as lemmatization. And we will treat each ingredient (a word or a phrase) as a vocab. Third, we will split the whole dataset into a training set and a test set.
Methodology:
We plan to train an encoder-decoder transformer model, probably with multi-head attention because we do not really care much about the order of ingredients.
Metrics:
The notion of “accuracy” does not apply well to our project because it is not a traditional classification problem. Since our proposed output is a list of ingredients, an ideal metric would measure how reasonable the ingredients are given the inputted dish name. It would not be optimal to simply measure whether the prediction is an exact match with the target, because when testing, no ground truth will be provided. Metrics idea: BLEU? (https://medium.com/neuralcook/neuralcook-image2ingredients-and-cooking-recommendation-using-deep-learning-94b51d4429c9)
Ethics:
Why deep learning is a good approach: Although it seems like rule-based models can also output a list of ingredients based on the input of a dish name, the usage of deep learning can achieve some kinds of tasks that are hard for rule-based models to achieve. For instance, when encountering a new dish name that the algorithm has never seen, our deep learning model can predict its required ingredients. It is not only applicable to existing dishes that are just not fed into the model during training, but it is also applicable to some novel dishes that the users creatively come up with.
Potential bias in dataset Our dataset is, by its description in Kaggle source, “recipes covering 18 years of user-submitted uploads on Food.com (formerly GeniusKitchen)”. Since most of the user traffics are from US(86.47%), Canada(5.33%) and UK(1.95%) (Source), and the recipes are uploaded by the users, the collected recipe data are mostly concentrated in European and North American regions. Our review found the database to be lacking in variety, imbalanced, and only represented recipes from a small portion of countries. We believe this lack and limitation are based on the skewed geographic and ethnocultural distribution of the site's user base. This dataset needs to be supplemented with additional data if applicable, such as African, Asian, Oceania, or South American recipes.
Division of labor:
Model architecture: Siyang Zhang(szhan227) Data preprocessing and augmentation: Jiayi Fan(jfan49) Hyperparameters and tuning: Tianqi Cheng(tcheng25) Writeup and metrics: Merielyn Sher(mgsher) Debug and test: Everyone
Log in or sign up for Devpost to join the conversation.