=Paper= {{Paper |id=Vol-1922/paper5 |storemode=property |title=TCNSVD: A Temporal and Community-Aware Recommender Approach |pdfUrl=https://ceur-ws.org/Vol-1922/paper5.pdf |volume=Vol-1922 |authors=Mohsen Shahriari,Martin Barth,Ralf Klamma,Christoph Trattner |dblpUrl=https://dblp.org/rec/conf/recsys/ShahriariBKT17 }} ==TCNSVD: A Temporal and Community-Aware Recommender Approach== https://ceur-ws.org/Vol-1922/paper5.pdf
     TCNSVD: A Temporal and Community-Aware Recommender
                           Approach
                             Mohsen Shahriari                                                     Martin Barth
                        RWTH Aachen University                                               RWTH Aachen University
                      shahriari@dbis.rwth-aachen.de                                         barth@dbis.rwth-aachen.de

                                 Ralf Klamma                                                  Christoph Trattner
                        RWTH Aachen University                                             MODUL University Vienna
                      klamma@dbis.rwth-aachen.de                                         christoph.trattner@modul.ac.at

ABSTRACT                                                                     that we do not update ratings when our judgment has changed
Recommender systems support users in finding relevant items in               due to changes in our taste, nor do we reflect that our ratings
overloaded information spaces. Researchers and practitioners have            are based on the influence of somebody we know. But, research
proposed many different collaborative filtering algorithms for dif-          has shown that we can increase the recommendation accuracy by
ferent information scenarios, domains and contexts. One of the               taking into account temporal effects with computational methods
latter, are time-aware recommender methods that consider tem-                e.g. changes in the user preferences or the item popularity over
poral dynamics in the users’ interests in certain items, topics, etc.        time. This has lead to the development of time-aware recommender
While there is extensive research on time-aware recommender sys-             systems [21]. In parallel, the social network research community
tems, surprisingly, researchers have paid little attention to model          has investigated the detection and analysis of community struc-
temporal community structure dynamics (community drift). In                  tures as implicit influence among members of a social network
consequence, recommender systems seldom exploit explicit and                 [14]. Members of a community are supposed to possess similar
implicit community structures that are present in online systems,            properties so that they form dense connections inside communi-
where one can see what others have been watching, sharing and or             ties and sparse connections among them. Correspondingly, more
tagging. In this paper, we propose a recommender method that not             and more recommender systems consider community structures
only considers temporal interest dynamics in online communities,             to e.g. improve accuracy [9]. However, one important property of
but also exploits the social structure by the means of community             social network research is still missing in recommender research,
detection algorithms. We conducted offline experiments on the                namely the temporal dynamics of online community structures
Netflix dataset and the latest MovieLens dataset with tag infor-             [1, 22]. Temporal community structures - detected from explicit
mation. Our method outperformed the current state-of-the-art in              and implicit users’ interactions and item-item networks - provide
rating and item-ranking prediction. This work contributes to the             dynamics of collective information carried by groups of people.
connection of two separate recommender research directions, in               These communities are dynamic similar to the network, in which
which exploits community structure and temporal effects together             this needs to be reflected in recommender systems. To the best of
in recommender systems.                                                      our knowledge, there is still no other work that explains to what
                                                                             extent temporal dynamics of online communities can be effective
KEYWORDS                                                                     in the proposal of a recommender system.
Collaborative Filtering, Community Detection, Community Drift,
Time-Aware Recommender Models
ACM Reference format:
Mohsen Shahriari, Martin Barth, Ralf Klamma, and Christoph Trattner. 2016.
TCNSVD: A Temporal and Community-Aware Recommender Approach. In
Proceedings of Workshop on Temporal Reasoning in Recommender Systems,           Objective. In this line of research, we propose two recommender
Como, Italy, August 2017 (RecTemp’17), 7 pages.                              models named CNSVD and TCNSVD. CNSVD considers the col-
                                                                             lective user preferences and item receptions at the same time. TC-
                                                                             NSVD, on the other hand, includes temporal dynamics of (over-
1    INTRODUCTION                                                            lapping) community structures, which is not yet addressed by the
Since many years, recommender systems based on collaborative                 research community. These models are extensions to the NSVD and
filtering techniques provide recommendations for us by applying              TNSVD models proposed by Koren [20, 21] - leaning upon neighbor-
specific approaches on a huge rating matrix. However, it is expen-           hood and factor models of recommendation. Using user-user and
sive to create and maintain such huge rating matrices for online             item-item networks contributes to the evaluation of (overlapping)
shops and rating websites. From our own experience, we know                  community detection algorithms as well as the graph construc-
                                                                             tion methods. Furthermore, we perform extensive studies of the
                                                                             proposed models on two large-scale and popular datasets - Movie-
RecTemp’17, Como, Italy
Copyright ©2017 for the individual papers by the papers’ authors.            Lens and Netflix - and compare them with the state-of-the-art
                                                                             approaches.
RecTemp’17, August 2017, Como, Italy                                     Mohsen Shahriari, Martin Barth, Ralf Klamma, and Christoph Trattner


2   RELATED WORK                                                              our knowledge regarding performance of (overlapping) community
In this paper, the proposed algorithms are related to both time-              structures on recommendation systems is imperceptible. 2) we
aware and community-aware recommender models. As such the                     are not aware about the goodness of graph construction similarity
related work in the area is shortly reviewed.                                 metrics, e.g. Jaccard, Cosine, etc, in time-evolving recommender
                                                                              models. 3) we also know very little regarding the effect of metadata
   Time-Aware Recommendation. Some research has been done in                  information on graph construction in temporal community-aware
the proposal of recommender systems dealing with temporal effects             recommender systems. 4) we need models to connect temporal
in recent years. Campos et al. [5] presented a survey and analysis            dynamics with (overlapping) community structures to improve item
of time-aware recommender systems. They claimed that time is                  ranking and precision accuracy metrics in recommender systems.
one of the most useful contextual dimensions in recommender
systems. Koren [21] applied a model-based collaborative filtering
approach using a combination of neighborhood and factor models.               3    PROPOSED RECOMMENDER MODELS
He used models that track temporal shifts over several relevant               In this section, we introduce the proposed recommender models.
characteristics e.g. user and item biases, covering both long-term            Koren [20] employed the neighborhood and factor models to com-
and short-term temporal effects. Daneshmand et al. [10] assumed               pute the rating of a specific user on a particular item. In this model,
a hidden item network structure that can be inferred from users’              weights of user or item similarities are interpreted as offsets that
sequences of selecting items. The basic idea is that if two items in          need to be added to a baseline estimation. In other words, this ap-
the hidden network are related, then a user selecting one of the two          proach combines three components including a baseline estimation,
items is likely to also select the other item. Baltrunas and Amatriain        a neighborhood and a factor model, in which can be written as
[2] proposed a slightly different approach to time dependency in              follows:
recommendation, and assumed time-changing but repetitive user
preferences. They recommended music, which depends on the
time of day, week or year using a collaborative filtering approach.                                               1    X
Charlin et al. proposed a dynamic matrix factorization model based                       µ + bu + bi + |Iu | − 2              ((ru j − bu j )w i j + c i j )
on Poisson factorization for recommendation, which considers                                                          j ∈Iu
temporal users’ interests and item popularity [8].                                                                                                                 (1)
                                                                                                                      + qTi (pu + |Iu | − 2
                                                                                                                                              1   X
                                                                                                                                                          yj ) ,
   Community-Aware Recommendation. There has also been work                                                                                       j ∈Iu
on using community detection for recommendation tasks. Dol-
gikh and Jelinek [11] proposed an approach to recommend music
using community detection. They constructed an artist-tag net-                where
work for each user from the user’s favorite artists and the tags
assigned to these artists. Community detection was applied on                 • the first block of terms refers to the baseline estimation, in which
these networks to determine each user’s interest subfield, which                µ is the average rating over all users and items and bu is the user
were then used for recommending artists to the user. Cao et al.                 bias, i.e. the deviation of the average rating given by user u from
[7] applied a neighborhood-based collaborative filtering approach               µ. Besides, bi is the deviation of the average rating given to item
for recommending movies to users. They reduced computation                      i from µ (item bias).
time and improved recommendation precision by using commu-                    • the second block of terms refers to the neighborhood model
nity structures. They applied a community detection algorithm                   contribution, in which Iu is the set of items rated by user u, w i j
on the network constructed from similarity among users which                    relates to explicit rating feedback, which is multiplied by ru j −bu j ,
was derived from the user-item ratings. Choo et al. [9] proposed                and c i j is related to implicit feedback and is added whenever user
a neighborhood-based collaborative filtering approach that uses                 u has given a rating to item j. In addition, to avoid overestimation
user communities. The user network was derived from review-                     of the rating of users who provide much feedback, i.e. |Iu | is
                                                                                                                                                    1
reply patterns, i.e. if one user reviews an item and another user               high, the estimation is scaled down by multiplying with |Iu | − 2 .
replies to that review then there may be a relation between the two           • finally the last block of terms indicates the factor model contri-
users. User communities were derived from this network and used                 bution, in which qi and pu are vectors characterizing item i and
as a basis for the recommendation process. Bellogin and Parapar                 user u, respectively. Moreover, the user preference vector u is
[3] constructed a user graph using Pearson correlation similarity               complemented by a sum of vectors y j , that represent implicit
and applied normalized graph cuts to find clusters of users. These              feedback from each item j ∈ Iu .
clusters were then used for neighbor selection in user-based col-
laborative filtering. Other approaches using community structures             This model is named Neighborhood-Integrated SVD (NSVD), in
alleviated the cold-start problem in collaborative filtering. [25] and        which parameters, i.e. bu , bi , w i j , c i j , yi j , qi and pu are learned by
[30] both addressed the cold-start problem for new users by taking            minimizing a squared error function. Koren extended the NSVD
into account additional user information.                                     model by using temporal information to improve recommendation
                                                                              accuracy. The temporal information allows the modeling of user
   Summary. To the best of our knowledge, there are no approaches             preferences and item characteristics that change over time [21].
that take into account temporal dynamics of community structures              Temporal information was included into each of the three com-
to support recommendation. Thus, the literature manifests that 1)             ponents i.e., baseline estimation, neighborhood model and factor
TCNSVD: A Temporal and Community-Aware Recommender Approach                                                                       RecTemp’17, August 2017, Como, Italy


models as follows:                                                                          where we sum over all communities that user u belongs to, in
                                                     µ + bu (t ) + bi (t )          (2)     other words, we add the corresponding biases bC weighted by
                                                                                            the user’s membership level muC regarding each community.
                −1
                     X                                                                    • b Ci refers to the community bias for item i with Ci as the set of
          + |I |
               u 2           e −ϕu · |t −tu j | ((ru j − bu j )w i j + c i j )      (3)
                                                                                            item communities that i belongs to. Similarly, we define the item
                     j ∈Iu
                                                                                            community bias as follows:
                                   + qTi (pu (t ) + |Iu | − 2
                                                               1   X
                                                                           yj ) ,
                                                                                                                        X
                                                                                    (4)                          b Ci =     bC · miC ,                     (7)
                                                                   j ∈Iu                                                            C ∈ Ci

where                                                                                       where bC shows the community bias of community C, in which
• the first block of terms refers to the time-aware baseline esti-                          miC represents the membership level of item i belonging to
      mation. bu (t ) and bi (t ) indicate the time-dependent user and                      community C.
      item bias at time t, in which bu (t ) can be computed as with                          Neighborhood Model. To use user community information for
     bu + αu · devu (t ) + bu,t . Here, bu , αu · devu (t ) and bu,t describe             the neighborhood model, we extend the original neighborhood
      time-independent user bias, the linear drift of the user bias and                   model to capture additional implicit feedback from each item that
      a time-specific parameter capturing short-lived effects. More-                      has been rated by a member of one of the user’s communities. The
      over, item characteristics are less complex to be described and                     extension is as follows:
      thus bi (t ) can be simply computed by bi + bi,Bin(t ) , in which
      short-lived effects are captured through time by bi,Bin(t ) .                                    1    X                                                        1    X
• the second block of terms describes the time-aware neighborhood                               |Iu | − 2           ((ru j − bu j )w i j + c i j ) + |I Cu | − 2                   di j ,   (8)
      model contribution where the function e −ϕu · |t −t j | decays the                                    j ∈Iu                                                        j ∈I Cu
      item contributions w i j and c i j such that ratings that are more
                                                                                          where the block of terms shows the community contribution in the
      distant to time t have less impact on the estimation.
                                                                                          neighborhood model. Here, I Cu represents the set of items that any
• the last block of terms indicates the contribution of the time-
                                                                                          user belonging to one of user u’s communities has rated. Then, di j
      aware factor model. pu (t ) represents the time-dependent user
                                                                                          shows the offset that such an item j contributes to the rating for
      preferences that can be captured through parameters including
                                                                                          item i.
      time-independent preference, gradual and short-lived effects.
      This model is known as Time-aware Neighborhood-Integrated                              Latent Factor Model. For the latent factor model, we again con-
SVD (TNSVD), in which parameters, i.e. bu , bu,t , bi , bi,Bin(t ) , w i j ,              sider the community information as implicit feedback, in which
c i j , yi j , αu , αuk , ϕu , qi , puk and puk,t are again learned by mini-              each item rated by a user’s community contributes to the user’s pref-
mizing a squared error function. In the following subsections, we                         erence vector pu . Using the original factor model, we can extend it
introduce two models based on NSVD and TNSVD models.                                      as follows:

                                                                                                              oC · miC +)T (pu +
                                                                                                         X                           X
                                                                                                  (qi +                                  oC · muC + +
3.1     Community-Aware NSVD Model                                                                           C ∈ Ci                                    C ∈ Cu
The community-aware neighborhood-integrated SVD (CNSVD)                                                                                                                                     (9)
                                                                                                                                    1 X                          1       X
model is an extension of the NSVD model that use community                                                                   |Iu | − 2           y j + |I Cu | − 2             z j ),
information to improve rating prediction accuracy. Similar to the                                                                        j ∈Iu                       j ∈I Cu
NSVD model, it consists of baseline estimation, neighborhood and
factor model contributions.                                                               where the vector z j represents the contribution from item j. Also,
                                                                                          to model the user’s communities, we introduce an additional vector
   Baseline Estimation. For the baseline estimation, we presume that                      oC that represents the preferences or characteristics of community
user and item communities have their own bias. The average rating                         C. Since a user can belong to multiple communities, we define o Cu
of a user community tends to deviate from the overall average                             as the combined community preferences of all communities that
rating and each user’s average rating tends to deviate from the                           user u belongs to. This is achieved by summing the community
community’s rating, and likewise with item communities. This is                           factors oC weighted by the user’s membership level muC to each
based on the assumption that users or items in a community have                           community. Likewise, to model the item community characteristics,
similar preferences or characteristics, which may imply a common                          we define o Ci as the combined characteristics of the communities
bias and thus the baseline estimation bui , is extended as follows:                       that item i belongs to. Combining baseline estimation, neighbor-
                      µ + bu + b Cu + bi + b Ci ,                                   (5)   hood model and factor model from equations 5, 8 and 9, we compute
                                                                                          the predicted rating rˆui from a user u to an item i.
, in which
• b Cu shows the community bias for user u, in which Cu represents                        3.2   Time and Community-Aware NSVD
    the set of user communities that user u belongs to. We model                                (TCNSVD) Model
    the user community bias as follows:                                                   The TCNSVD model is an extension of the TNSVD model that uses
                              X
                       b Cu =      bC · muC ,                  (6)                        temporal dynamics of community structures. To capture user and
                                     C ∈ Cu                                               item community drift, i.e. time-changing community structures,
RecTemp’17, August 2017, Como, Italy                                                           Mohsen Shahriari, Martin Barth, Ralf Klamma, and Christoph Trattner

                                                                                                                        Model    Learning Rate   Regularization Factor
we compute user and item graphs and their community structures                                                          NSVD     0.1             0.1
for several time ranges. Here, available time range is divided into                                                     TNSVD    0.001           0.001
community time bins. The set of communities of a user u at time                                                         CNSVD    0.01            0.1
                                                                                                                        TCNSVD   0.0001          1
t is represented by Cu,CBin(t ) and the corresponding set of item
                                                                                                    Table 1: Best learning parameters for each model (tested on
communities is shown by Ci,CBin(t ) , where CBin(t ) indicates a
                                                                                                    hold-out data).
function that returns the community time bin for a given time t.
TCNSVD model has three components that are explained in the
following.
   Baseline Estimation. For the baseline estimation, we extend the                                  vector function, oC (t ) is made up of multiple functions, each repre-
Equation 5 to capture time-dependent community biases and a                                         senting a component of the vector, i.e. oC (t )T = (oC1 (t ), oC2 (t ), . . . ,
time-dependent linear drift in community biases and thus we write                                   oCn (t )). Each component is defined as:
the baseline estimation for TCNSVD model as follows:                                                        oCk (t ) = oCk + αCk · devC (t ) + oCk,t         k = 1, . . . , n,         (13)
 µ + bu + αu · devu (t ) + bu,t                                                                     where oCk is the time-independent part of the community prefer-
  + bu,Period(t) + bi + bi,Bin(t ) + bi,Period(t)                                                   ences, oCk,t captures short-term effects and αCk · devC (t ) models
         X                                   X                                                      a linear shift of community preferences. Using the user community
  +              (bC + bC,t ) · muC +             αC · devC (t ) · muC +                            preferences, we extend the formula for the factor model as follows:
       C ∈ Cu, CBin(t )                                 C ∈ Cu
                                                                                                    rˆui (t ) = (qi +o Ci )T (pu (t )+o Cu (t )+|Iu | − 2
                                                                                                                                                        1 X                1 X
        X                                                                                                                                                   y j +|I Cu | − 2   z j ).
                      (bC + bC,Bin(t ) ) · miC ,                                                                                                        j ∈Iu                    j ∈I Cu
   C ∈ Ci, CBin(t )                                                                                                                                                   (14)
                                                                                                    Koren [21] does not make the item vector qi time-dependent. He
                                                                                        (10)
                                                                                                    claims that item characteristics are inherent and do not change with
in which the block of terms shows the community contributions.                                      time. We expect that this also applies to the item community vector,
In this formula, the time-independent bias of community C is de-                                    so we also leave it to be time-independent. Finally, we combine the
noted as bC , and community bias based on short-lived effects at                                    baseline estimation, the neighborhood model and the factor model
time t is denoted as bC,t for user communities and bC,CBin(t ) for                                  by summing their predictions.
item communities. Linear drift in community biases is captured by                                      For all the models, a squared error function is minimized to learn
αC · devC (t ). All community biases are summed over the respective                                 the parameters of the model e.g. regularization parameters, using
set of communities and weighted by the respective user’s or item’s                                  stochastic gradient descent. A regularization factor λ is used to
community membership level. For the time-independent biases and                                     penalize high parameter values to avoid overfitting the training data.
the short-lived temporal effects, we use the dynamic community                                      An implementation is included in LibRec 1 and we adapt it to our
structures. However, for the linear drift we use static community                                   NSVD-based models [15]. We performed some validations on hold-
structures so that longer-term temporal effects on each community                                   out data and found the optimum learning rate and regularization
can be captured. In addition, the periodic user and item biases are                                 parameters for the NSVD, TNSVD, CNSVD and TCNSVD models
also reflected by bu,Period(t) and bi,Period(t) , where Period(t) repre-                            using RMSE error. We selected the learning rate decay strategy
sents a function that returns an index showing the week day of time                                 from LibRec and used the same combination of learning rate and
t. To keep our model from getting overly complex, we capture only                                   regularization for parameters of each model. The best learning rates
one of these potential recurring temporal effects, namely weekly                                    and regularization parameters for each model are given in Table 1.
recurring effects.
                                                                                                    4       EVALUATION
  Neighborhood Model. For the neighborhood model, we use a
                                                                                                    Regarding experiments, we use the popular Netflix (NF) and the
decay function e −ψu · |t −t j | on the additional implicit feedback di j ,
                                                                                                    latest MovieLens (ML) dataset to evaluate the proposed recommen-
which was added to Equation 8. This leads to the following formula:
                                                                                                    dation algorithms. The basic statistics of the datasets are shown
                  1 X
          |Iu | − 2     e −ϕu · |t −t j | ((ru j − bu j )w i j + c i j )+                           Table 2. In MovieLens both ratings and tags information are avail-
                          j ∈Iu                                                                     able. As for tags-based graph construction, an edge is created
                                              1     X                                   (11)        between any two users that have used the same tag on any item.
                                     |I Cu | − 2             e −ψu · |t −t j | di j .               Similarly, an edge is created between any two items that have re-
                                                   j ∈I Cu                                          ceived the same tag from any user [16]. Regarding MovieLens and
                                                                                                    Netflix graph construction based on rating information, we apply
   Latent Factor Model. For the latent factor model, we change the
                                                                                                    k-NN proposed by Park et al. as an approach mainly suitable for
vector modeling the user community preferences o Cu , which was
                                                                                                    information retrieval and recommender algorithms [23]. As such,
introduced in Equation 8 to being a function o Cu (t ):
                               X                                                                    to compute the similarities between users and items from the rating
                   o Cu (t ) =     oC (t )·, muC ,            (12)                                  information, we use similarity measures such as Pearson Correla-
                                       C ∈ Cu                                                       tion, Cosine Similarity and Jaccard Mean Squared Distance (JMSD)
with the community preference vector oC being replaced by the                                       [4, 6, 17, 19, 28].
time-dependent vector function oC (t ). As with the user preferences                                1
                                                                                                        http://www.librec.net/
TCNSVD: A Temporal and Community-Aware Recommender Approach                                                                          RecTemp’17, August 2017, Como, Italy

Table 2: Basic statistics of Netflix and MovieLens datasets.                                    1.05                                                                                       DMID




                                                                                     RMSE
                                                                                                                                                                                           WT2
                                                                                                   1                                                                                       WT5
                                                                                                0.95
                Dataset     Users     Items    Ratings                                                             CNSVD-tags    TCNSVD-tags          CNSVD-ratings    TCNSVD-ratings
                Netflix     480,189   17,770   100,480,507
                                                                                                 0.08                                                                                      DMID




                                                                                      Prec@10
                MovieLens   138,000   27,000   20,000,000                                        0.06                                                                                      WT2
                                                                                                 0.04                                                                                      WT5
                                                                                                 0.02
                                                                                                    0
                                                                                                                    CNSVD-tags   TCNSVD-tags           CNSVD-ratings   TCNSVD-ratings

                                                                                                0.015                                                                                      DMID
   For the evaluation of our proposed recommender model, we




                                                                                     Rec@10
                                                                                                                                                                                           WT2
                                                                                                 0.01                                                                                      WT5
compute both rating prediction and the item ranking quality as                                  0.005
                                                                                                   0
well as accuracy. For measuring the accuracy of rating predictions,                                                CNSVD-tags    TCNSVD-tags           CNSVD-ratings   TCNSVD-ratings

we used the Root Mean Squared Error (RMSE). For measuring the
accuracy of item rankings, we used the measures Precision at k              Figure 1: Comparison of model performance using DMID
(Prec@k), Recall at k (Rec@k) and Normalized Discounted Cumu-               and Walktrap as community detection algorithms on
lative Gain (NDCG) [18, 27]. Finally, we use Wilcoxon Rank Sum              ratings-based and tags-based graph construction on Movie-
tests to identify statistical differences of the results generated by the   Lens dataset. For the Walktrap we use two stepping param-
models [29]. Evaluation of time-aware recommender algorithms                eters namely, 2 = WT2 and 5 = WT5.
is challenging since the time ordering of the ratings needs to be
considered and thus the use of cross validation approaches are not                                                                                  1.054
                                                                                                                  0.9644                                                         Cosine
suitable. Campos et al. [5] describe in detail the issues regard-                                                                                   1.053




                                                                                                         RMSE




                                                                                                                                          RMSE
                                                                                                                  0.9642                                                         Pearson
                                                                                                                   0.964                            1.052                         JMSD
ing time-aware recommender systems in their 2014 UMUAI paper.                                                     0.9638                            1.051
                                                                                                                  0.9636
Instead of k-fold cross-validation, we applied a sliding-window ap-                                                          CNSVD                             TCNSVD

proach taking snapshots along the timeline [12]. Taking a snapshot                                                 0.014                            0.0426                       Cosine




                                                                                                        Prec@10




                                                                                                                                          Prec@10
                                                                                                                   0.013                            0.0424                       Pearson
at time t means using the ratings within a certain number of days                                                  0.012
                                                                                                                                                    0.0422
                                                                                                                                                     0.042
                                                                                                                                                                                  JMSD

before t for training and the ratings within a certain number of                                                   0.011                            0.0418
                                                                                                                                                    0.0416

days after t for testing. In total we took five of these snapshots                                                           CNSVD                             TCNSVD
                                                                                                                                                    0.0098                       Cosine
                                                                                                                  0.0026
over the timeline in each dataset and report the overall means in
                                                                                                        Rec@10




                                                                                                                                          Rec@10
                                                                                                                                                    0.0097                       Pearson
                                                                                                                  0.0024
                                                                                                                                                    0.0096                        JMSD
the results section. Regarding complexity, the running times of                                                   0.0022
                                                                                                                                                    0.0095
                                                                                                                   0.002
the proposed methods are more than the baselines, in which we                                                                CNSVD                             TCNSVD
used a subsampled version of datasets on a compute cluster. We
considered a maximum running time of five days, in which TC-                Figure 2: Comparison of model performance employing dif-
NSVD and CNSVD models had higher running times compared to                  ferent similarity metrics for the k-NN graph construction
NSVD and TNSVD models. As for future works, we plan to per-                 using the Netflix dataset: Pearson correlation, cosine simi-
form time complexity analysis of the models, and ignore individual          larity and Jaccard mean squared distance. The parameter k
learning parameters to find a compromise between accuracy and               was set to 10 in this case.
time complexity.

5    RESULTS                                                                recall as well as precision. The only exception is TCNSVD recall
In the following section, we present the results of our offline simula-     results based on tags and ratings, in which DMID slightly outper-
tions. We did preliminary experiments on the current state-of-the-          forms Walktrap versions. To verify the overall performance of the
art community detection algorithms regarding time complexity and            proposed algorithms, online user studies need to be done.
number of found communities. We chose DMID [26] and Walktrap                   Figure 2 illustrates how the models perform when using differ-
[24] as two alternatives that can identify overlapping and disjoint         ent similarity metrics using the Netflix dataset (we omit for space
communities. They not only scale well on large amount of data               reasons the results of the MovieLens dataset, which though are
but can also handle weighed and directed networks. To use Walk-             comparable). k was set to 10 in this case. As shown, there are ob-
trap, a step size input parameter needs to be set that was 2 and 5          servable differences with respect to the measures chosen for both
in our case. Figure 1 presents the results with respect to RMSE,            models. In general we can observe the following: Pearson achieves
Prec@10 and Rec@10 for the NSVD, TNSVD, CNSVD and TCNSVD                    in four cases the best results for RMSE, Prec@10 and Rec@10, fol-
models on the MovieLens dataset (for space reasons we omitted               lowed by Cosine and JMSD. This pattern is also emerging when
the Netflix results here which show similar tendencies). As shown,          testing with different ks and the different similarity metrics at the
the RMSE values are quite close to each other for both of the two           same time. Table 3 shows the best performing parameters for the
community detection algorithms investigated. However, as also               ratings-based graph construction regarding RMSE, precision and
shown, Walktrap performs slightly better compared to the DMID               recall and the best performing parameters for k. To figure out the
algorithm. Moreover regarding RMSE, algorithms based on the                 practical performance of the models and similarity metrics, we need
TCNSVD model - using tags and ratings constructions - achieve               to deploy them online and study users’ feedback.
higher values than the CNSVD model. This trend also holds for                  To illustrate how the models perform compared to some base-
precision as well as recall. In general though, the results show that       lines, a series of experiments have been performed. First, the models
Walktrap (WT5) yields the better performance regarding RMSE,                were compared with the baseline methods NSVD and TNSVD on
RecTemp’17, August 2017, Como, Italy                                                                 Mohsen Shahriari, Martin Barth, Ralf Klamma, and Christoph Trattner

Table 3: Best performing k-NN graph construction parame-                                                                     0.3          TCNSVD                0.2          TCNSVD




                                                                                                                  Prec@10




                                                                                                                                                     Prec@10
                                                                                                                             0.2          WRMF***              0.15          WRMF***
ter values with respect to RMSE, precision and recall.                                                                       0.1
                                                                                                                                        ItemKNN***
                                                                                                                                           CNSVD
                                                                                                                                                                0.1
                                                                                                                                                               0.05
                                                                                                                                                                           ItemKNN***
                                                                                                                                                                              CNSVD
                                                                                                                              0            NSVD                   0            NSVD
                                                                                                                                   ML      TNSVD                      NF      TNSVD

          Model       RMSE                   Precision@10             Recall@10                                             0.04          TCNSVD
                                                                                                                                                               0.05
                                                                                                                                                               0.04
                                                                                                                                                                             TCNSVD




                                                                                                                  Rec@10




                                                                                                                                                     Rec@10
                      k = 20, Pearson        k = 10, Cosine           k = 20, Cosine                                        0.03          WRMF***              0.03          WRMF***
          CNSVD                                                                                                             0.02        ItemKNN***             0.02        ItemKNN***

          TCNSVD      k = 20, Pearson        k = 10, Pearson          k = 10, Pearson                                       0.01
                                                                                                                               0
                                                                                                                                           CNSVD
                                                                                                                                           NSVD
                                                                                                                                                               0.01
                                                                                                                                                                  0
                                                                                                                                                                              CNSVD
                                                                                                                                                                              NSVD
                                                                                                                                   ML      TNSVD                      NF      TNSVD

                                                                                                                            0.55          TCNSVD                0.4          TCNSVD

Table 4: Performance differences of the community-aware




                                                                                                                   NDCG
                                                                                                                             0.5




                                                                                                                                                     NDCG
                                                                                                                                          WRMF***              0.38           WRMF
                                                                                                                            0.45        ItemKNN***                         ItemKNN***
                                                                                                                                                               0.36
                                                                                                                             0.4
models to their baseline models for the MovieLens and Net-                                                                  0.35
                                                                                                                                           CNSVD
                                                                                                                                           NSVD
                                                                                                                                                               0.34           CNSVD
                                                                                                                                                                              NSVD
                                                                                                                                   ML      TNSVD                      NF      TNSVD
flix datasets. Statistically significant differences are denoted
with *p<0.05, **p<0.01, ***p<0.001 based on a Wilcoxon
                                                                                                          Figure 3: Performance comparison of proposed CNSVD and
Ranked Sum test.
                                                                                                          TCNSVD models with the baselines and other item rank-
    DS    Model    Graph     Baseline   ∆RMSE          ∆NDCG          ∆Prec@10        ∆Rec@10
                                                                                                          ing algorithms based on Prec@10, Rec@10 and NDCG us-
          TCNSVD   Ratings   TNSVD      +3.91%         +45.45 % ***   +675.32 % ***   +443.90% ***        ing LibRec2 . Statistically significant differences between TC-
                   Tags      TNSVD      +2.50 % **     +3.23 % *      +35.78% **      -13.62% *
    ML




          CNSVD    Ratings   NSVD       +0.27%         +1.26 %        +1.07% ***      +2.63% ***          NSVD and WRMF or TCNSVD and ItemKNN are denoted
          TCNSVD
                   Tags
                   Ratings
                             NSVD
                             TNSVD
                                        +0.59%
                                        +28.14 % ***
                                                       -2.50%
                                                       +15.67% ***
                                                                      -20.55%
                                                                      +126.73%
                                                                                      -19.60% *
                                                                                      +115.90% ***
                                                                                                          with **p<0.01, ***p<0.001 based on a Wilcoxon Ranked Sum
    NF




          CNSVD    Ratings   NSVD       -0.01 %        +2.57 % ***    +35.33 %        +44.49 %            Test.


the MovieLens (ML) and Netflix (NF) datasets. Thereafter, we com-                                         • Also it was shown that Pearson correlation as the similarity
pared them to current state-of-the-art item-ranking models such as                                           metric for graph construction achieves the best performance
WRMF and ItemKNN as present in the LibRec library.                                                           when considering temporal dynamics of community structures
   Table 4 shows the first set of results in this respect. In general we                                     in the recommendation task.
can observe that the TCNSVD model achieves the best results here.                                         • Finally, we show that TCNSVD as a temporal and community-
For instance in the MovieLens dataset, compared to its baseline                                              aware recommender model performs sign better than CNSVD
(TNSVD), the method increases NDCG, Precision and Recall with                                                and compared state-of-the-art baseline recommendation approaches
45.45 %, 675 % and 443 % in the best case relying on a ratings-based                                         on the MovieLens and Netflix datasets.
graph. Similar trends are also observed for the Netflix dataset. Here,                                       One limitation of the proposed CNSVD and TCNSVD models are
TCNSVD can also improve NDCG, Prec@10 and Rec@10 with 15.67                                               their high dimensionality. As such, it is planned for future work
%, 126.73 % and 115.90 %, compared to it’s baseline method. The                                           to improve the models in such a way that less parameters need
result “patterns” on the other hand for the CNSVD model are not                                           to be set, e.g. by omitting individual user and item parameters.
that clear as RMSE and NDCG values are sometimes decreased,                                               In our experiments we selected the optimum learning rate and
while Prec@10 and Rec@10 are not. This is actually an interesting                                         regularization based on RMSE. Future work needs to assess whether
behaviour which we need study further in future work.                                                     further improvements can be found when optimizing the models
   Figure 3 provides an overview of the computed item ranking and                                         e.g. with respect to NDCG.
precision metrics. Regarding the MovieLens dataset and the NDCG                                              Although temporal dynamics of overlapping community struc-
metric, the TCNSVD model could achieve the best results, that is                                          tures are considered by TCNSVD, modelling the effect of commu-
statistically better than the baselines WRMF, ItemKNN, CNSVD,                                             nity life cycles, i.e. birth, death, atrophy, grow, split and merge, on
NSVD and TNSVD. TCNSVD surpasses the other baselines also                                                 recommendation systems still need to be studied. Moreover, we
for Prec@10 and Rec@10 with even higher differences. As for                                               plan to study the impact of time bins as well as speed of community
Prec@10, TCNSVD achieves 0.28359, which is higher than 0.18842                                            changes in the proposal of a recommender system. In addition,
and 0.17433 as obtained by WRMF and ItemKNN. The results and                                              more community detection algorithms need to be investigated with
the ranking of the methods are consistent with other benchmarks                                           our models, to identify best performing ones. Finally, we plan to in-
run on the MovieLens dataset, although our evaluation protocol is                                         vestigate the effect of explicit community structures as the current
time-based [13]. As for the Netflix dataset, again TCNSVD gives us                                        ones are based on implicit ones and already achieving remarkable
the best results with notable statistically significant differences to                                    results.
the other models.
                                                                                                          ACKNOWLEDGMENTS
6        SUMMARY & FUTURE WORK                                                                            This work is in part supported by BIT research school.
The main findings of the paper can be summarized as follows:
• We proposed a community-aware model named CNSVD based
  on neighborhood and factor models of recommendation.
• Furthermore, we introduced TCNSVD as a model that considers
  temporal community structure and dynamics.
• We showed the effect of community detection algorithms on the
  recommendation performance and found that Walktrap is the
  better option.
TCNSVD: A Temporal and Community-Aware Recommender Approach                                                                      RecTemp’17, August 2017, Como, Italy


REFERENCES                                                                                        (2015).
 [1] Backstrom, L., Huttenlocher, D., Kleinberg, J. M., and Lan, X. Group                    [16] Helic, D., Strohmaier, M., Trattner, C., Muhr, M., and Lerman, K. Pragmatic
     formation in large social networks: Membership, growth, and evolution. In                    evaluation of folksonomies. In 20th International World Wide Web Conference
     Proceedings of the 12th ACM SIGKDD international conference on Knowledge                     (WWW2011), Hyderabad, India, March 28 - April 1, ACM (2011).
     discovery and data mining - KDD ’06 (2006), ACM Press, pp. 44–54.                       [17] Herlocker, J. L., Konstan, J. A., Borchers, A., and Riedl, J. An algorithmic
 [2] Baltrunas, L., and Amatriain, X. Towards time-dependant recommendation                       framework for performing collaborative filtering. In Proceedings of the 22nd
     based on implicit feedback. In Workshop on context-aware recommender systems                 annual international ACM conference on research and development in information
     (2009).                                                                                      retrieval (1999), ACM, pp. 230–237.
 [3] Bellogin, A., and Parapar, J. Using graph partitioning techniques for neighbour         [18] Herlocker, J. L., Konstan, J. A., Terveen, L. G., and Riedl, J. T. Evaluating
     selection in user-based collaborative filtering. In Proceedings of the 6th ACM               collaborative filtering recommender systems. Transactions on Information Systems
     conference on recommender systems (2012), ACM, pp. 213–216.                                  22, 1 (2004), 5–53.
 [4] Bobadilla, J., Ortega, F., Hernando, A., and Gutiérrez, A. Recommender                 [19] Jesús Bobadilla, J., Serradilla, F., and Bernal, J. A new collaborative filtering
     systems survey. Knowledge-Based Systems 46 (2013), 109–132.                                  metric that improves the behavior of recommender systems. Knowledge-Based
 [5] Campos, P. G., Díez, F., and Cantador, I. Time-aware recommender systems:                   Systems 23, 6 (2010), 520–528.
     A comprehensive survey and analysis of existing evaluation protocols. User              [20] Koren, Y. Factorization meets the neighborhood: A multifaceted collaborative
     Modeling and User-Adapted Interaction 24, 1-2 (2014), 67–119.                                filtering model. In Proceedings of the 14th ACM international conference on
 [6] Candillier, L., Meyer, F., and Boullé, M. Comparing state-of-the-art collabora-             knowledge discovery and data mining (2008), ACM, pp. 426–434.
     tive filtering systems. In Proceedings of the 5th international conference on machine   [21] Koren, Y. Collaborative filtering with temporal dynamics. In Proceedings of
     learning and data mining in pattern recognition (2007), Springer, pp. 548–562.               the 15th ACM international conference on knowledge discovery and data mining
 [7] Cao, C., Ni, Q., and Zhai, Y. An improved collaborative filtering recommenda-                (2009), ACM, pp. 447–456.
     tion algorithm based on community detection in social networks. In Proceedings          [22] Leskovec, J., Kleinberg, J., and Faloutsos, C. Graphs over time: Densifica-
     of the 2015 annual conference on genetic and evolutionary computation (2015),                tion laws, shrinking diameters and possible explanations. In Proceedings of the
     ACM, pp. 1–8.                                                                                Eleventh ACM SIGKDD International Conference on Knowledge Discovery in Data
 [8] Charlin, L., Ranganath, R., McInerney, J., and Blei, D. M. Dynamic poisson                   Mining (New York, NY, USA, 2005), KDD ’05, ACM, pp. 177–187.
     factorization. In Proceedings of the 9th ACM Conference on Recommender Systems          [23] Park, Y., Park, S., Lee, S.-g., and Jung, W. Greedy filtering: A scalable algorithm
     (New York, NY, USA, 2015), RecSys ’15, ACM, pp. 155–162.                                     for k-nearest neighbor graph construction. In Proceedings of the 19th international
 [9] Choo, E., Yu, T., Chi, M., and Sun, Y. Revealing and incorporating implicit                  conference on database systems for advanced applications (2014), Springer, pp. 327–
     communities to improve recommender systems. In Proceedings of the 15th ACM                   341.
     conference on economics and computation (2014), ACM, pp. 489–506.                       [24] Pons, P., and Latapy, M. Computing communities in large networks using
                                                                                                  random walks. In Proceedings of the 20th international symposium on computer
[10] Daneshmand, S. M., Javari, A., Abtahi, S. E., and Jalili, M. A time-aware
                                                                                                  and information sciences (2005), Springer, pp. 284–293.
     recommender system based on dependency network of items. The Computer
                                                                                             [25] Sahebi, S., and Cohen, W. W. Community-based recommendations: A solution
     Journal 58, 9 (2015), 1955–1966.
                                                                                                  to the cold start problem. In Proceedings of the 3rd workshop on recommender
[11] Dolgikh, D., and Jelínek, I. Graph-based music recommendation approach
                                                                                                  systems and the social Web (2011), ACM, pp. 40–44.
     using social network analysis and community detection method. In Proceedings
                                                                                             [26] Shahriari, M., Krott, S., and Klamma, R. Disassortative degree mixing and
     of the 16th international conference on computer systems and technologies (2015),
                                                                                                  information diffusion for overlapping community detection in social networks
     ACM, pp. 221–227.
                                                                                                  (DMID). In Proceedings of the 24th international conference on World Wide Web
[12] Eberhard, L., and Trattner, C. Recommending sellers to buyers in virtual mar-
                                                                                                  (2015), ACM, pp. 1369–1374.
     ketplaces leveraging social information. In Companion of the 25th international
                                                                                             [27] Shani, G., and Gunawardana, A. Evaluating recommendation systems. In
     conference on World Wide Web (2016), ACM, pp. 559–564.
                                                                                                  Recommender Systems Handbook. Springer, 2011, pp. 257–297.
[13] Gantner, Z., Rendle, S., Freudenthaler, C., and Schmidt-Thieme, L. My-
                                                                                             [28] Su, X., and Khoshgoftaar, T. M. A survey of collaborative filtering techniques.
     MediaLite: A free recommender system library. In Proceedings of the 5th ACM
                                                                                                  Advances in Artificial Intelligence (2009), 421425:1–421425:19.
     Conference on Recommender Systems (RecSys 2011) (2011).
                                                                                             [29] Trattner, C., Kowald, D., Seitlinger, P., Ley, T., and Kopeinik, S. Model-
[14] Gauvin, L., Panisson, A., and Cattuto, C. Detecting the community structure
                                                                                                  ing activation processes in human memory to predict the use of tags in social
     and activity patterns of temporal networks: A non-negative tensor factorization
                                                                                                  bookmarking systems. The Journal of Web Science 2, 1 (2016), 1–16.
     approach. PLoS ONE 9, 1 (2014).
                                                                                             [30] Yanxiang, L., Deke, G., Fei, C., and Honghui, C. User-based clustering with top-
[15] Guo, G., Zhang, J., Sun, Z., and Yorke-Smith, N. Librec: A java library
                                                                                                  n recommendation on cold-start problem. In Proceedings of the 3rd international
     for recommender systems. In Posters, demos, late-breaking results and workshop
                                                                                                  conference on intelligent system design and engineering applications (2013), IEEE,
     proceedings of the 23rd conference on user modeling, adaptation and personalization
                                                                                                  pp. 1585–1589.