<!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>Weighted Averaging of Various LSTM Models for Next Destination Recommendation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Shotaro Ishihara∗</string-name>
          <email>shotaro.ishihara@nex.nikkei.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shuhei Goda∗</string-name>
          <email>shu@wantedly.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yuya Matsumura∗</string-name>
          <email>yuya@wantedly.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Nikkei, Inc.</institution>
          ,
          <addr-line>Tokyo</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Wantedly, Inc.</institution>
          ,
          <addr-line>Tokyo</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>46</fpage>
      <lpage>49</lpage>
      <abstract>
        <p>This paper describes the 6th place approach to Booking.com WSDM WebTour 2021 Challenge, which is a challenge with a task of predicting travellers' next destination. We, in the team "hakubishin3 &amp; u++ &amp; yu-y4", trained four types of Long short-term memory (LSTM) models, and achieved the final score: 0.5399 by weighted averaging of these predictions. There are some diferences in these models in feature engineering, multi-task learning, and data augmentation. Our experiments showed that the diversity of the models boosted the final result. Our codes are available at https://github. com/hakubishin3/booking-challenge-2021 and https://github.com/ upura/booking-challenge-2021.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>CCS CONCEPTS</title>
      <p>• Information systems → Information systems applications;
Recommender systems;</p>
    </sec>
    <sec id="sec-2">
      <title>INTRODUCTION</title>
      <p>
        Booking.com is one of the world largest online travel agencies. Its
mission is to make it easier for everyone to experience the world,
and it seeks the way of using information technology that helps
reduce the time and efort regarding travel [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. One of the
implementations is the recommendation of the destination. According
to Booking.com, many of the travellers go on trips which include
more than one destination. Suggesting travel destinations based on
the past history would be helpful for travellers.
      </p>
      <p>In 2021, Booking.com published dataset and organized a
challenge with a task of predicting travellers’ next destination. In this
challenge, participants consider a scenario in which the users of
Booking.com make a reservation and immediately suggest options
for extending their trips.</p>
      <p>The rest of this paper is organized as follows. In section 2, the
overview of the challenge is described. Before our own approach,
section 3 describes the previous works by the organizer that we
followed. From section 4 to 6, we present our solution step by step.
Each section shows the architecture of the neural network models,
the input features, and the training methods. In section 7, we report
the experimental results of our proposed method. The final section
provides a conclusion of this paper.
∗These authors contributed equally to this work.
The goal of the challenge is to develop a strategy for making the
best recommendation of cities as a travellers’ next destination. The
quality of the recommendations are evaluated by using Precision@4
metric. In other words, it is considered correct when the true city
is one of the top four suggestions for each trip.
2.2</p>
    </sec>
    <sec id="sec-3">
      <title>Dataset Description</title>
      <p>The training dataset consists of over a million of anonymized hotel
reservations, with the following columns:
• user_id: User ID
• check-in: Reservation check-in date
• checkout: Reservation check-out date
• afiliate_id : An anonymized ID of afiliate channels where
the booker came from (e.g. direct, some third party referrals,
paid search engine, etc.)
• device_class: desktop/mobile
• booker_country: Country from which the reservation was
made (anonymized)
• hotel_country: Country of the hotel (anonymized)
• city_id: city_id of the hotel’s city (anonymized)
• utrip_id: Unique identification of user’s trip (a group of
multidestinations bookings within the same trip)</p>
      <p>The evaluation dataset is constructed similarly, however the
city_id and hotel_country of the final reservation of each trip are
concealed. We are required to predict the city_id.</p>
      <p>The distribution of the city_id appearing in the dataset is
longtailed. Though there are about 40,000 candidates, we can achieve
the score of 0.036 by just suggesting the top four most frequent
cities in the dataset.
3</p>
    </sec>
    <sec id="sec-4">
      <title>BASELINE APPROACH</title>
      <p>
        The organizer’s previous works [
        <xref ref-type="bibr" rid="ref6 ref9">6, 9</xref>
        ] were a good starting point.
We implemented a neural network model based on these references
as a baseline for our solution. This model consists of recurrent
neural networks (RNNs) model that handles a series of features. As
features, afiliate_id, device_class, booker_country, and city_id are
used. These sequential categorical features are encoded by GRU cell
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and the output is converted to probability values for each city_id
through a Softmax layer. The top four city_ids with the highest
probability values can be regarded as the model’s recommendation.
      </p>
      <p>
        Some beneficial ideas are also explained in the previous works.
First, the experiment showed that adding features other than the
series of city_id greatly improved the performance[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. This made us
realize the importance of feature engineering in this task. The
second is how the features should be used. Two basic merge functions,
concatenation and element-wise multiplication, were compared
in the experiment[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. And the result showed that the former was
better. Finally, some tips for training were introduced. For example,
the following techniques were shown in the previous work of [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
• The data should be sorted by series length to reduce the
number of padding in making batches.
• The duplicates should be eliminated when the same city_id
is consecutive.
4
      </p>
    </sec>
    <sec id="sec-5">
      <title>MODEL ARCHITECTURE</title>
      <p>We prepared two types of model architecture. Both architectures
are described in this section.
4.1</p>
    </sec>
    <sec id="sec-6">
      <title>Long short-term memory</title>
      <p>
        As RNNs, we adopted Long short-term memory (LSTM) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] instead
of GRU. Figure 1 shows an architecture of a LSTM model. There
are no major diferences from the baseline presented in section 3,
except for the replacement of the RNNs unit. The diferences in
feature engineering and training process are described in section 5
and 6.
4.2
      </p>
    </sec>
    <sec id="sec-7">
      <title>LSTM with Multi-task Learning</title>
      <p>
        We also used a LSTM model with another type of structure, shown
in Figure 2. This is an extension of the model with the concept of
multi-task learning (MTL). MTL is a training paradigm in which
machine learning models are trained with the dataset from multiple
tasks simultaneously [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. It is known that there are some advantages
like improved data eficiency, reduced overfitting through shared
representations, and so on.
      </p>
      <p>In this challenge, we built an architecture that predicts not only
the city_id but also the hotel_country at the same time. Since there
is an inclusion relationship between hotel_country and city_id, we
thought that the prediction of hotel_country would also contribute
to the quality of the prediction of city_id. To predict hotel_country
is an easier task than city_id. When a hotel_country is given, the
candidates of city_id are limited. This can help our model to predict
a correct city_id.
5</p>
    </sec>
    <sec id="sec-8">
      <title>FEATURES</title>
      <p>We generated some features from the original dataset, and removed
some of the original dataset. Features can be divided into three
types, categorical, numerical, and graphical variables. Each type of
feature is briefly summarized in this section.
5.1</p>
    </sec>
    <sec id="sec-9">
      <title>Categorical Features</title>
      <p>There are seven diferent categorical features in the dataset, and six
of them are used in the baseline as described in section 3. The only
removed one is utrip_id, a unique identificator.</p>
      <p>We added some categorical features. The followings are
categorical features we used.</p>
      <p>• month_checkin: Month of check-in.
• past_city_id: Previous city_id.</p>
      <p>• past_hotel_country: Previous hotel_country.
5.2</p>
    </sec>
    <sec id="sec-10">
      <title>Numerical Features</title>
      <p>We extracted some numerical features. The days_stay is a feature
that uses future information, we should be careful. In this challenge,
check-in and checkout date of the targets are given. Therefore,
days_stay which should not be available practically can be
calculated, which is a useful feature since it indicates the characteristics
of the targets.</p>
      <p>• days_stay: The number of days staying in a current hotel.
• days_move: The number of days from a previous hotel
checkout date to a current hotel check-in date.
• num_checkin: The number of check-in within utrip_id.
• num_visit_drop_duplicates: The number of unique city_id
within utrip_id.
• num_visit: The number of city_id within utrip_id.
• num_visit_same_city: The number of duplicated city_id within
utrip_id.
• num_stay_consecutively: The number of consecutive stay in
the same city_id.</p>
    </sec>
    <sec id="sec-11">
      <title>5.3 Graph Features</title>
      <p>
        Each sequence of trips are just a fragment of it. We believe that
graph related features are important because it can lead to
reconstruct geographical information. We believe that the graph
related features are important because they can lead to reconstruct
geographical information. We used Word2Vec [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and
PyTorchBigGraph [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to create graph features using the sequences of each
trip.
      </p>
      <p>
        Figure 3 is a scatter plot of city_id vectors calculated by Word2Vec
compressed by UMAP [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. When we used MTL architecture, the
same embeddings were calculated regarding hotel_country.
      </p>
    </sec>
    <sec id="sec-12">
      <title>6 TRAINING PROCESS</title>
    </sec>
    <sec id="sec-13">
      <title>6.1 Loss Functions</title>
      <p>
        CrossEntropyLoss is commonly used in multi-classification tasks.
However, the classes of city_id that are required to be predicted
in this challenge are imbalanced with long-tailed distribution. In
order to suppress the bias of the loss caused by the class imbalance,
we adopted FocalLoss [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] as one of the options of a loss function.
      </p>
    </sec>
    <sec id="sec-14">
      <title>6.2 Validation Strategy</title>
      <p>We chose Stratified K-Folds so that the distribution of the length of
trips in each fold is equal. This is because there is a diference in
the length of trips shown in Figure 4, which may afect the quality
of the prediction. The number of folds was set to five. We trained
15 epochs in each fold, and used a model with the best validation
score for predictions.</p>
    </sec>
    <sec id="sec-15">
      <title>6.3 Data Augmentation</title>
      <p>We believe that each sequence of trips can be flipped. In applying
this data augmentation, booker_country must be removed in order
to keep consistency of the dataset.</p>
      <p>In this challenge, we can use the information of the
evaluation dataset. The final city of each trip in the evaluation dataset is
masked to be used for evaluation. Therefore, we created an
additional dataset from the evaluation dataset by regarding the second
city_id from the final reservation as the target of each trip and
added it to the training data.</p>
    </sec>
    <sec id="sec-16">
      <title>7 EXPERIMENTS</title>
    </sec>
    <sec id="sec-17">
      <title>7.1 Settings</title>
      <p>Table 1 shows the settings of each model. Each model was composed
of the combination of the proposed architecture, features, and the
training methods.</p>
      <p>MTL architecture was used in LSTM 2 and 3. Graph features
and loss function were diferent in LSTM 4. Data augmentation
techniques were applied in LSTM 3 and 4.</p>
    </sec>
    <sec id="sec-18">
      <title>7.2 Results for Each Model</title>
      <p>Table 2 shows the results of our experiments for each model. The
validation scores were calculated by averaging the predictions of
all folds.</p>
      <p>We can see that our proposed models outperformed the baseline.
From the comparison between LSTM 1 to 3, it was observed that
MTL worked in our experiment, and data expansion by flipping
didn’t work. LSTM 4 gave us the best result.</p>
    </sec>
    <sec id="sec-19">
      <title>7.3 Weighted Averaging</title>
      <p>A weighted averaging was used for the ensembling. In this
challenge, we decided to use it because of the small opportunity of
submissions and the high computational cost. Table 2 shows that
the diversity of the models leads to higher scores. It is interesting</p>
    </sec>
    <sec id="sec-20">
      <title>ACKNOWLEDGMENTS</title>
      <p>The four numbers in Weights mean the ratio of LSTM 1 to 4 respectively.
to note that even though LSTM 4 performed well on its own, the
best result was obtained when the ratio was reduced to 0.4.
8</p>
    </sec>
    <sec id="sec-21">
      <title>CONCLUSION</title>
      <p>This paper described our approach to Booking.com WSDM
WebTour 2021 Challenge. We trained four types of LSTM model, and
weighted averaging of these predictions increased the accuracy.
There is a diversity regarding feature engineering, multi-task
learning, and data augmentation. In the end, we won the 6th place on
the final leaderboard of this challenge.</p>
      <p>We thank the organizers of the Booking.com WSDM WebTour 2021
Challenge for the opportunity to participate in this interesting
challenge.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Lerer</given-names>
            <surname>Adam</surname>
          </string-name>
          , Wu Ledell, Shen Jiajun, Lacroix Timothee, Wehrstedt Luca, Bose Abhijit, and
          <string-name>
            <given-names>Peysakhovich</given-names>
            <surname>Alex</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>PyTorch-BigGraph: A Large-scale Graph Embedding System</article-title>
          .
          <source>In Proceedings of the 2nd SysML Conference</source>
          . Palo Alto, CA, USA.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Sarah</surname>
            <given-names>Cohen</given-names>
          </string-name>
          , Werner Nutt, and
          <string-name>
            <given-names>Yehoshua</given-names>
            <surname>Sagic</surname>
          </string-name>
          .
          <year>1997</year>
          .
          <article-title>Long Short-Term Memory</article-title>
          .
          <source>Neural Comput 9</source>
          ,
          <issue>8</issue>
          (
          <year>1997</year>
          ),
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Crawshaw</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Multi-Task Learning with Deep Neural Networks: A Survey</article-title>
          . arXiv preprint arXiv:
          <year>2009</year>
          .09796v1 (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Goldenberg</given-names>
            <surname>Dmitri</surname>
          </string-name>
          , Kofman Kostia, Levin Pavel, Mizrachi Sarai, Kafry Maayan, and
          <string-name>
            <given-names>Nadav</given-names>
            <surname>Guy</surname>
          </string-name>
          .
          <year>2021</year>
          .
          <article-title>Booking.com WSDM WebTour 2021 Challenge</article-title>
          . https://www.bookingchallenge.com/.
          <source>In ACM WSDM Workshop on Web Tourism (WSDM WebTour'21).</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Matthew</given-names>
            <surname>Van Gundy</surname>
          </string-name>
          ,
          <string-name>
            <surname>Davide Balzarotti</surname>
            , and
            <given-names>Giovanni</given-names>
          </string-name>
          <string-name>
            <surname>Vigna</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation</article-title>
          . https://doi.org/10.3115/v1/
          <fpage>D14</fpage>
          -1179.
          <source>In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)</source>
          .
          <article-title>Association for Computational Linguistics</article-title>
          , Doha, Qatar.
          <fpage>1724</fpage>
          --
          <lpage>1734</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Pavel</given-names>
            <surname>Levin</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Modeling Multi-Destination Trips with RNNs</article-title>
          .
          <source>Technical Report. DataConf</source>
          <year>2018</year>
          ,
          <article-title>October 4th</article-title>
          ,
          <string-name>
            <surname>Jerusalem</surname>
          </string-name>
          , Israel.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Leland</surname>
            <given-names>McInnes</given-names>
          </string-name>
          , John Healy, and
          <string-name>
            <given-names>James</given-names>
            <surname>Melville</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction</article-title>
          . arXiv preprint arXiv:
          <year>1802</year>
          .03426v3 (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Tomas</given-names>
            <surname>Mikolov</surname>
          </string-name>
          , Kai Chen, Greg Corrado, and
          <string-name>
            <given-names>Jefrey</given-names>
            <surname>Dean</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Eficient Estimation of Word Representations in Vector Space</article-title>
          .
          <source>arXiv preprint arXiv:1301.3781v3</source>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Sarai</given-names>
            <surname>Mizrachi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Pavel</given-names>
            <surname>Levin</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Combining Context Features in SequenceAware Recommender Systems</article-title>
          . ACM RecSys 2019
          <string-name>
            <surname>Late-breaking Results</surname>
          </string-name>
          ,
          <fpage>16th</fpage>
          -20th
          <source>September</source>
          <year>2019</year>
          , Copenhagen, Denmark (Sept.
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Lin</given-names>
            <surname>Tsung-Yi</surname>
          </string-name>
          , Goyal Priya, Girshick Ross,
          <string-name>
            <given-names>He</given-names>
            <surname>Kaiming</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Dollar</given-names>
            <surname>Piotr</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Focal Loss for Dense Object Detection</article-title>
          .
          <source>In Proceedings of the IEEE International Conference on Computer Vision</source>
          (ICCV).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>