Packaged foods in most countries are not required to indicate the quantity of added-sugars they contain on the label, even though current dietary guidelines recommend limiting added-sugar consumption.  This makes it difficult for consumers to identify products they  should avoid or reduce in their diet.  Davies and colleagues conducted a study to develop an algorithm capable of predicting added-sugars in packaged products using the available nutrient, ingredient and food category information that utilized machine learning techniques.  Their results are published in the January 2022 issue of The Journal of Nutrition.

Data used to develop the algorithm included packaged food information from the US Label Insight dataset and employed a k-nearest neighbors (KNN) approach.  The validity and generalizability of the process was assessed using a synthetic dataset of Australian packaged foods.  The KNN outcomes were compared with an existing added-sugar prediction approach using manual steps.

The KNN approach explained a similar amount of variation in added-sugar content as the current prediction approach, and was also able to rank products from highest to lowest.  However, the KNN approach was not as effective at minimizing the difference between predicted and true added sugar values as the current approach.  These observations led the authors to conclude that the KNN machine learning approach can be used to predict added-sugar contents of packaged foods, and since it is automated, it could be used with large datasets.   The KNN algorithm can be used to monitor the added-sugar content of the food supply and inform interventions aimed at reducing added-sugar intake.


Tazman Davies, Jimmy Chun Yu Louie, Rhoda Ndanuko, Sebastiano Barbieri, Oscar Perez-Concha, Jason H Y Wu, A Machine Learning Approach to Predict the Added-Sugar Content of Packaged Foods, The Journal of Nutrition, Volume 152, Issue 1, January 2022, Pages 343–349,

Images via