Google AI Classifies Baking Recipes And Explains Its Predictions
One goal of AI researchers is to figure out how to make machine learning models more interpretable so researchers can understand why they make their predictions. Google says this is an improvement from taking the predictions of a deep neural network at face value without understanding what contributed to the model output. Researchers have shown how to build an explainable machine learning model able to analyze baking recipes.
The machine learning model can develop its own new recipes, and no data science expertise was needed to build the model. Sara Robinson works on AI for Google Cloud. During the pandemic, she enjoys baking and turned her AI skills towards the hobby. She started by collecting a data set of recipes and built a TensorFlow model to absorb a list of ingredients and spit out predictions like "97 percent bread, two percent cake, one percent cookie."
The model was able to classify recipes by type with accuracy, and she used it to come up with a new recipe. Her model determined the recipe was 50 percent cookie and 50 percent cake. It was dubbed a cakie. Robinson said the AI's recipe was yummy and tasted like what she would imagine would happen if she told an AI to make a cake cookie hybrid.
Robinson teamed up with another researcher to build baking 2.0 model with the larger dataset, new tools, and an explainable model to give insight into what makes cakes, cookies, and bread. The model came up with a new recipe called the "breakie," a bread cookie hybrid. The data set used by the researchers included a laundry list of 16 core ingredients and 600 recipes.
As the last part of preprocessing, the researchers used a data augmentation trick. Data augmentation is a method for creating new training examples from data you already have. The AI was designed to be insensitive to a recipe's serving size, so the researchers would randomly double and triple ingredient amounts.
The machine learning model could predict recipe type and provided a dialogue allowing the researchers to name the model, how long they wanted the model to train, and to indicate what input features to use in training. The result was a model able to predict the category of a recipe it was given correctly and to specify importance scores for ingredients that most contributed to its prediction.