Published July 24, 2025 | Version v1
Model Open

Food and Recipe Ontology: Semantic Model for Recipes, Allergen Labelling, and Dietary Classification

  • 1. ROR icon TU Dresden
  • 2. Technische Universität Dresden Fakultät Informatik

Description

Food and Recipe Ontology is a formal semantic model formulated in a Description Logic (DL) to represent and reason about culinary recipes, dietary restrictions, and allergen content. This ontology includes:

  • 22 distinct recipes, in form of general concept inclusions,

  • A taxonomy of 19 food allergen labels with formal definitions,

  • Formal definitions for dietary classifications, namely vegan/non-vegan recipes and vegetarian/non-vegetarian recipes,

  • In total, 35,369 concept-, 195 role names and 52,248 logical axioms (with FoodOn imported).

Designed for DL reasoning to support automated proof extraction: determining whether a recipe contains allergens or qualifies as (non-)vegetarian or (non-)vegan.

Building Blocks

The foundation of our food and recipe ontology is WhatToMake Ingredient Ontology,

Miao Qi, Yarden Neeman, Forest Eckhardt, and Kevin Blissett. 2018. WhatToMake: a semantic web application for recipe recommendation. Rensselaer Polytechnic Institute. 

where recipes and food items are modeled as named individuals. Since recipes inherently have a complex relational structure we translated the 22 WhatToMake recipes into logical axioms using concepts and roles from FoodOn

Damion M. Dooley, Emma J. Griffiths, Gurinder S. Gosal, Pier L. Buttigieg, Robert Hoehndorf, Matthew C. Lange, Lynn M. Schriml, Fiona S. L. Brinkman, and William W. L. Hsiao. 2018. FoodOn: a harmonized food ontology to increase global food traceability, quality control and data integration. npj Science of Food, 2(23).

Application

The following demonstrates a DL proof generated from Food and Recipe Ontology using the forgetting method for reasoning. Such proofs can then be processed by LLM interfaces to explain the dietary suitability of a recipe in natural language.

{
    "finalConclusion": "bread ⊑ vegan recipe",
    "inferences": [
        {
            "conclusion": "bread ⊑ vegan recipe",
            "ruleName": "eliminate 'flour'",
            "premises": [
                "(∀has ingredient.(water ⊔ flour) ⊓ bread) ⊑ vegan recipe",
                "bread ⊑ ∀has ingredient.(water ⊔ flour)"
            ]
        },
        {
            "conclusion": "(∀has ingredient.(water ⊔ flour) ⊓ bread) ⊑ vegan recipe",
            "ruleName": "eliminate 'vegan ingredient'",
            "premises": [
                "water ⊑ vegan ingredient",
                "flour ⊑ vegan ingredient",
                "(∀has ingredient.vegan ingredient ⊓ bread) ⊑ vegan recipe"
            ]
        },
        {
            "conclusion": "water ⊑ vegan ingredient",
            "ruleName": "asserted",
            "premises": []
        },
        {
            "conclusion": "flour ⊑ vegan ingredient",
            "ruleName": "asserted",
            "premises": []
        },
        {
            "conclusion": "(∀has ingredient.vegan ingredient ⊓ bread) ⊑ vegan recipe",
            "ruleName": "eliminate 'food recipe'",
            "premises": [
                "bread ⊑ (food recipe ⊓ ∃has ingredient.flour ⊓ ∃has ingredient.water)",
                "vegan recipe ≡ (∀has ingredient.vegan ingredient ⊓ food recipe)"
            ]
        },
        {
            "conclusion": "bread ⊑ (food recipe ⊓ ∃has ingredient.flour ⊓ ∃has ingredient.water)",
            "ruleName": "asserted",
            "premises": []
        },
        {
            "conclusion": "vegan recipe ≡ (∀has ingredient.vegan ingredient ⊓ food recipe)",
            "ruleName": "asserted",
            "premises": []
        },
        {
            "conclusion": "bread ⊑ ∀has ingredient.(water ⊔ flour)",
            "ruleName": "asserted",
            "premises": []
        }
    ]
}

An LLM-generated summary with a factual inaccuracy: The proof demonstrates that 'bread' is classified as a 'vegan recipe'. This conclusion is derived from the fact that all ingredients of the bread are vegan. The key steps involve showing that the bread contains ingredients like flour and water, all of which are classified as vegan ingredients. By establishing that all these ingredients are vegan, it follows that the entire recipe qualifies as a vegan recipe. The final conclusion is reached by eliminating non-vegan ingredients and confirming that the remaining ingredients meet the criteria for a vegan recipe.

Files

Files (186.2 kB)

Name Size Download all
md5:cede0db7d85b3334543d4cbccc760883
186.2 kB Download