<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>FoodKG Enabled Q&amp;A Application ?</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>IBM Research</institution>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Rensselaer Polytechnic Institute</institution>
          ,
          <addr-line>Troy NY</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2002</year>
      </pub-date>
      <abstract>
        <p>We demonstrate the usage of our FoodKG [3], a food knowledge graph designed to assist in food recommendation. This resource, which brings together recipes, nutrition, food taxonomies, and links into existing ontologies, is used to power a cognitive agent that performs knowledge-base question answering, primarily to help improve peoples' diets by guiding them towards better foods. The system demonstration involves three categories of questions: simple queries for nutritional information, comparisons of nutrients between dierent foods, and constraintbased queries to nd recipes matching certain criteria.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In our resource track paper titled ‘FoodKG: A Semantics-Driven Knowledge
Graph for Food Recommendation’ [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], we described the basis for a food
knowledge graph (FoodKG) that brings together recipes, food ontologies, and
nutritional data. The FoodKG comprises approximately 7.7 thousand nutrient records
(sourced from the USDA), one million recipes (sourced from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]), and 7.3
thousand classes of food (sourced from [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]). Overall, it has over 67 million triples. Full
details related to the motivation, composition, and construction of the FoodKG
can be found in the resource track paper [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>For the sake of brevity, we did not fully describe potential and current
applications of our Food knowledge graph. In our demo, as described in this paper,
we examine how a knowledge graph can be leveraged by a question-answering
system to answer queries related to recipes and nutrition.
In our demo, we will demonstrate the use of our FoodKG for answering
natural language questions - a process known as knowledge base question answering
(KBQA). The system takes natural language questions, such as What Indian
dishes can I make with chicken and garlic?, and generates an answer based on
information stored in the FoodKG.
? Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>We seek to answer three Questions Question Template Examples
tcyopmepsaroifsoqnu,eastnidoncso:nsstirmapinlet., Simple Hioswinm{uicnhgr{enduietnrite}n?t}
THhowe simmupcleh qusuesgtaironsi,s e.ign., Comparison {inwghreicdhiehnta1s}leosrs {{innugtrreidenietn}t?2},
cchreeaetseed,cbraeasemd, ofanttfhreeeU?,SaDreA Constraint maWkehwatit{hta{gin}gdreisdhieenstc_anlisIt}?
data and require only one
hop reasoning. The compar- Table 1. Examples of the types of questions handled
ison question, e.g., Sesame by the Q&amp;A system
oil or peanut oil, which has
less saturated fat?, can be regarded as a composition of two simple questions,
followed by a quantitative comparison on some attribute. Last, we also create
questions with constraints, e.g., What Laotian dishes can I make with sugar,
water, oranges?. Table 1 summarizes the types of questions.
2.1</p>
      <sec id="sec-1-1">
        <title>Q&amp;A over the FoodKG</title>
        <p>
          Our KBQA system consists of three components: the question type classier , the
topic entity predictor , and the KBQA model. Given a natural language question,
such as how much sugar is in Cheese, Blue?, the question type classier
determines the question type. In this case, the question is simple. Then, the topic
entity predictor is applied to detect the topic entity mentioned in the question
and link it to the entity ‘Cheese, Blue’ in the FoodKG. Finally, the KBQA model
is called to retrieve answers from the KG subgraph (which we assume contains
all the candidate answers) surrounding the topic entity. For our
implementation, we deploy our state-of-the-art neural network-based KBQA model called
BAMnet [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
2.2
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Towards Personalized Food Recommendation</title>
        <p>In order to provide personalized food recommendation to users, we are working
to extend our KBQA system to be aware of user preferences. Our current
strategy is to treat preferences as additional, implicit constraints. This is done by
maintaining a personal KG for user preferences, such as liked/disliked
ingredients or nutritional requirements.</p>
        <p>Given a query, such as What are brewing recipes that consist of sugar?,
we transform the query into one that incorporates the user’s preferences. For a
user who is allergic to ‘mint leaves’, this could result in a query of What are
brewing recipes that consist of sugar, and do not have mint leaves? A regular
KBQA system that is not aware of user preferences will recommend ‘Kahlua
Popsicles’, ‘Jasmine, Green Tea, Fresh Lemonade’, ‘Lemon Liqueur’ and ‘Tequila
Lime Punch’. However, our personalized KBQA system will instead recommend
‘Kahlua Popsicles’, ‘Lemon Liqueur’ and ‘Tequila Lime Punch’, since ‘Jasmine,
Green Tea, Fresh Lemonade’ contains ‘mint leaves’. In this way, our system
is able to provide dierent users with tailored food suggestions that suit their</p>
      </sec>
      <sec id="sec-1-3">
        <title>FoodKG Enabled Q&amp;A Application 3</title>
        <p>needs. Future work in this direction includes how to combine personal KG with
FoodKG and how to eectively handle negation in a query.
3
3.1</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Demonstration</title>
      <sec id="sec-2-1">
        <title>Design</title>
        <p>The KBQA system
provides answers to
user questions; on
top of this, we
have built a web
application to
receive questions and
present the results.</p>
        <p>This is summarized
in Figure 1. Bold- Fig. 1. The architecture of the food information system.
face text refers to
specic components within the gure.</p>
        <p>We chose to build a web application in Node-RED3, a ow-based tool to
link together logic and services. This made it straightforward to combine the
aforementioned KBQA system with a simple frontend, along with the necessary
services to perform entity recognition display results.</p>
        <p>To identify the topic entity and question type of a query, we use IBM’s
Watson Assistant4 service. This information, along with the original query, is
passed to the KBQA service.</p>
        <p>Since the answers to the user’s queries exist directly in the FoodKG, we
chose to have the KBQA system respond not with a plain-text response (e.g., 250
mg sodium), but rather with a URI (e.g.,
http://idea.rpi.edu/heals/kb/usda#sodium-01004). This direct reference to the KG is then handed to another
service, the Explainer. The Explainer service uses a SPARQL query to retrieve
data from the FoodKG, and then uses the result of the query to produce
humanreadable text. Each type of resource measurement, recipe, nutritional entry
has its own rule. This separation of concerns makes it simpler to extend and
modify the Q&amp;A system.
3.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Examples</title>
        <p>To demonstrate the usefulness of the FoodKG, we plan to present the usage of
the above system to answer three types of questions. Examples of such questions
and their answers are shown in Figure 2.</p>
        <p>As noted, we are presently working to incorporate personalization into the
question-answering pipeline, leading to markedly dierent answers to the same</p>
      </sec>
      <sec id="sec-2-3">
        <title>3 https://nodered.org</title>
        <p>4 https://www.ibm.com/cloud/watson-assistant/
question for dierent users - depending on personal tness and preferences. These
implicit additions to the question enrich the meaning of each query without
requiring a fundamental shift in how the queries are carried out.
(b) Comparison</p>
        <p>(c) Constraint</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusions</title>
      <p>There is a vast amount of disconnected food knowledge, which spans an entire
spectrum of food topics, from nutrients to recipes. For an individual, numerous
biological, psychological, social and environmental factors inuence food choices.
Therefore, navigating this vast space on food requires meaningful linkages.
Furthermore, the provenance of the food facts is equally important in order to trust
the data, and eventually, the food that is consumed by an individual. Our
unied knowledge graph on food, the FoodKG, has these characteristics, and in our
demo, we will illustrate the utility of this resource via a Q&amp;A system.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaki</surname>
            ,
            <given-names>M.J.:</given-names>
          </string-name>
          <article-title>Bidirectional attentive memory networks for question answering over knowledge bases</article-title>
          .
          <source>In: Annual Conference of the North American Chapter of the Association for Computational Linguistics</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Griths</surname>
            ,
            <given-names>E.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dooley</surname>
            ,
            <given-names>D.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buttigieg</surname>
            ,
            <given-names>P.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hoehndorf</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brinkman</surname>
            ,
            <given-names>F.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hsiao</surname>
            ,
            <given-names>W.W.:</given-names>
          </string-name>
          <article-title>FoodON: A Global Farm-to-Fork Food Ontology</article-title>
          . In: ICBO/BioCreative (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Haussmann</surname>
          </string-name>
          ,
          <article-title>Steven and Seneviratne, Oshani and Chen, Yu and Ne'eman, Yarden and Codella, James and Chen, Ching-Hua and McGuinnes, Deborah and Zaki, Mohammed: FoodKG: A Semantics-Driven Knowledge Graph for Food Recommendation</article-title>
          . In: International Semantic Web Conference (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Marin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Biswas</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hynes</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salvador</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aytar</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torralba</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Recipe1m: A dataset for learning cross-modal embeddings for cooking recipes and food images</article-title>
          . arXiv preprint arXiv:
          <year>1810</year>
          .
          <volume>06553</volume>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>