<!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>Healthy Food Recommendation and Explanation Generation using a Semantically-Enabled Framework?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>S. Shir</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ching-Hu</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>l M. Gru</string-name>
          <email>gruend2g@rpi.edu</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>h L. M</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guinn</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IBM T.J. Watson Research Center</institution>
          ,
          <addr-line>Yorktown Heights, NY</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Rensselear Polytechnic Institute</institution>
          ,
          <addr-line>Troy NY 12180</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Recommender systems are an important service utilized in a wide variety of applications, but they rarely explain the processes and data used to generate the nal recommendation. Furthermore, no convenient software resource exists to help developers create recommender systems that use a variety of strategies, such as knowledge-driven recommendation processes. We present a Python framework to support the development of recommender systems with an emphasis on using data sources containing rich semantics and providing explanations for each step involved in producing the recommendation. We illustrate this through an example food recommendation system developed using the framework. Submission Type: Poster Resource Link: https://tetherless-world.github.io/FREx</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Recommender systems, which aim to predict preferences and suggest suitable
items to users, have become a standard tool in many application domains.
Various recommendation techniques have been developed, and in recent years there
has been an increasing amount of attention given to factors like the explainability
of recommender systems [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. However, knowledge-driven or rule-driven processes
involved with recommendations have typically not received much attention.
      </p>
      <p>
        While there are many software tools available to implement algorithms for
computing various recommendation scores [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], such tools are not typically
intended to encompass the entire recommendation process due to the many
domainand application-speci c aspects that may need to be considered in a
recommendation system. Naturally, there is no one-size- ts-all solution that can be
automatically applied to every possible application and domain. Therefore, we believe
? Copyright © 2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
that the community can bene t from a tool that can help provide the
groundwork for the typical processes involved in recommender systems and integrate
explanations into the system from the ground up.
      </p>
      <p>In this paper, we present preliminary work for FREx (a Framework for
Recommendations with Explanations), which provides a framework for
developing knowledge-driven recommender systems that integrate explainability into
the end-to-end process of the recommender system. Our framework is intended
to best serve applications that utilize a source of well-structured semantics, such
as an ontology, to provide domain models of the various items, users, and other
entities involved in the application. Additionally, we apply our framework to
implement an application for healthy food recommendation, to demonstrate its
utility and to potentially serve as pedagogical material.
2</p>
    </sec>
    <sec id="sec-2">
      <title>FREx Framework</title>
      <p>FREx is a Python framework aimed at enabling e ective prototyping of
knowledgedriven recommendation systems with a focus on integrating explanations. FREx
provides extensible classes that can be developed and integrated into a
cohesive system for recommending items and providing explanations. At the core
of FREx is a pipeline architecture for processing a series of steps to provide
recommendations. This general architecture is shown in Figure 1.</p>
      <p>FREx's pipeline for recommendations is constructed of PipelineStages. In
a recommender system, three key stages that are typically carried out are to (1)
generate, (2) score, and (3) lter candidate items to recommend. In FREx, the
skeleton of each of these three stages is implemented { as the CandidateGenerator,
CandidateScorer, and CandidateFilterer classes { and handles the creation
or modi cation candidates as well as attaching explanations associated with
the stage. Developers can extend these base classes to provide domain-speci c
functionality and supply customized explanations.</p>
      <p>
        As candidates pass through the pipeline, they retain information about the
context in which they were produced, the recommendation scores applied by
scoring stages, and the explanations applied by all stages. Precisely what constitutes
\context" (for which various de nitions exist [
        <xref ref-type="bibr" rid="ref1 ref2">1,2</xref>
        ]) will be entirely dependent
on the application that is being implemented. Scores that are applied may be
hand-crafted heuristics related to some knowledge-driven process, or they may
be the result of other recommendation algorithms. Explanations are supplied by
each pipeline stage, so the nal candidates that are output by the pipeline will
have a record of all explanations applied by the entire pipeline.
      </p>
      <p>In order to make meaningful use of the data in a domain speci c,
knowledgedriven recommendation system, it is important to model the semantics of objects
in the domain. FREx has been developed with the intention of enabling the use
of Resource Description Framework (RDF) data with rich semantics to model
domain objects and their properties. To facilitate this, Python dataclasses for
the application are implemented that re ect the data models of the underlying
ontology, supporting more object-oriented program design.
3</p>
    </sec>
    <sec id="sec-3">
      <title>FoodRec System</title>
      <p>Using FREx, we have developed an exemplar application, FoodRec, for
recommending healthy foods to users. FoodRec incorporates knowledge into the
recommendation process by (1) considering the classi cations of ingredients and
(2) utilizing guidelines to determine what is considered a \healthy" recipe. In
the recommender, we leverage semantic information that is available through
FoodOn's class hierarchy to infer additional knowledge about preferences and
restrictions. For example, if a user is prohibited from eating pork, we can
identify subclasses of pork in FoodOn to infer further restricted ingredients, like
\bacon" or \ham." Similarly, we can infer more general preferences based on
speci c ingredients that are included in a user's favorite recipes (e.g., a user
likes recipes that use bacon, so we can infer a preference for pork in general).</p>
      <p>
        The FoodRec use case utilizes the FoodKG [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] as a data source for recipes,
ingredients, and linked data about ingredient classi cation and nutrition. We
use a prototype of several healthy eating guidelines for diabetic patients to serve
as the guidelines to apply in the recommendation process. For this application,
we implemented a FREx pipeline to recommend recipes similar to the user's
favorite recipes (based on embeddings produced by RECIPTOR [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]) as well as
knowledge-driven scoring and ltering. Filtering was conducted to remove recipes
using prohibited ingredients and their subclasses (e.g., allergic restrictions by
the user). Scoring stages were formed based on the healthy eating guidelines,
which consisted of the conditions in which to apply the guideline (e.g., based on
the user's age, sex, and BMI) and the directives to apply (e.g., eat fewer than
2,300 mg of sodium in a day). Through the FREx pipeline we developed, the
nal recommendations for recipes that were produced could include explanations
about factors such as which guidelines the given recommendation adheres to.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>In its current state, FREx is intended to be highly exible in terms of the kinds
of data used as input and the methods used to produce recommendations. Our
example use case, FoodRec, demonstrates how RDF data can be queried and
converted into objects, which in turn can be passed through a pipeline to
perform knowledge-driven recommendations. FREx can be similarly utilized in new
domains by constructing the appropriate domain object models and querying
services. New pipelines to perform di erent recommendation strategies can also
easily be developed and incorporated.</p>
      <p>A key limitation of our current iteration of FREx is the need for developers
to de ne the domain object models for their application, as well as the need to
manually craft explanation text. If the recommendation application is developed
using an ontology, domain objects may be easily modeled, but it may be di cult
to determine what pieces of information from the ontology are relevant to the
application. Additionally, while our framework focuses on explanations about
the recommendation stages, such explanations are not produced automatically.
While it is possible to extend the Explanations class to apply some strategies like
templating systems (e.g., \This item received a score of fitem scoreg because its
fproperty nameg was below the threshold of fthreshold valueg"), such
templating systems would once again be fairly speci c to the application or domain and
not be widely applicable to certain scoring or ltering techniques.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and Future Work</title>
      <p>FREx provides a high level structure aimed at aiding developers to prototype
recommendation systems that integrate explanations throughout the
recommendation process. A exible pipeline system is introduced to handle the common
components of generating, ltering, and scoring items to recommend. We
demonstrate the use of FREx for a food recommendation use case in the FoodRec
application.</p>
      <p>Moving forward, we aim to integrate FREx with other tools to better leverage
semantics provided by ontologies. Our goal here is to incorporate tools that can
automatically generate Python classes from the domain ontology to more easily
support FREx's object oriented work ow. We additionally hope to expand our
work to provide a greater level of automation in providing explanations. This will
help to further reduce the burden on developers to manually supply FREx with
explanation text, making prototyping of such applications even easier. Lastly,
we plan to perform an evaluation of using FREx for developing recommender
systems. This evaluation would mostly focus on the framework's usability,
especially in terms of more e ciently creating knowledge-driven recommendation
pipelines.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This work is partially supported by IBM Research AI through the AI Horizons
Network.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Adomavicius</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mobasher</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricci</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tuzhilin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>ContextAware Recommender Systems</article-title>
          .
          <source>AI Magazine</source>
          <volume>32</volume>
          (
          <issue>3</issue>
          ),
          <volume>67</volume>
          {
          <fpage>80</fpage>
          (
          <year>2011</year>
          ). https://doi.org/10.1609/aimag.v32i3.2364, https://ojs.aaai.org/index.php/ aimagazine/article/view/2364, number:
          <fpage>3</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dourish</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>What we talk about when we talk about context</article-title>
          .
          <source>Personal and Ubiquitous Computing</source>
          <volume>8</volume>
          (
          <issue>1</issue>
          ),
          <volume>19</volume>
          {30 (Feb
          <year>2004</year>
          ). https://doi.org/10.1007/s00779-003-0253- 8, https://doi.org/10.1007/s00779-003-0253-8
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Haussmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seneviratne</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ne</surname>
            'eman,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Codella</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>C.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mcguinness</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaki</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>FoodKG: A Semantics-Driven Knowledge Graph for Food Recommendation</article-title>
          , pp.
          <volume>146</volume>
          {
          <fpage>162</fpage>
          . Springer (10
          <year>2019</year>
          ). https://doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -30796-7 10
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaki</surname>
            ,
            <given-names>M.J.:</given-names>
          </string-name>
          <article-title>Reciptor: An e ective pretrained model for recipe representation learning</article-title>
          .
          <source>In: Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery &amp; Data Mining</source>
          . p.
          <volume>1719</volume>
          {
          <fpage>1727</fpage>
          . KDD '
          <volume>20</volume>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA (
          <year>2020</year>
          ). https://doi.org/10.1145/3394486.3403223, https://doi.org/10.1145/3394486. 3403223
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mao</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          , Zhang, G.:
          <article-title>Recommender system application developments: A survey</article-title>
          .
          <source>Decision Support Systems</source>
          <volume>74</volume>
          ,
          <fpage>12</fpage>
          {
          <fpage>32</fpage>
          (
          <year>2015</year>
          ). https://doi.org/https://doi.org/10.1016/j.dss.
          <year>2015</year>
          .
          <volume>03</volume>
          .008
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Zhang,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <surname>X.</surname>
          </string-name>
          :
          <article-title>Explainable recommendation: A survey and new perspectives</article-title>
          .
          <source>Found. Trends Inf. Retr</source>
          .
          <volume>14</volume>
          ,
          <issue>1</issue>
          {
          <fpage>101</fpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>