Semantic Modeling for Food Recommendation Explanations

Ishita Padhiar, Oshani Seneviratne, Shruthi Chari, Daniel Gruen, Deborah L. McGuinnessarXiv 2021

TL;DR

This paper introduces the Food Explanation Ontology (FEO), a semantic framework designed to pull back the curtain on "black-box" AI food recommendation systems. By modeling the complex interplay between user profiles, environmental context, and food data, FEO allows systems to generate diverse, human-understandable justifications—such as why a specific meal is recommended or how a change in health status (like pregnancy) would alter dietary advice.

What Problem Does This Paper Address?

As AI moves deeper into the health and nutrition space, we face a "trust gap." While deep learning models can suggest recipes with high accuracy, they rarely explain why. For a user with a seafood allergy or a specific cultural diet, a recommendation without a justification is often ignored.

The challenge is that food is multidimensional. A recommendation depends on ingredients, seasonal availability, user likes/dislikes, and even group dynamics. Existing food ontologies like FoodOn focus on categorization but lack the formal structure to handle Explainable AI (XAI). This paper bridges that gap by providing a formal semantic model specifically for generating food-related explanations.

Methods

The authors developed FEO by extending two existing pillars: the Explanation Ontology (EO) (for the logic of "why") and the 'What To Make' Ontology (a concise foundation for food and recipes that maps to the broader FoodOn).

Key technical components include:

  • The feo:Characteristic Hierarchy: This is the root of the ontology, branching into UserCharacteristic (e.g., allergies), SystemCharacteristic (e.g., current season), and Parameter (the food item being questioned). Subclasses of the Characteristic class
  • Fact vs. Foil Logic: To handle contrastive questions ("Why A instead of B?"), the system identifies "Facts" (supportive traits present in the environment) and "Foils" (traits that oppose a recommendation or are absent). Defining facts and foils
  • Reasoning & Querying: The authors used the Pellet reasoner to handle logical inferences (like identifying a food as "disliked" via inverse properties) and SPARQL to extract specific explanation templates.
Fig. 1. Subclasses of feo:Characteristic class.
Fig. 3. Defining facts and foils in our system. The italicized portion of each box refers to a base characteristic of the question parameter. The underlined portion refers to the base characteristics of the ecosystem. The characteristics themselves can overlap and can include things such as location and season. Instances in the green square would be considered facts, and those that are in the red boxes are foils. The blue box recommendation refers to instances that classify as neither facts nor foils.

Datasets

The research leverages:

  • FoodKG: A large-scale food knowledge graph.
  • 'What To Make' Ontology: Used as the base for food modeling.
  • Health Coach Application: A real-world recommendation service used to provide the baseline recommendations that FEO then explains.

Key Insights and Ideas

  • System Agnosticism: FEO is designed to be "post-hoc." It doesn't care how the recommendation was generated (e.g., neural net vs. collaborative filtering); it retroactively creates semantic connections to explain the output.
  • Transitive Reasoning: By defining properties like hasCharacteristic as transitive, the system can "crawl" through ingredients. For example, it can explain that a Curry is recommended because it contains Cauliflower, and Cauliflower is currently in season.
  • Diverse Explanation Types: The paper formalizes a taxonomy of food questions, ranging from "Everyday" explanations to "Scientific" and "Counterfactual" ones. Table of explanation types and example questions
Table of explanation types and example questions

Key Results

The authors successfully evaluated FEO using competency questions for three critical explanation types:

  1. Contextual: Successfully explained a recommendation based on external factors (e.g., "Cauliflower Potato Curry is recommended because cauliflower is in season in Autumn").
  2. Contrastive: Explained why one soup was better than another by identifying a user allergy in the "foil" (the non-recommended item).
  3. Counterfactual: Demonstrated how recommendations change if a user's state changes (e.g., "If you were pregnant, sushi would be forbidden, and Spinach Frittata would be recommended for its folic acid").

Limitations and Future Work

  • Natural Language Generation: Currently, the system outputs structured data (SPARQL results). The authors note the need for a layer that converts these into natural, conversational speech for non-technical users.
  • Evidence Scaling: While the framework supports "Scientific" and "Statistical" explanations, the authors have deferred full modeling of these types until they can amass enough peer-reviewed evidence and aggregate user data to back them up.
  • Data Volume: The next step involves integrating FEO with even larger datasets to allow users to query a wider range of food parameters and ingredients.

Summary updated

Abstract

With the increased use of AI methods to provide recommendations in the health, specifically in the food dietary recommendation space, there is also an increased need for explainability of those recommendations. Such explanations would benefit users of recommendation systems by empowering them with justifications for following the system's suggestions. We present the Food Explanation Ontology (FEO) that provides a formalism for modeling explanations to users for food-related recommendations. FEO models food recommendations, using concepts from the explanation domain to create responses to user questions about food recommendations they receive from AI systems such as personalized knowledge base question answering systems. FEO uses a modular, extensible structure that lends itself to a variety of explanations while still preserving important semantic details to accurately represent explanations of food recommendations. In order to evaluate this system, we used a set of competency questions derived from explanation types present in literature that are relevant to food recommendations. Our motivation with the use of FEO is to empower users to make decisions about their health, fully equipped with an understanding of the AI recommender systems as they relate to user questions, by providing reasoning behind their recommendations in the form of explanations.
BibTeX
@misc{padhiar2021semantic,
  author = {Ishita Padhiar and Oshani Seneviratne and Shruthi Chari and Daniel Gruen and Deborah L. McGuinness},
  title = {{Semantic Modeling for Food Recommendation Explanations}},
  year = {2021},
  eprint = {2105.01269},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.01269},
}

Loading related content...

Figure