Abstract
The relationship between diet and health is important, yet difficult to study in practice. Dietary pattern analysis is one method for investigating this link; having more variety in diet tends to be beneficial and a score can be generated based on a heuristic approach to food intake habits. We aim to enhance the intuition behind these food scores by creating an intuitive data-driven visualization of food relatedness by leveraging t-distributed stochastic neighbor embedding (t-SNE). More specifically, by performing t-SNE analysis in a controlled manner to project the high-dimensional nutritional information of food items into a lower dimensional food similarity space, the natural clustering of foods based on the underlying nutritional composition becomes visually observable. The efficacy of this data-driven approach for visualizing food relatedness was investigated on a total of 8549 food item entries in the USDA food composition database, with the results showing considerable promise as a tool for gaining important nutritional insights. This is the first step toward providing a novel method to enhance dietary pattern analysis with additional context and insight into food intake habits based on the inherent nutritional content of the foods consumed.
Introduction
Nutritional epidemiology—the study of how dietary habits influence health outcomes—faces significant methodological challenges. Traditional assessment methods often rely on subjective self-reporting or costly biochemical analyses. To address these complexities, researchers frequently employ "dietary pattern analysis" to evaluate the healthfulness and variety of a person's diet.
However, existing analytical frameworks possess notable limitations. A-priori methods depend on expert-defined health criteria, which may be subjective or constrained by current scientific understanding. Conversely, a-posteriori methods, such as Principal Component Analysis (PCA) or k-means clustering, often rely on linear assumptions that may overlook complex nutritional interactions or require pre-defined cluster counts, potentially introducing bias. This research proposes an intuitive, data-driven approach to visualize food relatedness based solely on chemical composition.
Methodology
The study utilizes t-distributed Stochastic Neighbor Embedding (t-SNE), a non-linear dimensionality reduction technique. Unlike linear methods like PCA, t-SNE calculates similarities between data points in high-dimensional space and maps them into a 2D or 3D space, ensuring that similar items remain proximal.
Data Processing and Feature Extraction
The researchers analyzed the USDA National Nutrient Database for Standard Reference (SR28) from 2015, encompassing 8,549 unique food items. Each item was represented as a point in a 47-dimensional space, with each dimension corresponding to a specific nutrient (e.g., vitamins, minerals, fats, proteins).
Controlled Projection
To optimize the visualization, a linear grid search was conducted to determine the ideal "perplexity" hyperparameter. Perplexity balances the algorithm's focus between local and global data structures. The final model utilized a perplexity of 50 over 2,000 iterations.
The clustering process was entirely unsupervised; the algorithm operated solely on nutrient values without prior knowledge of food categories. Labels and colors were applied post-clustering for validation purposes.
Results and Discussion
The t-SNE analysis successfully projected the complex 47-dimensional dataset into an interpretable similarity space. The most significant finding was the emergence of "Nutritional Gravity": foods naturally formed clusters that aligned with semantic groups (e.g., "leafy greens," "meats") based purely on their chemical profiles.
Key Insights
- Semantic Alignment: The natural clustering suggests that linguistic food categories are deeply rooted in their underlying nutritional chemistry.
- Hidden Relationships: The visualization uncovered non-obvious connections. For instance, certain ice creams clustered with cheeses. While linguistically distinct, both are nutritionally similar high-fat dairy products.
- Capturing Non-Linearity: By avoiding linear assumptions, t-SNE captured synergistic nutritional interactions that traditional methods might obscure.
Distinct, dense clusters were observed for various categories, including meats, high-fat oils, cheeses, leafy greens, and mixed dishes like pizza or lasagna. This provides a visual "map" of the nutritional landscape that is easily interpretable by human observers.
Conclusion and Future Work
This study demonstrates the efficacy of t-SNE in creating an intuitive visualization of food relatedness. Future work will focus on:
- Enhanced Color Encoding: Developing methods to encode nutritional similarity directly into the color spectrum (e.g., similar hues for similar nutrient profiles).
- Database Expansion: Incorporating global datasets like the Canadian Nutrient File to enhance the model's generalizability.
- Parametric t-SNE: Transitioning to a parametric version of the algorithm to allow real-time projection of individual dietary patterns onto the established nutritional map, aiding dietitians in assessing food variety.
This approach represents a significant step toward providing deeper insights into dietary habits based on the inherent nutritional content of consumed foods.
Summary updated