Artificial Intelligence Sniffs Out Unsafe Foods

Researchers trained machine-learning algorithms to read Amazon reviews for hints that a food product would be recalled by the FDA. Christopher Intagliata reports.

Illustration of a Bohr atom model spinning around the words Science Quickly with various science and medicine related icons around the text

Join Our Community of Science Lovers!

The Food and Drug Administration has to recall hundreds of foods every year. Like cookie snack packs with chunks of blue plastic hiding inside, Salmonella-tainted taco seasoning or curry powder laced with lead

It can take months before a recall is issued. But now researchers have come up with a method that might fast-track that process, leading to early detection and, ultimately, faster recalls. 

The system relies on the fact that people increasingly buy foods and spices online. And people tend to write reviews of products they buy online—which are like bread crumbs to food-safety officials sniffing out dangerous products. 


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


The researchers linked FDA food recalls from 2012 to 2014 to Amazon reviews of those same products. They then trained machine-learning algorithms to differentiate between reviews for recalled items and reviews for items that had not been flagged. 

And the trained algorithms were able to predict FDA recalls three quarters of the time. They also identified another 20,000 reviews for possibly unsafe foods—most of which had never been recalled. The results are in [JAMIA Open]. [Adyasha Maharana et al., Detecting reports of unsafe foods in consumer product reviews]

The World Health Organization estimates that 600 million people worldwide get sick annually, and more than 400,000 people die from contaminated food. “So having tools that allow us to detect this faster and hopefully investigate and do recalls faster will be useful not just in the U.S. but in other countries around the world as well.” Study author Elaine Nsoesie of Boston University. 

She did add one caveat: even recalled products can still get five-star reviews. So stars alone don’t tell the whole sickening story. The proof, unfortunately, may still be in the pudding.

—Christopher Intagliata

[The above text is a transcript of this podcast.]

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe