<!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>Session-Based Recommendaotins with Recurrent Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Research In Progress</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ACM Reference format: V.Bogina, T.Kuflik 2017. Incorporating Dwell Time in Session-Based Recommendations with Recurrent Neural Networks. SIG Proceedings Paper in Word Format. In Proceedings of RecTemp Workshop co-located with ACM RecSys'2017</institution>
          ,
          <addr-line>Como</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Tsvi Kuflik Haifa University Israel</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Veronika Bogina Haifa University Israel</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Recurrent Neural Networks (RNN) is a frequently used technique for sequence data predictions. Recently, it gains popularity in the Recommender Systems domain, especially for session-based recommendations where naturally, each session is defined as a sequence of clicks, and timestamped data per click is available. In our research, in its early stages, we explore the value of incorporating dwell time into existing RNN framework for sessionbased recommendations by boosting items above the predefined dwell time threshold. We show improvement in recall@20 and MRR@20 by evaluating the proposed approach on e-commerce RecSys'15 challenge dataset.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>METHOD ABSTRACT</title>
    </sec>
    <sec id="sec-2">
      <title>CCS CONCEPTS</title>
      <p>Information retrieval -&gt;
Recommender systems</p>
    </sec>
    <sec id="sec-3">
      <title>MOTIVATION</title>
      <p>
        Nowadays, users are flooded with a wide variety of items to
purchase/listen/read in the Sea of Possibilities over the Internet. In
this scenario, relevant and useful recommendations can be a life
saver for a customer by reducing the number of alternatives. Hence,
predicting next items a customer will be interested in (to click on,
listen to, read through etc.) is an ongoing attractive and interesting
research task, as it is important to the service provider and the
customer alike [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. To succeed in predicting the “next item to be
clicked”, some of the researchers considered past sessions of the
user [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ][
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], item repetition in past interaction, favorite items, items
co-occurrences, topics similarity [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and more.
      </p>
      <p>
        However, as the previous studies [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] show, dwell time plays a
significant role in predictions based on implicit users’ feedback
† Copyright©2017 for this paper by its authors. Copying
permitted for private and academic purposes
which is defined as a sequence of clicks in news, music and
ecommerce domains. Hitherto, with the development of RNN,
sequences of events were taken into consideration, still without
incorporating the dwell time - the time that user spent examining
this specific item [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ][
        <xref ref-type="bibr" rid="ref6">6</xref>
        ][
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>Therefore, we decided to explore the effect of incorporating dwell
time into the input data of the RNN based on the existing
framework, and evaluate it in a dataset taken from the e-commerce
domain.</p>
      <p>Next, we will describe first our method, then we present an initial
evaluation and, finally, discuss our findings and future research
directions.</p>
      <p>The general idea of the proposed method is that the longer user
examines an item (stays on its web page), the more interested s/he
is in that item. Obviously, we are not talking about outliers, where
there is a possibility that the user just left the application or simply
kept the web page open while moving away from the computer.
Therefore, this approach can be used in the next click
recommendations techniques.</p>
      <p>Let an e-commerce session be a sequence of clicks {x1,…,xn} and
for each click there is a dwell time dti. We propose to use Boosting
to boost items that have dwell time greater than a predefined
threshold t. This way we multiply the number of such items in the
session and define the number of occurrences of the item in the
session as (dti/t +1).</p>
      <p>
        Hidasi et al.[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] proposed to use the Gated Recurrent Unit (GRU)
based RNN for session-based recommendations that was preferable
to LSTM in its performance [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. One of the challenges in session
based recommendations modelling with RNN is that sessions differ
in their length. Therefore, the authors proposed to represent each
mini-batch as set of elements from parallel sessions – refer to Fig1
and then predict next elements in the parallel sessions by predicting
next mini-batch. On the left, we see the original click sequences
while on the right – input to the model and an output from the
model. All sessions are ordered by session id and time. After that
the first elements of the few sessions are used in the first mini batch,
the second elements in the second min-batch and so forth. Only
elements with next element available are used in the input. Once
session ends, another one is proceeded (as in the Tetris game). The
output forms the set of the next items for each item in the input
batch. Therefore, the last element in the session is not part of the
input (no item follows it), as well as the first element of the session
is not part of the output (no item precedes it). We will refer to their
model in the paper as GRU4Rec.
      </p>
      <p>
        In our study, we propose to enrich Hidasi et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] model
(GRU4Rec) with the representation of dwell time as additional
elements by incorporating item boosting.
      </p>
      <p>
        In our proposed method, session i is represented by clicks, based
on their dwell time. Let’s assume that the predefined threshold for
the dwell time is t seconds and in session2 the dwell time of the
first element is greater than 2t seconds but less than 3t, then this
session parallel mini batch is different from the previous one (as
described in Fig1) by inclusion of 2 instances of the first element –
see Fig2. We call it items boosting. Items dwell times are different.
To differentiate items accordingly, we propose to increase the
presence in the session of those, having dwell time greater than the
pre-defined threshold. Indeed, the presence remains at the same
location in the sequence.
Recently, Hidasi and Karatzoglou [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] (will refer to it later as
GRU4Rec with sampling) improved the performance of the
GRU4Rec by changing a sampling strategy: where for each
example in the mini batch another example is used as a negative
sampling; and presenting a novel family of ranking loss functions,
based on individual pairwise losses. Their recall@20 and
MRR@20 results outperformed GRU4Rec. We will also approach
this method it in the next section of evaluation.
3
      </p>
    </sec>
    <sec id="sec-4">
      <title>EVALUATION</title>
      <p>
        Our proposed method was evaluated on RecSys’2015 challenge
data set – Yoochoose [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Each e-commerce session is represented
by clicks, including timestamp of the click. Clearly, dwell time for
all clicks, except the last one in the session (as there is no dwell
time for the last click in the data set), where dwell time is not
available, can be extracted. The dwell time is calculated as a
difference between timestamp of the current item and the next one.
Following Hidasi et al. research [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] , the one-click sessions from
the original training dataset were dropped due their nature – the
lack of next click to predict.
      </p>
      <p>
        Yoochoose click data was split to training and test sets the same
way as it was done in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. To be able to compare our results with
the results of GRU4Rec the same metrics were used – recall@20
and MRR@20.
      </p>
      <p>The statistics on the dwell time (in seconds as the reader can see on
axis X) is presented as a boxplot in Fig3. Items dwell time
distribution is presented in Fig4.
The reader can see from the boxplot that the average dwell time is
around 148 seconds, while the median is around 60 and standard
deviation is 326.05. 25th percentile is 26 seconds, 50th - 58.5
seconds and 75th percentile - 130 seconds.</p>
      <p>
        We decided to test our approach initially with the threshold that is
half of the average time – 75 seconds (from practical performance
reasons), as well as between the 50th and 75th. Moreover, since we
are curious about other threshold values, we have conducted an
experiment with 100 seconds as a threshold and got worse results
Addressing Temporal Aspects in User Modelling
than with 75 seconds, as presented in Table 1. Looking at Table 1,
the reader can see two baseline method’s GRU4Rec[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and
GRU4Rec with sampling[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] results. Under each one of them we
present results for the same method, but with the dwell time
enrichment with the threshold set to 75 seconds and 100 seconds.
According to the table, incorporating dwell time into GRU4Rec
with sampling, using the threshold set to 75 provides the best
results.
We will continue to experiment and test different thresholds effects
on the next item recommendation task.
      </p>
      <p>
        The loss function values progression over epochs in the extended
version of the algorithm, based on Rec4GRU with sampling [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], is
presented in Fig5. The goal is to minimize the loss function for the
training data. Therefore, the smaller the value of the loss function,
the better our predictions. Frequently used loss function is the
cross-entropy loss. In Rec4GRU – TOP1 loss was used [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
However, in Rec4GRU with sampling - Bayesian Personalized
Ranking (BPR)-max provided the best results.
      </p>
      <p>For each epoch in RNN the loss function value is outputted as well.
On the first epoch0 the values are the worst and after that, slowly,
it converges. When the threshold is set to 75 seconds, then the
learning process is faster, since more data is available (relatively to
Rec4GRU with sampling). As well given the fact that Hidasi et al.
models were optimized.
4</p>
    </sec>
    <sec id="sec-5">
      <title>DISCUSSION AND FUTURE WORK</title>
      <p>We proposed and evaluated a method for incorporating dwell time
in session-based recommendations with RNN for next item
prediction. By multiplying items instances we increased the
original training dataset that we had. As a result, we also improved
recall@20 and MRR@20 by boosting significant to user items,
based on their dwell time.</p>
      <p>
        We showed that the newly suggested method enhances and
outperforms the method suggested by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] in a specific case study.
This supports our claim that the recommendations of the next item
are dynamic and depend also on the time user spends on the specific
item. Moreover, they evolve over time.
      </p>
      <p>In future work, we plan to explore the optimal threshold for the
dwell time and check our findings on few more data sets, not only
on RecSys’2015 challenge.</p>
    </sec>
    <sec id="sec-6">
      <title>ACKNOWLEDGMENTS</title>
      <p>The work is partially supported by the Israeli Innovation Authority,
the Ministry of Economy and Industry, MAGNET “Infomedia”
project.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Ben-Shimon</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsikinovsky</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shapira</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rokach</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Hoerle</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Recsys challenge 2015 and the yoochoose dataset</article-title>
          .
          <source>In Proceedings of the 9th ACM Conference on Recommender Systems</source>
          (pp.
          <fpage>357</fpage>
          -
          <lpage>358</lpage>
          ). ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Bogina</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuflik</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Mokryn</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Learning Item Temporal Dynamics for Predicting Buying Sessions</article-title>
          .
          <source>In Proceedings of the 21st International Conference on Intelligent User Interfaces 251-255</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Merriënboer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bahdanau</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>On the properties of neural machine translation: Encoder-decoder approaches</article-title>
          .
          <source>arXiv preprint arXiv:1409</source>
          .
          <fpage>1259</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Greenstein-Messica</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rokach</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Friedman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2017</year>
          , March).
          <article-title>SessionBased Recommendations Using Item Embedding</article-title>
          .
          <source>In Proceedings of the 22nd International Conference on Intelligent User Interfaces</source>
          (pp.
          <fpage>629</fpage>
          -
          <lpage>633</lpage>
          ). ACM.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Hidasi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karatzoglou</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baltrunas</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Tikk</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Session-based recommendations with recurrent neural networks</article-title>
          .
          <source>arXiv preprint arXiv:1511</source>
          .
          <fpage>06939</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Hidasi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Karatzoglou</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Recurrent Neural Networks with Top-k Gains for Session-based Recommendations</article-title>
          .
          <source>arXiv preprint arXiv:1706</source>
          .
          <fpage>03847</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Jannach</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kamehkhosh</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Lerche</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          (
          <year>2017</year>
          , April).
          <article-title>Leveraging multidimensional user models for personalized next-track music recommendation</article-title>
          .
          <source>In Proceedings of the Symposium on Applied Computing</source>
          (pp.
          <fpage>1635</fpage>
          -
          <lpage>1642</lpage>
          ). ACM.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Park</surname>
            ,
            <given-names>S. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>S. G.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Session-based collaborative filtering for predicting the next song</article-title>
          .
          <source>In Computers, Networks, Systems and Industrial Engineering (CNSI)</source>
          ,
          <year>2011</year>
          First ACIS/JNU International Conference on(pp.
          <fpage>353</fpage>
          -
          <lpage>358</lpage>
          ). IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>Y. K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2016</year>
          ,
          <article-title>September)</article-title>
          .
          <article-title>Improved recurrent neural networks for session-based recommendations</article-title>
          .
          <source>In Proceedings of the 1st Workshop on Deep Learning for Recommender Systems</source>
          (pp.
          <fpage>17</fpage>
          -
          <lpage>22</lpage>
          ). ACM.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Yi</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hong</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhong</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>N. N.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Rajan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Beyond clicks: dwell time for personalization</article-title>
          .
          <source>In Proceedings of the 8th ACM Conference on Recommender systems</source>
          ,
          <volume>113</volume>
          -
          <fpage>120</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>