Can a machine think like a Chef?

Even as AI is transforming a range of domains from across arts to science, gastronomy remains among the ultimate unassailable AI frontiers. Cooked food is a complex phenomenon involving intertwined sensory mechanisms. Therefore, to ask, ‘Can a machine think like a Chef?’ is a provocative proposition. Aligned with Alan Turing’s inquiry, this question of gastronomic origin invokes a deep query on the interface of culinary arts and artificial intelligence.  

Historically, gastronomy is perceived as an artistic endeavor. Cooking came across as a magical process in which raw ingredients are combined and processed to transform their taste and aroma, yielding a delicious dish. However, the rise of ‘Computational Gastronomy’ has opened a new realm of possibilities through a data-driven approach to food (Goel and Bagler, J Biosciences, 2022). The Complex Systems Laboratory, IIIT-Delhi, has been laying the foundations of computational gastronomy to investigate food through the lens of recipes, flavors, nutrition, health, and sustainability. Over the years, the research conducted in our lab has asked pertinent gastronomic questions with a promise to revolutionize culinary endeavors.

 In the latest article published in NPJ Systems Biology and Applications journal (‘Computational Gastronomy: Capturing culinary creativity by making food computable,’ Bagler and Goel, 2024), we wonder if machines can imitate the intelligence and creativity of writers, poets, artists, scientists, and even mathematicians, can they also capture the intuition of a Chef? Can a machine think like a Chef?

To answer this question, to begin with, we compiled RecipeDB, a structured repository of traditional recipes from across the globe comprising over 118,000 cooking protocols from 74 countries (Batra et al., Database, OUP, 2020), by implementing state-of-the-art named entity recognition algorithms (Diwan, Batra, and Bagler, IEEE-ICDE, 2020; Goel et al., LREC-COLING, 2024). This was followed by the implementation of a text generation algorithm, Ratatouille, for creating a galaxy of novel recipes (Goel et al., IEEE-ICDE, 2022). However, the generated novel recipe text needs to be evaluated for its human-like qualities, necessitating the Turing Test of AI-generated recipes. 
We enrolled culinary experts from the Institute of Hotel Management, Pusa (New Delhi), to test the ability of the Ratatouille algorithm to generate good-quality recipes. By implementing the ‘Turing Test for Chefs,’ we have shown that generative algorithms rooted in the structured data of recipes are capable of arriving at a practically uncountable number of hitherto unseen recipes (G. Bagler & M. Goel, NPJ Systems Biology and Applications, 2024).
This test is by invitation only and identifies the participant as an amateur, expert, or professional. Further, a recipe is randomly chosen to be displayed to the participants, and they rate it as Fake (computer-generated) or Real on a scale of 0 to 5. A score of ‘zero’ refers to a recipe text assessed as undoubtedly fake, and ‘five’ points to a real/traditional recipe beyond doubt. The participants are weeded out based on their ability to judge a real recipe as real (true positive) and a fake recipe as fake (true negative). The ratings are binaralized, and a confusion matrix is generated for evaluating the performance of the novel recipe generation algorithm. We obtained an F1-score of 69.88%; our study demonstrates the capabilities of fine-tuned models trained with well-annotated, structured data to generate meaningful recipe texts that can fool chefs, thereby (barely) passing the ‘Turing Test for Chef.’
 
Imagine an AI-generated recipe winning the MasterChef show! While it may seem preposterous, algorithmic protocols that mimic sensory processes may soon embrace cooking, similar to other creative domains. 
Of course, the models have much to improve upon in capturing subtle culinary nuances and will improve with reinforcement learning, enhanced training data, and superior model architectures. Going forward, such a strategy for capturing culinary creativity is generalizable by using relevant datasets for generating novel recipes of desirable culinary, flavor, nutrition, health, and carbon footprint profiles. 
We are conducting subsequent controlled studies to assess the palatability of these recipes by evaluating cooked dishes through the sensory expert panel. These recipe-generation models open a new realm of possibilities to generate palatable recipes by accounting for the constraints of culinary style, ingredient preferences, and allergies. They can potentially be optimized for cost, calories, and carbon footprints. Thus, going beyond the boundaries of creative writing and art, we argue that generative algorithms can help create potentially tasty and nutritious recipes and shape the future of culinary creativity.

Acknowledgments:  GB thanks Indraprastha Institute of Information Technology Delhi (IIIT-Delhi) for the computational support. GB thanks Technology Innovation Hub (TiH) Anubhuti for the research grant. This study was supported by the Infosys Center for Artificial Intelligence and Centre of Excellence in Healthcare at IIIT-Delhi. The authors thank the team of research interns who contributed to the ‘Turing Test for Chefs’ project. The authors are thankful to the senior year students of Bachelor of Science in Hospitality and Hotel Administration from the Institute for Hotel Management, Pusa (New Delhi), who volunteered for the Turing Test for Chef experiment.

Hot Topics

Related Articles