New UpdatesTechnology

The Battle Of Cyber Chefs: How Neural Networks Learn To Cook

The Battle Of Cyber Chefs: How Neural Networks Learn To Cook


The Battle Of Cyber Chefs: How Neural Networks Learn To Cook


"Cyber Chefs"
Cyber Chefs

Artificial intelligence has learned to draw, write songs and even generate porn – this has long been no surprise to anyone. Now the robots have almost learned how to cook food. Let’s talk about why it’s important

What’s happening?

Imagine a world where you don’t have to spend time searching for recipes, learning the principles of proper nutrition, and exhaustingly scrolling through restaurant menus. All this can be done by artificial intelligence, which will analyze your preferences and food allergies, take into account whether you want to lose weight or gain weight, and even think in advance how to reduce waste. Just such a “smart” assistant was created in Estonia.

"Cyber Chefs"
Cyber Chefs

Initially, the startup Yummy was supposed to be the next food delivery service. The result is a service that can not only adapt recipes, but also generate a possible appearance of a new dish. The development has already interested several large business angels – Yummy was able to raise $3.6 million.


How the neural network will change the user experience

Now the standard approach to choosing food looks like this: the client selects the desired category and sets up filters – the price of the product, ingredients or manufacturer. Usually, each time you have to set everything up again. Even if you just moved from the category “Grocery” to “Milk”.


The neural network will allow you to customize the choice as much as possible, reducing the number of actions. Probably, it will be possible to make a full-fledged voice control. For example, you say: “I want to pick up a dietary weekly diet that will include five fish dishes. I also hate rice. It will take about 20 minutes to pick something like this by hand. The neural network will spend a couple of seconds.

Why is this needed?

Fusion Recipe Generation

Although the Estonian startup has come a long way, the idea itself is not unique. Since recipes are algorithms , many developers have thought about how to automate the process of cooking and creating new dishes. Yes, maybe robots aren’t that good at judging flavor combinations yet. But one AI can replace several chefs at once, who have arranged a “brainstorming”. The fact is that to create a new fusion recipe, you may need, for example, simultaneous knowledge of Greek and Indonesian cuisines. Not all chefs have such skills, and even more so not amateur chefs. AI can easily cope with such a task.

Waste reduction

Some people do have the superpower to come up with genius dishes out of two carrots and one egg. But most of us, seeing an almost empty refrigerator, are more likely to order a pizza – and the lone ingredients will go into the garbage chute in a couple of days. Cooking AIs can make recipes out of anything, which means they could make our lives greener (and more economical).

Service improvement

Probably, culinary AI will be of greater interest to food service owners. It’s one thing to figure out how to surprise your friends at the holiday. It is quite another to launch a cafe where dishes are never repeated and products are not wasted, as the robot analyzes leftovers and generates recipes rationally. You can approach the problem from the other side. Let people come up with dishes, and AI analyzes the taste preferences of customers and suggests which ingredients to order and which items to remove from the menu.

Do robots really cook delicious food?


"Cyber Chefs"
Cyber Chefs

The problem is that so far we cannot explain to the neural network what “delicious” is, since this concept refers to qualia  – incommunicable information. The perception of taste is subjective: for example, some love olives, while others turn out from their smell alone. And this means that the developer will not even be able to algorithmize tastes – for example, by setting “successful” and “unsuccessful” product combinations in advance.

True, there is a way that helps a little to get around this problem – robots can come up with dishes not from individual ingredients, but by combining recipe fragments. This reduces the probability of generating absolutely unsuccessful options, although not completely.

How does AI come up with recipes?


"Cyber Chefs"
Cyber Chefs

It depends on what approach the neural network uses. Some enthusiasts even test different AI and arrange a kind of “battle of the chefs”, comparing the taste of dishes prepared according to the recipe of the robot.

It is a Python library that uses Recurrent Neural Network (RNN) to generate text and work with serial data. Yes, it is not tailored specifically for recipes, but it can work with them. Such neural networks have a serious drawback – they gradually “forget” the initial inputs. Therefore, the more data you enter, the higher the likelihood that in the end it will no longer be about borscht, but about the development of agriculture.

However, here is what such AI suggests to cook :

Mix olive oil and sambal olek (this is an Indonesian sauce);
cut the cucumber into cubes;
cook pasta according to package instructions;
marinate salmon in balsamic vinegar, adding onion, garlic, and oil to the marinade. Then bake it in the oven until golden brown;
wash and cut the tomatoes in half.
And such a dish was really prepared. According to the taster, it turned out delicious, and the sauce of olive oil and sambal is really good.


It is a generative pre-trained transformer. That is, such a neural network can guess the next words in a sentence – the first phrase is entered by the user himself. This approach has recently become more popular than RNN. GPT-2 was able to generate entire pages of perfectly coherent text. Now, by the way, GPT-3 has already appeared. She is smarter but uses the same approach.

Here is what GPT-2 suggested to cook :

“Combine the tomatoes, cilantro, tomato paste, sour cream, lime juice, salt, black pepper, cumin, chili powder, and cayenne in a large bowl. Marinate vegetables for 30 minutes. Heat a 12-inch non-stick skillet over medium-high heat. Add bacon, onion and pepper flakes. Fry it all for 3 minutes, until the bacon is crispy. Then add sour cream and then ground beef. Cook, stirring the meat with a wooden spoon – 3-4 minutes is enough. Then mix it all together.”

Recipe from the Sberbank neural network


It was created by developers from Sberbank, having trained a neural network on a dataset of 600 GB of text. RBC Trends tried to create an unusual recipe using this neural network. Here is what we got for the query “Cut the ciabatta and grate the cheese”:

“Melt the butter, chop the chili with a knife. Preheat oven to 180 degrees. Grate the cheese. Melt the butter in a separate pan, add sugar, dry zest and hot pepper to it. Simmer, stirring, until caramelized, about 3 minutes.

In another pan, heat the olive oil, put the grated cheese there and cook, stirring, for about five minutes. Sprinkle with chili, put melted cheese on top of it and chop the remaining pepper. Put it all in a baking dish and pour over the cream. Bake for 5-10 minutes to melt the cheese. Serve with a ball of ciabatta.”

Note that we launched the neural network only once – a good result was obtained from the first attempt. In our opinion, the dish may appeal to lovers of spicy.

Recipe from “Balaboba” – neural networks “Yandex”
Balaboba works on the YaLM (Yet another Language Model) language model. In general, the principle of text generation is the same as that of GPT-3. The neural network can write texts in different styles – you can pre-select “Instructions” or even “Folk Wisdom”. There are also recipes here – Balaboba offers to list the ingredients from which you want to cook the dish.

We chose the carrot and egg that we mentioned earlier in the text:

“You can make a very tasty salad out of carrots and eggs. Grate carrots on a coarse grater, add eggs, finely chopped onion, herbs, and mayonnaise. Stir, and decorate with vegetables or herbs.

The neural network succeeded on the fourth attempt. The recipe turned out to be quite simple, and Balaboba did not specify in what form the egg should be added to the salad.

Is it really important?

In fact, culinary AI developers have more important tasks than generating fusion recipes. For example, there is still no single standard for healthy eating in the world, since national approaches vary greatly, and the guides themselves are constantly being improved. Powerful AI would help not only bring together the experience of nutritionists from different countries but also take into account many side factors, from the average cost of products to the carbon footprint that their production leaves.

For More Updates Click Here.


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button