Service-based framework was proposed by Abel et al. [280] for e-learning
systems. Their model based on a recommender architecture can allow for a
flexible combination of components.

##### Dealing with Long User and Item Interaction Session

A long user-item interaction sequence is another important challenge of SRSs
which needs to be tackled. This problem refers to a situation where there are
too many items in a session, which may cause some difficulties in modelling. A
higher-order Markov chain can be one intuitive choice to address this issue
[5], which can model sequential dependencies among items in a long session. In
addition, various types of RNNs have shown to work well with sequential data
[9]. In contrast to RNN-based models, which may have difficulties to capture
long-term dependencies, improved architectures such as Gated Recurrent Unit
(GRU) [281] and Long-Short Term Memory (LSTM) [282] have been introduced to
better model long-range sequential data.

Another critical issue with long-range sequential data is how to model the
dependencies between items which are placed far from each other in a session.
In this context, a class of RNN approaches might not be a good answer, as they
mainly assume that the nearby items in a session are highly dependent, which
might not comply with the nature of this problem. Therefore, more robust
techniques, such as mixture model [283], memory network [11], and attention
mechanism [8], need to be used in order to model a long-range dependency.
Mixture models try to combine different models that excel at solving their
associated problems. M3 [283] as a typical example of a mixture model applies
different kinds of encoders to better deal with long sessions and provides
effective recommendations. M3 can focus on different temporal dynamics and
ranges depending on the applications’ context. A memory network has shown to
be effective in memorising long-term data characteristics [85]. Hence, based
on the reported recent progress on the memory mechanism of neural networks
[284], [285], [272], an augmented RNN-based sequential recommender with
external memories was proposed by Huang et al. [286]. The authors combined RNN
with Key-Value Memory Network (KV-MN) in order to build a hybrid model which
can capture sequential users’ preferences and attribute-level users’
preferences, respectively.

Besides the mentioned robust techniques, an attention mechanism with
considerable capability to focus on important items is another good solution
for long-range dependency modelling. For instance, SHAN [8] as a two-layer
hierarchical attention-based structure tries to automatically assign different
weights to the items in a long sequence to capture the dynamic property of the
users’ preferences. MEANS [11], which consists of a three-component memory
module, an attention network, and a predictor layer is another example of the
works in this category. While the memory module is responsible for storing the
recent sessions, an attention mechanism is applied to learn the long-range
dependency, and finally, a ranked list of items is provided by MEANS at the
predictor layer for the next-item recommendation task.

####  2.3.2 SRS Categorisation in terms of Model Structure

In the previous section, we discussed issues and solutions for sequential
recommender systems with respect to a session’s characteristics. However,
because of the popularity of different complex models and algorithms
integrated in sequential recommendations, in this section, we have decided to
divide the current SRSs in terms of their model structures. The reason behind
this division is that algorithm adoption is a major step in a recommender
system, where correct selection can play an important role in modelling the
users’ behaviours and generate more accurate recommendations, accordingly.

##### Sequential Pattern Mining

Sequential pattern mining (SPM) [287], as a powerful data mining technique,
tries to discover repeated temporal patterns among users and is an intuitive
solution for the next-items recommendation task. The main idea behind SPM is
that if most of the users frequently use item x after item y, it is better to
recommend item y for a user who recently used item x. SPM has shown
significant improvement in various set of domains such as e-commerce [288],
web browsing [289], and TV programs scheduling [290]. This observation has
encouraged researchers to benefit from adopting SPM in their systems. Most of
the current SPM-based approaches assume that there is no difference between
sessions. In [291], for instance, the proposed method mined sequential web
access patterns by collecting the users’ log data to generate a pattern tree
and then make recommendations, accordingly. Weighted sequential pattern mining
is more efficient than simple SPM, as it can differentiate the level of
importance among sequences [292]. Furthermore, Capelle et al. [293] proposed
the use of two constraints, namely a frequency constraint and a similarity
constraint, for comparing the similarity of two patterns. Then, a threshold
was defined in this study to consider two patterns as similar patterns only if
the calculated similarity score between them was above a pre-defined
threshold. Several years later, Yep et al. [117] introduced a personalised
sequential pattern mining-based recommendation framework to emphasise the
important sequences. In particular, user-specific sequential pattern mining
was applied in their method to provide a personalised recommendation. To do
so, the authors differentiated the sequences according to the available
knowledge about different users.

Unlike the aforementioned models which allow the sequence data to be flexible,
there are other studies which follow a strict order for items in a sequence of
user-item interactions. The sequential pattern mining technique is a popular
model that is commonly used by approaches in this domain. In education, for
example, mining students’ usage information to find out the interesting
information that can help a teacher to personalise the provided courses for
her/his students. The most used path by the students is discovered by the use
of sequential pattern mining and then is automatically recommended to the new
students [294]. Web server log data are another source of information that can
be mined to extract useful information. Niranjan et al. [295] proposed the use
of this information to construct closed sequential patterns, and then, based
on these patterns, pattern trees were built to make a personalised web
recommendation.

##### Pattern/Rule-Based Approaches

According to Wang et al. [67] ‘Pattern/rule-based RS mainly contain three
stages: frequent pattern mining, session matching, and item recommendations.’
The main idea behind pattern/rule-based approaches is to identify the frequent
patterns by analysing the users and items interaction data to be used for
further recommendations. For example, a chips and a coke are more likely to be
purchased together, and this can be treated as a usual pattern in a shopping
basket. In these approaches, there is no difference in which item should be
added to a basket first; the pattern is the same. Hence, pattern/rule based
approaches can be a good choice for dealing with unordered data. Apriori [296]
and FP-Tree [297] can be two good examples of approaches in this domain. A
rule-based framework proposed by Mobasher et al. [298], clickstream data is
captured from Web server logs to make a scalable recommender framework. The
authors discuss that their proposed model can overcome some drawbacks of
current rule-based RSs, low coverage for instance, which can result in a
performance degradation. Moreover, LIN et al. [68] show the performance
improvement of customised CF over pure CF and association-rule based models
when the key task is to use association rule mining as an underlying
technology.

##### Markov Chains Models

Markov chains model have been known as a straightforward technique to model
the transitions over user-item interactions in a sequence. As discussed in
[299], MC technique is good at behaviour analysis due to its strong assumption
that the current state is highly dependent only on the previous states. Based
on the specific technique used, Markov chain-based RSs can be divided into
basic Markov chain-based approaches and latent Markov embedding-based
approaches. The former refers to the situation where the transition
probability of every state is computed only based on the previous state.
Following that, auxiliary information, e.g. context features, can be used to
enrich the Markov chain model and improve the recommendation accuracy [300].
Moreover, in one work [301], the authors combine a mixed order Markov chains
with the web content information to have a more accurate web-recommendation.
They form a hybrid web-recommendation system in which Markov-based methods are
used in order to model users’ Web browsing behaviour. Then, they combine it
with content-based filtering models to extract contents from the links that
users have visited online. While the basic Markov chain-based approaches can
only model the simple and basic dependencies between the states, the latent
Markov embedding-based approaches are able to capture the complex
relationships between the states as the transition probabilities are
calculated based on the Euclidean distance of embedded Markov chains [302].

##### Convolutional Neural Network-based Models

Recently, Convolutional Neural Networks (CNN) have shown a promising result in
image-related tasks [303, 304], [305] and natural language processing domain
[306]. Inspired by the success of CNN in capturing local features, Caser [86,
307] is proposed as the first CNN-based sequential recommender system. Caser
stores all previous user-item interactions in a matrix and treats this matrix
as an ‘image’, which is fed into a CNN network. various convolutional filters
are applied in Caser, such as horizontal filters and vertical filters to well
extract local features at a different level from the matrix of the embedded
previous items. Another CNN-based study is proposed by Tuan and Phuong [308],
which exploit the content of items into session clicks to generate
personalised recommendations. They believe that current SRSs may not be able
to make any recommendations when there are no available information regarding
users’ profiles or their past activities. Furthermore, they introduce a
challenging problem called, add-to-cart prediction task, which may be more
complicated than the next click prediction problem. To overcome the mentioned
issues, Tuan and Phuong propose a 3D CNN model for SRS, which leverages the
incorporating of the session associated content features such as item
descriptions and item categories for accurate predictions. A 3D CNN input is
able to capture spatio-temporal pattern which makes recommendation systems
more robust. While Caser as a CNN-based recommender comparably performs well
over the popular RNN-based model in the top-N sequential recommendation
problems, it may lose some useful information due to using max pooling
operations. Therefore, an efficient and highly effective convolutional
generative model is presented by Yuan et al. [309] for top-N item
recommendation task in SRSs. In contrast to the basic filters in CNN, the
dilated convolution filters are applied over an embedded matrix in order to
include all useful information. The embedded matrix is padded with zero in
order to make it larger than its original length to avoid losing any
information, specifically in a long-range sequence data.

##### Recurrent Neural Network-based Algorithms

Recurrent Neural Networks (RNN), have been known as one of the widely adopted
deep learning techniques in SRSs. One of the benefits of RNN is its great
success in sequence modelling, which has been widely demonstrated in the field
of natural language processing (NLP) [310]. Following this, a novel RNN-based
model is proposed to capture users’ sequential behaviours for click prediction
[311]. While RNN-based sequential recommender systems have been reached to a
significant results, they may not be able to model dependencies in a longer
sequence. Therefore, different from traditional RNN, several works have been
introduced to modify classic RNN in order to better capture the whole
historical user-item interaction sequences [312], [313]. For instance, Wu et
al. [82] applies Long Short-Term Memory (LSTM) [314], which is an updated
version of RNN, to capture temporal dynamics of user profiles and movie
attributes. Tan et al. [315] propose to use GRU, founded by [9], and use data
augmentation techniques to take temporal shifts in user behaviour.

##### Graph Neural Network-based Models

With the rapid growth of GNN, an increasing interest is paid to GNN by the
researchers in many applications such as natural language processing, computer
vision, and recommender systems in particular [316], [317]. We et al. [83] is
one of the pioneering in adopting GNN in their proposed recommender system,
SR-GNN. First, a directed graph is built with the help of transactional
sequence data, and next the users and items embeddings are learned on the
graph. This may help SR-GNN to benefit from more complex relations over the
whole graph. While GNN as a strong deep learning technique has shown to be
effective in recommender systems and generate promising results, a less
attention is paid by the recommendations community and more investigation are
required.

##### Attention Mechanism-based Models

Lately, researchers have employed attention mechanism due to its powerful
capability in focusing on selective parts [318]. Attention mechanism is
initially designed by Bahdanau et al. [318], which is applied in machine
translation task in order to emphasise on some selective parts of inputs with
high impacts on the outputs sentence. The basic version of attention, named
vanilla attention is used as a decoder in an RNN network. While vanilla
attention which has been widely used in sequential recommender systems [10],
has shown great success. An improved version of attention named, self-
attention mechanism attract more attention as it can perform well without
using either a recurrent or convolutional network [319]. Self-attention
network is originally introduced in transformer for neural machine translation
task [242], but it is shown promising results in an RSs’ community as well. An
attention mechanism is successful to differentiate the contributions of
different items in a session. In this regard, a two-layer hierarchical design
called, SHAN, is proposed by Ying et al. [8] as an attention-based SRS to
focus on more relevant items in a session. Moreover, incorporating an
attention network presents the superior performance in context learning in
Wang et.al [84]. Attention mechanism also can be a good solution for dealing
with a noisy session, as it is able to discover the most important items in a
session, and discard the irrelevant ones.

Table 2.2: Comparison of approaches used by sequential recommenders.

##### Factorised Machine-Based Models

Matrix factorisation or tensor factorisation are the most widely used
techniques in recommendation systems, which map users and items into latent
spaces [81]. In sequential recommender systems, matrix or tensor is
constituted of interactions rather than the ratings [279]. For instance, FPMC
is built based on the combination of matrix factorisation and Markov chains to
predict the next action [74]. Another factorised model is FPMC-LR, which is an
extended version of FPMC and proposed by Cheng et al. [42]. The personalised
Markov chain is applied in FPMC-LR for personalised point-of-interest (POI)
recommendation task. FPMC-LR pays more attention to the users’ movements
around local region to provide users with more accurate suggestions. More
importantly, FPMC-LR not only can offer locations which a user has not seen
before, but also it can reduce the computation cost and ignore the noisy
information to increase recommendation performance.

####  2.3.3 SRSs Categorisation In terms of Inputs

Sequential recommender systems may have different types of inputs including
only user-item interaction, single or multiple user behaviour data, repeat
purchasing behaviour, and incorporating side information. Therefore, in this
section, we aim to categorise the existing sequential recommender systems in
terms of their input.

##### Only User-item Interaction Session

This is a very basic type of input data in sequential recommender systems. A
session which records multiple actions is passed into a sequential recommender
for further processing. To so so, a sequential recommender may not need to
have the users’ identifications as usually people may browse online without
logging into the system. GRU4Rec which is proposed by Hidasi et al. [9]
exploits a session with 1-of-N encoding ($N$ is the number of items) where an
active item in a session is considered as 1, while inactive one is equal to 0.
GRU4Rec generates a set of outputs which is a probability of the next
interacted items. DRNN is another sequential recommender in which multiple
hidden layers are used with temporal feedback loops in each layer to provide
more personal and real-time recommendation [320]. There are several more
studies which only take transactional data and achieve a superior performance
in SRSs [315].

##### Single Behaviour User Data

In sequential recommendations, there are multiple sequence types such as
‘browse/buy/mark items, receive/use coupons, click ads, search keywords, write
down reviews, or even watch videos by a particular brand’ [321]. Obviously,
each of the mentioned actions can represent different level of the users’
preferences, and thus, need to be modelled differently. Usually users’
behaviour are heterogeneous and polysemous, and thus, it is crucial task for a
recommendation system to model each type of users’ behaviour individually in
order to generate better suggestions. Considering only one type of users’
behaviour may be a simple type of input which can be taken by the most of the
current SRSs [322]. ATRank [321], is an excellent example in which
heterogeneous user behaviors are considered with using only the attention
model.

##### Multiple Behaviour User Data

As we have explained above, SRSs are dealing with a wide range of behaviours
such as clicking on items, adding items to the wishlist, purchasing items, and
putting items into a cart. Taking into account different types of actions is
another issue of SRSs, which is less explored. Usually, most of the current
approaches treat users’ actions in the same way with no difference among them.
This may limit the recommendation performance as there may be a difference
between different action types, such as add-to-cart and clicked and it is
important to take multi-behavioural sequences into consideration [125]. Most
of the current SRSs assume that there is only one action in each time step
like purchased items and might ignore to take the other types like viewed
items. In an online e-commerce website, a user may click on various items
under consideration, add some of them to a shopping cart, and puts others on a
wishlist, and eventually just purchase a few of them. Here, we are dealing
with multiple sequence types and behaviours which need to be addressed as
clicked items also may indicate a user’s preference. For instance, Le et al.
[322] pay different attention to a various behaviour type. They consider that
purchasing action as the target behaviour type which is more important for
modelling users’ behaviour. Then the other type of behaviors like clicking can
be seen as a supporting behaviour according to the target behaviour which can
facilitate the next-item prediction task. Furthermore, discriminative
behaviour learning also can help to learn the difference between actions’
heterogeneity [49].

The last level in Figure 1.3, Chapter 1 in short-term users’ preferences is
related to the items’ attributes, context and its associated further details
and factors [310]. Each item includes multiple heterogeneous attributes like
category, price and producer which might be explicitly or implicitly
interdependent. For instance, the same product may have different price based
on the producers which can explain the explicit interdependence, or different
products by the same category may be purchased together due to the implicit
interdependence. How to model the interdependence and heterogeneity of items’
feature is not an easy task as the data scales/types are totally different
[323]. The involvement of item attributes can help SRSs to better understand
the item dependency and better deal with the cold-start problems, accordingly
[127]. Moreover, it may be possible that the context of the items affect the
users’ next behaviours. Here, the context refers to the specific explicit
properties of an item when it is purchased, such as its popularity, discount,
and community trends, or the implicit ones, such as the time and weather,
season, and location, when the item was purchased [128], [129]. For instance,
the time gaps between events and the time of day for each interaction are
considered as a contextual factor in Contextual Recurrent Neural Networks for
Recommendation (CRNNs), which is proposed by Smirnova and Vasile [324].

Contextual information is an influential factor in both general and sequential
recommenders, where there is a separate line of research in general
recommenders known as context-aware recommenders [20]. CBS is an example of
approaches in this context which is based on the analysing of contemporaneous
basket sequences. Considering a session of a particular type of behaviours,
then the target session is related to the more informative session [322].
Behaviour-Intensive Neural Network (BINN) is proposed by Li et al. [325] to
address the problem of personalised next-item recommendations. Inspired by the
item2vec [326], w-item2vec is introduced in BINN to discriminatively exploit
user behaviours. As stated by NMRT, buying action may take place after
clicking on an item [327]. Therefore, the cascading relationship among
different types of behaviors are taken into account by NMRT. It means that the
authors in NMRT believe that the ‘prediction of a high-level behaviour (i.e.
purchase) comes from the prediction of the low-level behaviour (i.e. view)’.
In this way, the behaviour semantics is incorporated by NMRT to better model
multi-behaviour recommendations. However, this important factor is not
explored enough by the current SRSs.

##### Repeat Purchasing Behaviour

This type of user behaviour may be more common in the real-world cases, where
the same item is repeatedly observed in a user transactional behaviour. While
simple and effective, there is quite a few work which try to consider this
type of user behaviour. As discussed by Ren et al. [328], repeat consumption
is very usual among people’s behavioural habits. People are more likely to
visit the same restaurant that they have been before, they may like to listen
to the same songs and more probably there are some items that users may
repeatedly purchase. Therefore, RepeatNet is proposed to adopt repeat-explore
mechanism with an encoder-decoder structure. RepeatNet is able to discover
repeat recommendation mechanism in order to select the best items for a user
at the right time. Anderson et al. [329] investigated the impact of the
repeated consumption on several datasets and achieved an interesting outcome:
that recency is the strongest predictor of repeated consumption. A recent
attempt by Hu et al. [330] demonstrated that although RNN is an effective
solution for a sequential recommender system, it may not be able to model
personalised item frequency (PIF). Hence, the authors propose a simple
k-nearest neighbour model to benefit from the PIF in their next-basket
recommendation task.

##### Exploiting Side Information

This property of sequential data refers to the incorporating items’
characteristics as the complementary information which makes the
recommendations more accurate. As reported by Wang et al [331], the context of
a transaction event needs to be taken in order to fully understand users’
behaviours. They propose a neural network-based comprehensive transaction
embedding model (NTEM) to learn the comprehensive embeddings of both items and
their features to produce high quality recommendations. Generally, customers
tend to try the newly-released items rather than always recommended by the
popular or similar products, which in turn can increase business benefit as
well. To address the mentioned problems, NTEM learns the embedding of items
and their features of a transaction at the same time through a wide-in-wide-
out structure. While both categorical and numerical features are important,
NTEM uses categorical features of items and learns the relations between item
relevance [332]. NTEM guarantees its efficiency to find the best next choices
in terms of novelty and recommendation accuracy evaluation metrics. Items
features also can be a good signal for revealing what types of items a user is
interested in. A recent study demonstrates that instead of using ratings, item
comparisons can be effectively used to compute recommendations [127]. In this
work, all items of interest for a user are collected and then will be compared
in terms of their features in order to construct the users’ profiles. The
extracted features are ranked according to their contribution to system
performance. Next, a similarity score between the two users is calculated.
Additionally, the proposed model is able to handle the cold-stat problem and
improve the performance of a recommender system. Item features involvement is
also exploited by a factorisation-based model [333, 334], CNN [308], and RNN
[335]. Parallel RNN (P-RNN) is a different version of RNN which is used by
Hidasi et al. [335] to show that ‘for each aspect/feature of the clicked item
(e.g. the item-ID, text description, image features) there is a separate RNN
processing the input’. In the proposed model, the term ‘Parallel’ means that
they use multiple RNNs rather than distributed processing of the data or the
algorithm computations. The enriched features are image and text, which are
extracted from video thumbnails and product descriptions, respectively. Their
proposed architecture achieves the higher recommendation accuracy over a
simple SRS, showing the benefit of using the item features (image data and
text) in RNN-based sequential recommender.

Module Factor Method Papers Input Only user-item interaction session Utilising
sequential data [321] Single behaviour user data Simple behaviour embedding
[322], [321] Multiple behaviour user data Temporal behaviour modelling [322],
[49] Repeat purchasing behaviour Discovering users’ habits [330], [336] Side
information used Data augmentation technique [337],[338] Adopted Model Model-
based Recurrent neural network [81], [9], [339], [340], [341], [342], [82]
Convolution neural network [83], [7], [309], [308] Graph neural network [343],
[83] Attention mechanism [344], [10], [276], [84] Model-free Sequential
pattern mining [117], [345], [346] Factorised Machine-based [347], [74], [93]
Markov Chain [123], [164] Pattern/Rule-based [120], [348], [349], [68] Item
Characteristics Session’s purpose Convolutional Neural Network [7],[278] Noisy
session Attention mechanism, Memory network [84], [85] Session’s order
Pattern/Rule-based [350], [298] Long session LSTM,GRU, RNN, Mixture models
[283], [82], [351], [9], [315], [283]

Table 2.3: Summary of the influential factors of sequential recommender
systems.

###  2.4 Unified Recommenders

Nowadays, RSs are the core components of many of the modern online services
including movies, products, news, songs and more. Each of these services has
its own characteristics, issues and recommendation scenarios which need its
associated techniques to be adopted, accordingly. While the key idea behind
each recommender system is to provide accurate suggestions, satisfying users’
preferences and needs in a quick response, increase the business profit and
ease user with their decision-making process. Therefore, learning accurate
users’ preferences is a critical task for the recommendation problem. While
the users’ preferences may be very diverse, some type of user interests may
last for a long time and are consistent for the same user [352]. For example,
a user may be a fan of the popular singer $JustinBieber$ and thus she/he is
more likely to follow her/his songs for several years, even if she/he listens
to the other singer as well. This kind of users’ preferences can be regarded
as a long-term preference (i.e. general taste), which is mainly modelled by
general recommenders. In addition, user interests may keep evolving over time
and may be affected by specific contexts such as time, location, and friend.
For example, a user may become interested in sad music since she/he may be
upset because of her/his current loss. This kind of user interest can be known
as a short-term preference. Although modelling long-term users’ preferences is
important, short-term users’ preferences also play a significant role in
building an accurate user profile. Hence, unlike general recommenders,
sequential recommenders are introduced as a new paradigm of recommenders with
the capability of taking users’ current needs and interests.

Although modelling each of which users’ preferences in a separate manner may
be easier, recent progress is captured by approaches that combine both types
of users’ preferences in a unique framework. FPMC for instance, as a unified
framework exploits MF for modelling user general preference and uses the MC
technique in order to model sequential behaviour and then linearly combine
them to make a recommendation [74]. According to the [5], while FPMC records
superior results compared to both the state-of-the-art MF and MC models, it
may not be able to deal with the sparsity issue and the long-tailed
distribution of many datasets, and thus it may need more improvement.
Therefore, inspired by the strength of FISM in modelling long-term users’
preferences through using item-item similarity matrix specifically on sparse
data, Fossil [5] proposed to learn a personalised weighting scheme over the
sequence of items. Fossil was able to make a personalised item recommendation
even on a large and sparse dataset. CoFactor [347], which jointly uses MF and
the item-item co-occurrence matrix with shared item latent factors, is another
example of a unified recommender system. CoFactort outperforms pure MF-based
models, where the rare items can be discovered for recommendation through
exploiting the co-occurrence patterns, unlike standard MF.

Although the mentioned approaches model both type of users’ preferences, the
performance of their model may be limited as both types of users’ preferences
are linearly combined. Soon after, HRM partially solves the problem of
modelling high-level user-item interactions through adopting a nonlinear
aggregation function [6]. Specifically, HRM builds a hybrid user and item
representations by employing a two-layer structure. Moreover, the benefits of
different aggregation functions are incorporated among multiple factors by HRM
which results in large flexibility and promising potential.

Learning users’ behaviour is an essential task for a recommender system as it
can help the system to better understand users’ needs and interests.
Therefore, BINN [49] is proposed which contains two main components: Neural
Item Embedding and Discriminative Behaviours Learning. Particularly, a novel
item embedding technique called w-item2vec method is introduced in BINN to
embed items and the interactive behaviours over item sequences. W-item2vec is
a combination of a Skip-gram model with a Negative Sampling method [353].
Reported results can demonstrate the performance improvement of BINN in
recommendations of the next items for the target users. LSDM [354] is another
hierarchical architecture, in which users’ purchase preferences over time are
modelled with an LSTM network. The main assumption behind LSDM is to cluster
the successive products together and deal with users’ repeated purchase
demands of items at different multi-time scales.

Differently, inspired by the great success of the GAN mechanism presented by
Goodfellow et al. [355], in a wide range of task such as image generation
[356], image captioning [357], and sequence generation [358], PLASTIC is
introduced by Zhao et al. [359] to use a generative adversarial network (GAN)
in order to discriminatively exploit the performance contributions of
combining the MF approach and the RNN approach. Before PLASTIC, IRGAN [360]
shows the capability of exploiting GAN in their proposed model in order to
iteratively optimise a generative retrieval component and a discriminative
retrieval component.

Inspired by Convolutional Neural Networks (CNNs), Caser [7] has been
introduced as a sequential recommender that treats user-item interactions as
an image and then learns sequential patterns as local features of the image by
using convolutional filters. Furthermore, RNNs also have attracted more
attention in modelling sequential dependencies in SRSs [312], [361]. For
instance, SLi-Rec improves the classic RNN structure such as Long Short-Term
Memory (LSTM) by proposing time-aware and content-aware controllers to fully
exploit user modelling. Then the attention-based framework is applied to
combine general and sequential recommender [362]. While taking the advantages
of both general and sequential recommenders is a strong solution for user
representations learning, most of the mentioned approaches try to adopt one
recommendation paradigm to help the other one and thus may not be able to deal
with both tasks in a unified way. Hence, Recurrent Collaborative Filtering
(RCF) as a multi-task learning approach is presented by Dong et al. [77] which
jointly models both types of users’ preferences. RCF models user general taste
under MF-based collaborative filtering and captures user sequential behaviour
by utilising RNN. RCF can act as a general recommender and a sequential
recommender at the same time and deliver superior performance. Due to the
great success of both CNN and RNN in capturing local sequential patterns and
complex long-term dependencies, respectively, Xu et al. [363] propose a novel
Recurrent Convolutional Neural Network model (RCNN) to better generate
recommendations. Apart from basic RNNs, improved architectures such as Gated
Recurrent Unit (GRU) [281] and Long-Short Term Memory (LSTM) [282] have been
developed to model sequential dependencies.

Lately, researchers have employed an attention mechanism due to its powerful
capability in focusing on selective parts [318]. Although incorporating an
attention network presents the superior performance in context learning in the
work by Wang et.al [84], this model ignores users’ general taste. Instead, a
two-layer hierarchical design called, SHAN, has been proposed by Ying et al.
[8] as an attention-based SRS to incorporate both users’ general tastes and
short-term preferences in a unified manner. SHAN calculates the attention
score which is guided by the user embedding, and thus it may not completely
discover the contributions of each item, and it may not be able to find noisy
items. According to Alyari et al. [163], a significant improvement on a
probabilistic classifier is achieved by Maron et al. [364] which has been
recently known as a Naïve Bayesian classifier [365].

Table 2.4: Comparison of approaches in recommender systems.

###  2.5 Summary

In this chapter, we presented an overview of the work related to recommender
systems, and categorising them based on their structure. First, we provided a
brief background of recommender systems, and then discussed the approaches
that only focused on the general recommender systems, followed by those with
the main focus of sequential recommender systems. Finally, we reviewed unified
recommender systems, which incorporate general and sequential recommender
systems. In the following chapters, we propose a series of novel recommender
systems, including a general recommender system which analyses users’
personality traits for providing personalised recommendations, and two
sequential recommender systems, in which the first one pays different
attention to different items clicked by the users, and the second one aims to
discover the users’ main purposes and preferences of buying successive items.

##  Chapter 3 Fundamental Concepts and Preliminaries

In this chapter, we first introduce important notions and definitions in both
general and sequential recommender systems which are the key concepts of this
thesis. Then, we will formulate both the mentioned tasks and their relevant
information for giving a better view of the other chapters of this thesis.

###  3.1 Problem Definition for General Recommenders

In this section, we will first introduce the most important concepts and
definitions in related to general recommenders, which will help a reader to
better understand the recommendation problem.

User-Item interaction matrix (Utility matrix $R$). In the context of
recommender systems, users and items are the two main concepts. There is a set
of $|u|$ users and $|v|$ items, where $U=\\{u_{1},u_{2},...,u_{|u|}\\}$
denotes the user set and $V=\\{v_{1},v_{2},...,v_{|v|}\\}$ indicates the item
set. The users’ preferences for a set of items can be denoted by a utility
rating matrix $R^{|u|\times|v|}$, where $R_{ij}$ denotes the preference of
user $u_{i}$ over item $v_{j}$. In this matrix, each row is reserved for a
user and each column can show each item.

Type of interactions. There are two types of user-item interactions, namely
explicit feedback and implicit feedback, which can be used as the
recommendation inputs. According to the different types of inputs the
recommendation problem and the adopted solution may change. Sometimes, users
can explicitly express their level of preferences for interested items (e.g.
music, movie, and products) with a given rating on the Likert scale (from 1 to
5). The higher rating can indicate the higher level of a user’s preference for
an item. This is an explicit type of users’ feedback. Under this setting, a
recommendation system should use the rating matrix $R$, which is usually
sparse, to complete the U-I matrix by predicting the ratings for unseen items.
Besides for explicit feedback, users can indirectly show their interests in
items by clicking, viewing or purchasing the items. This type of feedback is
known as implicit feedback in which $R=\\{0,1\\}$. There is a binary value in
this type of feedback, where if $R=0$, it means that the user has not
interacted with this item, while the value of $R$ is equal to 1 if the user
has watched, clicked, or purchased the item. Dealing with implicit feedback is
much more complicated than dealing with explicit feedback, as it is not clear
whether users dislike the unobserved items or just do not realise them yet.
Therefore, unlike the previous RSs which use explicit feedback, the main goal
of approaches fed with the implicit feedback is to provide a ranking list of
items rather than the real preference scores.

Rating recommendation task. Based on the adopted technique, the recommendation
task may differ from content-based, collaborative filtering, and hybrid-based.
As only model-based collaborative filtering was applied for developing a pure
general recommender in this thesis, we will only introduce the mechanism of
model-based CF approaches. The core idea behind the item recommendation task
is to compute the recommendation score and then compare it with the actual
rating in order to minimise the point-wise comparison loss. In this paradigm,
mostly, a U-I matrix which records the users’ explicit feedback, is given to
the recommendation engine to calculate the ratings for an unobserved item.

Ranking recommendation task. Different from point-wise methods, a pair-wise
ranking structure is proposed to personalise recommendations. The top-n
recommendation task produces a ranking ordered list of preferred items where
items at the higher order at the top of the list may better satisfy the users’
interests. The core assumption behind the pair-wise ranking function is that a
user may prefer the clicked items to the unclicked ones. A ranking order set
of triplets $(i_{1},u_{1},i_{2})$ is defined, which indicates that user
$u_{1}$ might prefer item $i_{1}$ to $i_{2}$. Finally, the pair-wise strategy
is mostly adopted in order to better deal with implicit feedback.

###  3.2 Problem Definition for Sequential Recommenders

Here, we define the concept of session and provide a set of useful definitions
for sequential recommenders. Next, we will formulate the task of session-aware
recommender systems and explain how the SRSs work.

Session. A session can be defined as a set of items which a user has
interacted with (e.g. purchasing, clicking, viewing or adding to cart) in one
transaction or during a certain period of time (e.g. one hour or one day). A
session consists of a group of interactions with items during a given time
frame, which can happen on the same day or over several days.

In other words, a session can be seen as a set of purchased items such as
bread, cheese, and butter together in one transaction, or successive clicks on
a set of items in one hour, or a list of watched movies by a user in one day.
In this thesis, when we talk about the session, it refers to a set of bought
items in one shopping basket. A session includes transactional data which
record the IDs of the purchased items together.

Session-aware recommender system. Recently, this line of RSs has emerged and
attracted more attention from both the industry and academia, as it can better
fit the real-world scenarios. The terms session-based recommender system,
session-aware recommender system, sequential recommender, and sequence-based
recommender system can be used, interchangeably. However, we have mostly used
sequential recommender system throughout this thesis for consistency reason.
As is clear from the name, the basic unit of SRSs is the transactional data
stored in a session. The main goal of a session-aware RS is to model the
sequential dependencies among items in a session and then predict the most
probable item/items that a user may interact with in the near future. In this
regard, there are two main branches of session-aware recommender systems based
on whether the recommended items are a part of the current session (i.e. next-
item/s recommendation task) or the predicted items are completely placed in
the next session (i.e. next-basket(session) recommendation task). We will
formally define these two types of SRSs, but the main focus of this thesis is
on the first structure (next item/s recommendation problem).

Session’s context. Context is a multifaceted concept that has been studied
across different research disciplines. However, we define it as an important
concept which specifies the situation in which a user makes a decision. The
contextual factor such as time, weather, location, season, time of day, and
venue may have a significant effect on the user’s final choice. This critical
parameter may be obvious and can be extracted explicitly from a session, while
it may be hidden in a user’s transaction history. For instance when a user
consistently clicks on a playlist of multiple romantic songs, clearly she/he
may be interested in this genre of music, and this contextual information can
be extracted from her/his behaviours. While in a shopping basket of a user if
she/he puts butter, milk, eggs, and baking powder, she/he may want to make a
cake, and this contextual factor is hidden in her/his past actions. Therefore,
identifying a contextual factor is an important task, which plays an important
role in better understanding the users’ needs and interests and to thus make a
right prediction, accordingly. As it is an important parameter particularly in
terms of recommender systems, there is a separate line of research on general
recommenders, known as Context-Aware Recommender Systems (CARS); however, it
is in its early stage.

Next-item recommendation task. The main goal of the next-item recommendation
task is to take the context of the current session and then predict the best
next item which this user may interact with in the future. Most of the current
sequential recommenders fall into this category and only consider the last
session for making a prediction [339], [333], [9]. There are only a few works
which take the context factor into account from multiple sessions, which is a
complicated task by itself and requires more investigation.

Next-basket (session) recommendation task. In contrast to the previous
structure of sequential recommenders, this line of research mainly focuses on
finding the most probable items that a user may prefer in the next session.
Hence, under this setting, all the $n$ number of previous sessions are taken
into account and the shared context among them is modelled for providing
recommendations in the next session.

As mentioned earlier, in this thesis, we have only paid attention to the next-
item recommendation problem and have left the next-basket recommendation task
for future work. Below, we provide some notations which may be useful for a
frequent reader to better understand this domain.

Notation | Meaning
---|---
$u$ | user
$U$ | user set
$v$ | item
$V$ | item set
$T$ | transaction history of a shopping basket of an user
$s$ | session including a set of multiple items in a certain period of time
$S$ | session set
$c$ | session context
$G$ | long-term interacted items set
$Q$ | collection of all previous sessions
$R$ | recommendation utility matrix
$r$ | recommendation score
$k$ | latent dimension
$h$ | embedding vector
$\alpha$ | attention score
$\beta$ | attention score
$b$ | bias of neural network
$e$ | latent vector
$W$ | neural network weighting matrix
$\lambda$ | neural network regularisation
$c$ | latent representation vector
$K$ | kernel of CNN
$p$ | user latent vector
$q$ | item latent vector
Table 3.1: List of commonly used notations in this thesis.

###  3.3 Preliminaries

In this thesis, various embedding, data mining, deep neural networks, and
machine learning models were applied to both general and sequential
recommender systems in order to build the approaches for overcoming the
potential challenges. In particular, we introduce matrix factorisation model,
convolutional neural network, and attention mechanism. Matrix factorisation is
one of the widely used classic techniques in recommender systems, which embeds
user-item interactions into low-dimensional spaces. In addition to matrix
factorisation, we explain convolutional neural network as one of the most
powerful designs in deep neural networks. Capturing the local context among a
set of items is one of the main capabilities of convolutional neural networks,
which attracts the attention of the researchers in this community.
Furthermore, attention mechanism is recently introduced as one of the
successful technologies in learning information from the input data.
Therefore, we discuss the core concepts and procedures of these algorithms in
order to make it more easier for the readers to follow the other chapters.

Figure 3.1: Overview of a rating matrix.

####  3.3.1 Matrix Factorisation

Matrix factorisation, which has been widely adopted by the current recommender
systems, is one of the most popular methods for performing model-based
collaborative filtering. As shown in Figure 3.1, this matrix records the
users’ interactions with the items. Matrix factorisation is a latent factor
model using the U-I rating matrix to embed the hidden factors of both the
items and users [51]. Matrix factorisation is a mathematical tool that works
with the matrices to simply discover the hidden relationships between users
and items, and thus, it can be used in a wide range of domains. In real-world
applications, we have too many users and items, while just a small portion of
items are rated by even very active users. Moreover, even very popular items
are rated by only a few users. This problem refers to the data sparsity
problem, with which most of the current RSs are confronted. Under this
setting, there is a lack of available information which makes a recommendation
more challenging. Therefore, matrix factorisation as a dimensionality
reduction method can be one of the best solutions for the data sparsity
problem.

Mathematically speaking, we have a set of users ($U$) and a set of items
($V$). The rating matrix $R$ contains all the available ratings given to all
the items. The goal of matrix factorisation is to convert this matrix into two
latent vectors $u$ and $v$ to first deal with the data sparsity problem and
then learn the hidden features embedded in the rating matrix. To do so, it is
required for matrix factorisation to identify $k$ latent features. Next,
matrix factorisation predicts the ratings for unseen items to complete the U-I
matrix by computing the inner products of a user’s and item’s latent vectors
together.

Figure 3.2: Matrix factorization structure.

The basic model of matrix factorisation is given in Formula 3.1. As is clear
from this formula, a user’s interest for a particular item is calculated by
the inner product of a user $u_{i}$ and item latent $v_{j}$ vectors as
follows:

$r_{ij}={q^{T}_{j}}{p_{i}}$ (3.1)

Then, in order to learn the latent vectors, the RSs need to minimise the
regularised squared error on the set of known ratings as follows:

${min\sum({r_{ij}^{^{\prime}}}-{r_{ij}})+\lambda{||q_{j}||}^{2}+\lambda{||p_{i}||}^{2}}$
(3.2)

where $r_{ij}^{^{\prime}}$ is the real rating value and $r_{ij}$ is the
predicted value by Formula 3.1.

####  3.3.2 Convolutional Neural Networks

Convolutional Neural Networks (CNNs) were introduced by David Hubel and
Torsten Wiesel [366] in the 1990s. They found that the neurons in the primary
visual cortex are sensitive to the specific regions of the visual field
features in the visual environment, particularly the oriented edges. In the
late 1950s and the early 1960s, David Hubel and Torsten Wiesel found that the
neuronal cells in the brain fired only in the presence of the edges of a
certain orientation. This region of the visual space is known as the receptive
field. Hence, inspired by the concept of visual cortex from biology, CNNs have
emerged as a powerful technique in computer vision, where the first project
related to the handwritten digits recognition showed a promising result [367].
Years after, ‘ImageNet Large Scale Visual Recognition Challenge’ was
introduced by Russakovsky et al. [368] to demonstrate the considerable
potential of these networks. ‘AlexNet’ as a CNN model proposed by Alex
Krizhevsky and his collaborators achieved the first place and thus has become
a state-of-the-art model in the field of computer vision. Although CNN was
initially designed to work with images and has achieved excellent results for
image classification [305], it has been shown to be effective for sentence
classification [306], sentence modelling [369], and speech recognition [370].

Figure 3.3: Example for convolution operation on a 6*6 image with a 3*3
kernel.

A CNN is a feed-forward neural network which consists of several layers with
different aims and jobs: such as a convolutional layer, a nonlinearity layer,
a pooling layer, and a fully connected layer. The first layer (convolutional
layer) takes a matrix of inputs and then performs a convolution operation
between a set of kernels and the inputs in order to identify features. There
are various sizes of kernels (filters) responsible for detecting different
parts of the inputs. As shown above in Figure 3.3, an element-wise product
between the input and the kernel is applied, and then, the value is summed to
build an output from this layer. Then, the kernel is stridden to the right and
the element-wise product is calculated again in this new part. This procedure
is continuously repeated from left to right and from top to bottom until it
covers all the inputs.

The next step is to use a nonlinear activation function, when the output of
the convolutional layer is ready. There are different types of activation
functions, such as tanh or sigmoid [371], but the ReLU function is the most
widely adopted one as it is faster to compute than the other functions [372].

$c_{i}=ReLU(K\times e_{{\lfloor i-\frac{k-1}{2}\rfloor}:{\lfloor
i+\frac{k-1}{2}\rfloor}}+b)$ (3.3)

Figure 3.4: Example of image portion for a max-pooling operation.

Then, the pooling operation is applied to the output of the previous layer to
reduce the spatial size of the representation captured by the convolutional
layer and thus speeds up the computation time. Max-pooling is one of the
commonly used functions in the pooling layer. In this layer, a window strides
over the convolved feature matrix and takes the maximum value information.

The last layer in CNN is a fully connected layer. The outputs from the
previous layer are first converted into a 1D format and then are inputted into
this layer. The main job of this layer is to calculate the probability score
for each class of objects in order to perform a classification task.

Figure 3.5: Fully connected layer.

####  3.3.3 Attention Mechanisms

Attention is, to some extent, motivated by the basic function of a human
brain, which pays visual attention to different parts of an image. Usually,
humans focus more on the selective part of an image with ‘high resolution’ and
ignore the ‘low resolution’ parts. In other words, when we look at a picture,
the whole picture may be shallowly scanned at first. Then, we may like to see
more details of the picture and thus pay more attention to a small portion of
an image. This observation shows that our brain can differentiate all the
regions in a picture and give more weight to the important parts of the
picture. Motivated by this observation, an attention mechanism is introduced
to discriminately learn the information from the input data [318]. While an
attention mechanism was initially applied in natural language processing (NLP)
tasks [241], [373], it has also been shown to perform well in a wide range of
domains such as machine translation [374], image captioning [375], and
recommendations [169]. In addition, the considerable success of attention
mechanisms motivates other tasks such as dependency modelling and sequential
recommenders [376].

Various types of attention mechanisms have been reported in the literature,
but here, we applied the most popular one, which was proposed by Bahdanau et
al. [318] for an NLP task. In this model, the attention mechanism is used for
neural machine translation tasks. In such system, a sentence is inputted into
the system and the goal of the system is to translate this sentence to the
correct version of translation, which is the output of the neural machine
translation. To do so, encoder-decoder modules are required for translating
between different languages. Here, the main issue is that these modules
convert a sentence to a fixed-length vector, which may result in information
loss and performance reduction, accordingly. Therefore, an extension of the
encoder–decoder model was proposed by Bahdanau et al. [318] to concentrate
more on the most relevant information in order to learn the context of a
source sentence. Thus, both the length of a source sentence and the squashing
of the information in a source sentence in a fixed-length vector are not
required, which may avoid information loss.

If we consider $X=\\{x_{1},...,x_{T_{x}}\\}$ as an input sentence in the
source language, $h_{t}$ as the hidden state at time $t$, $c_{i}$ as the
context vector, $Y=\\{y_{1},...,y_{T_{x}}\\}$ as the translated output
sentence in the target language, then the task is to maximise the conditional
probability defined in Formula 3.4 as follows:

$P(y_{i}|y_{1},...,y_{i-1},X)=g(y_{i-1},h_{i},c_{i})$ (3.4)

where $h_{i}$ is an hidden state at time $i$ and is calculated as follows:

$h_{i}=f(h_{i-1},y_{i-1},c_{i})$ (3.5)

where $c_{i}$ is a context vector built on a sequence of annotations
$(e_{1},...,e_{T_{x}})$; at each time point, $e_{i}$ contains the information
of the whole sequence of inputs with the main emphasis on the selective parts
around the $i-th$ words from the input sequence. $c_{i}$ as the weighted sum
is computed as follows:

$c_{i}=\sum_{j=1}^{T_{x}}\alpha_{ij}e_{j}$ (3.6)

where the weight $\alpha_{ij}$ of each $e_{j}$ is calculated as follows:

$\alpha_{ij}=\frac{exp(s_{ij})}{\sum_{k=1}^{T_{x}}exp(s_{ik})}$ (3.7)
$s_{ij}=a(h_{i-1},e_{j})$ (3.8)

where $a$ is the parameterised weight to jointly train all the other
components in a feedforward neural network. In the end, the attention
mechanism can assign different weights to the different parts of the inputs
according to their level of importance to the current word.

##  Chapter 4 Experimental Setup

In this chapter, we will discuss the experimental setup, including the
datasets used in our experiments, the evaluation metrics, and the baseline
methods, for a comparison with the sets of approaches proposed in this PhD
thesis.

###  4.1 Datasets

Here, we will first introduce the datasets that were used in general
recommender systems, followed by the datasets for sequential recommender
systems.

####  4.1.1 Amazon Instant Video Dataset

As the first proposed model is for a general recommender system, we have
decided to select an appropriate dataset from this domain. Therefore, in this
first approach, we have needed to detect the users’ personality types and
selected a dataset that contained textual information that would help with the
personality detection task. We have selected the Amazon dataset, which has
been widely used in RSs [377], [378]. The Amazon
111http://jmcauley.ucsd.edu/data/amazon/ dataset is a rich source of reviews
and provides a wide range of useful information (e.g. ratings and reviews),
which consists of 2000 users, 1500 items, 86690 reviews, 7219 number ratings,
3.6113 average number of rates per user, 0.2166 average number of ratings per
item, and the user rating density of 0.0024. Figure 4.1 shows a sample of this
dataset, where reviewerID is the id of the reviewer, e.g. A2SUAM1J3GNN3B; asin
is the id of a product, e.g. 0000013714; reviewerName is the name of the
reviewer; helpful denotes the helpfulness rating of the review, e.g. 2/3;
reviewText is the text of the review; overall is the given rating to the
product; summary is a summary of the review; unixReviewTime is the time of the
review (unix time); and reviewTime is the time of the raw review. We have
selected a subset of the Amazon dataset called Instantvideos, as it includes
an important source of knowledge that can be extracted for a different
purpose. In addition, because of the strong relations between a person’s
personality type and her/his choices of videos, we have selected the
Instantvideos dataset to test the proposed model on it, and have left the
other domains for future works. We have selected users who left more than
three reviews in this dataset in order to obtain a better analysis of their
generated content.

Figure 4.1: Sample review of Amazon dataset.

####  4.1.2 Tmall, Tafeng, and Gowalla Datasets

For sequential recommender systems, we have selected three real-world
datasets, namely Gowalla [379], Tafeng [380], and Tmall [381], to compare the
performance of the proposed model with that of the baseline approaches.
Gowalla 222https://snap.stanford.edu/data/loc-gowalla.html aggregates the
users’ check-in information from the location-based social networking website,
Gowalla. Tmall 333https://ijcai-15.org/index.php/repeat-buyers-prediction-
competition records the users’ transactions on the largest online shopping
website in China, where each session (transaction) consists of multiple items.
Tafeng 444http://www.bigdatalab.ac.cn/benchmark/bm/dd?data=Ta-Feng is a
grocery shopping dataset, which covers products ranging from food to office
supplies to furniture.

Figure 4.2: Sample review of Gowalla dataset.

Note that, similar to another work [8], in both the Tmall and the Gowalla
datasets, we only considered the data for the previous seven months and
removed the sessions with only one item and with items with less than 20
observations. Then, to better represent the users’ sequential behaviours (i.e.
short-term preference), transactions in one day were considered one session.
While similar to the work done by Hu et al. [11], in the Tafeng dataset, all
the users, who have consumed less than 10 items were removed from the
datasets. Thus, we only kept sessions with at least 10 items, which might
cause a longer average session. The reason behind the limitation of 10 items,
is that there are a fewer number of users and items than in both the Tmall and
the Gowalla datasets. The characteristics of these datasets obtained after the
pre-processing step are shown in Table 4.1.

Dataset | Tmall | Gowalla | Tafeng
---|---|---|---
Number of users | 20,716 | 15,254 | 12095
Number of items | 25,143 | 13,052 | 11024
Avg.session length | 2.81 | 2.99 | 3.01
Train session | 71,998 | 128,115 | 131,102
Test session | 3565 | 3611 | 3984
Table 4.1: Statistics of Tmall, Tafeng, and Gowalla datasets.

###  4.2 Evaluation Metrics

In this section, we will define the evaluation metrics used throughout this
thesis. As we have proposed novel models for both general and sequential
recommender systems, we had to select the appropriate evaluation metrics to
compare each of these models with the current studies. In Chapter 5, wherein
the main focus is on improving the accuracy of a general recommender, we have
decided to similarly use the accuracy metrics adopted by the existing
approaches for the general recommenders. In this chapter, we propose an
algorithm to calculate a rating score for the unobserved items for a
particular user, and thus, how accurately our model can predict this score
should be assessed. Therefore, we have used the mean absolute error (MAE) and
root mean squared error (RMSE) evaluation metrics, which will be introduced in
Section 4.2.1. As the main goal of Chapters 6 and 7 will be the performance
improvement of sequential recommender, we will evaluate the performance of the
proposed models in terms of accuracy and ranking metrics, just like the other
sequential recommender systems.

####  4.2.1 Accuracy Metrics

In general, in the domain of recommender systems, typically, there are two
broad ways for measuring the performance of a recommendation system: rating
prediction and ranking prediction. As we have already discussed in Chapter 3,
the main focus of each of the mentioned task was different, and hence, the
corresponding performance evaluation metrics had to be selected accordingly.
While the rating prediction-based approaches are only concerned about the
observed ratings, the unobserved items are taken into consideration by ranking
the prediction-based models [382].

##### Rating-Based Evaluation Metrics

The two widely adopted accuracy metrics for recommender systems are the mean
absolute error (MAE) and the root mean squared error (RMSE). These metrics are
mostly applied in ratings-based recommender systems, wherein the predicted
score is compared with the actual value in order to calculate the error
between them. The smaller values of MAE and RMSE denote a better
recommendation accuracy, as they imply that the predicted rating score for an
item is close to its real value.

  * •

MAE. Mean absolute error is a metric that computes the average of all the
absolute differences between the real and the predicted rating values [383].
The lower the MAE is, the better is the accuracy. MAE can be measured as
follows:

$MAE=\frac{1}{|n|}\sum_{j=1}^{n}|r_{ij}-r_{ij}^{{}^{\prime}}|$ (4.1)

where $n$ is the total number of users and $r_{ij}$ and $r_{ij}^{{}^{\prime}}$
are the real and the predicted values of the ratings, respectively.

  * •

RMSE. Root mean square error, which was proposed by Herlocker et al. [384],
calculates the square root of the result of the mean value of all the
differences squared between the true and the predicted ratings values as
follows:

$RMSE=\sqrt{\frac{1}{|n|}\sum_{j=1}^{n}(r_{ij}-r_{ij}^{^{\prime}})^{2}}$ (4.2)

where similar to those in the case of the MAE, $n$ is the total number of
users, and $r_{ij}$ and $r_{ij}^{{}^{\prime}}$ are the real and the predicted
values of the ratings, respectively.

##### Ranking-Based Evaluation Metrics

Recommender systems can be usually considered a special case of information
retrieval systems, which try to retrieve the related information from the
user’s historical data [385]. In this case, the recommendation performance
should be evaluated with respect to the order of the recommended items. The
top-n recommendation problem, which recommends a list of top $n$ items with
the highest popularity for a particular user, can be a good example of the
ranking-based approach. In this prediction schema, where the output is a
ranked list of items, we have needed evaluation metrics with the capability of
testing the relevancy of the recommended items in this list over the users’
interests. According to the observations, we have selected precision and
recall, which are two popular evaluation metrics for ranking-based RSs.
However, before we dive into more details, we need to explain the confusion
matrix, which is the basic concept for understanding precision and recall. In
general, the main idea behind a confusion matrix is to count the number of
correct and incorrect predictions. A confusion matrix is a $2\times 2$ table
which summarises the prediction results of a model. As is shown in Figure 4.3,
each column represents an actual class, while each row represents a predicted
class.

Figure 4.3: Overview of a confusion matrix.

The outcomes of the RS model belong to one of four classes: True Positive
(TP), False Positive (FP), True Negative (TN), and False Negative (FN) which
are defined below:

  * •

True positive (TP): when a model correctly predicts the positive class.

  * •

False positive (FP): when a model incorrectly predicts the positive class.

  * •

True negative (TN): when a model correctly predicts the negative class.

  * •

False negative (FN): when a model incorrectly predicts the negative class.

Precision. This parameter evaluates how well the proposed model can capture
the relevant items among all the predicted items. It assesses the ability of
the model to find all the relevant top-N items within a dataset as follows:

$Precision=\frac{TP}{TP+FP}$ (4.3)

According to Equation 4.3, precision is calculated as the ratio of the correct
positive predictions to the total predicted positives.

Recall. This metric quantifies the ability of a model to correctly retrieve
positive instances from all the observations in the actual class.

$Recall=\frac{TP}{TP+FN}$ (4.4)

According to Equation 4.4, recall describes the proportion of the user’s
favourite items that are not missing. Note that larger precision and recall
values indicate better performance.

Figure 4.4: ROC curve.

Area Under Curve (AUC). This is another evaluation metric that aims to
calculate the overall performance of a model. For calculating AUC, first, we
need to introduce ROC, which stands for ‘Receiver Operating Characteristics’
and was originally used as an analysis tool for signal detection to separate
the ‘signal’ from the ‘noise’. Recently, it has become more popular,
particularly in the field of information retrieval and evaluation of machine
learning algorithm [386]. As shown in Figure 4.4, the ‘ROC curve is a two-
dimensional coordinate graph, the X-axis is the false positive rate (FPR) and
the Y-axis is the true positive rate (TPR). The ROC curve shows the
correspondence between FPR and TPR’ [385].

Therefore, AUC as the area under the ROC curve can be a good parameter to
evaluate the performance of different recommender systems. AUC as a summary of
the ROC curve can measure the ability of a model to rank a randomly chosen
positive instance higher than a randomly chosen negative instance. Hence, it
can be a better measure than a classification error rate based upon a single
prior probability. As can be seen in Figure 4.4, the higher the TP rate and
the lower the FP rate for each threshold, the better is the accuracy, and
thus, models that have curves standing taller on the top-left-side are better.
In other words, it means that a perfect system would have an AUC of 1.

####  4.2.2 Novelty Metric

Besides for the mentioned evaluation metrics that we have explained above, the
novelty factor is another important parameter to test the recommendation’s
performance. Considering that recommending items similar to those that a user
has already purchased may not be satisfying and users may be more willing to
be recommended new items, similar to the work done by Wang et al. [84], we
have considered the novelty metric as another evaluation parameter to show the
capability of the proposed model to recommend novel items. The novelty metric
can measure the difference between contextual items in a shopping basket and a
set of recommended items, where a larger difference can represent the novel
items [331]. Novel items provide an opportunity for users to try unexpected
items, which may leverage the satisfaction rate as well.

Context Aware Novelty (CAN). This evaluation metric can mainly represent how
different the recommended items are compared to the previously purchased ones.
Therefore, the more distance between this range can demonstrate the higher
novelty metric and result in suggesting more different items to the users. As
it is shown in Equation 4.5, items which are purchased in context $c$ can be
used for recommendation $R$. The more the overlap between recommended list $R$
and purchased items in context $C$, the less the novelty. Hence, CAN can be
defined as follows:

$CAN=1-\frac{|R\cap C|}{|R|}$ (4.5)

MCAN@K. This is the mean of CAN (MCAN), which is somehow similar to CAN. MCAN
measures the mean of unseen items corresponding to context $C$ over all $N$
top-K recommended items. Similar to the work done by Hu et al. [381], we
compared the proposed model by using the MCAN evaluation metric, which can be
defined as follows:

$MCAN=\frac{1}{N}\sum CAN$ (4.6)

Noted that we have considered $k\in\\{5,100\\}$ in this thesis, as in reality,
people are usually interested in the first few pages of the recommendations.
Therefore, we have evaluated the performance of the proposed models in this
thesis under this condition as it may be more challenging to discover the
exact actual items which the users may prefer among a million available
options.

###  4.3 Baselines

We have compared the proposed approaches with the state-of-the-art recommender
systems for both general and sequential recommenders. Below, we list the
baselines used to compare the proposed models with in most of the following
chapters. First, we will introduce the baselines with respect to the general
recommender systems followed by several representative models for sequential
recommender systems.

####  4.3.1 Baselines for General Recommenders

In this section, we will introduce the state-of-the-art traditional RSs used
as the baselines for comparison.

##### Personality-Based RSs

As in Chapter 5, we propose a personality-based recommender system, present
the existing representative models in this regard, and then discuss the other
classic RSs.

  * Figure 4.5: Overall framework of Hu [1], which consists of two main parts, namely rating-based and personality-based components.
  * •

Hu. This is a personality-based RS in which the correlations between users’
personality types and their interests in music genres are explored [1]. The
framework of Hu is illustrated in Figure 4.5 and includes two core components,
namely the rating-based part on the left side of this figure and the
personality-based part on the right side of the figure. Rating-based modules
try to identify the most similar users in terms of their rating pattern, while
the main focus of the personality-based module is on discovering a
personality-based neighbourhood. Then, a final score is computed using
Equation 4.7. The authors provided users with personality quizzes to
explicitly detect their personality traits and then used Pearson correlation
coefficient to understand how similar these users were. In this model, a
user’s personalities with the ratings information is linearly combined under
the CF framework. In particular, the similarity between user $u$ and user $v$
can be measured by using the following formula:

$sim(u,v)=\alpha simr(u,v)+(1-\alpha)simp(u,v)$ (4.7)

where $simr(u,v)$ and $simp(u,v)$ represent the item-based and personality-
based similarity between user $u$ and user $v$, respectively. In this
equation, $\alpha$ is the weighting parameter which controls the contribution
of each of the two components in the final score and is set it during their
experiment.

Figure 4.6: Overall framework of TWIN [2] including data processor,
personality recogniser, profile creator, similarity estimator, and results
visualiser.

  * •

TWIN. ‘Tell me What I Need’ (TWIN) is an example of a recommender system that
estimates the users’ similarity in terms of their personality traits with the
Euclidian distance [2]. Similar to the work done by Mairesse et al. [12], in
this study, the user’s personality types were estimated implicitly on the
basis of their written texts. The researchers have crawled all the resources
that a person had already provided such as generating personal information,
giving rate, and answering any questions. Then, they have evaluated this
information regarding 24 important features related to the user’s personality
type, as discussed by Mairesse et al. [12]. Next, they have identified a set
of neighbours for a target user with the k-nearest neighbour approach (KNN).
Finally, Euclidian distance was applied to estimate the similarity between the
users’ profiles as follows:

$\sqrt{(a_{1}^{(1)}-a_{1}^{(2)})^{2}}+(a_{2}^{(1)}-a_{2}^{(2)})^{2}+...+(a_{n}^{(1)}-a_{n}^{(2)})^{2}$
(4.8)

where $n$ is the number of attributes and $a_{n}$ are the attribute values.
TWIN is applied in the online travelling domain, TripAdvisor
555https://www.tripadvisor.com/, to test the impact of incorporating a user’s
personality type in the recommender system and has shown promising results.

##### Traditional Collaborative Filtering-Based RSs

In Chapter 5, we use personality information as additional information to
alleviate the data sparsity problem and increase the accuracy of the
recommendation systems. Therefore, in order to test the performance of the
proposed model, we not only compared the proposed model with the personality-
based recommender systems but also compared the model with classic recommender
systems that incorporated side information. Below, we list those models as
follows:

Figure 4.7: Graphical model for the CTR framework [3].

  * •

CTR. The collaborative topic regression (CTR) model was proposed by Wang et
al. [3] to combine traditional collaborative filtering and probabilistic topic
modelling for recommending scientific articles to users of an online
community. The graphical structure of this model is presented in Figure 4.7,
where latent Dirichlet allocation (LDA) [387] is used for the topic modelling
purposes. In this figure, for each word $n$, there is a topic assignment
$z_{jn}$ $\sim$ $Mult$ $(\theta_{j})$, and for each word in article $w_{j}$,
$w_{jn}$ $\approx$ $Mult$ $(\beta_{z_{jn}})$.

Wang et al. [3] updated the matrix factorisation technique which is basically
used for purely CF models and then used the EM style algorithm (i.e.
expectation–maximisation (EM) algorithm as an iterative method to find (local)
maximum likelihood; see [388] for more detail) to learn the maximum a
posteriori (MAP) estimates. Next, the following updating rules are generated
for $u$ and $v$:

$u\leftarrow{(VCV^{T}+\lambda
I^{K})}^{-1}VCR\quad\mathrm{and}\quad{v\leftarrow{(UCU^{T}+\lambda
I^{K})}^{-1}(UCR+\lambda\theta)}$ (4.9)

where $U$ and $V$ are the user and the item matrices, respectively; $C$ is a
diagonal matrix, $R$ is a rating matrix, $I$ is an identity matrix, $\lambda$
is the regularisation parameter, and $\theta$ is the topic proportion.

  * •

SVD++. This is one of the representative approaches in recommender systems,
which combines the benefits of both the neighbourhood approach and the latent
factor models. SVD++ [389] also achieves a significant improvement by
exploiting both the explicit and the implicit feedback by the users. The final
proposed formula for this combination is presented below:

$r^{\land}_{ui}=\mu+b_{i}+q_{i}^{T}\left(p_{u}+|N(u)|^{\frac{-1}{2}}\sum_{j\in
N_{(u)}}y_{i}\right)+|R^{k}(i;u)|^{\frac{-1}{2}}\sum_{j\in
R^{k}(i;u)}(r_{ui}-b_{uj})w_{ij}+|N^{k}(i;u)|^{\frac{-1}{2}}\sum_{j\in
N^{k}(i;u)}c_{ij}$ (4.10)

where $p_{u}$ and $q_{i}$ are user $u$’s and item $i$’s factors vectors,
respectively; $y_{i}$ is the item $i$’ associated parameter; $r_{ui}$ is the
rating score for user $u$ for item $i$ and $b_{ui}$ is its baseline; and
$b_{i}$ is the item $i$ baseline. The weight from item $j$ to item $i$ is
denoted by $w_{ij}$, and $c_{ij}$ is the offset added to the baseline
estimation. $R(u)$ denotes all the explicit preferences for user $u$, while
$N(u)$ is its implicit ones. In order to avoid confusion, we will not delve
into the details of the more complicated mathematical concept here. However,
for those who are willing to understand more details of this model, we will
encourage them to deep-dive into this algorithm.

  * •

UserMean. This is a basic model in which the mean of all the ratings that a
user has given to items is computed.

$r_{ij}=\frac{1}{N}\sum_{i=1}^{n}r_{i}$ (4.11)

where $r_{ij}$ is a given rating to item $i$ by user $j$ and $n$ is the total
number of items.

  * •

ItemMean. This model is similar to ItemMean; however, this time, the mean of
all the ratings that an item has received by the users is calculated as
follows:

$r_{ij}=\frac{1}{K}\sum_{j=1}^{k}r_{j}$ (4.12)

where $k$ is the total number of users.

  * •

Random. This model randomly assigns the rating values.

  * •

Top. This model recommends the top popular items determined during the
training process.

####  4.3.2 Baselines for Sequential Recommenders

In this section, we will introduce the representative session-based
recommender systems used in this thesis as the comparison methods.

  * Figure 4.8: Left matrix represents the observed items. The right matrix stores positive feedback as 1, and the unobserved items as negative feedback, which is equal to 0 [4]. Figure 4.9: Left matrix records observed items by a user, while the right matrices are inferred by BPR which applies a pair-wise ranking [4].
  * •

BPR. This is a state-of-the-art method for item recommendation with a pair-
wise ranking loss through implicit feedback [4]. Since the implicit feedback
is different from the explicit one, typical machine learning models may find
it difficult to deal with it. In implicit feedback systems, there is no
difference between the real negative feedback (items that the user may not
prefer to purchase) and the missing values (items that the user may not be
aware of). Thus, it is difficult for a recommender system to directly learn
the users’ preferences from this matrix. As is clear from Figure 4.8, the
positive feedback is treated as $1$, and the negative feedback is considered
$0$. While the right matrices in Figure 4.9 are inferred by BPR, in which a
ranking order such as $i>_{u}j$ between items is calculated to find the users’
preferences correctly. On the right side of this figure, $(+)$ means that a
user prefers item $i$ over item $j$, while $(-)$ indicates that a user prefers
item $j$ over item $i$. In this study, a generic optimisation criterion BPR-
Opt for personalised ranking is presented to recommend a personalised ranked
list of items which the user may prefer to consume. Given $\theta$ as the
model parameter, the Bayesian formulation is to personalise the ranking for
all items $i\in I$ by maximising the following posterior probability:

$p(\theta|>_{u})\propto P(>_{U}U|\theta)P(\theta)$ (4.13)

where $>u$ is the desired but latent preference structure for user $u$.

  * •

FPMC. Factorising Personalised Markov Chain (FPMC), which was proposed by
Rendel et al. [74], integrates the Markov Chain (MC) as a commonly used method
in SRSs to model sequential behaviours and Matrix Factorisation (MF) for
modelling users’ long-term preferences. FPMC just utilises a linear
aggregation function to combine these two different types of users’
preferences.

$p(i\in B_{t}^{u}|B_{t-1}^{u})=\frac{1}{|B_{t-1}^{u}|}\sum_{l\in
B_{t-1}}^{u}p(i\in B_{t}^{u}|l\in B^{u}_{t-1})$ (4.14)

where $B_{t}^{u}$ is the purchase history of user $u$ at time $t$, which
consists of the total $i$ number of items; $l$ is the last item in the basket.

  * •

Fossil. Factorised Sequential Prediction with Item SImilarity ModeLs (or
Fossil in short) is a combination of similarity-based methods and Markov
chains for the sequential prediction task [5]. One of the benefits of Fossil
is its ability to deal with the cold-start problem. The basic form of Fossil
can be expressed as follows:

$p_{u}(j|i)\propto\sum_{j^{\prime}\in
I_{u}^{+}/\\{j\\}}<P_{j^{\prime}},Q_{j}>+(\eta+\eta_{u}).<M_{i},N_{j}>$ (4.15)

where $I_{u}^{+}$ is the set of items that user $u$ prefers, $\eta$ is the
weighting parameter shared by all the users, and each item $i$ is
parameterised with four vectors $M$ , $N$, $P$,and $Q$. Then, in order to
reduce the parameters, two matrices are forced to $P=M$ and $Q=N$. Thus, the
new formulation can be expressed as follows:

$p_{u}(j|i)\propto\beta_{j}+<\frac{1}{|I^{+}_{u}/{j}|^{\alpha}}\sum_{j^{\prime}\in
I^{+}_{u}/\\{j\\}}P_{j^{\prime}}+(\eta+\eta_{u}).P_{i},Q_{j}>$ (4.16)

where $\beta_{j}$ is the bias term for item $j$.

Figure 4.10: Difference between Fossil and the current models, in which Fossil
combines two different methods to provide a better suggestion [5]. Figure
4.11: Framework of HRM model: a two-layer hierarchical structure which builds
a hybrid representation of the user and item interactions to predict the next
purchased items [6].

  * •

HRM. This model introduces a hierarchical representation to learn both the
users’ general taste and their sequential behaviour [6]. Given a user $u$ and
two consecutive transactions $T_{t-1}^{u}$ and $T_{t}^{u}$, the probability of
purchasing the next item $i$ is defined by HRM, as follows:

$p(i\in
T^{u}_{t}|u,T^{u}_{t-1})=\frac{exp({\vec{v_{i}}}^{I}.\vec{v}_{u,t-1}^{\small
Hybrid})}{\sum_{j=1}^{|I|}({\vec{v_{j}}}^{I}.\vec{v}_{u,t-1}^{\small
Hybrid})}$ (4.17)

where $\vec{v}_{u,t-1}^{\small Hybrid}$ is the hybrid representation which is
defined as follows:

$\vec{v}_{u,t-1}^{\small
Hybrid}:=f_{2}(\vec{v}_{u}^{U},f_{1}(\vec{v}_{l}^{I}\in T^{u}_{t-1}))$ (4.18)

where $f_{1}(.)$ and $f_{2}(.)$ are the aggregation operations at different
layers of the HRM structure.

Figure 4.12: Example of point-level, union-level, and skip-level behaviours in
[7].

  * •

Caser. Convolutional Sequence Embedding Recommendation Model is a state-of-
the-art model, which uses CNN for sequence embedding [7]. As stated by Tang et
al. [7], most of the current Markov chain-based approaches only model point-
level sequential patterns in which each previous action (blue part in Figure
4.12) is considered individually, whereas a collection of actions (yellow part
in Figure 4.12) can have a significant effect on the target action. Those
approaches which only consider modelling point-level behaviour may not be able
to model the union-level and skip-level patterns shown in Figure 4.12. While
in a the union-level pattern, a set of joint several previous actions can have
an effect on the target action, while skip behaviours mean that previous
actions still have their impact on the target action even if a few previous
steps are skipped. Caser proposes to use CNN filters to capture sequential
patterns at the point-level, at the union-level, and of skip-level behaviour.
It pays equal attention to both long- and short-term users’ preferences;
considering $C^{u}=\\{L+1,L+2,...,|S^{u}|\\}$ to be the collection of the
previous actions of user $u$ at different time steps, the likelihood of all
the sequences can be defined as follows:

$p(S|\Theta)=\prod_{u}\prod_{t\in
C^{u}}\sigma(y_{S^{u}_{t}}^{(u,t)})\prod_{j\neq
S_{t}^{u}}(1-\sigma(y_{j}^{(u,t)}))$ (4.19)

where $\sigma=\frac{1}{1+e^{1-x}}$ is the sigmoid function, $\Theta$ is the
model parameters, and $y^{(u,t)}$ is the value of the output layer.

Figure 4.13: Architecture of SHAN in which a combination of long- and short-
term users’ preferences are learned by a sequential hierarchical structure
[8].

  * •

SHAN. Sequential Hierarchical Attention Network is a state-of-the-art method
in SRSs, which combines sequential behaviours with the users’ general taste
through the hierarchical attention-based structure [8]. In this study, an
attention mechanism was applied to both long- and short-term users’
preferences to retain their dynamic properties. The attention mechanism can
automatically assign different weights to the items to capture the dynamic
property. The hybrid user representation is calculated by SHAN as follows:

$u_{t}^{hybrid}=\beta_{0}u_{t-1}^{long}+\sum_{j\in S_{t}^{u}}\beta_{j}v_{j}$
(4.20)

where $\beta_{0}$ is the weight of long-term users’ preferences and
$\beta_{j}$ is the attention score of different items in a short-term item
set, which is computed as follows:

$\beta_{j}=\frac{exp(u^{T}h_{2j})}{\sum_{p\in
S_{t}^{u}\cup\\{0\\}}exp(u^{T}h_{2p})}$ (4.21)

where $h_{2p}$ is the high-level representation of item $j$ in the short-term
item set for user $u$, and as is clear from Figure 4.13, $S_{t}$ and $L_{t-1}$
are the short-term and long-term items set, respectively.

Figure 4.14: Very general design of the GRU4Rec network [9].

  * •

GRU4Rec. This is a state-of-the-art sequential recommender, which applies a
modern recurrent neural network (GRU) to model the whole session [9].
Recurrent Neural Networks (RNNs) have demonstrated their success in working
with variable-length sequence data. However, an improved version of RNNs such
as a Gated Recurrent Unit (GRU) [390] shows the strength of the vanishing
gradient problem and memorising the very long-distance previous states by
using the update and reset gates, which are defined as follows:

$z_{t}=\sigma(W_{z}x_{t}+U_{z}h_{t-1})$ (4.22)

$r_{t}=\sigma(W_{r}x_{t}+U_{r}h_{t-1})$ (4.23)

where Equations 4.22 and 4.23 are used for computing the update gate and the
reset gate. $U$ projects the input into a hidden space; $W_{z}$, and $W_{r}$
are the weighting matrices for the update gate and the reset gate,
respectively; and $x_{t}$ is the input at time $t$.

The general form of the GRU4Rec architecture is shown in Figure 4.14, where
the actual state of the sessions is projected into the network, and then, a
set of interested items in a next session is predicted. There are varying
numbers of GRU layers between the input layer and the output layer. Despite
the normal form of RNNs which uses a fixed vector for input, here, a
normalised weighted sum of items’ representations is fed into the neural
network which can reinforce the memory effect to capture very local ordering
constraints. Finally, in this design, additional feed-forward layers are added
between the last layer and the output layer.

Figure 4.15: Encoder-decoder architecture of NARM model, where the user’s main
purpose in the current session is captured by the local encoder, and the
global encoder is used to model the user’s sequential behaviour; next, the
combination of the results of both of these components is used to compute the
recommendation score for each item [10].

  * •

NARM. Neural Attentive Recommendation Machine is a neural encoder-decoder
sequential recommender, which combines a recurrent neural network with an
attention network [10]. The authors stated that a user’s main purpose in the
current session is ignored in most of the current RSs. The global encoder and
the local encoder are used in the NARM structure to capture the user’s
sequential behaviour and the main purpose of the current session,
respectively. As is shown in Figure 4.15, $c_{t}$ is a unified representation
of both the user’s sequential behaviour and the main purpose in the current
session, which is calculated as follows:

$c_{t}=[h_{t}^{g};\sum_{j=1}^{t}\alpha_{tj}h_{t}^{l}]$ (4.24)

while $h_{t}^{g}$ is the last hidden state of the global encoder and
$h_{t}^{l}$ is the hidden state of the local encoder, aiming to compute
attention weight $\alpha$, where $\alpha_{tj}$ calculates the alignment
between the final hidden state $h_{t}$ and the representation of the
previously interacted item $h_{j}$.

Figure 4.16: Graphical structure of MEANS [11].

  * •

MEANS. Memory-Augmented Attention Network for Sequential Recommendation is a
recommender system in which a mixture of long-term and short-term preferences
is learnt for making recommendations [11]. The authors believed that the local
patterns within the current session are missed by most of the current RSs, as
they may assume each item to be a separate entity in a session. Therefore,
MEANS was proposed to capture the high-level information in the sessions. This
structure consists of three main components: $(1)$ a memory module to store
the most current sessions, $(2)$ an attention mechanism to learn long-term
users’ preferences, and $(3)$ a prediction layer in which a recommendation is
made by learning a mixture of long- and short-term preferences. MEANS first
operates a max-pooling technique on the most recent sessions to extract the
more salient features from item embedding, and then, the results are stored in
an external memory.

Given $S_{u}^{(t)}=\\{v_{1}^{(t)},v_{2}^{(t)},...,v_{n}^{(t)}\\}$ as a session
at time $t$ for user $u$ which stores the interaction of user $u$ with
item$v$, $s_{u}^{(t)}$ as the current session representation can be computed
as follows:

$s_{u}^{(t)}=Max-Pooling(v_{1}^{(t)},v_{2}^{(t)},...,v_{n}^{(t)})$ (4.25)

Next, the long-term user representation $m_{u}^{(t)}$ can be acquired as a
weighted sum of the most recent $k$ session as follows:

$m_{u}^{(t)}=\sum_{i=1}^{k}\alpha_{i}s_{u}^{(t-i)}$ (4.26)

where $\alpha_{i}$ is the attention score which can reflect the level of
contribution of item $i$ in the long-term users’ preferences. Finally, the
user’s representation $h_{u}^{(t)}$, which is a combination of both the long-
and the short-term users’ preferences can be obtained as follows:

$h_{u}^{(t)}=\alpha m_{u}^{(t)}+\beta s_{u}^{(t)}$ (4.27)

where $\alpha$ and $\beta$ are the weighting parameters to control the weights
of the long-term and the short-term users’ preferences, respectively.

##  Chapter 5 Enabling the Analysis of Personality Aspects in Recommender
Systems

###  5.1 Introduction

In this chapter, we will focus on one of the main challenges at the
interaction level in general recommender systems: the data sparsity of user-
item interaction, when there is a lack of availability of common feedbacks
among them, as shown in the hierarchical structure in Figure 1.3 in Chapter 1.
In this chapter, we present a personality-based recommender system to deal
with the problem of sparse user-item interactions. We will introduce a problem
called DSW-n-FCI, which is a subset of the data sparsity problem. We propose a
novel algorithm to identify the users’ personality types implicitly with no
burden on the users and incorporate this important feature along with the
users’ personal interests and their level of knowledge. This chapter is also
related to the first challenge that we have addressed, as shown in the thesis
structure in Figure 1.4 in the first chapter. The results of the proposed
approach in this chapter are accepted and published in several papers by
$13^{th}$ ACM International WSDM Conference 2020 [391] (Core Rank A*
111https://www.core.edu.au/conference-portal), the Pacific Asia Conference on
Information Systems (PACIS) 2019 [53] (Core Rank A), and Web Information
Systems Engineering Society (WISE) Workshop 2018 [55] (Core Rank A).

####  5.1.1 The Target Problem and The Motivation

In the last two decades, we have witnessed the emerging growth of the
generated information by people’s daily activities (e.g. browsing, clicking,
listening to music, and purchasing items). Because of this information
explosion, people are surrounded by a large number of options and services.
Recommender systems have appeared as filtering tools which can help customers
with their decision-making process, find items of their interest, and
alleviate the information overload problem. As discussed in Chapter 3, Section
3.3.1 in particular, the matrix factorisation technique on Collaborative
Filtering (CF) is one of the widely adopted solutions for general
recommenders. Collaborative filtering is a method for making automatic
predictions about the interests of a user by collecting preferences from many
users. Although pure collaborative filtering-based recommender systems have
been studied well in the literature, the data sparsity problem still remains
as one of the major difficulties of these models. CF-based techniques try to
predict the interests of a particular user in items by discovering the
previously rated similar items. In this situation, they may fail when there is
no captured previous feedback on common items. There are several attempts to
alleviate the data sparsity problem by incorporating additional side
information such as the users’ generated contents [3], [392], [393] or social
network information [394]. The semantic correlation between users and items
can be captured to help users with their options even in the case of the data
sparsity problem [395]. Moreover, rule-based techniques can generate a rule by
exploiting the users’ reviews from different aspects [396]. While the
mentioned approaches have been proposed to overcome the data sparsity problem,
they may fail in the case of the DSW-n-FCI problem, as they considerably rely
on discovering a set of users who previously rated similar items. Moreover,
they resort to external information to deal with the data sparsity problem.
Therefore, most of the existing models such as CTR [3] and SVD++ [389] may not
be able to provide any suggestions for users in the DSW-n-FCI situation, as
they cannot find any connections among users.

In contrast to such approaches, personality-based RSs do not need to look up
common items of interest to find similar users, and thus, they may provide
better results even with sparse data. Psychologically speaking, personality is
a consistent behaviour pattern that a person tends to show irrespective of
her/his situation. Personality also has a strong correlation with the
individuals’ interests, and people with similar personality types tend to
share similar interests. Because of the strong correlation between personality
traits and users’ preferences, recommender systems have inspired to
incorporate personality characteristics into their model to not only help
users with a diverse set of items [111] but also provide a better group
recommendation [112] ,[27] and improve the accuracy of recommendations for
music, movies, e-learning, and web searches [216], [113].

The Five Factor Model (FFM) is one of the widely adopted personality models in
both the psychology and the computer science domains. FFM consists of five
main personality traits, namely as Openness to Experience, Conscientiousness,
Extraversion, Agreeableness, and Neuroticism, and is briefly known as OCEAN.
As stated by psychologists, people with similar personality types, more or
less, tend to consume similar items (e.g. music, movies, services, and
products) [207]. For instance, people with the Openness personality type
mostly prefer to watch the comedy and fantasy genres of movies, while romantic
movies are more likely to be watched by people with the Neurotic personality
type [397]. We also adopted one of the leading text analysis tools with a
lexical root, known as Linguistic Inquiry and Word Count (LIWC). LIWC can
categorise the given textual content in more than 88 psychological categories
related to the FFM personality traits [398], [399]. However, the main drawback
of most of the existing studies is that they rely considerably on explicit
personality detection approaches, such as filling out a questionnaire. In an
explicit personality detection task, users will be asked to answer some
questions and conduct a survey. This is a time-consuming task, and users may
be unwilling to participate because of privacy concerns [57], [216], [56],
[400]. Furthermore, people usually do not disclose much about themselves and
probably will answer questions incorrectly, which can have a negative effect
on the accuracy of a recommender system. Despite the above-mentioned benefits
of incorporating personality types in recommender systems, only a few
personality-based recommender systems have been reported in the literature.

Besides the users’ personality types, their level of knowledge in a particular
domain can be another important factor that has a considerable impact on the
recommendations’ acceptance rate. For example, assume that Mark is personally
interested in the cooking and music domains. Mark is a music expert with a low
level of knowledge of cooking. On the basis of this observation, he is less
likely to be influenced by the other users’ suggestions in the music domain,
while he is more willing to seek other users’ recommendations from the cooking
domain as he has no expertise in this domain. Therefore, most of the
aforementioned personality-aware methods not only detect the users’
personality types explicitly by having them fill out a questionnaire, which is
an unfeasible task in many real-world applications, but also ignore the
differences between the users’ level of knowledge in different domains. The
users’ personal interests is another factor, which is mostly ignored by the
current personality-based recommender systems. Let us make it more clear by
giving an example, imagine Sarah and Joe are two users who give 2 and 5 stars
(on a Likert scale of 0-5) to a particular item, respectively. This indicates
that both the users are interested in this item, but perhaps, Joe likes it
considerably more than Sarah as he gives a higher rating to this item.
Therefore, taking the users’ personal interests into consideration can help to
make personalised recommendations, improving the users’ satisfaction rate and
boost the business benefit.

In order to tackle the above-mentioned problems, in contrast to personality-
based recommender systems that simply use personality as a similarity measure,
we directly considered this important factor in our mathematical model and
propose a novel matrix factorisation model. The assumption of our method is
that the users’ decision-making process consists of three major factors:
users’ personality types, their level of knowledge in a particular domain, and
their personal interests. We built a user-item interaction matrix with the
real values of ratings in order to preserve the users’ actual interests in
items and show their level of personal interest.

####  5.1.2 Proposed Design and Main Contributions

The above observation shows the importance of incorporating personality in
RSs, general ones in particular. It is a factor in the users’ decision-making
process, as it is relatively stable over time and is relatively consistent
over situations. Here, we propose a novel model, APAR, to investigate the
effect of a user’s personality type in recommender systems. In this chapter,
we will identify the users’ personality types implicitly with no burden on
users and incorporate it along with the users’ personal interests and their
level of knowledge. A two-step framework of APAR is illustrated in Figure 5.1.
APAR analyses the pattern of users’ activities and behaviours in order to find
their personality types. The main contributions of the proposed model can be
summarised as follows:

Figure 5.1: Framework of APAR, which consists of two major components: users’
personality detection and their level of knowledge extraction. In the
personality detection module, ‘Psy. Cat’ refers to psychology categories which
we extract from the users’ provided contents.

  * •

We develop an algorithm to construct a user-item interaction matrix with the
actual ratings scores to show the level of users’ personal interest in the
items.

  * •

We propose a novel recommender system called APAR, integrating three main
factors which may affect a user’s decision-making process such as the users’
personal interests, their personality types, and their level of knowledge.

  * •

We detect the users’ personality types implicitly with no need for the users’
efforts by analysing their online-generated contents.

The rest of this chapter is organised as follows: we present the overview and
the framework in Section 5.2. The experiment and the evaluation are presented
in Section 5.3, before concluding the chapter in Section 5.4.

###  5.2 Overview and Framework

In this section, we present the proposed personality-based recommender system.
We first constructed a user-item interaction matrix with the real values of
ratings in order to preserve the degree of the users’ interests and their
personal interests. Figure 5.1 depicts the proposed novel framework called
APAR, which consists of two major steps of the users’ personality detection,
and their level of knowledge extraction. The upper part of this structure is
reserved for personality detection in which the users’ textual contents are
analysed, and ‘Psy. Cat.’ in the middle indicates the extracted psychology
categories from LIWC. At this stage, the generated users’ raw data are
collected and contextualised in order to discover the users’ main
characteristics, such as their personality types. For the next phase, as shown
in the bottom part of Figure 5.1, all the activities of a user and her/his
neighbours in a particular domain are monitored to ascertain her/his level of
knowledge by finding how the other users are influenced by this user’s
opinions/comments. Then, we propose a novel matrix factorisation model that
incorporates the users’ personality types, their level of knowledge, and their
personal interests. In the following sections, we provide more detail about
each of the main phases of APAR.

####  5.2.1 Problem Statement

Suppose that there are $|v|$ total number of items
$V=\\{v_{1},v_{2},\dotsm,v_{v}\\}$ and $|u|$ number of users
$U=\\{u_{1},u_{2},\dotsm,u_{u}\\}$. Let $R\in R^{|u|\times|v|}$represents the
rating matrix, and $R_{ij}$ indicates the given rating to item i by user j,
and if this item has not been seen by the user, there is no available rating
and we show this unrated item with unr. Let us consider $L\in
R^{|v|\times|v|}$ as the personality matrix, where
$L_{jj^{\prime}}=\\{0,1\\}$; there is a direct connection between $u_{j}$ and
$u_{j}^{\prime}$ if they have the same personality type. In other words,
$L_{jj^{\prime}}=0$ denotes that $u_{j}$ and $u_{j^{\prime}}$ do not have
similar personality types.
There are two different ways of constructing the user-item matrix from the
users’ given ratings. One solution, which is followed by most of the existing
approaches, is to treat all the rated items as the same and equal to 1, while
the rest of the unrated items are 0. Thus, there is no difference among all
the rated items, while the rating value can indicate the level of the users’
preferences for an item [401], [402]. However, in order to capture the users’
personal interests completely and express the level of users’ preferences, we
constructed this matrix according to Equation 5.1 [403].

$W_{ij}=\begin{cases}0,&\text{if $R_{ij}=unr$}\\\
R_{ij},&\text{otherwise}\end{cases}$ (5.1)

where $W\in R^{|u|\times|v|}$, $W_{ij}>0$ can represent the actual interest of
user $i$ in item $j$, and if $W_{ij}=0$, there is no preference for this item
by this user.

####  5.2.2 Personality Acquisition

In contrast to the traditional CF-based approaches, the users’ personality
types, which can explain the wide variety of human behaviour, have inspired
some recommender systems. Personality is a domain-independent concept along
with individuals in a wide range of domains, such as music [12], movies, and
books [215]. Moreover, personality can be acquired by analysing people’s
nonverbal behaviour such as their shared posts, their online activities, and
their written review texts [209], [210]. While there are too many theories
that try to define the concept of human personality in a wide range of
domains, including the cognitive, biological, learning, and humanistic
perspective [404], the trait theory is one of the most widely adopted
personality theories [405]. According to this theory, human personality traits
are habitual patterns of behaviours, thoughts, and emotions, and the Big-five
personality trait model is one of the popular methods in trait theories. The
Big-five model is also known as the five-factor model (FFM) and is based on
the common language description of personality. Therefore, FFM can be a good
choice to work within various tasks including ‘computing technologies, natural
language processing, machine learning, and semantic technologies’ [406].

Personality is a context-independent factor, which normally does not change
over time and can be extracted either explicitly by using a questionnaire or
implicitly by applying regression [57]. There are several questionnaires based
on the FFM model, NEO-Personality-Inventory Revised (NEOPI-R, 240 items) for
instance, in which the participants’ personality types are revealed after they
answer several questions [107]. While the explicit personality detection task
may reveal a better understanding of a user’s personality type, it is a
tedious and time-consuming task and the users may be unwilling to perform it.
Instead, implicit personality detection models exploit the users’ digital
footprints and actions to analyse their behaviours with no extra burden on the
users [214]. Unlike most of the current methods which detect the users’
personality types by asking them to fill out a questionnaire, in the present
study, the users’ personality types were measured implicitly with no need for
their efforts. To do so, we collected all the written users’ reviews to
categorise them with the LIWC tool. A sample of the categories of LIWC and the
corresponding words is given in Table 5.1.

  * •

Openness to Experience: from cautious/consistent to curious/inventive. People
with the openness to experience personality tend to have intellectual
curiosity and creativity and are open to having a variety of experiences. A
higher score of openness means a higher degree of imagination, artistic
interest, emotionality, adventurousness, intellect, and liberalism.

  * •

Conscientiousness: from careless/easy-going to organised/efficient.
Conscientiousness people are self-disciplined and focus on their personal
achievements. These types of people are organised, and a high score of
conscientiousness shows strong degrees of self-efficacy, orderliness,
dutifulness, achievement-striving, and cautiousness.

  * •

Extraversion: from solitary/reserved to outgoing/energetic. This type of
person is more social and talkative and aims to find positive emotions, such
as happiness, satisfaction, and excitation. A high score of extraversion
denotes a higher tendency for friendliness, gregariousness, activity level,
excitement-seeking, and cheerfulness.

  * •

Agreeableness: from cold/unkind to friendly/compassionate. The main
characteristics of people with this personality type are kindness, concern,
truthfulness, and cooperativeness toward others. A high score of agreeableness
reflects strong degrees of morality, altruism, sympathy, modesty, trust,
cooperation, and conciliation.

  * •

Neuroticism: from secure/calm to unconfident/nervous. Anger, anxiety,
depression, and vulnerability are the key features of this type of people, who
lack emotional stability and impulse control. Individuals with a higher score
of neuroticism demonstrate a higher level of hostility, social anxiety,
depression, immoderation, vulnerability, and impulse.

LIWC category | Words
---|---
Anger words | hate, kill, pissed
Metaphysical issues | God, heaven, coffin
Friends | buddy, friend, neighbour
Family members | mom, brother, cousin
Past tense verbs | walked, were, had
References to friends | pal, buddy, coworker
Positive emotions | love, nice, sweet
Negative emotions | hurt, ugly, nasty
Sadness | crying, grief, sad
Prepositions | to, with, above
Family | daughter, husband
Humans | adult, baby, boy
Physical state/function | ache, breast, sleep
Cognitive process | cause, know, ought
Tentative | maybe, perhaps, guess
Insight | think, consider
Social processes | talk, us, friend
Achievement | hero, win, earn
Inclusive words | with, and, include
Motion | arrive, car, go
Table 5.1: Examples of LIWC categories and corresponding words in each
category.

In order to determine the users’ personality types, we first collected all the
users’ textual content such as reviews/tweets/posts, and then analysed them
using the Linguistic Inquiry and Word Count (LIWC) tool. We used LIWC to
understand how many words of the users’ textual content are related to each of
the 88 categories of LIWC (such as positive emotions, cognitive process, and
social processes). From Table 5.2, we can see how each of the five FFM
personality traits is related to the categories of LIWC. For instance,
according to this table, people of the openness to experience personality type
are more likely to use the punctuation category (e.g. periods, commas, colons,
and semicolons) and affect words (e.g. anger and sad).

Inspired by Roschina et al. [2], we used a linear regression model to measure
a user’s personality traits as follows:

Open. Consc. Extra. Agree. Neuro. Punctuation Affect Words Total pronouns
Exclamation marks Affect Words Affect Words Death Exclamation marks Dictionary
words Anger Apostrophes Future Article Feel Anxiety Achievement Home Friends
Home Article Anger Prepositions Periods Singular Pronoun Feel Home Anger
Pronoun Anger Leisure Article Body Question marks Negative emotion Music
Positive Feeling Hear Positive Emotion Positive emotion Number Assent
Apostrophes Punctuation Body Apostrophes Causation Certainty Apostrophes
Family Exclamation marks Death Hear Parentheses Motion Family Family Job Body
Negations Friends Feel Music Certainty Parentheses Singular Pronoun Friends
Negations Family Pronoun Negations Singular Pronoun Negative emotion Fillers
Future Negative emotion Job Prepositions Other punctuation Periods Total
pronouns Motion Question marks Singular Pronoun Achievement Prepositions Music
Nonfluencies Music Anxiety Present focus

Table 5.2: Relationship between the Big Five personality traits and different
LIWC categories [12] (in no particular order), based on the analysis from
Pennebaker and King [13]. The Linguistic Inquiry and Word Count (LIWC)
categorises words into more than 88 categories. Here, the categories of LIWC
related to the Big Five personality traits, namely ‘Open.’, ‘Consc.’,
‘Extra.’, ‘Agree.’, and ‘Neuro.’, represent Openness to experience,
Conscientiousness, Extraversion, Agreeableness, and Neuroticism, respectively.

$E=w_{1}X_{1}+w_{2}X_{2}+w_{3}X_{3}+\dotsm+w_{i}X_{i}$ (5.2)

where $X_{i}$ and $w_{i}$ denote each of the LIWC’s categories and its
corresponding category weight, respectively, $i\in\\{1,2,...,n\\}$ and $n=88$,
which is the total number of LIWC categories. The final score $E$ can show the
level of each of the five personality traits, if we only place their
correlated categories form LIWC and their corresponding weights, which can be
extracted by using the method proposed by Mairesse et al. [12].

####  5.2.3  Acquiring Users’ Level of Knowledge

The level of an individual’s knowledge is one of the main criteria to
determine the acceptance rate of her/his recommendations, which we termed as
the users’ level of knowledge. In the real world, individuals may be an expert
in one or two domains and have a different level of knowledge in various
domains. Therefore, it is important to take a user’s level of knowledge into
consideration, in order to provide a better recommendation.

We denoted a user’s level of knowledge with $u_{i}$ in domain $d$, as
$kl_{i}^{d}$, which could be computed as follows:

$kl_{i}^{d}=\frac{1}{n_{i}^{d}}\sum_{p=1}^{n_{i}^{d}}h_{p}^{i,d}$ (5.3)

where $n_{i}^{d}$ is the total number of reviews left by user $u_{i}$ in
domain $d$, and $h_{p}^{i,d}$ denotes the number of ratings that a user
$u_{i}$ has received by writing a review $p$ from the other users.

####  5.2.4 Our Framework

We computed user $u_{i}$’s interest in item $j$ in domain $d$ by using an
inner product between the latent feature vector of item $j$, as $q_{j}^{(d)}$
and the latent feature vector of user $i$, as $p_{i}^{(d)}$. Matrix $L$
contains the personality information, and $\varphi_{i}^{+(d)}$ is the set of
users who have the same personality type as that of user $i$, where $l_{ik}=1$
means that user $u_{i}$ and user $u_{k}$ have the same personality type. For
the sake of simplicity, we denote $\gamma_{i}^{d}$ $=\beta+kl_{i}^{d}$, where
$\beta$ is the controlling parameter that controls the weight of users’
preferences. Finally, the rating score for the unobserved items can be
calculated as follows:

$R_{ij}^{(d)}=\gamma_{i}^{d}p_{i}^{(d)^{T}}q_{j}^{(d)}+(1-{\gamma_{i}^{d}})\sum_{k\in\varphi_{i}^{+(d)}}L_{ik}p_{k}^{(d)^{T}}q_{j}^{(d)}$
(5.4)

where $R_{ij}^{(d)}$ predicts the rating value for the unobserved items. It is
a combination of three critical factors of the users’ decision-making process,
namely users’ personality types, their level of knowledge, and their personal
interests.

$\displaystyle\
min{\frac{1}{2}}\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}I_{ij}^{(d)}\Bigg{(}{R_{ij}^{d}}-\bigg{(}\gamma_{i}^{d}p_{i}^{(d)^{T}}q_{j}^{(d)}+\Big{(}(1-\gamma_{i}^{d})\sum_{k\in\varphi_{i}^{+(d)}}L_{ik}p_{k}^{(d)^{T}}q_{j}^{(d)}\Big{)}\bigg{)}\Bigg{)}^{2}+$
(5.5)
$\displaystyle\alpha_{1}\|P^{(d)}\|_{F}^{2}+\alpha_{2}\|Q^{(d)}\|_{F}^{2}$

where $I_{ij}^{(d)}$ = 1, if user $i$ has rated item $j$; otherwise,
$I_{ij}^{(d)}$ = 0. In order to prevent overfitting, we introduced
$\eta(j,j^{\prime})$ as the personality coefficient between $u_{j}$ and
$u_{j^{\prime}}$ with some features: $(1)$ $\eta(j,j^{\prime})$
$\in\\{0,1\\}$, $(2)$ $\eta(j,j^{\prime})=\eta(j,j^{\prime})$, and $(3)$ if
$\eta(j,j^{\prime})=1$, indicating that $u_{j}$ and $u_{j^{\prime}}$ are more
likely to have some common interests. Then, as in [182], we performed the
personality regularisation as follows:

$min\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\eta(j,j^{\prime})\|P(i,:)-Q(j,:)\|_{2}^{2}$
(5.6)

where $P$ and $Q$ are the users and items latent matrices, respectively. After
some derivations for a specific user $u_{i}$, we obtain the following
regularisation:

$\begin{split}&\frac{1}{2}\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\eta(j,j^{\prime})\|P(i,:)-Q(j,:)\|_{2}^{2}=\frac{1}{2}\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\sum_{k=1}^{d}\eta(j,j^{\prime})\Big{(}P(i,:)-Q(j,:)\Big{)}^{2}\\\
&=\frac{1}{2}\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\sum_{k=1}^{d}\eta(j,j^{\prime})P^{2}(i,k)+\frac{1}{2}\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\sum_{k=1}^{d}\eta(j,j^{\prime})Q^{2}(j,k)\\\
&-\sum_{i=1}^{|v|}\sum_{j=1}^{|u|}\sum_{k=1}^{d}\eta(j,j^{\prime})P(i,k)-Q(j,k)=\sum_{k=1}^{d}P^{T}(:,k)(D-Z)Q(:,k)=Tr(P^{T}YQ)\end{split}$
(5.7)

where $Tr$ is short for showing a trace of a matrix in linear algebra. Next,
we used the alternating least squares algorithm and updating rule presented by
Krompaas et al. [407] to update $P$ and $Q$ as follows:

$\Theta_{i}=\Theta_{i}\Bigg{(}{\frac{\frac{\partial
C(\Theta)^{-}}{\partial\Theta_{i}}}{\frac{\partial
C(\Theta)^{+}}{\partial\Theta_{i}}}}\Bigg{)}^{a}$ (5.8)

where $\Theta$ is a non-negative variable and $C(\Theta)$ is the negative part
of the derivation. We took the partial derivative of Equation 5.8 with respect
to $P$ and $Q$ and make it equal to zero. Next, on the basis of the Karush
Kuhn Tucker complementary condition [408], [409] and the model presented by
Tang et al. [410], we have the updating rules as follows:

$P(i,j)\leftarrow P(i,j)\sqrt{\frac{A(i,j)}{B(i,j)}},\quad\quad
Q(i,j)\leftarrow Q(i,j)\sqrt{\frac{C(i,j)}{D(i,j)}}$ (5.9)

where $A,B,C,$ and $D$ can be expressed as follows:

$A=q^{{(d)}^{T}}R^{(d)}\gamma^{(d)}+(1-\gamma_{i}^{(d)})L^{T}R^{{(d)}^{T}}q^{{(d)}^{T}}+\gamma^{(d)}R^{(d)}q^{{(d)}^{T}}$
(5.10)

$\displaystyle\begin{split}&\
B=\gamma^{(d)}q^{(d)}p^{(d)}q^{{(d)}^{T}}+q^{{(d)}^{T}}\gamma^{(d)}p^{(d)}q^{(d)}+\gamma^{(d)}p^{(d)}L^{T}q^{{(d)}^{T}}+\\\
&(1-\gamma_{i}^{(d)})L^{T}q^{{(d)}^{T}}p^{{(d)}^{T}}+(1+\gamma_{i}^{(d)})L^{T}R^{(d)}q^{{(d)}^{T}}+(1-\gamma_{i}^{(d)})L^{T}q^{(d)}p^{(d)}q^{{(d)}^{T}}+\\\
&(1-\gamma_{i}^{(d)})q^{{(d)}^{T}}Lp^{(d)}q^{(d)}+(1-\gamma_{i}^{(d)})L^{T}p^{{(d)}^{T}}q^{{(d)}^{T}}+(1-\gamma_{i}^{(d)})L^{T}q^{{(d)}^{T}}p^{{(d)}^{T}}\\\
&+YP+Y^{T}p+\alpha_{1}2p\end{split}$ (5.11)

$C=R^{(d)}\gamma^{(d)}p^{{(d)}^{T}}+(1-\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}R^{{(d)}^{T}}+\gamma^{(d)}p^{{(d)}^{T}}R^{(d)}$
(5.12)

$\displaystyle\begin{split}&\
D=\gamma^{(d)}p^{{(d)}^{T}}q^{(d)}p^{(d)}+\gamma^{(d)}p^{(d)}q^{(d)}p^{{(d)}^{T}}+(1-\gamma_{i}^{(d)})p^{{(d)}^{T}}q^{{(d)}^{T}}p^{{(d)}^{T}}L^{T}+\\\
&1-\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}q^{{(d)}^{T}}+(1+\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}R^{(d)}+(1-\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}q^{(d)}p^{(d)}+\\\
&(1-\gamma_{i}^{(d)})Lp^{(d)}q^{(d)}p^{{(d)}^{T}}+(1-\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}q^{{(d)}^{T}}p^{{(d)}^{T}}L^{T}+\\\
&(1-\gamma_{i}^{(d)})p^{{(d)}^{T}}L^{T}q^{{(d)}^{T}}p^{{(d)}^{T}}L^{T}+\alpha_{2}2q\end{split}$
(5.13)

The details of the proposed model are presented in Algorithm 1.

1:Input: L, d, $\gamma$, $\alpha_{1}$ and $\alpha_{2}$

2:Randomly initialising $P,Q$

3:While Not convergent

4: Set A as Equation 5.10 and Set B as Equation 5.11

5: for j = 1 to —u— do

6: for i = 1 to —v— do

7: $P(i,j)\leftarrow P(i,j)\sqrt{\frac{A(i,j)}{B(i,j)}}$

8: end for

9: end for

10: Set C as Equation 5.12 and Set D as Equation 5.13

11: for j = 1 to d do

12: fori= 1 to d do

13: $Q(i,j)\leftarrow Q(i,j)\sqrt{\frac{C(i,j)}{D(i,j)}}$

14: end for

15: end for

16: end for

17:end While

18:return $P,Q$

Algorithm 1 Framework of APAR with Personality Regularisation

###  5.3 Experimental Evaluation of APAR and Analysis

In order to evaluate the proposed model and compare the performance of this
model with that of the state-of-the-art methods, we used the dataset (Amazon
Instant Video), evaluation metrics (MAE and RMSE), and baseline methods
introduced in Chapter 4.

####  5.3.1 Experimental Setup

We used the five-fold cross-validation method and considered the average
performance of all the folds as the final performance value. Then,
experimentally set the controlling parameters of the proposed model as
follows: $\gamma=0.5$, $\alpha_{1}=0.1$, $\alpha_{2}=0.1$, and $d=100$.

####  5.3.2 Performance Comparison and Analysis

To evaluate the performance of the proposed approach, we compared it with the
following three categories: (i) purely rating-based recommender systems such
as SVD$++$ [389], UserMean and ItemMean [411], and Random [121] [412] [413]
[414]; (ii) recommender systems that incorporate side information, such as CTR
[3]; and (iii) personality-based recommender systems such as TWIN [2] and Hu
[1]. We discussed the compared methods in detail in Chapter 4.

As is clear from Table 5.3, we used different training dataset sizes (60%,
70%, 80%, and 90%). From Table 5.3, we can infer that when we increase the
volume of the training data, the accuracy of all the models will be improved,
accordingly. All the approaches reached their best performance when they were
trained with 90% of the data. Therefore, to have a fair comparison, we
considered the results of all the baselines related to the 90% training
dataset size. Among all the compared methods, the proposed model, APAR,
achieved the best performance in terms of both RMSE and MAE. This might be
because of paying more attention to the real values of ratings, which can
better explain the level of a user’s interests on an item. Additionally, APAR
considers the users’ personality types and their level of knowledge in
addition to their personal interests, which results in making more
personalised suggestions for a particular user. Next, SVD++ performs better
than UserMean and ItemMean, because they simply use the mean rating value of a
user and an item, respectively.

Training Data Metrics Random Hu ItemMean UserMean SVD++ CTR TWIN APAR 60% MAE
7.759 2.983 2.889 2.770 2.033 1.887 1.353 1.165 60% RMSE 8.124 3.32 3.084
2.896 2.314 2.129 2.074 1.554 70% MAE 7.467 2.763 2.648 2.54 1.864 1.69 1.215
1.005 70% RMSE 7.985 3.152 2.815 2.785 2.29 2.101 1.898 1.295 80% MAE 7.058
2.581 2.354 2.321 1.719 1.52 1.132 0.936 80% RMSE 7.654 2.978 2.642 2.763
2.011 1.986 1.620 1.058 90% MAE 6.589 2.426 2.224 2.203 1.547 1.391 .95 0.850
90% RMSE 7.236 2.649 2.545 2.539 1.99 1.718 1.428 0.995

Table 5.3: Comparison of the performance of APAR with other baseline
approaches with respect to MAE and RMSE on the Amazon dataset.

However, the recommendation performance of UserMean was higher than that of
ItemMean; this may be because of having a higher number of average ratings per
user than the average number of ratings per item in the used dataset.
Moreover, the recommendation performance of CTR was higher than that of SVD++
by around 11% and 14% in terms of MAE and RMSE, respectively, as SVD++ only
took the user’s rating into consideration while CTR sought to use additional
information. In the context of personality-based recommender systems, TWIN
performed better than Hu, which integrated both the rating and the personality
information. The reason behind this performance degradation might be the use
of two sources of information, ratings in particular, which might increase the
chance of suffering from the data sparsity problem. Finally, APAR, which
detects the users’ personality types implicitly, exhibited superior
performance to the other methods because it integrated the users’ personality
types, their personal interests, and their level of knowledge in a particular
domain. In addition, unlike a majority of the existing approaches, APAR
constructed a matrix with the actual rating score, which could help to better
understand the users’ interests. It outperformed CTR by 39% and 42%, and TWIN
by 11% and 31% in terms of MAE and RMSE, respectively.

Figure 5.2: Impact of personality regularisation with respect to MAE
evaluation metric on the Amazon dataset. Figure 5.3: Impact of personality
regularisation with respect to RMSE evaluation metric on the Amazon dataset.

####  5.3.3 Impact of Personality Regularisation

In this section, we will evaluate the impact of the proposed personality
regularisation factor on the effectiveness of the proposed model in terms of
RMSE and MAE. Considering $\lambda$ to be a controlling parameter, we tested
the proposed model under different values
$\lambda=\\{0.01,0.1,0.3,0.5,0.7,0.9\\}$; the corresponding results are shown
in Figure 5.2 and Figure 5.3. According to this figure, increasing the value
of $\lambda$ gradually increased the performance of APAR; APAR reached its
best performance (MAE = 1 and RMSE = 1.2), when $\lambda=0.9$.

Figure 5.4: Recommendation performance in the presence of DSW-n-FCI with
respect to MAE evaluation metric on the Amazon dataset. Figure 5.5:
Recommendation performance in the presence of DSW-n-FCI with respect to RMSE
evaluation metric on the Amazon dataset.

####  5.3.4 DSW-n-FCI Experiments

In this section, we will investigate the performance of the proposed model and
other baseline methods in the case of the Data Sparsity With no Feedback on
Common Items (DSW-n-FCI) problem. To do so, we randomly divided the dataset
into four different sub-datasets with the DSW-n-FCI degree of 20% (SD1), 40%
(SD2), 60% (SD3), and 80% (SD4), where DSW-n-FCI= 20% means that only 20% of
the users did not have any feedback on the common items out of all the users.
We computed the degree of DSW-n-FCI as follows:

$d=\frac{number-of-users-without-any-similar-feedback}{total-users}$ (5.14)

We compared the proposed model with other methods on each sub-dataset already
explained above. From Figure 5.4 and Figure 5.5 , we can see the superiority
of APAR in all the sub-datasets and under different degrees of DSW-n-FCI. This
indicates the ability of APAR to deal with the DSW-n-FCI problem, and having
recommendations even when there is no recorded feedback on the common items
among users. We only compared APAR with CTR, and SVD++ under the DSW-n-FCI
situation, as they demonstrated great results in the experiments. On the SD1,
SD2, SD3, and SD4 sub-datasets, on average, APAR showed a performance
improvement of 51%, 63% , 39%, and 52% as compared to CTR and SVD++ in terms
of MAE and RMSE, respectively. This implies that discovering the users’
personality types can help APAR better handle the DSW-n-FCI problem.

###  5.4 Summary

Collaborative filtering based on matrix factorisation (MF), which embeds user
and item latent features to learn the users’ preferences over a set of items,
is one of the most successful and straightforward solutions to general
recommender systems. Collaborative filtering-based models are still valuable
in some real-world organisations as they can capture the users’ general
tastes. However, most of the current approaches considerably depend on
analysing the users’ feedback, e.g. ratings and reviews of common items, to
discover similar behaviour patterns among users. Therefore, they may fail when
there are no common items of interest among users, a problem which we have
called the Data Sparsity With no Feedback on Common Items (DSW-n-FCI) problem
in this thesis. Personality as a stable behavioural pattern is one of the key
factors with the ability to explain why people are different in their choices
and decisions. Inspired by the significance of using personality for
discovering the users’ ultimate interests, some general recommenders have
started adopting personality in their models. However, while personality-aware
methods detect the users’ personality types explicitly by having the users
fill out a questionnaire, which is an unfeasible task in many real-world
applications, they nevertheless ignore the differences among the users’ level
of knowledge in different domains. Most of the existing methods exploit the
users’ personality types to simply use them as a similarity measure. In
contrast to those approaches, we directly considered the personality factor in
our mathematical model and proposed a novel matrix factorisation model. The
assumption of the proposed method is that the users’ decision-making can be
affected by three major factors: users’ personality types, their personal
interests, and their level of knowledge in a particular domain. Moreover, to