Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2019 Aug 5;2(3):330-338.
doi: 10.1093/jamiaopen/ooz030. eCollection 2019 Oct.

Detecting reports of unsafe foods in consumer product reviews

Affiliations

Detecting reports of unsafe foods in consumer product reviews

Adyasha Maharana et al. JAMIA Open. .

Abstract

Objectives: Access to safe and nutritious food is essential for good health. However, food can become unsafe due to contamination with pathogens, chemicals or toxins, or mislabeling of allergens. Illness resulting from the consumption of unsafe foods is a global health problem. Here, we develop a machine learning approach for detecting reports of unsafe food products in consumer product reviews from Amazon.com.

Materials and methods: We linked Amazon.com food product reviews to Food and Drug Administration (FDA) food recalls from 2012 to 2014 using text matching approaches in a PostGres relational database. We applied machine learning methods and over- and under-sampling methods to the linked data to automate the detection of reports of unsafe food products.

Results: Our data consisted of 1 297 156 product reviews from Amazon.com. Only 5149 (0.4%) were linked to recalled food products. Bidirectional Encoder Representation from Transformations performed best in identifying unsafe food reviews, achieving an F1 score, precision and recall of 0.74, 0.78, and 0.71, respectively. We also identified synonyms for terms associated with FDA recalls in more than 20 000 reviews, most of which were associated with nonrecalled products. This might suggest that many more products should have been recalled or investigated.

Discussion and conclusion: Challenges to improving food safety include, urbanization which has led to a longer food chain, underreporting of illness and difficulty in linking contaminated food to illness. Our approach can improve food safety by enabling early identification of unsafe foods which can lead to timely recall thereby limiting the health and economic impact on the public.

Keywords: artificial intelligence; consumer product safety; food and drug administration; food safety; machine learning.

PubMed Disclaimer

Figures

Figure 1.
Figure 1.
Database for linking Amazon reviews to FDA recalls.
Figure 2.
Figure 2.
Distribution of consumer reviews across recalled product categories.
Figure 3.
Figure 3.
Features of Amazon reviews for the study period. Temporal trends (a) and distribution of customer ratings (b) of Amazon reviews.
Figure 4.
Figure 4.
Reasons for FDA food product recalls.
Figure 5.
Figure 5.
Plot of the reconstruction error. This shows that sentences from unsafe and safe product reviews are not significantly different. This might explain the difficulty in the classification process.

References

    1. Zhang P, Penner K, Johnston J.. Prevalence of selected unsafe food‐consumption practices and their associated factors in kansas. J Food Saf 1999; 194: 289–97.
    1. Story L. Lead paint prompts Mattel to recall 967, 000 toys. The New York Times.2007: 2.
    1. Story L, Barboza D. Mattel recalls 19 million toys sent from China. The New York Times.2007: 15.
    1. Teagarden MB, Hinrichs MA.. Learning from toys: reflections on the 2007 recall crisis. Thunderbird Int Bus Rev 2009; 511: 5–17.
    1. Vierk KA, Koehler KM, Fein SB, et al. Prevalence of self-reported food allergy in American adults and use of food labels. J Allergy Clin Immunol 2007; 1196: 1504–10. - PubMed