The Downgrading Axioms Challenge for Qualitative Composition of Food Ingredients Bernd Krieg-Brückner1,2 , Mark Robin Nolte2 , Mihai Pomarlan2 and Michaela Kümpel3 1 German Research Center for Artificial Intelligence, DFKI, BAALL, Bremen, Germany 2 Collaborative Research Center EASE, Universität Bremen, Germany 3 Institute for Artificial Intelligence, Universität Bremen, Germany Abstract Qualitatively graded relations provide increased granularity for fine-grain modelling, and achieve qualitative abstraction from quantitative data. We focus on composite dosage for food ingredients in the BAALL Ontology (of considerable size): weight ratios, Alcohol By Volume, etc. To deduce the overall qualitative composition by reasoning, axioms for downgrading are introduced. These impose a heavy load on reasoning such that conventional reasoners fail. Keywords qualitatively graded relations, downgrading, composite dosage, food ingredients 1. Introduction The BAALL Ontology, originally motivated by Ambient Assisted Living at DFKI’s Bremen Ambient Assisted Living Lab, BAALL, now integrates diverse applications with more than 40k OWL axioms [6], covering a foundational, a variety of general, and several application domain ontologies for configuration of service robots, diets, structured food products and dishes, and cooking assistance [1, 2, 3, 4, 5].1 We plan a harmonisation with the FoodOn initiative [7] that demonstrates the dire need for ontologies in the food domain and related commercial interest. For food products and their composition by ingredients we have introduced Qualitatively Graded Relations (Sect. 2) for the deduction of Composite Dosage (Sect. 3) with a significant number of Downgrading Axioms (Sect. 4), providing a considerable challenge for reasoning. Only advanced reasoners such as Konclude provide an adequate response; conventional reasoners such as HermiT or Pellet easily reach limitations in space or processing time that can only be overcome by reducing the downgrading axioms for “normal” work with Protégé. As examples for the Semantic Reasoning Evaluation Challenge we thus provide several reduced versions of the BAALL Ontology (Sect. 5). Semantic Reasoning Evaluation Challenge, 21st International Semantic Web Conference (ISWC 2022) email: Bernd.Krieg-Brueckner@dfki.de, bkb@uni-bremen.de (B. Krieg-Brückner); nolte@uni-bremen.de (M. Nolte); Mihai.Pomarlan@uni-bremen.de (M. Pomarlan); Michaela.Kuempel@uni-bremen.de (M. Kümpel) ○c 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR CEUR Workshop Proceedings (CEUR-WS.org) Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 1 Partial support has come from the German Research Foundation (DFG), as part of the Collaborative Research Center 1320 “EASE - Everyday Activity Science and Engineering” (http://www.ease-crc.org/) Figure 1: Names in sheaf of relation hasFoodIngredient encode grades from IngredientSignificance Figure 2: hasFoodIngredient_f001Dominant has range FoodIngredient_f001Dominant, which has IngredientSignificance grade f001Dominant 2. Qualitatively Graded Relations To achieve a graded valuation according to some qualitative abstraction of a semantic concept, we introduce extra valuation domains (cf. IngredientSignificance in Fig. 1, left) with values such as f001Dominant, f002Essential, ... or some other (arbitrarily fine) qualitative metrics; the number of grades/levels depends on the application. Such values are used as grades in qualitatively graded relations (cf. [2, 1, 3, 4]) to encode the valuations in the names of (a sheaf of) relations, e.g. hasFoodIngredient_f001Dominant, hasFoodIngredient_f002Essential, ... , cf. Fig. 1. The axiomatization defining the re- lationship between the set of values (grades) in Fig. 1, left, and the ranges of the relations in the sheaf hasFoodIngredient is partially given in Fig. 2: e.g. the relation hasFoodIngredient_f001Dominant has the range FoodIngredient_f001Dominant, defined by hasIngredientSignificance to have as grade value the IngredientSignificance individual f001Dominant. These axioms are partially omitted in the challenge, cf. Sect. 5. 3. Composite Dosage As a motivating example, these relations refer to the composite dosage of food ingredients, i.e. the significance of ingredients in composite ingredients, giving rise to a hierarchy of qualitative composition. Consider the composition of ingredients in ChiliConCarne (Fig. 3). Figure 3: Recipe prototype for ChiliConCarne with qualitative characterization of ingredients Figure 4: Grading of Intensity in hasIngredient, embedding graded notions for bakery etc. The names are suggestive, leading to the qualitative characterization of a food product in terms of its ingredients, in effect a kind of recipe prototype sufficient for an experienced cook to derive precise measures for a personal recipe at her/his discretion (cf. quantitative vs. qualitative scales in Sects. 3.1, 3.2 below). TomatoSauce refers to a sub-recipe. Qualitative grading for different kinds of food ingredients is embedded in a general grad- ing scheme for ingredients based on Intensity (Fig. 4). Consider hasIngredient_i016Moderate: it embeds hasChemicalCompound_f016Subordinate and hasFoodIngredient_f016Subordinate, etc.; note that different notions/scales are used for bakery, seasoning, or (hot) spices, and related to the grading of weight proportions in Intensity, on which we will focus here. Figure 5: Qualitative scale with doubling proportions (blue), and ABV scale (yellow) Figure 6: Quantitative intervals for hasABV yielding qualitative classification 3.1. Qualitative Scales The governing principle for the qualitative scaling of intensity is the doubling, or con- versely halving, of proportions, see Fig. 5: level 001 (see blue row), corresponding to hasFoodIngredient_f001Dominant, refers to that ingredient, which is dominant in the composite food, i.e. it has the ratio 1/1, while an ingredient at level 002 is comprised with ratio 1/2, and so on; thus the level names x correspond to the ratio 1/x. This gives rise to an exponential scale of (ordered) qualitative levels based on powers of 2. Each level corresponds to an interval. For example level 002 corresponds to the interval 33% .. 66%, thus 1/3 .. 2/3 of the total, or, if we assume a total weight of 1kg, to 333 g/kg .. 666 g/kg. The notions of doubling/halving seem appropriate (cognitively adequate) for the application. Note that the governing proportion resides in the middle of each interval (e.g. 1/002 in the middle of 33% .. 66%). As a consequence, level 001 is in the middle of 66% .. 133%; this takes a little getting used to, but, after some reflection, makes a lot of sense. In practice, it means that the “whole” may actually be a little more than 1kg; taking the analogy of recipe prototypes, the “whole” is identified with an amount of 666g .. 1.33kg, appropriate for a meal for 4 persons. 3.2. Quantitative vs. Qualitative Dosage The qualitative intervals may thus be related to quantitative intervals. As a further example take the definition of AlcoholicProducts (cf. Fig. 5, yellow row): the scale for mass (kg) is related to the ABV (Alcohol by Volume) scale based on the relative density Figure 7: Deduced qualitative classification as AlcoholicProduct of Spirit and Fortified Wine Figure 8: Qualitative dosage for Classic Martini and Reverse Martini deduced by downgrading (specific weight) of alcohol; level 002, corresponding to hasFoodIngredient_f002Essential, or hasIngredient_i002ExtremelyHigh, refers to the interval 42% .. 84% ABV. We can formally state this correspondence by a general class axiom as in Fig. 6, thus relating the qualitative definition to quantitative measures. Moreover, an alcoholic beverage stating its ABV by an assertion with the data property hasABV will be classified automatically by an OWL-DL reasoner. As examples, take Spirit and FortifiedWine in Fig. 7. 4. Downgrading We would like to automatically derive the ABV of a composite dosage as in e.g. Classic- Martini or ReverseMartini in Fig. 8. Note that the 2:1 (i.e. 1/3 : 2/3 or 66%:33%) mass proportion of Gin vs. DryVermouth in ClassicMartini just fits above the lower bounds of the intervals for f001Dominant and f002Essential, resp. This is achieved by axioms downgrading the dosage composition such as those for hasIngredient_i004VeryHigh in Fig. 9; they may be generated according to the downgrading table in Fig. 9 by Generic Ontology Design Patterns (GODPs, cf. [3, 4, 6]): for example, Figure 9: Downgrading Table and Downgrading Axioms the composition of hasIngredient_i002ExtremelyHigh and hasIngredient_i002ExtremelyHigh leads to hasIngredient_i004VeryHigh at the next lower level, and so on. Downgrading is symmetric here (but cf. other composition patterns in [3]). For the ClassicMartini example, we note that Spirit is classified as an AlcoholicPro- duct_i002ExtremelyHigh, while FortifiedWine is classified as an AlcoholicProduct_i008High, cf. Fig. 7. For the composite dosage hasFoodIngredient_i001Dominant some Gin we deduce an AlcoholicProduct_i002ExtremelyHigh, similarly for hasFoodIngredient_f002Essential some DryVermouth we deduce an AlcoholicProduct_i016Moderate, cf. Fig. 8, Fig. 9. Fig. 10 shows the derived subsumption hierarchy for AlcoholicProduct_i001Exceptionally- High_orLess where the derivations AlcoholicProduct_i002ExtremelyHigh and Alcoholic- Product_i016Moderate for ClassicMartini combine into AlcoholicProduct_i002Extremely- Figure 10: Derived Subsumption Hierarchy for AlcoholicProduct_i002ExtremelyHigh_orLess Figure 11: Alcohol and Sugar Dosage of Variants of Sangria High_orLess, while the derivations AlcoholicProduct_i004VeryHigh and AlcoholicProduct_- i008High for ReverseMartini combine into AlcoholicProduct_i004VeryHigh_orLess, resp. Fig. 11 shows another example: different kinds of sangría, where not only the dosage of alcohol but also of sugar is derived, clearly dominated by FruitjuiceConcentrate. Figure 12: Performance Table [*standalone, otherwise heap error inside Protégé; **NullPointer- Exception; ***ReasonerInternalException] 5. The Downgrading Axioms Challenge The downgrading axioms provide a considerable challenge for reasoning. Only advanced reasoners such as Konclude provide an adequate response. For the Semantic Reasoning Evaluation Challenge we provide several reduced versions of the BAALL Ontology, all of them with most imports expanded2 : A FOD_Dish_down: the Food part, with all downgrading axioms (cf. Sect. 4); B FOD_Product_i064to001 : smaller version, axioms reduced to grades i064 ... i001; C FOD_Product_i016to001 : downgrading axioms reduced to grades i016 ... i001; D FOD_Small_i032to001 : yet smaller, axioms reduced to grades i032 ... i001; E FOD_Small_i016to001 : downgrading axioms reduced to grades i016 ... i001; F IngredientSignificance_down: the minimal core of the downgrading axioms; G IngredientSignificance_i016to001 : axioms reduced to grades i016 ... i001. All experiments have been performed on a MacBook Pro with an M1 Max chip with a 10Core CPU and 64GB RAM (Java heap space set to 50 GB). Fig. 12 gives a summary of the performance. All versions perform with Konclude. However, Konclude is not integrated with Protégé; handling is cumbersome as imported ontologies have to be merged before submitting to Konclude, separately from Protégé; explanations of the deduction chain leading to an inconsistency are not provided (as they would in Protégé). Versions [C,E] are considered to be the limit for reasonable performance with HermiT from Protégé; it is quite irritating that some versions produce (heap) errors or timeouts in HermiT/Pellet/Fact++ so that it is unclear whether they are perhaps indeed erroneous. Versions [A,B,D] are beyond reasonable space limits (leading to Java heap space exceptions) and time requirements (whether executed inside Protégé or separately); even the minimal core version [F] with the complete set of downgrading axioms is out of scope for HermiT.3 2 The versions at http://ontologies.baall.de/2022SemREC/ may be configured with a variety of ranges for the downgrading axioms, or the definitional axioms for qualitatively graded relations (Sect. 2). 3 Interestingly, although HermiT classified Version [D] rather quickly as a standalone reasoner, we had to disable the reasoning for individual inferences in Protégé; otherwise, HermiT takes 40h, terminating with a heap error (although derivations are usable). This issue merits further investigation. Figure 13: Shandy, Pils and Radler Note that if Konclude is set up to preserve its initial data structure for a given ontology, it provides a rather immediate response for subsequent DL queries, while HermiT essentially requires a complete re-classification with unacceptable time requirements. 6. Conclusion For standard reasoners in Protégé such as HermiT, the dosage of CiderSangria (Fig. 11) is already at the limit (cf. versions [B, E] in Fig. 12, Sect. 1). In contrast, the shandy BrandXRadler (Fig. 13) is beyond the limit, since it requires the grade i064VeryLow. Similarly, when we consider the dosage of spices (cf. Fig. 3) we easily reach very low overall proportions. For chemical aroma compounds (cf. Fig. 4) (and the deduction of aroma compositions in qualitative “virtual cooking” as a perspective) we will even be obliged to go beyond grade i512ExcessivelyLow in the future. Pungency, as an example, is quite important for the modeling of diets related to food related impairments with qualitative grading [1, 2, 5], which we intend to pursue further. The reduced versions of the performance table in Fig. 12 do not include the definitional axioms for qualitatively graded relations (Sect. 2, Fig. 1, 2), since these significantly burden the deduction4 , nor do they include other constituents (such as sugar, etc.) or the modelling of e.g. bakery products; only the full version [A] does. Moreover, we are working on a harmonisation of the BAALL Ontology with the FoodOn initiative [7], as an extension regarding qualitative prototype recipes with composite dosage and its derivation. GODPs [3, 4, 6] will be applied in a systematic fashion. Inclusion of a reasonable set of composite products with recipes will lead to substantial size and considerable additional stress on the faculties of reasoning engines. Other applications of Graded Relations or patterns for composition [3] are likely to impose additional challenges. As a response to the Semantic Reasoning Evaluation Challenge we hope for significant improvement of reasoning capabilities, preferably integrated with Protégé. Acknowledgments. We gratefully acknowledge constructive comments from John Bate- man, Mihai Codescu, and some of the reviewers. 4 by a factor of 500 for Version [E] on an older laptop. References [1] B. Krieg-Brückner, S. Autexier, M. Rink, S. G. Nokam, Formal Modelling for Cooking Assistance, Essays Dedicated to Martin Wirsing, in: R. D. Nicola, R. Hennicker (Eds.), Software, Services and Systems, Springer International Publishing, 355–376, 2015. [2] B. Krieg-Brückner, Generic Ontology Design Patterns: Qualitatively Graded Con- figuration, in: F. Lehner, N. Fteimi (Eds.), KSEM 2016, The 9th International Conference on Knowledge Science, Engineering and Management, vol. 9983 of Lec- ture Notes in Artificial Intelligence, Springer International Publishing, 580–595, doi: 10.1007/978-3-319-47650-6_46, 2016. [3] B. Krieg-Brückner, M. Codescu, Deducing Qualitative Capabilities with Generic Ontology Design Patterns, in: M. F. Silva, J. L. Lima, L. P. Reis, A. Sanfeliu, D. Tardioli (Eds.), Robot 2019: Fourth Iberian Robotics Conference. Advances in Robotics, Volume 1., no. 1092 in Advances in Intelligent Systems and Computing, AISC, Faculty of Engineering, University of Porto, Springer Nature Switzerland AG, Cham, ISBN 978-3-030-35989-8, 391–403, doi:https://doi.org/10.1007/978-3-030-35990-4_32, URL https://doi.org/10.1007/978-3-030-35990-4_32, 2020. [4] B. Krieg-Brückner, M. Codescu, M. Pomarlan, Modelling Episodes with Generic Ontology Design Patterns, in: K. Hammar, O. Kutz, A. Dimou, T. Hahmann, R. Hoehndorf, C. Masolo, R. Vita (Eds.), JOWO 2020, The Joint Ontology Workshops, Proceedings of the Joint Ontology Workshops co-located with the Bolzano Summer of Knowledge (BOSK 2020), Virtual & Bozen-Bolzano, Italy, August 31st to October 7th, 2020, vol. 2708 of CEUR Workshop Proceedings IAOA Series, CEUR-WS.org, URL http://ceur-ws.org/Vol-2708/skale1.pdf, 2020. [5] B. Krieg-Brückner, S. Autexier, M. Pomarlan, The BAALL Ontology - Configuration of Service Robots, Food, and Diet, in: Joint Ontology Workshops 2021 Episode VII: The Bolzano Summer of Knowledge, JOWO 2021; Bolzano; Italy; 11 September 2021 through 18 September 2021; Code 172257. Joint Ontology Workshops (JOWO- 2021), vol. 2969 of CEUR Workshop Proceedings, CEUR Workshop Proceedings, URL http://ceur-ws.org/Vol-2969/paper37-FoisShowCase.pdf, 2021. [6] B. Krieg-Brückner, T. Mossakowski, M. Codescu, Generic Ontology Design Pat- terns: Roles and Change Over Time, in: E. Blomqvist, T. Hahmann, K. Hammar, P. Hitzler, R. Hoekstra, R. Mutharaju, M. Poveda-Villalón, C. Shimizu, M. G. Skjæveland, M. Solanki, V. Svátek, L. Zhou (Eds.), Advances in Pattern-based Ontology Engineering, vol. 51 of Studies on the Semantic Web, IOS Press, Am- sterdam, ISBN 978-1-64368-174-0 (print), 978-1-64368-175-7 (online), URL https: //ebooks.iospress.nl/volume/advances-in-pattern-based-ontology-engineering, 2021. [7] D. M. Dooley, E. J. Griffiths, G. S. Gosal, P. L. Buttigieg, R. Hoehndorf, M. C. Lange, L. M. Schriml, F. S. Brinkman, W. W. Hsiao, FoodOn: a harmonized food ontology to increase global food traceability, quality control and data integration, npj Science of Food 2 (1) (2018) 1–10.