Analyzed More Than 600 Baking Recipes and Developed New Products Using Machine Learning

After thousands of years of accumulation, humans have developed a variety of delicious foods, but our taste buds are never satisfied. In order to explore new possibilities, an AI developer at Google used AI to develop new dessert recipes. Will AI be more imaginative than humans in the field of recipe development?
Among all kinds of delicacies in the world, baked goods have always occupied an important position. Soft bread, delicate cakes, and crispy biscuits are all irresistible.
Baking is not only a cooking technique, but also an art. Mixing flour, eggs, butter, sugar and other raw materials in different proportions, and after a series of physical and chemical reactions, you will get snacks with different flavors and textures, like exquisite works of art.

To date, baking masters have developed dozens of classic desserts such as egg tarts, puffs, and mille-feuille. However, in order to bring new experiences and stimulation to the taste buds of foodies, they are still constantly researching and developing new products.
Sara, a baking enthusiast at Google, has also been exploring new possibilities. She combines this hobby with work and uses AI to develop new baking recipes.
Using machine learning to bake, develop two new products in minutes
Like many people, Sara, an AI engineer at Google Cloud, spent a lot of time in the kitchen while being forced to stay at home due to the epidemic.

Sara likes baking, but she found that most people search for ready-made recipes online and follow them step by step. This approach is safe, but it has great limitations and it is difficult to innovate. However, if you mix them randomly, you may fail, wasting materials and time.
Therefore, it is important to understand the scientific principles behind baking recipes so that you can clearly understand the different effects brought about by each ingredient and different proportions, thus breaking away from the limitations of fixed recipes.
As an AI engineer, Sara believes this task is very suitable for machine learning. "We can train the machine learning model with existing data, let it master the rules, and then create the new formula we want."
Based on this idea, Sara quickly built an AI model.After learning 600 baking recipes, the model can accurately determine whether the baking result of an input recipe is bread, cake or cookie.

Next, Sara asked the AI model, which had mastered the secret of baking ingredient ratios, to create a mixture recipe of cake and cookies, which she named "cakie" (cake+cookie).
The AI model lived up to expectations and generated an accurate recipe according to Sara's needs. Sara conducted her own experiments and found that under the guidance of this new recipe, the baked "cakie" met her expectations and tasted very nice.

Afterwards, Sara asked the AI model to create a recipe for "breakie" (bread+cookie), and the result also satisfied her.

AI baker: deeply familiar with the principles of pastry mixing
Sara detailed the process of building this model in her blog. Let’s see how AI can be trained to become a professional baker.
Dataset organization
First, Sara and her colleagues collected more than 600 recipes from the Internet to form a recipe dataset, including bread, cakes, and cookies.The commonly used core raw materials were extracted, a total of 16 kinds, including flour, yeast, milk, water, salt, eggs, etc.
Then the author standardized the measurement units of various ingredients in these recipes. For example, some were measured in "cups" and some were measured in "spoons". The author converted them all into "ounces" (1 ounce ≈ 28.35 grams).

Build models, learn recipes
They used Google's AutoML Tables to build a classification model.
Once you have created a new tabular model, you can import data directly from csv, Google Sheets, or BigQuery databases. Once the data is imported, you can see them in the "Training" tab:

After training the model with these data, the model will master the recipe characteristics corresponding to each baked product, so that it can make more accurate predictions.
Analyzing model interpretability
Through analysis, Sara further understood the basis for the AI model's predictions. The results showed that for the AI model, the importance of each ingredient in the baking recipe for decision-making was ranked as follows:

Of course, in reality, the recipes for various desserts are very complex, and the above indicators are not fixed. For example, Sara analyzed the prediction results of a certain "cake" recipe and found that eggs, butter, and baking soda are important judgment indicators for AI prediction.

In fact, in the field of baking, professionals have long written books introducing the principles of baking, such as "Understanding the "Why" of Bread in a Scientific Way" and "The Bread Bible", but amateurs may not have enough time or patience to study it in depth.
AI bakers save us this step. You don’t need to master scientific principles, you can let AI help you create desserts that suit your taste. Isn’t it wonderful?
When it comes to developing new dishes, is AI more reliable than humans?
Tired of conventional dishes, more and more people have begun to pursue innovative dishes in recent years. However, the reality is that innovative dishes can easily turn into dark dishes that people are afraid of: stir-fried green vegetables with oranges, stir-fried mooncakes with peppers, stir-fried watermelons with bananas...
Before AI learned to develop baking recipes, it had already been involved in recipe research and development. Will it be more reliable than human chefs, and will it be more innovative while also avoiding failures?
In 2019, British pie maker Piglet's Pantry partnered with Esme Loans, a business loan platform, toThe algorithm was fed thousands of existing British-specific pie recipes (totaling nearly 1 million characters of text), and then learned to invent thousands of new pie recipes.
After that, after artificial experimental screening and improvement, five new pie recipes were selected for production. After trying them, some customers said they were delicious.

However, AI with too much imagination and too much innovation is bound to make mistakes.
Previously, even after learning 30,000 recipes, an AI still failed to master the combination of various foods and generated some recipes that looked unpalatable.
For example, the combination of blueberry + spinach + feta cheese, bacon + avocado + peach, etc.

It seems that AI’s skill in developing recipes is not stable enough, and sometimes it is just a random combination. So foodies need to be mentally prepared to hand over the task of creating innovative dishes to AI, which saves time but also carries certain risks.

News Source:
https://cloud.google.com/blog/topics/developers-practitioners/baking-recipes-made-ai