FlavorDiffusion: Modeling Food-Chemical Interactions with Diffusion

Junpyo Seo, Dongwan Kim, Jaewook Jeong, Inkyu Park, Junho MinNAACL 2025

TL;DR

This paper introduces FlavorDiffusion, a novel framework that uses diffusion models to predict food-chemical interactions and ingredient pairings. By integrating graph-based embeddings and chemical structure prediction, FlavorDiffusion achieves state-of-the-art results in reconstructing ingredient relationships and offers a promising approach for discovering novel food combinations.

What Problem Does This Paper Address?

The art of food pairing has traditionally relied on the intuition and experience of chefs. While scientific analysis and optimization of food combinations are gaining traction, current data-driven approaches face limitations. Existing methods often lack chemical interpretability, rely heavily on labeled data, and struggle with data imbalances, making them less generalizable across different cuisines and novel ingredient combinations. Furthermore, experimental methods for acquiring chemical interaction data are costly and time-consuming. This paper aims to bridge this gap by developing a scalable, interpretable, and chemically informed computational framework for food pairing.

Methods

FlavorDiffusion builds upon the DIFUSCO framework, a graph-based diffusion model, and extends it to structured food-chemical graphs. The core idea is to train a model that can reconstruct subgraphs sampled from a larger heterogeneous graph representing food-chemical relationships.

Key methodological components include:

  • Heterogeneous Graph Construction: The model utilizes a graph constructed from multiple datasets (Recipe1M, FlavorDB, HyperFoods) representing ingredient-ingredient co-occurrence, ingredient-flavor compound associations, and ingredient-drug compound relations.
  • Metapath2Vec Embeddings: To learn chemically meaningful embeddings, the authors employ Metapath2Vec, which captures high-order relations through structured random walks. This helps differentiate between "hub" ingredients (directly linked to chemicals) and "non-hub" ingredients.
  • Chemical Structure Prediction (CSP) Loss: An additional loss function is introduced to explicitly incorporate chemical structure information. This layer refines the embedding space by predicting molecular substructures, enhancing the model's understanding of chemical relevance.
  • Diffusion Model: The core of FlavorDiffusion is a Gaussian diffusion process. The forward process progressively corrupts the edge structure of subgraphs with noise, while the reverse process learns to denoise and reconstruct the original graph structure. Node representations are kept fixed during this process, forcing the model to learn denoising based on learned node attributes.
  • Sub-Graph Sampling: A balanced subgraph sampling strategy is employed to address data imbalance issues, ensuring fair representation across different ingredient-chemical associations.
  • Anisotropic GNN Architecture: The noise prediction network uses an anisotropic Graph Neural Network (GNN) to iteratively refine both node and edge embeddings, capturing local and global graph structures.

Datasets

The study utilizes the following datasets, which were also used in the FlavorGraph framework:

  • Recipe1M: Contains recipes with ingredient lists and cooking instructions, used to capture ingredient co-occurrence patterns.
  • FlavorDB: Compiles chemical composition data, linking flavor compounds to food ingredients.
  • HyperFoods: Maps drug compounds to food ingredients based on food-gene interactions.

The paper does not introduce new benchmark datasets but rather uses existing ones to construct a robust food-chemical network.

Key Insights and Ideas

  • Diffusion Models for Graph Reconstruction: Applying diffusion models, typically used for image generation, to reconstruct graph structures for food pairing is a novel approach. This allows for a more nuanced understanding of relationships than traditional graph embedding methods.
  • Chemical Structure Prediction is Crucial: The explicit inclusion of a Chemical Structure Prediction (CSP) layer significantly improves the learned ingredient embeddings and clustering quality, as evidenced by higher NMI scores. This highlights the importance of chemical properties in understanding food pairings.
  • Generalization Across Scales: The study investigates how models trained on subgraphs of different sizes generalize to others. A mid-sized subgraph training approach (e.g., 100 nodes) appears to offer the best balance between clustering accuracy and scalability.
  • Beyond Established Pairings: FlavorDiffusion not only reconstructs known ingredient relationships but also suggests novel, unconventional combinations, opening avenues for ingredient innovation and recipe development.

Key Results

  • Improved Clustering: FlavorDiffusion achieves state-of-the-art Normalized Pointwise Mutual Information (NMI) scores, indicating improved clustering quality of ingredient embeddings. The Flavor Diffusion_CSP (200 nodes) model achieved the highest NMI score of 0.3410.
  • Enhanced Chemical Inference: The model demonstrates improved performance in chemical inference, facilitating more effective discovery of novel ingredient combinations.
  • Generalization Performance: While models trained on very small subgraphs generalize poorly to larger ones, the 100-node trained model shows stable generalization across different test sizes. The 200-node trained model excels on large graphs but struggles with smaller ones.
  • Novel Pairings: The model successfully identifies both traditional spice blends (e.g., Red Chili Powder with Turmeric Powder) and unconventional pairings (e.g., Soy Sauce with Vanilla Extract), demonstrating its potential for discovering new flavor synergies.

Limitations and Future Work

  • Limitations:
    • Models trained on extremely small subgraphs exhibit limited generalization.
  • Models trained on very large subgraphs can struggle to adapt to smaller structures.
  • The current framework's generalization ability is sensitive to subgraph size.
  • Future Work:
    • Expand datasets to include more diverse food categories and chemical information.
  • Integrate multi-modal data (e.g., sensory data, textual descriptions) to enrich ingredient representations.
  • Refine graph-sampling techniques to further improve robustness and scalability.
  • Explore applications in computational gastronomy, such as AI-assisted recipe development and personalized flavor recommendations.

Summary updated

BibTeX
@inproceedings{seo2025flavordiffusion,
  author = {Junpyo Seo and Dongwan Kim and Jaewook Jeong and Inkyu Park and Junho Min},
  title = {{FlavorDiffusion: Modeling Food-Chemical Interactions with Diffusion}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
}
Figure