Research Project Yields Quick and Tasty Salad Recipes
Have you ever been stuck trying to find something new for dinner? If it's the salad course that's got you puzzled, Erol Cromwell '15 has the answer.
Funded by a Duke Research Initiative grant, Cromwell and Assistant Professor of Mathematics and Computer Science Raghuram Ramanujan employed math and computer science last summer to create a program that generates novel salad recipes with limited human assistance.
Recognizing the opportunity to work on his computer programming skills, Cromwell picked up the project from its originator, Jonah Galeota-Sprung '13.
The first step involved creating a list of about 1,800 salad recipes from . Each one came with a rating between 1 and 5 stars from users on the site. The researchers then matched every single possible pair of salads, which yielded exactly 1,619,100 pairs. They fed all the possible pairs into a computer program along with a label telling the program which of the two recipes was ranked higher by consumers.
The program examined the relationships among the ingredients that occurred in highly ranked recipes. That yielded a statistical model that, given two new salads, could predict which one would receive more favorable reviews.
The researchers then generated thousands of new salads by combining ingredients at random. Surprisingly, they discovered that this simple, trial-and-error process uncovered many novel recipes that were rated highly by the learned model. This finding suggests that choosing a set of ingredients to create a pleasing salad may require only a limited amount of creativity.
The final step was the creation and implementation of a human taste test to see how computer generated salads measure up on people's taste buds. Cromwell organized a public taste test on the atrium floor of the Alvarez College Union this fall. Cromwell gave the dining services department six lists of ingredients for three human-assembled and three computer generated salads. Passers by sampled all six, then filled out a questionnaire rating each on taste and novelty, and guessing which ones were computer generated.
The human salads all were rated higher in taste than those generated by the program, but the computer-generated salads were rated highly in novelty, meaning that people thought that the combinations of ingredients were unique.
Cromwell said the project went smoothly overall, though there were some unexpected surprises. "The primary thing I learned was that you might have to struggle with certain aspects of a project. But that's part of the learning process, too."
Cromwell and Ramanujan hope to present their project at a computer science conference in Florida, and are examining the potential of using the program to create an app or a website for new salad recipes.
Despite all his close works with salads, Cromwell wants it clearly understood that he is not an expert salad chef. "My friends sort of joke about it" he said.
They ask him at mealtimes to generate a salad for them. His response? "They can make their own salads!"
Bridget Lavender '18 contributed to this story.