<!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>RecSPARQL for Cross-Domain Recommendations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Victor Anthony Arrascue Ayala</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georg Lausen</string-name>
          <email>lauseng@informatik.uni-freiburg.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Freiburg</institution>
          ,
          <addr-line>Georges-Kohler Allee, Geb. 51, 79110 Freiburg</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Recommender Systems (RS) bene t from the richly-structured information contained in publicly available RDF-graphs. Not only is the burden of extracting features from text thereby alleviated, but also the interconnections in the graph have been proven to be useful. These allow one to nd related items in the graph which do not necessarily share a large number of features, e.g. items from di erent domains. Thus, these graphs can be exploited to generate cross-domain recommendations, i.e. to recommend items using feedback provided in a di erent domain. To bene t from RDF's data model, RecSPARQL has been proposed as an extension of SPARQL together with a system which evaluates such queries. Although this solution makes it possible to generate recommendations on top of arbitrary RDF-graphs, it is limited to single-domain recommendations. In this paper we present an extension of RecSPARQL's syntax and semantics for cross-domain recommendations. Our experiments on a very sparse dataset show that the added components can help to improve the quality of recommendations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Driven by the Semantic Web (SW) initiative, a considerable number of
knowledge graphs are published according to the Resource Description Framework (RDF).
For Recommender Systems (RS) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], i.e. systems which recommend to users new
items they might be interested in, exploiting such structured knowledge has
proven to have the potential to enhance the quality of recommendations [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In
particular, the interconnections in the graph are very useful to navigate to other
similar or related items [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], especially those which belong to di erent domains.
For instance, the movie and music domains can be interconnected by paths
consisting of soundtrack and related artists predicates. Therefore, semantic graphs,
such as those published according to Linked Open Data (LoD) principles, have
been widely investigated for this purpose due to their characteristic of linking
domains [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Recommender Systems which exploit preferences for items that
belong to a certain domain (source domain) to generate recommendations of
Copyright © 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
items from a di erent domain (target domain) are called cross-domain [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. They
are based on the assumption that there are correspondences between user and
item preferences in both domains. The typical goal of considering an additional
domain is to overcome the lack of ratings in a single-domain scenario. Even
for the simpler single-domain case, a RS cannot easily leverage both feature
nodes and structure from an RDF-graph, since a mismatch exists between both
data models. To tackle this, RecSPARQL was proposed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] as an extension
to SPARQL. RecSPARQL queries empower users to generate recommendations
from arbitrary RDF-graphs by allowing them to specify features in the query
which are used to build a recommendation model. However, the authors limited
this work to single-domain recommendations. In this paper we present an
extension of RecSPARQL's syntax and semantics for cross-domain recommendations.
We demonstrate that our extended pro ling component and property path
processor not only make it possible to generate these kinds of recommendations,
but they can also signi cantly improve the quality of recommendations.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Approach and Experiments</title>
      <p>Our extension consists of adding mechanisms to specify the source as well as
the target domains. By specifying them, the user and item pro les are extended
to embed this information. The new multi-domain pro les are the input to the
similarity operator which computes, for instance, the neighborhoods, i.e. the
most similar users with respect to each user in the dataset. In the experiments, we
use the Facebook dataset (2nd LoD-enabled RS Challenge, ESWC 2015), which
contains feedback for three domains: movies, books and music (see statistics in
the table below). Moreover, items are directly given as DBpedia resources. Using
these IRIs, we augmented the dataset with a subgraph extracted from DBpedia
by keeping all paths between items up to three hops regardless of the direction.</p>
      <p>#Users #Items #Ratings Sparsity (%)
Movie Domain 32,159 5,389 638,268 99.631
Books Domain 1,398 2,609 11,600 99.681</p>
      <p>Music Domain 52,072 6,372 1,093,851 99.67
Queries. To show the bene ts of having the feedback, features, and
interconnections all in a single graph, we gradually introduce more information in each
query (Figure 1). Query Q1 is a traditional collaborative- ltering RecSPARQL
query based only on liked movies (single-domain). In Q2 (our extension) we
introduced preferences from a second source domain, music. Note that the syntax
allows one to de ne a domain (?domain rdf:type recsparql:Domain) and to
set even multiple source and target domains (recsparql:SourceDomain, and
recsparql:TargetDomain, correspondingly). The system adequately processes
the additional information by creating the input to the recommendation model
and customizing it. In Q3 we additionally introduce with respect to Q2 some
common features between movies and music items. To make use of
interconnections in the graph, we introduced the processing of property paths in our</p>
      <p>Q1 (traditional RecSPARQL query):
1 RECOMMEND ?user ?item.REC (AVG(?RATING)
2 AS ?avgRat) USING CF
3 WHERE f
4 ?user ex:likes ?item .
5 ?item rdf:type ?type .
6 FILTER(?SIMscore &gt; 0.0 &amp;&amp; (?type = dbo:Film jj
7 ?type = sorg:Movie jj ?type = rc:Movie CW) g
8 BASED ON f
9 ?user ex:likes ?item g
10 SETTINGS f (*) g
11 GROUP BY ?user ?item.REC</p>
      <p>Q2 (our extension):
1 RECOMMEND ?user ?item.REC (AVG(?RATING)
2 AS ?avgRat) USING CF
3 WHERE f
4 ?user ex:likes ?item .
5 ?item rdf:type ?domain .
6 FILTER(?SIMscore &gt; 0.0) g
7 BASED ON f
8 ?user ex:likes ?item g
9 SETTINGS f (*), (.),
10 dbo:Film rdf:type recsparql:SourceDomain ,
11 sorg:Movie rdf:type recsparql:SourceDomain ,
12 rc:Movie CW rdf:type recsparql:SourceDomain ,
13 rc:MusicalPerformer rdf:type recsparql:SourceDomain ,
14 rc:Band MusicGroup rdf:type recsparql:SourceDomain ,
15 dbo:Band rdf:type recsparql:SourceDomain ,
16 sorg:MusicGroup rdf:type recsparql:SourceDomain ,
17 dbo:Film rdf:type recsparql:TargetDomain ,
18 sorg:Movie rdf:type recsparql:TargetDomain ,
19 rc:Movie CW rdf:type recsparql:TargetDomain g
20 GROUP BY ?user ?item.REC
cross-domain extension. This allows one to conveniently specify in the Based
On clause any possible path between items from di erent domains. Our
extensions uses the additional information in Q2 and Q3 to change the way user
pro les are built. Consequently, the system directly alters the recommendation
model based on the new neighborhoods. To choose the feature types used in Q3
(genre, label, and subject) we prioritized relevant ones, which were common to
both domains and also show a high degree of interconnectivity. The relevance
is based on Principal Component Analysis (PCA) and Information Gain (IG).
These feature selection techniques measure how representative a feature type
is for its corresponding domain. The interconnectivity is based on counting the
number of item pairs from di erent domains which are connected by a feature of
the same type. All queries were evaluated in a distributed fashion using Spark
to alleviate the scalability challenge related to the neighborhood computation.
Results. Figure 2(A-B) shows the comparative results with respect to two
metrics, mean reciprocal rank (MRR) and normalized discounted cumulative
gain (NDCG). MRR tells us how well the recommendation model is doing in
nding the</p>
      <p>rst relevant item in the list of recommendations. NDCG gives a
score for the complete list instead, taking into account the number of hits with
respect to the test set but also with respect to the position of the hits in the list.
6
e4
r
o
c
S2
0 5 10
SD-Q1
2
1
0
6
s
r
4
o
b
h
g
2
i
e
N
0
#
104 (C)</p>
      <p>104 (D)</p>
      <p>10 2(E)</p>
      <p>The plots clearly show, for di erent number of recommendations k, the
benets of introducing the additional graph components in each query. For instance,
when we focus on a single metric, we found that from Q1 to Q2, the number of
users with NDCG@50 equal to zero was reduced by 3.79%. From Q2 to Q3 this
was reduced again by 3.3%, i.e. overall the reduction was 7.09%.</p>
      <p>This was due to changes in the characteristics of the neighborhoods, which
can be better understood by looking at the plots (C-E) in Figure 2. These plots
show that the average number of neighbors in each neighborhood increases the
more information is utilized to build them (C). Moreover, the standard deviation
(D) shows that introducing a second domain a ects only some users (probably
those with common ratings in both domains). This inequality is later corrected
when the features are included. Overall, the average similarity scores between
the neighbors and active user consistently decreases, as the plot (E) shows.
25
CD-Q2</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusions and Future Work</title>
      <p>We believe there is still room for new tools on top of RDF-graphs to enable
useful applications. While leveraging both the graph's content and structure
continues to be a challenge, we showed that our extension of RecSPARQL for
cross-domain recommendations ful lls its purpose of enhancing the quality of
recommendations. Not only did feedback from the additional information source
have a positive impact, but the features speci ed by means of property paths
also helped to build fairer neighborhoods for the users.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ayala</surname>
            ,
            <given-names>V.A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Przyjaciel-Zablocki</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hornung</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Schatzle,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Lausen</surname>
          </string-name>
          , G.:
          <article-title>Extending SPARQL for recommendations</article-title>
          .
          <source>In: SWIM</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Cremonesi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tripodi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turrin</surname>
          </string-name>
          , R.:
          <article-title>Cross-domain recommender systems</article-title>
          .
          <source>In: Data Mining Workshops (ICDMW)</source>
          ,
          <source>IEEE</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Fernandez-Tob as</surname>
          </string-name>
          , I.:
          <article-title>Mining semantic data, user generated contents, and contextual information for cross-domain recommendation</article-title>
          .
          <source>In: UMAP</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Musto</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lops</surname>
            , P., de Gemmis,
            <given-names>M.</given-names>
          </string-name>
          , et al.:
          <article-title>Semantics-aware recommender systems exploiting linked open data and graph-based features</article-title>
          .
          <source>Knowl.-Based Syst</source>
          . (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ricci</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rokach</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shapira</surname>
            ,
            <given-names>B</given-names>
          </string-name>
          . (eds.):
          <source>Rec. Systems Handbook</source>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ristoski</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Exploiting semantic web knowledge graphs in data mining</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of Mannheim, Germany (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>