text:
\section{IR Setup Foundation} \label{sec:foundation}
\input{sections/foundation}

\section{A Factored Relevance Model} \label{sec:frlm}
\input{sections/frlm}

\section{Factored Relevance Model with Word Semantics} \label{sec:kdefrlm}
\input{sections/kdefrlm}

\section{Multi-Contextual Generalization of Factored Relevance Model} \label{sec:frlm_psi}
\input{sections/frlm-psi}

\begin{comment}
\section{Algorithmic Details}    \label{sec:algo}
\input{sections/algo}
\end{comment}

\section{Experiment Setup} \label{sec:setup}
\input{sections/setup}

\section{Results and Discussion}   \label{sec:results}
\input{sections/results}

\section{Conclusions and Future Work} \label{sec:conclusions}
\input{sections/conclusions}

\begin{acks}
\subsubsection*{\textbf{Funding}}
This work was supported by the ADAPT Centre for Digital Content Technology, funded under the
\grantsponsor{SFI}{Science Foundation Ireland Research Centres Programme}
 \ \ (Grant ~\grantnum{SFI}{13/RC/2106})
and is co-funded under the European Regional Development Fund.

\end{acks}

\bibliographystyle{ACM-Reference-Format}

\section{Introduction}

Owing to the enormous volume of online data, there is an ever increasing need for contextually relevant recommendations in a variety of domains and use-cases, e.g. recommending movies, articles to read, places to visit, etc.
An appropriate definition of \emph{contextual recommendation} obviously relies on a precise definition of the \emph{context} itself. Generally speaking, it can be argued that the more fine-grained the definition of the context is to a system, the better is its potential for providing more personally relevant information to users at specific points in time, specifically focused and tailored to their \emph{context}.

To illustrate the point that systems addressing a multiple number of fine-grained contexts are potentially more beneficial to users, imagine two systems $A$ and $B$, where the former only keeps track of a user's geographic location, whereas the latter additionally keeps track of other qualifiers associated with the location, e.g., the specific purpose of the user to visiting that location, whether the user is alone while visiting the place or she is with her friends or family, the season, day or hour of the visit, etc.
It can be hypothesized from this example that system $B$, in comparison to system $A$, could potentially provide more selective and relevant recommendations to its user about places to visit, and activities to do. This is because system $B$ could potentially reason that museums would not be the best place to recommend if the purpose of the user's current trip is business.
On the other hand, it is rather difficult for system $A$ to exclude such non-relevant suggestions
because of the lack of adequately informative context.

In addition to the context, the other source of useful information for contextual recommendation is the user's own personal \emph{history} or \emph{activity log}. The rationale for using the personal historical information of the user is based on the assumption that user feedback (in the form of ratings or positive/negative comments) may help to capture her
preferences. Consider, for example, if the user is particularly fond of live music (i.e., she has in the recent past favoured pubs offering live music over the ones which do not, and has also rated them positively), it is likely that suggesting a pub with live music in a new location could also be relevant to her.
Specifically, a contextual recommender system could attempt to \emph{match} a user's past preferences in other contexts (e.g. locations) with the top rated points-of-interests (POIs) of the current context to suggest potentially relevant ones.

To put our work in a general perspective, we consider that there are two broad distinct sources of information (or contexts), that a contextual recommendation system can benefit from. The first of these describes the \emph{present state} of the user at an instant of time, which is typically a combination of features with categorical values, e.g., the location of the user (one out of a finitely many cities on Earth), purpose of a trip (e.g. leisure vs. work), current season (e.g., summer, fall, winter or spring), etc.
The second source of information is the \emph{past state} of the user, which, acquired over a sufficient period of time, is likely to broadly capture her general preferences in particular situations. In other words, past information provides information about a user's general preferences for certain types of items over others, e.g. `museums' over `beaches',
e.g. when travelling `solo' (\emph{accompanied-by} qualifier) for `leisure' (\emph{trip-type} qualifier).

To illustrate the potential usefulness of both the \emph{present state} and the \emph{past state} contexts with an example,
consider for instance the situation when a user visits Dublin with her group of friends in early summer. Based on the user's previous preferences in other locations (e.g. the user usually loves to hangout with friends, or she is an avid draught lover, or she loves trekking or hiking), a context-aware system should seek to \emph{match} information from previous user preferences with the POI descriptors in the current context. For this example, an ideal system should recommend popular tourist destinations and activities in Dublin, that match the user preference history, such as the cliff walk in Howth, the Guinness Storehouse, Temple Bar, etc.

In addition to semantically matching the present state POI descriptors and the past preferences based on the \emph{present state} context of a given user location, an effective system should also consider the more personalized \emph{present state} context qualifiers, such as trip-type, accompanied-by etc.
Again as an example, a user's visit to Dublin for leisure with a group of friends should lead to preferring such suggestions as `lunch at cheap prices in pubs at the Temple Bar region' over the ones such as `lunch at the restaurant Avoca', because the latter is more suitable for families.

There are two fundamental differences between the location qualifier and the rest of the context qualifiers.
Firstly, the location of a POI is a universal property (irrespective of the perspective of individual users) whereas the other qualifiers, e.g. `trip type', `time of travel' etc., are intricately tied as attributes of individual users.
Secondly, the location information of a user
acts as a \emph{hard} constraint for POI recommendation because for a contextual suggestion to be meaningful and usable, the locations of the recommended POIs must be
close to the present state location of the user. On the other hand, non-location qualifiers do not enforce a hard constraint, e.g., a positively rated POI in the past for a trip-type which was different from the current one (e.g. `solo' in the past vs. `with family' in the present) could still be recommended.

\subsection*{Key Research Challenges}

In our work, we approach the problem of contextual recommendation from an information retrieval (IR) perspective,
where POIs can be considered analogous to documents, and the information in the preference history analogous to a query. The key advantage of this approach is that it is mainly unsupervised or weakly supervised. Unsupervised approaches do not need to rely on training a model with annotated data; instead, to make recommendations they rather try to utilize the inherent semantic associations between latent features of the data itself (e.g. semantically matching the past preferences of users with the POI descriptions in the current context).
We now highlight the main research challenges in an IR-based approach to contextual recommendation.

\para{Formulation of Query from User History}
First, a major challenge in formulating contextual recommendation from an IR perspective is that, in contrast to the traditional IR setup, there is no notion of an explicitly entered user query. In this case, the query needs to be automatically formulated from the information available in the user profiles, such as pieces of text describing their preferences and dislikes. This query then needs to be effectively \emph{matched} with the information of the POIs (documents) in the current context.

\begin{figure}[t]
	\centering
	\includegraphics[width=0.99\textwidth]{schematic/contextual-recommendation-intro3.pdf}
	\caption{Schematic of Contextual Recommendation}
    \label{fig:schematic}
\end{figure}

\para{Lack of Non-location type Contextual Information in the User History}
The second major challenge is the inevitable absence of explicit annotation of non-location type context (e.g. trip qualifiers, such as `trip purpose' etc.) in the user preference history. To illustrate this point, consider typical user feedback in a
Location Based Social Networks (LBSNs), such as
Foursquare\footnote{\url{https://foursquare.com}} or
TripAdvisor\footnote{\url{https://tripadvisor.com}}.
This usually comprises a text review and an explicit rating score
(from very bad to very good).
An important point to note here is that this past information usually does not contain trip qualifier information, i.e. the context in which the POI was visited and rated thereafter.
Since a user's perception about a POI can be drastically different
in changed circumstances, associating a precise context to a preference is useful to model the subtle dependence between the two, e.g. to model the situations that pubs are great for hanging out with friends only when there are no accompanying children, or hiking in the mountains is great only when it is less likely to rain. While on the one hand including this precise context as a part of the user feedback could provide additional sources of information, on the other, it is highly likely to reduce the number of users prepared to submit feedback due to the additional effort required to enter this information through a more complex interface.

\para{Modeling Relevance for Non-location Contexts in the Present State (Query)}
While user preference histories generally lack non-location or \emph{trip qualifier},
such information often forms a part of the present state of the user (i.e. the query). In contrast to the situation of a user being not prepared to enter these details every time as a part of feedback to a system, users in this case are more likely to submit such information as the type of the trip, whether they are with family or friends etc., because of their intuitive expectation that such precisely defined contextual information (in addition to the current geographic location) would enable the system to suggest more contextually relevant items (POIs).
An important research question is then how to bridge the gap between the lack of contextual information from the historical information of user feedback and the constraints imposed by them during the present context (query).

A general approach of bridging this information gap is to employ weak supervision to associate certain topics in user feedback with a seed set of categories defining a precise context, e.g. starting with a seed set of term associations, such as `pub' being relevant to the context category `friends'. The natural language text of the reviews is also likely to be helpful in discovering more meaningful dependencies, e.g. associating `live music' with `friends', by using the semantic correlation between `pub' and `live music'.
We propose a formal framework towards this effect.

We illustrate the schematics of the overall idea of the problem and its solution in Figure \ref{fig:schematic}.
The top part of the figure shows two types of context information of a user, first, the \emph{location} of the user (specifically, a city which the user is currently visiting), and second, the more personal trip-qualifiers (non-location type) information categories which further qualify the location context, e.g. the `trip purpose' (whether vacation or work), `trip type' (i.e. whether a accompanied by family or a solo trip) etc.
The vertical line in Figure \ref{fig:schematic} separates the past context of a user from his present, e.g. the figure shows that the user's current location is Delhi, and that he has visited New York, Beijing etc. in the past.
The bottom-left part of Figure \ref{fig:schematic}, constituting a part of a user's history, shows a list of POIs that the user rated positively (or negatively) during her different trips. We can imagine each unit of context information as a node in a tree that grows downwards from the location nodes to the POI and rating nodes. A path rooted at one of the location nodes and terminating at a particular POI denotes a single trip of a user among her past trips, e.g., in Figure \ref{fig:schematic}, the path shown by the red coloured arrows starting from the node `Amsterdam' and visiting in sequence the nodes `Vacation', `Friends', `Pub' and `Live Music' denotes a set of POIs which the user visited (and rated) during her leisure trip to Amsterdam with her friends.
Although the complete trip information is shown in the schematic diagram of Figure \ref{fig:schematic}, it is worth noting that the tree is essentially incomplete in real-life situation, i.e. the non-location type contextual information is not present in user ratings. The main research challenge is then to estimate a likely path in the tree from a location to a number of POIs, i.e. estimate the likely non-location intermediate nodes by utilizing the information from the review text themselves.

After constructing a model of a user's preferences, the challenge in contextual recommendation is to be able to make new recommendations to the user for a new present location (that she has not visited before) with a given set of trip qualifiers, e.g., the path specified in Figure \ref{fig:schematic} with the green arrows indicates that the user's current location is `Delhi' which she is visiting for work along with her colleagues.
An effective contextual recommendation system in this scenario should seek to leverage similar situations in the past (i.e. the user's past non-solo work trips in other locations) in figuring out what type of POIs the user had previously rated positively in those situations, and then use information from these past POIs to recommend a set of similar POIs for the current location.

After an introduction to the problem, we now discuss two different threads of work that could, in principle, be applied to address this problem of POI recommendation. The first among these is an information retrieval (IR) based approach and the second is one based on recommendation systems (RecSys or RS).
While an IR approach uses an analogy that POIs correspond to documents (that are to be retrieved) and the textual representation of a user's past historical preferences broadly corresponds to a query, an RS approach maps users and items respectively to POIs and preferences (contexts).

However, a careful consideration of the RS approach reveals that it is most likely not to be effective, firstly because of the \emph{lack of sufficient data for training} standard RS approaches in learning the user-item associations (e.g. by factorizing
a user-item matrix \cite{Gemulla:2011}), and secondly because there may be \emph{no ratings available for the POIs in query locations (contexts)}, which is specifically true for our experiment setup.
Following this argument, our proposed approach in this paper is an IR based one. We hypothesize that it is more suitable to formulate the POI recommendation problem as a \emph{constrained IR} problem, which is characteristically different from the scope of a traditional RecSys approach where the popularity of an item depends only on user ratings, or other contextual features, e.g. current user location etc.

\begin{comment}
External information, in the form of tags obtained from LBSNs, has been demonstrated to be effective in improving contextual recommendation effectiveness.
The study in \cite{aliannejadi2017personalized} applied an EM-based approach for tag-vocabulary normalization between externally obtained LBSN tags (referred to as `venue taste keywords' in the article) and the ones provided in the dataset (TREC-CS '16) used for the experiments (referred to as `user tags').
The main problem with such a venue-word to tag mapping is that it has to rely on the presence of a set of such pairs of samples to train a generative model. Moreover, the use of external information may not lead to reproducible results under the Cranfield paradigm of laboratory based settings due to the dynamic nature of this external information (e.g. the reviews and the tag vocabulary of an LBSN).

\end{comment}

\subsection*{Our Contributions}
After introducing the problem, we list the main contributions of this paper.
\begin{enumerate}[leftmargin=*]
\item
We propose a formal IR-based approach (specifically, a pseudo-relevance feedback model) to address the problem of contextual recommendation. More specifically, to tackle the problem of matching the user preferences with the POI descriptors in a given query context, we propose a generalized version of the well-known relevance model \cite{Lavrenko_RLM2001:RBL:383952.383972}.
Our proposed model is a \emph{factored} version of the standard relevance model, where the first step (\emph{exploitation}) involves enriching the user preference information, and the second step (\emph{exploration}) involves subsequently using the enriched information to effectively match the POI descriptors given query context.

\item We incorporate a \emph{generalized framework of addressing both the hard and the soft constraints} (location and trip qualifiers respectively) within the framework of the proposed relevance model. We undertake a weakly supervised approach (leveraging a small set of context-term annotations) to transform the soft constraints into term weighting functions.

\item Further, we incorporate \emph{term semantic information} within the framework of our proposed relevance model. In particular, we use embedded vector representations of words to bridge the vocabulary gap between user preferences, POI descriptions and the trip qualifier (\emph{soft}) constraints.

\begin{comment}
This part yields answering two research questions:

\textbf{RQ 1:} What is the most effective and systematic approach to find the trade-off between a user's preference history (\emph{exploitation}) and the information about the POIs constrained to a \emph{hard} contextual constraint such as `location' (\emph{exploration}) for contextual POI recommendation?

\textbf{RQ 2:} What is the most effective and systematic approach to find the trade-off between a user's preference history (\emph{exploitation}) and the information about the POIs constrained to multiple \emph{soft} contextual constraints such as `trip-type', `accompanied-by', along with a \emph{hard} constraint (\emph{exploration}) for contextual POI recommendation?

\item
In our proposed pseudo-relevance feedback based framework, we also investigate the research question

\textbf{RQ 3:} To what extent, introducing semantic association between terms present in POI content, while estimating POI's contextual appropriateness, can improve the contextual POI recommendation quality?

\item
Unlike some of the existing researches that rely on external information (e.g. in the form of Yelp categories or Foursquare tags), our method only makes use of a static data collection of user profiles and current contextual information for the purpose of contextual recommendation to ensure the reproducibility of our research.

\item
Since our proposed models do not use ratings of other users, they are potentially suitable in cold-start scenarios, where little or no user ratings are available for candidate POIs.

\end{comment}

\end{enumerate}

\subsection{Kernel Density Estimation based RLM}
Kernel Density Estimation (KDE) is a non-parametric method to estimate the probability density function of a random variable. Formally, let $\{x_1, \dots, x_n\}$ be independent and identically distributed (i.i.d.) samples drawn from a distribution. The shape of the density function, $f$, from which these points are sampled can be estimated as
\begin{equation} \label{eq:weightedKDE}
	\hat f_\alpha(x) = \frac{1}{nh} \sum_{i=1}^n \alpha_i K \Big(\frac{x-x_i}{h}\Big),
\end{equation}
where $x_i$ is a given data point (commonly known as the pivot point), $\hat f_\alpha(x)$ is the estimated value of the true density function $f(x)$,
$\alpha_i$ is the relative importance of the $i^{th}$ data point with the constraint that $\sum_i \alpha_i = 1$,
and
$K(.)$ is a kernel function scaled by a bandwidth parameter $h$.
By definition, a kernel function is a monotonically increasing function of the distance between two points (vectors). A common choice of a kernel function is a Gaussian function.

Roy et al. \cite{DoiKDERLM_CIKM16} observed that since the relevance model estimates a distribution of (real-valued) weights over terms, the concept of KDE can be applied to define this distribution in a generalized way (the model being called Kernel Density Estimation based RLM or KDERLM for short). The basic idea to define the relevance model distribution this way is to treat the query terms as a set of pivot terms (analogous to the $x_i$'s of Equation \ref{eq:weightedKDE}). Rather than treating terms as independent, the distance between the vector representation
(obtained by applying a word embedding method such as \texttt{word2vec} \cite{Word2vec_NIPS2013}) of a pivot (query) term with that of a term occurring in the top-ranked documents is then used to define
the kernel function. This results in the influence of a query term to \emph{propagate} to other terms that have similar (close) vector representations in the embedded space.
Formally, assuming that the query terms $Q = \{q_1, \dots, q_n\}$ are embedded as vectors, the probability density function estimated with KDE is
\begin{equation} \label{eq:KDERLM_1D}
    f(w) = \frac{1}{nh} \sum_{i=1}^n P(w|\mathcal{M}) P(q_i|\mathcal{M}) K \Big(\frac{w-q_i}{h}\Big),

\end{equation}
where the kernel function $K$ is a function of the distance between the word vectors of a term $w$ (within a top-ranked document) and a query term $q_i$. Moreover,
$P(w|\mathcal{M}) P(q_i|\mathcal{M})$ acts as the weight associated with this kernel function (thus incorporating the local RLM effect in addition to the global term semantics from the embedded space). In other words,
the closer the word $w$ is to a query term $q_i$ in conjunction with a high RLM term weight, the higher becomes the value of the KDERLM weight $f(w)$.

\subsection{KDE based RLM on User Profiles}

In the context of the POI recommendation problem,
the KDERLM model potentially assigns higher importance to
a word $w$ from a POI descriptor if it is semantically associated to a tag (query) term $t$ (as per the embedding space).
We can imagine that the discrete probabilities $P(w|\theta_{U, q_U})$ of the user profile based RLM (Equation \ref{eq:rlmprofile}) are smoothed out to form a continuous probability density function $f(w)$.
As seen in Figure \ref{fig:frlm_density_with_kde}, the shape of this density function is controlled by a set of pivot points comprising the tag terms in a user's profile.
\begin{figure}[t]
	\centering
	\includegraphics[width=0.5\textwidth]{image/KDE_termDistribution2}
	\caption{FRLM density estimation with KDE}
    \label{fig:frlm_density_with_kde}
\end{figure}
\begin{comment}
In the weighted version of KDE (Equation \ref{eq:weightedKDE}), in addition to the tag terms (points), the shape of the function is also manipulated by a set of weights,
say a set of $\alpha$s,
where each weight
$\alpha_t$
is associated with the
tag term,
$t$.
\end{comment}
Concretely, for a user profile $U =\cup_{i=1}^{N_U} \{P_i: P_i = (D, T, r)\}$ with the set of unique tag terms,
$T'$,
the probability density function estimated by KDE (with a Gaussian kernel) is given by
\begin{equation} \label{eq:kderlmprofile_1}
f_\alpha(w) = \frac{1}{nh} \sum_{t \in T'} \alpha_t K \Big(\frac{w-t}{h}\Big)
= \sum_{t \in T'} \alpha_t \frac{1}{\sigma \sqrt{2 \pi}} \exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2}),
\end{equation}
where $\vec{w}$ and $\vec{t}$ denote the vectors for the word $w$ and the tag $t$, and $\alpha_t$ is the weight assigned to the tag term which we describe how to compute next.

Considering the set of all documents (reviews or POI descriptions) of a user profile, i.e. D belonging to some tuple in
$U = \cup_{i=1}^{N_U} \{P_i: P_i = (D, T, r)\}$,
as a single document model $\mathcal{M}$,
the estimation of our previously proposed user profile based RLM (Equation \ref{eq:rlmprofile})
can be reduced as shown in Equation \ref{eq:rlmprofile_1D}.
\begin{equation}
    P(w|\theta_{U, q_U}) = P(w|\mathcal{M}) \prod_{t \in T'} P(t|\mathcal{M}) \label{eq:rlmprofile_1D}
\end{equation}
Then maximum likelihood estimates (MLE) of $P(w|\mathcal{M})$ and $P(t|\mathcal{M})$ ensure that to maximize $P(w|\theta_{U, q_U})$, both $P(w|\mathcal{M})$ (i.e. the normalized term frequency of a word $w$ in the set of documents in the user's preference history, or in other words, the set of terms a user generally prefers, e.g., `friends', `pubs' etc.), and $P(t|\mathcal{M})$ (i.e., the normalized term frequency of the tags in the set of documents in the user's preference history) are both maximized, i.e., Equation \ref{eq:rlmprofile_1D} captures the local
co-occurrences between a tag and a term within a user profile.
We then assign
$\alpha_t = P(w|\mathcal{M}) P(t|\mathcal{M})$
and substituting it in Equation \ref{eq:kderlmprofile_1}, yields Equation \ref{eq:KDERLM_1D_fullForm}.
\begin{equation} \label{eq:KDERLM_1D_fullForm}

    f(w) = \sum_{t \in T'} P(w|\mathcal{M}) P(t|\mathcal{M}) \frac{1}{\sigma \sqrt{2 \pi}} \exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})
\end{equation}
Figure \ref{fig:frlm_density_with_kde} shows a schematic example of the KDERLM distribution estimated with three sample tag terms, such that the user profile based RLM probability distribution function can be visualized as a function pivoted around these three tag vectors projected on a line. In Figure \ref{fig:frlm_density_with_kde}, there are two terms `seafood' and `pub' in the neighbourhood of a tag term `beer'. As `pub' is closer to `beer' than `seafood', the value of the density function at `pub', i.e. $f(pub)$, is higher than that at `seafood', i.e. $f(seafood)$.

In Equation \ref{eq:KDERLM_1D_fullForm}, we consider all documents in the user's preference history as a single document model and ignored document level user rating. To incorporate the document level importance of a term $w$ in the estimation of the probability density function, we introduce the document level user rating while computing $P(w|\mathcal{M})$. We compute document-level user rating based relevance weights, $P(w|\mathcal{M})$ as shown in Equation \ref{eq:KDERLM_2D}.
\begin{equation} \label{eq:KDERLM_2D}
    P(w|\mathcal{M}) = \sum_{(D,T,r) \in U} r P(w|D)
\end{equation}
Plugging this into Equation \ref{eq:KDERLM_1D_fullForm} yields Equation \ref{eq:KDERLM_2D_fullForm}.
\begin{equation} \label{eq:KDERLM_2D_fullForm}

    P(w|\theta_{U, q_U};h,\sigma) = \sum_{t \in T'} \Big(\!\!\!\!\!\!\sum_{\ \ (D,T,r) \in U} \!\!\!\! r P(w|D)\Big) P(t|\mathcal{M}) \frac{1}{\sigma \sqrt{2 \pi}} \exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})
\end{equation}
Similar to our previous version of the user profile base RLM (Equation \ref{eq:rlmprofile}), the rating values in Equation \ref{eq:KDERLM_2D_fullForm} are used as confidence scores for the co-occurrences, which allows the relevance model to
preferentially weigh the term co-occurrences of across POIs that are high rated in a user profile.

\begin{comment}
Instead of capturing tag-term specific semantic relationship, we incorporate the KDE score of a term $w$ based on all tag terms while estimating the RLM. Assuming all tag terms
$T'$
i.e. the union of all $T$s $\in U = \cup_{i=1}^{N_U} \{P_i: P_i = (D, T, r)\}$ as the observed terms, (un-weighted) KDE score of a candidate term $w$ can be computed as shown in Equation \ref{eq:kdescore}.
\begin{equation} \label{eq:kdescore}

    f(w) = \frac{1}{nh} \sum_{t \in T'} K \big(\frac{w-t}{h}\big)
\end{equation}
This can be visualized as a degenerated case of Equation \ref{eq:weightedKDE}, where
$\alpha_t = 1$
i.e. uniform importance for all tag terms in a user profile. Now, the semantic relation between the term $w$ and all tag terms $T'$ can be introduced in Equation \ref{eq:rlmprofile} in multiplicative fashion as shown in Equation \ref{eq:kderlmprofile}.
\begin{equation} \label{eq:kderlmprofile}
\begin{split}
P(w|\theta_{U, q_U}) & = \sum_{(D,T,r) \in U} r P(w|D) \big( \prod_{t \in T'} P(t|D) \big) \frac{1}{nh} \sum_{t \in T'} K \big(\frac{w-t}{h}\big)\\
& = \sum_{(D,T,r) \in U} r P(w|D) \big( \prod_{t \in T'} P(t|D) \big) \sum_{t \in T'} \frac{1}{\sigma \sqrt{2 \pi}} \exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})
\end{split}
\end{equation}
One plausible advantage of this approach is that it allows us to assign higher weight to a term that is semantically associated to most of the tag terms over a term that is semantically very close to a single tag term but quite far from all other user assigned tag terms. Please note that user profile based RLM performed better while estimated in the multiplicative fashion, which in fact indicates the diverse nature of user assigned tags in the user profile.
\end{comment}

\subsection{A Factored version of KDERLM}
We argued in Section \ref{ss:factoredrlm} (Figure \ref{fig:frlm}) that a factored version of the RLM is particularly suitable for the task of contextual POI recommendation because it is useful to enrich the initial query (comprised of tag terms) with additional relevant terms from the user profile (review text/POI descriptors).
Since term weights estimated from Equation \ref{eq:KDERLM_2D_fullForm} yield a set of such potentially relevant terms, we make use of the term weight distribution estimated from Equation \ref{eq:KDERLM_2D_fullForm} to estimate another relevance model for the retrieval step with the hard location constraint, i.e., this time the term weights are useful to effectively match the information need (weighted query estimated from a user profile) with the documents that are to be retrieved (specified by the set of documents from the collection satisfying the location constraint). More formally,
\begin{equation}
P(w|\theta_{U, q_U, l_U};h,\sigma) = \sum_{d \in M(\theta_U,q_U,l_U)}
\frac{1}{\sigma \sqrt{2 \pi}}
P(w|d) \prod_{t \in \theta_{U, q_U}} P(t|d)
\exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2}),
\label{eq:flmkde}
\end{equation}
where we make use of the set of POIs of the current location (constrained by $L(d)=l_U$) to estimate the KDERLM corresponding to the \emph{exploration} mode (similar to Equation \ref{eq:KDERLM_1D_fullForm}).

\begin{comment}
\begin{equation}
P(w|\theta_{U, q_U, l_U}) = \sum_{t \in \theta_{U, q_U}} P(w|\mathcal{M}) P(t|\mathcal{M})
\frac{1}{\sigma \sqrt{2 \pi}} \exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2}),
\label{eq:kdeflm}
\end{equation}
$\mathcal{M}$, in this case is the set of top retrieved POIs (documents constrained to be satisfying the current context, i.e., ) and $\theta_U$, the RLM estimated from the preference history is the observed set of terms.
\end{comment}

Similar to FRLM, where we combine both the models corresponding to exploitation and exploration, we can create a combined version of this KDE based model as shown in Equation \ref{eq:kdefrlm_linearcomb}.
\begin{equation}
    P(w|\theta;h,\sigma) = \gamma_H P(w|\theta_{U, q_U};h,\sigma) + (1-\gamma_H)P(w|\theta_{U, q_U, l_U};h,\sigma) \label{eq:kdefrlm_linearcomb}
\end{equation}
The trade-off parameter $\gamma_H$ controls the relative importance of the two relevance models. We call this version of our proposed model Kernel Density Estimation based Factored ReLevance Model (KDEFRLM).

\begin{comment}

\section{Modeling Multiple Contextual Constraints} \label{sec:fineGrainedContexts}
Please note that, if the current context state $c$, as mentioned in Section \ref{ss:irsetupforcs}, is comprised of a single contextual constraint such as location, i.e. $N_c = 1$ in Equation \ref{eq:contextState}, it essentially means that the proposed methodology makes an effort to match between user's preference history in one context which is precisely a location context (i.e. some visited cities in our experiment setup) and top ranked POIs in a different (location) context (i.e. a new city that the user has not visited before). We essentially perform a constrained (to location context) IR for this problem.

At this stage we would like to see how can we utilize some additional contextual information which may be available in many practical cases i.e. if the current context state $c$ is comprised of a combination of multiple contextual constraints. \emph{Trip type} of the user such as business trip or holiday, \emph{trip duration} such as day trip, longer, night out or weekend trip, and \emph{group type} such as whether the user is alone or with her family or with her friends, are some of the important contextual constraints that can be taken into account to capture more fine-grained contextual relevance of a POI. e.g. even if a user's preference history indicates that she is an avid beer lover, recommending popular pubs may not be desirable when she is with her family.

\subsection{Learning Fine-grained Contextual Relevance}
In addition with the location constraint, we extend our experiments by utilizing three more contextual constraints, trip type, trip duration and group type of the user, i.e. $N_c = 4$ in Equation \ref{eq:contextState}. Hence the current context state $c$ now becomes a state comprised of 4 constraints: $C_1 \equiv$ the current location (such as Dublin),  $C_2 \equiv$ any instance of trip type (such as holiday),  $C_3 \equiv$ any instance of trip duration (such as day trip) and  $C_4 \equiv$ any instance of group type (such as friends). Intuitively, it makes the contextual recommendation problem, a more fine-grained one, i.e. in addition with finding most relevant POIs in current location (based on user's preference history in some different locations), we need to take into account whether a potential relevant POI is appropriate for other contextual constraints (such as trip type, trip duration and group type).

With the help of a publicly available manually annotated data \cite{Aliannejadi_crowdsourceData}, it is possible to learn whether a tag or a short phrase (such as `Seafood' or `American Restaurant') is contextually appropriate to a specific combination of three contextual constraints. More specifically, the annotated data provides a human assessors generated label (+1 or -1) for a tag such as `Seafood', from a controlled tag vocabulary, to indicate whether `Seafood' is contextually appropriate (+1 being appropriate and -1 being inappropriate) for a specific combination of three contextual constraints say $C_2 \equiv$ holiday,  $C_3 \equiv$ day trip and  $C_4 \equiv$ friends. $C_1 \equiv$ Dublin remains as the primary contextual constraint. In Section \ref{Data}, we will discuss about the aforementioned data in detail.

We define a joint context, $\mathcal{J} \sim \{C_2, C_3, C_4\}$ i.e. a specific combination of $C_2$ (any instance of $C_2$), $C_3$ (any instance of $C_3$) and $C_4$ (any instance of $C_4$). With the available set of tags $\mathcal{J}_t = t_1, \dots, t_n$, labled as +1 (i.e. contextually appropriate) for the joint context $\mathcal{J}$, it is then possible to compute a fine-grained contextual appropriateness similarity of any term $w$ for the joint context $\mathcal{J}$. More formally,
\begin{equation} \label{eq:jointContextSim}

    finSim(w, \mathcal{J}) =
    \begin{cases}
        \max(\mathbf{w} - \mathbf{t}), \ \ t \in \mathcal{J}_t, & \text{if } N_c > 1\\
        1,              & \text{otherwise}
    \end{cases}
\end{equation}
As mentioned in Section \ref{Algorithm}, we have created the vector representation, $\mathcal{D}_{vec}$, for all terms in the static collection $\mathcal{D}$, using $word2vec$ \cite{Word2vec_NIPS2013}. The vector embeddings of the words of the collection vocabulary allows us to compute the value of $w-t$ as a distance or similarity measure such as the cosine similarity, i.e. $\frac{\mathbf{w} \cdot \mathbf{t}}{\norm{\mathbf{w}} \norm{\mathbf{t}}}$, between two words $w$ and $t$. As mentioned earlier, $\mathbf{w}$ (bold face) denotes the vector embedding of a word $w$.

The primary reason behind taking maximum similarity in Equation \ref{eq:jointContextSim} is that the set of tags $\mathcal{J}_t$ may be very diverse in nature and the candidate term $w$ needs not to be necessarily semantically related to all the tags in $\mathcal{J}_t$. e.g. based on the available data \cite{Aliannejadi_crowdsourceData}, for a joint context $\mathcal{J} \sim \{C_2, C_3, C_4\}$, where $C_2 \equiv$ holiday, $C_3 \equiv$ day trip and $C_4 \equiv$ friends, the set $\mathcal{J}_t = \{$\texttt{Baseball-Stadium, Beer-Garden, Salon, Sporting-Goods-Shop, \dots}$\}$, i.e. `Baseball-Stadium', `Beer-Garden', `Salon' and `Sporting-Goods-Shop' are contextually appropriate for the joint context $\mathcal{J}$. A candidate term such as `pub' which is likely to be contextually appropriate for the joint context $\mathcal{J}$, is semantically very close to a tag such as `Beer-Garden' (high cosine similarity value) in set $\mathcal{J}_t$ but `pub' is not semantically related to the tags such as `Salon' and `Sporting-Goods-Shop'.

Proposed FRLM or KDEFRLM essentially generates a weighted term distribution by estimating the probability (importance) of terms, with the help of terms' co-occurrence information, or both terms' co-occurrence information and semantic relationships between terms. Intuitively, a candidate term $w$ in the weighted term distribution generated by FRLM/KDEFRLM, should get some boost or be penalized based on how appropriate the term $w$ is to the current joint context.

\subsection{KDE based FRLM for Multiple Contextual Constraints}

Formally speaking, if the current context state $c$ is comprised of a single contextual constraint such as location, i.e. $N_c = 1$ in Equation \ref{eq:contextState}, making $finSim(w, \mathcal{J}) = 1$ in Equation \ref{eq:jointContextSim}, we simply combine user profile based (KDE)RLM (Equation \ref{eq:kderlmprofile}) and KDE based FRLM (Equation \ref{eq:kdeflm}) into a single model using the exploitation-exploration trade-off parameter $\gamma_H$ as we did in Equation \ref{eq:frlm_linearcomb}. However, if the current context state $c$ is comprised of a combination of multiple contextual constraints, i.e. according to our problem definition, $N_c = 4$ in Equation \ref{eq:contextState}, where the current joint context $\mathcal{J} \sim \{C_2, C_3, C_4\}$, we upgrade the Equation \ref{eq:frlm_linearcomb}, into a fine-grained contextual relevance sensitive one, as in Equation \ref{eq:frlm_linearcomb_updatedJointContext}.
\begin{equation}
    P(w|\theta) = \big(\gamma_H P(w|\theta_{U}) + (1-\gamma_H)P(w|\theta_{U,C(U)})\big) * finSim(w, \mathcal{J}). \label{eq:frlm_linearcomb_updatedJointContext}
\end{equation}
Clearly, higher the $finSim(w, \mathcal{J})$ value, more contextually appropriate the term $w$ is for the joint context $\mathcal{J}$. The term $w$ will get some boost or be penalized, in the upgraded estimation $P(w|\theta)$. Please note that, we perform our experiments with location as the primary constraint and three additional contextual constraints trip type, trip duration and group type i.e. total number of constraints $N_c = 4$, but our approach can be easily extended to model any number of contextual constraints in the similar fashion.

\end{comment}

\section{Background}
In this section we briefly outline Kernel Density Estimation (KDE), a statistical technique to estimate a probability distribution, which we use in our proposed relevance feedback model. We then provide a general description of the relevance model (RLM), which is a pseudo-relevance feedback method, followed by a short review of a generalized KDE based RLM method, underlying theory of which is applicable to our proposed model.

\subsection{Kernel Density Estimation}
Kernel Density Estimation (KDE) is a non-parametric method to estimate the probability density function of a random variable. Formally, let $\{x_1, \dots, x_n\}$ be independent and identically distributed (i.i.d.) samples drawn from a distribution. The shape of the density function $f$, from which these points are sampled can be estimated as in Equation \ref{eq:weightedKDE}.
\begin{equation} \label{eq:weightedKDE}
	\hat f_\alpha(x) = \frac{1}{nh} \sum_{i=1}^n \alpha_i K \Big(\frac{x-x_i}{h}\Big)
\end{equation}
In Equation \ref{eq:weightedKDE}, $\hat f_\alpha(x)$ is the estimated value of the true density function $f(x)$, where $K(.)$ is a kernel function scaled by a bandwidth parameter $h$. Please note that Equation \ref{eq:weightedKDE} is a generalized weighted version of KDE in which the kernel function around the $i^{th}$ data point is weighted by $\alpha_i$, where $\sum_i \alpha_i = 1$.

\subsection{Relevance Model for IR} \label{RelevanceModelRevisited}
The traditional relevance model (RLM) \cite{Lavrenko_RLM2001:RBL:383952.383972} is a relevance feedback technique which estimates terms' importance for relevance feedback by using the co-occurrence information between a set of given query terms and the ones in a set of top-retrieved documents. According to the underlying theory, RLM assumes that the terms frequently co-occurring with the query terms are semantically related to the actual information need and, therefore, could be useful to enrich the query with additional information.

Formally speaking, given a query $Q=\{q_1,\ldots,q_n\}$, RLM essentially estimates a term weight distribution $P(w|Q)$ from a set of $M$ top-retrieved documents $\mathcal{M}=\{D_1,\ldots,D_M\}$, i.e.,
\begin{equation} \label{eq:traditional_rlm}
	P(w|Q) = \sum_{D \in \mathcal{M}} P(w|D) \prod_{q \in Q} P(q|D).
\end{equation}
Intuitively, it can be seen that higher $P(w|Q)$ values (RLM term weights) are achieved for a term $w$ if it occurs frequently in a top-retrieved document (large $P(w|D)$ value), in conjunction with the frequent occurrence of a query term $q \in Q$ such that $P(q|D)$ is also large.

\subsection{Kernel Density Estimation Based RLM}
Roy et al. \cite{DoiKDERLM_CIKM16} introduced semantic relationships between terms, along with document-level co-occurrence of terms, for better estimation of $P(w|Q)$. With the query terms $Q = \{q_1, \dots, q_n\}$ embedded as vectors, the probability density function has been estimated with KDE as shown in Equation \ref{eq:KDERLM_1D}. More formally,
\begin{equation} \label{eq:KDERLM_1D}
    f(w) = \frac{1}{nh} \sum_{i=1}^n P(w|\mathcal{M}) P(q_i|\mathcal{M}) K \Big(\frac{w-q_i}{h}\Big),

\end{equation}
where the applied kernel function $K(.)$ is a Gaussian one with the weight around the $i^{th}$ data point is considered as $P(w|\mathcal{M}) P(q_i|\mathcal{M})$, $\mathcal{M}$ being the set of terms in top ranked documents. i.e. for a candidate term $w$, the (semantically) closer $w$ is to a query term $q_i$, along with the higher RLM term weights, the higher is the value of the density function $f(w)$.

\subsection{Proposed Algorithm} \label{Algorithm}

\para{Initialization}
As shown in Algorithm \ref{Algorithm:PseudoCode}, let a user profile is presented as $U = \cup_{i=1}^{N_U} \{P_i: P_i = (D, T, r)\}$ (Equation \ref{eq:profile}), along with $q_U$, as the \emph{soft} contextual constraint and $l_U$, as the \emph{hard} location constraint. We define $T'$, as the set of user assigned (unique) tags i.e. union of all $T$s from the set of tuples $(D, T, r) \in U$ and $M_U$, as the union of all documents, $D$s from the set of tuples $(D, T, r) \in U$. We then perform an initial retrieval to get a set of top retrieved documents, $M_{l_U}$, while queried with the set of tags, $T'$. Please note that, this is an example of a constrained retrieval, i.e the retrieved documents in $M_{l_U}$, are the documents constrained to the \emph{hard} location constraint $l_U$.

In addition, we create a vector representation,
for all terms in the static collection $\mathcal{D}$, using $word2vec$ \cite{Word2vec_NIPS2013}. While training $word2vec$, we set the size of word vectors as $200$, maximum skip length between words as $8$, number of negative samples as $25$, threshold for occurrence of words as $1e-4$, number of threads as $20$, number of training iterations as $15$ and use the continuous bag-of-words model.

\para{Estimate User Profile Based RLM}
After the initialization step, we estimate the factor model $\theta_{U, q_U}$, which is a relevance model based on user profile information. For each term $w \in M_U$, we estimate $P(w|\theta_{U, q_U})$, i.e. the probability of sampling the term $w$ from the relevance model $\theta_{U, q_U}$ (Equation \ref{eq:kderlmprofile}). Note that, it is essentially done by the joint probability of observing the term $w$, along with the user assigned tags, $T'$, with the help of KDE. As we mentioned earlier, that we apply the multiplicative semantic evidence approach for KDE while estimating the user profile based RLM, as it performed better than the generalized KDE approach.

Note that, the estimation of the relevance model is in fact a mixture model of the estimated model $\theta_{U, q_U}$ in conjunction with $P(w|T')$, the tag likelihood model, to get the influence of the user assigned tags $T'$, in the actual estimation of $\theta_{U, q_U}$. We use maximum likelihood estimation (MLE) to compute the tag likelihood model, $P(w|T')$. $\mu_U$ acts as a smoothing (tag mixing) parameter to control the relative weight we set to the relevance model itself versus the tag model. From the mixture model, we get the actual probability of the term $w$, $P'(w|\theta_{U, q_U})$. Now the probability $P'(w|\theta_{U, q_U})$, along with the actual term $w$, are stored in an initially empty list, $L_U$. Note that, the term itself and its probability are stored as a single entity, $\{w, P'(w|\theta_{U, q_U})\}$, in the list. Once we are finished computing the probability of every term in $M_U$, we sort the list $L_U$, in decreasing order of the probability value $P'(w|\theta_{U, q_U}$. Top $\tau$ terms are then extracted from $L_U$, and added to another initially empty list, $L'_U$ (along with their associated $P'(w|\theta_{U, q_U})$ values).

\para{Estimate Factored RLM}
After estimating the first relevance model (the factor model), we estimate the factored relevance model, $\theta_{U, q_U, l_U}$, from the set of documents, $M_{l_U}$, in the similar way. As shown in Algorithm \ref{Algorithm:PseudoCode}, this time we compute the probability of sampling a term $w$, $P(w|\theta_{U, q_U, l_U})$ by the joint probability of observing the term $w$, along with the set of terms estimated in the former user profile based relevance model, $\theta_{U, q_U}$, again with the help of KDE (Equation \ref{eq:kdeflm}). This time we followed the generalized semantic evidence approach for KDE, as it performed better than the multiplicative KDE approach. We create a list of terms (along with their associated $P'(w|\theta_{U, q_U, l_U})$ values), $L'_{l_U}$ in the similar fashion we created $L'_U$.

\para{Generalization of FRLM}
We then combine these two lists, $L'_U$, and $L'_{l_U}$ into a final list, $L$, using a linear combination (Equation \ref{eq:frlm_linearcomb}), where $\gamma_H$ acts as the trade-off parameter to balance \emph{exploitation-exploration}. We define $T''$, as a weighted term distribution by extracting the set of all terms from the list, $L$, where the weight of each term is the corresponding probability of that term in $L$. This term distribution, $T''$ can be considered analogous to expanded query of the original query, $T'$. Now, we perform the final constrained (to the \emph{hard} location constraint, $l_U$) retrieval, using $T''$ as the query, to generate the final rank list of documents (POIs) for the user $U$.

Note that, based on the way we compute $P(w|\theta_{U, q_U})$ and $P(w|\theta_{U, q_U, l_U})$, we report the results of two variations of our proposed model. The result of our proposed approach is denoted by `FRLM', when $P(w|\theta_{U, q_U})$ and $P(w|\theta_{U, q_U, l_U})$ are computed based on Equation \ref{eq:rlmprofile} and \ref{eq:flm}, respectively. On the other hand, we refer to the result of our proposed approach as `KDEFRLM', when $P(w|\theta_{U, q_U})$ and $P(w|\theta_{U, q_U, l_U})$ are computed based on Equation \ref{eq:kderlmprofile} and \ref{eq:kdeflm}, respectively.

\subsection{Weakly Supervised approach for addressing Trip Qualifier (\emph{Soft}) Constraints}
To incorporate non-location type qualifiers, one needs to learn an association between a word from the review text or the tag vocabulary of a user profile, and the likely (historical) context (trip-type, duration, etc.) that leads to creating the review text in the first place. As an example, it should be possible for humans (with their \emph{existing knowledge}) to infer that a review about a pub frequently mentioning phrases, such as `friends', `good times', `tequila shots' etc. is most likely associated with accompaniment by friends on vacation (i.e. \texttt{trip-type}=\texttt{vacation} and \texttt{accompanied-by}=\texttt{friends}).

\input{tables/examples}

A computational approach to automatically constructing this association requires
the use of
a knowledge base (e.g. a seed set of term-category associations). One such knowledge resource was compiled in \cite{Aliannejadi_crowdsourceData}, which is composed of the following two different types of manually assessed information.

\begin{enumerate}[leftmargin=*]
\item List of pairs constituting a term and a \emph{single} non-location trip-qualifier with manually judged relevance scores of the form $(t,q,a)$, where $t$ is a term (e.g. food), $q$ is a single category (e.g. holiday) and $a\in [0,1])$ is a manually judged \emph{appropriateness score}. An example of a non-relevant pair is (\texttt{nightlife, business, 0.1}) with a lower score. Table \ref{Table:CrowdsourcedContextualRelevanceSingle} shows more examples of this sort.

\item List of pairs of a term with a \emph{joint} context (a $3$-dimensional vector of categories) along with a manually assessed binary label (1/0) indicating whether the term is relevant in the given \emph{joint context} or not. As an example, the word `pub' is assessed to be non-relevant in the joint context of `(\texttt{holiday, family, weekend})', whereas it is relevant in the context `(\texttt{holiday, friends, weekend})'.
Table \ref{Table:CrowdsourcedContextualRelevanceJoint} shows more examples of this sort.

\end{enumerate}

\input{tables/examples-joint}

We formally denote these two types of knowledge resources (Tables \ref{Table:CrowdsourcedContextualRelevanceSingle} and \ref{Table:CrowdsourcedContextualRelevanceJoint}) as
\begin{equation}
\begin{split}
\kappa_s: (w, q) & \mapsto [0,1], w \in V, q \in Q_i, i \in \{1,\ldots,c\} \\
\kappa_j: (w, q) & \mapsto \{0,1\}, w \in V, q \in Q=Q_1\times\ldots Q_c,
\end{split}
\label{eq:kappa}
\end{equation}
where $Q$ denotes the set of \emph{joint} non-location type contexts (\emph{soft} constraints), $Q_i$ denotes a \emph{single} context category, and $V$ denotes the vocabulary set of the review text and tags.

A seed set of such labeled examples of term-context (single or joint) association pairs can then be used to define a modified similarity score function $\psi$. In contrast to the text-based function of Equation \ref{eq:phi}, this also takes into account the information from the \emph{soft} constraints of the query context.
In particular for a given \emph{soft} constraint vector $q_U$ in the user query, we use embedded word vector representations to aggregate the similarities of each word in the review text/tag of a user profile with the seed words assessed as relevant for a single or a joint context $q_U$.
Formally, $\forall w \in U$ we define two functions of the form $\psi:(w, q_U) \mapsto \mathbb{R}$, one each for the addressing the single and the joint contexts, as shown in Equation \ref{eq:psi}.
\begin{equation}
\begin{split}
\psi_s(w, q_U) & = \max (\vec{w}\cdot \vec{s}),\,s \in \cup \{t:\kappa_s(t, q_U)>0\}\\
\psi_j(w, q_U) & = \max (\vec{w}\cdot \vec{s}),\,s \in \cup \{t:\kappa_j(t, q_U)=1\}
\label{eq:psi}
\end{split}
\end{equation}
Equation \ref{eq:psi} shows that for each word $w$ (embedded vector of which is represented as $\vec{w}$) contained in the text from the historical profile of a user, we compute its maximum similarity:
\begin{itemize}
\item In the case of single context ($\psi_s$), over all seed words, and
\item In the case of the joint context ($\psi_j$), over a subset of seed words relevant only for the given context, i.e., the words for which $\kappa(q_U,s)=1$.
\end{itemize}
We use \texttt{word2vec} \cite{Word2vec_NIPS2013}, to embed the vector representation of a word (similar to the KDEFRLM approach described in Section \ref{sec:kdefrlm}).

The reason for using the maximum as the aggregate function in Equation \ref{eq:psi} is that a word is usually semantically similar to a small number of seed
words relevant to a given context.
To illustrate this with an example,
for the query context `holiday, day-trip, friends', the relevant seed set constitutes words such as `base-ball stadium', `beer-garden', `salon', `sporting-goods-shop', etc. However, a word such as `pub' is similar to only one member of this seed set, namely `beer-garden', which means that other aggregation functions, such as averaging, can lead to a low aggregated value, which is not desirable in this case.

\subsection{Factored Relevance Model with \emph{Soft} Constraints}

To incorporate the multi-contextual appropriateness measure into our proposed factored relevance model (FRLM), we combine both the text-based similarity $\phi$ (Equation \ref{eq:phi}), and the trip context driven similarity function $\psi$ ($\psi_s$ or $\psi_j$ of Equation \ref{eq:psi}) into our proposed relevance models. Specifically, the user profile based RLM of Equation \ref{eq:rlmprofile} is generalized as shown in Equation \ref{eq:rlmprofile_withPsi}.
\begin{equation}
    P(w|\theta_{U, q_U}) = \sum_{(D,T,r) \in U} r P(w|D) \psi(w, q_U) \prod_{t \in T'}P(t|D) \label{eq:rlmprofile_withPsi}
\end{equation}
In addition to addressing the semantic relationship between a user assigned tag and a term present in the POI description, this relevance model of Equation \ref{eq:rlmprofile_withPsi} also takes into account the trip-qualifier based contextual appropriateness of a term $w$ by the use of the $\psi(w, q_U)$ factor. A higher value of this factor indicates that either $w$ is itself one of the seed words in an existing knowledge base or its embedded vector is close to one of the seed words, thus indicating its likely contextual appropriateness.
It is worth noting that substituting an identity function for $\psi(w, q_U)$, i.e., $\psi_l: (w, q) \mapsto 1$, degenerates the general case to the particular case of \emph{location-only} user-profile based RLM of Equation \ref{eq:rlmprofile}.

In a similar manner, the \emph{exploration} part of the model (Equation \ref{eq:flm}) is generalized as shown in Equation \ref{eq:flm_withPsi}.
\begin{equation}

    P(w|\theta_{U, q_U, l_U}) = \sum_{d \in M(\theta_U,q_U,l_U)} P(w|d) \psi(w, q_U) \prod_{t \in \theta_{U, q_U}} P(t|d) \label{eq:flm_withPsi}
\end{equation}
More specifically, the \emph{soft} constraint similarity function $\psi$ manifests itself in three different forms, namely $\{\psi_l, \psi_s, \psi_j\}$, for the location (\emph{hard} constraint) only retrieval, single-context based retrieval and joint-context based retrieval, respectively.

The word-semantics enriched relevance models (KDEFRLM) can also
be generalized by incorporating the $\psi$ function within them to further generalize them to address multiple contexts.
Similar to the non-semantic version of the factored relevance model, the multi-contextual appropriateness measure, $\psi(w, q_U)$, is incorporated into the KDE based FRLM model as a part of the kernel function weights $\alpha_t = P(w|\mathcal{M}) \psi(w, q_U) P(t|\mathcal{M})$ in Equation \ref{eq:KDERLM_1D_fullForm}, as shown in Equation \ref{eq:KDERLM_2D_fullForm_withPsi}.
\begin{equation} \label{eq:KDERLM_2D_fullForm_withPsi}

    P(w|\theta_{U, q_U};h,\sigma) = \sum_{t \in T'} \Big(\!\!\!\!\!\!\sum_{\ \ (D,T,r) \in U} \!\!\!\! r P(w|D)\Big) \psi(w, q_U) P(t|\mathcal{M}) \frac{1}{\sigma \sqrt{2 \pi}} exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})

\end{equation}

\begin{comment}
\begin{equation} \label{eq:kderlmprofile_withPsi}
\begin{split}
P(w|\theta_{U, q_U}) & = \sum_{(D,T,r) \in U} r P(w|D) \psi(w, q_U) \big( \prod_{t \in T'} P(t|D) \big) \sum_{t \in T'} \frac{1}{\sigma \sqrt{2 \pi}} exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2}).
\end{split}
\end{equation}
\end{comment}
Finally, the \emph{exploration} side of the model is generalized as shown in Equation \ref{eq:kdeflm_withPsi}.
\begin{equation}
P(w|\theta_{U, q_U, l_U};h,\sigma) = \sum_{d \in M(\theta_U,q_U,l_U)}
\frac{1}{\sigma \sqrt{2 \pi}}
P(w|d) \prod_{t \in \theta_{U, q_U}}
P(t|d)
\psi(w, q_U)
\exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})
\label{eq:kdeflm_withPsi}
\end{equation}
Equation \ref{eq:kdeflm_withPsi} is the most general among our proposed family of models, the contributing factors being
\begin{enumerate}[leftmargin=*]
    \item $\theta_{U, q_U}$, which takes into account an enriched user profile while matching against POIs of the current location,
    \item $\exp (-\frac{(\mathbf{w}-\mathbf{t})^T (\mathbf{w}-\mathbf{t})}{2\sigma^2 h^2})$, which addresses the semantic association between tags and document terms (both user profile and POI descriptors of the current location), and
    \item $\psi(w, q_U)$, which factors in the trip-qualifier based contextual appropriateness.
\end{enumerate}

\subsection{Overall Observations}

Table \ref{Table:ResultsCombined2} shows the results obtained by each contextual recommendation approach that we investigated, as outlined in Section \ref{ss:methods}. We present a summary of the optimal results for both the location-based and the location + trip-qualifier based approaches in the same table for the sake of readability. Each method was separately optimized with grid search on the nDCG@5 metric, the official metric to rank systems in the TREC-CS task.

Since the effectiveness of a particular approach (e.g. FRLM) in comparison to a baseline (e.g. RLM) is comparable across the same setting (i.e., location-only or location + soft constraints), we present the comparable rows in separate colour codes (light-grey for the location-only results, i.e., $\psi_l$, and no colour for the soft constraints based results, i.e., $\psi_s$ and $\psi_j$,) so that only the rows with the same colour code are comparable to each other.

In summary, from Table \ref{Table:ResultsCombined2} we can see that the word semantics based extension of our proposed factored relevance model, i.e., KDEFRLM, outperforms all other methods for both the location-only (hard) and `location + trip-qualifier' (hard and soft) constrained contextual POI recommendation tasks.
A paired $t$-test showed that the improvements in nDCG@5, nDCG@10, nDCG, P@5, P@10, and MAP with KDEFLRM were statistically significant (95\% confidence level) in comparison to the three strongest baselines: BL5 (KDERLM), BL11 (Hybrid) and BL1 (BM25).
We now highlight and comment on the key observations from our set of experiments.

\para{Factored models (exploration and exploitation) outperform the other approaches}
The superior performance of the factored models (FRLM and KDEFRLM) in comparison with BL2 (Term Selection) indicates that the probability distribution of weighted terms, as estimated by the factored models, is a more effective way to select candidate terms for query formulation. Although BL3 (BM25 + Term selection) takes both the preference history of the user (term selection based exploitation) and the top ranked POIs (BM25 based exploration) into account, the superior performance of both FRLM and KDEFRLM indicates that such information turns out to be more
effective when intricately integrated within the framework of a relevance based model, leveraging information from
both preference history and the top retrieved POIs
(rather than the ad-hoc way of first retrieval and then term selection for query expansion).

Figure \ref{fig:FRLM_Vs_KDE_term_distribution} shows the comparison of relative term distributions (common terms) between FRLM and KDEFRLM for a user request (user ID 763) where $T' = \{$\texttt{art, city-walks, caf\'{e}s, fast-food, museums, parks, restaurants, tourism, shopping-for-wine, shopping-for-accessories}$\}$. Both FRLM and KDEFRLM assign higher weights to terms such as `park', `museum', which are clearly relevant for this particular example. Indeed, both these models are also successful at capturing other relevant terms such as `view', `tree', `canal' etc.

\para{Incorporating term semantics improves POI effectiveness}
We observe from Table \ref{Table:ResultsCombined2} that the KDE extended versions of the factored models (for both single and multi-contexts corresponding to the shaded and the non-shaded rows) mostly outperform their non-semantic (non-KDE) counterparts.
This shows that leveraging underlying term semantics of a collection in the form of an embedded space of vectors helps to retrieve more relevant POIs at better ranks.
Figure \ref{fig:FRLM_Vs_KDE_term_distribution} shows that KDEFRLM is able to capture the semantic relationship between terms better than FRLM. For example, the semantic relationship between the term `histori' (stemmed form of `history') and `museum' was successfully captured by the KDE-based variant of FRLM. This demonstrates that KDEFRLM is able to successfully leverage the semantic association between terms, in addition to those of the term-based statistical co-occurrences only.
Table \ref{Table:W2VnearestTerms} shows a few terms whose word vectors are in close proximity of the user assigned tags in the embedded space.

\begin{figure*}[t]
\centering
\begin{subfigure}[t]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_term_distribution_Raw_sorted1}
     \caption{FRLM ($\psi_l$)}

     \label{fig:FRLM_term_distribution}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/KDEFRLM_term_distribution_Raw_sorted1}

     \caption{KDEFRLM ($\psi_l$)}
     \label{fig:KDEFRLM_term_distribution}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_withPsiJ_termDistribution.pdf}
     \caption{FRLM ($\psi_j$)}

     \label{fig:FRLM_term_distribution}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/KDEFRLM_withPsiJ_termDistribution.pdf}

     \caption{KDEFRLM ($\psi_j$)}
     \label{fig:KDEFRLM_term_distribution}
\end{subfigure}
\caption{Comparisons of term distribution weights (sorted from highest to lowest) between FRLM and KDEFRLM on
single (location) and multiple contexts (joint modeling with
$\psi_j$).
For location-only modeling, FRLM ($\psi_l$) uses $M=5$ (number of top-retrieved documents for feedback as per the $M(\theta_U,q_U,l_U)$ notation of Table \ref{Table:Notations}) and $\tau=25$ (number of top-scoring terms in the estimated RLM distributions). KDEFRLM ($\psi_l$) uses $M=2$ and $\tau=$ 80.
FRLM with joint context ($\psi_j$) uses parameters $M=5$ and $\tau=35$, whereas the results for KDEFRLM with the joint context ($\psi_j$) were obtained with $(M,\tau)=(2,100)$.
}
\label{fig:FRLM_Vs_KDE_term_distribution}
\end{figure*}

\begin{table}[t]
    \centering

    \small
    \caption{(Stemmed) words whose vectors are close to the user assigned tags in the embedded space. \label{Table:W2VnearestTerms}}
    \begin{tabular}{ll}
    \toprule
    Tags &  Semantically close terms \\
    \midrule
    \texttt{beer} & \{\texttt{tap}, \texttt{draft}, \texttt{craft}, \texttt{microbrew}, \texttt{draught}, \texttt{\texttt{ipa}}, \texttt{pint}, \texttt{breweri}, \texttt{hefeweizen}, \texttt{delirium}, \texttt{lager}\}\\
    \texttt{beach} & \{\texttt{oceanfont}, \texttt{ocean}, \texttt{lifeguard}, \texttt{pier}, \texttt{beachfront}, \texttt{\texttt{sand}}, \texttt{surfer}, \texttt{pismo}, \texttt{murrel}, \texttt{seasid}, \texttt{vacat}\}\\
    \texttt{seafood} & \{\texttt{shellfish}, \texttt{oyster}, \texttt{crab}, \texttt{fish}, \texttt{shrimp}, \texttt{\texttt{triggerfish}}, \texttt{restaur}, \texttt{fisherman}, \texttt{swordfish}, \texttt{lobster}, \texttt{scallop}\}\\
    \texttt{pub} & \{\texttt{irish}, \texttt{gastropub}, \texttt{bar}, \texttt{fado}, \texttt{behan}, \texttt{\texttt{sport}}, \texttt{british}, \texttt{linkster}, \texttt{mccool}, \texttt{mcgregor}, \texttt{alehous}\}\\
    \texttt{family} & \{\texttt{oper}, \texttt{kid}, \texttt{pantuso}, \texttt{parent}, \texttt{niec}, \texttt{\texttt{children}}, \texttt{orient}, \texttt{sicilli}, \texttt{fun}, \texttt{home}, \texttt{yohan}\}\\
    \bottomrule
    \end{tabular}
\end{table}

\para{IR approaches outperform collaborative/personal RecSys ones}
A common and sometimes very useful recommendation approach is BL6 (Most Popular K).
The poor performance of this method demonstrates that globally popular items (across a number of different users)
do not work well for the POI retrieval task. The likely reason for this being that personal choices in this case are more important.
The fact that BL7 (Profile Popular K) performs better than BL6 is consistent with this hypothesis of emphasizing personal preferences more than the global ones.

However, it can be seen that the effectiveness of this RecSys based approach (BL7) is inferior to that of BL1 (BM25), which is a standard IR based approach making use of the information in the set of tags from POIs with ratings higher than $0.8$. This shows that user ratings are more important than the popularity (relevance likelihood) of tags created by a user. A frequently used tag may have been used to create negative reviews by a user, in which case assigning importance to these tags may introduce noise into POI recommendation.

\para{Unsupervised approaches outperform supervised ones}
Supervised approaches, namely BL8 (NeuMF) and BL9 (Bayesian), do not perform well. This is most likely due to the lack of sufficient training data. One of the problems of a supervised approach is that it involves learning a hard decision during the training phase to classify POIs as either relevant (with rating values higher than a threshold) or non-relevant (otherwise). The advantage of our proposed models is that they do not involve hard decision steps during any stage of their working procedure. Moreover, the primary advantage of an unsupervised approach is that it can work in situations where user preference data (for training) is sparse or even non-existent.

Another observation from the comparisons between KDEFRLM and the matrix factorization based technique BL8 (NeuMF) is that representation learning over words (which is trained on unannotated document collections available in large quantities) is more beneficial than the matrix factorization based joint representation learning of users and POIs in a latent space (which requires large quantities of training data in the form of user-item associations).
Moreover, the POI recommendation problem is more of a personalized retrieval problem, where information from other users (which is what happens in a user-item matrix factorization based collaborative setup such as NeuMF) may in fact turn out to be ineffective. This is also reinforced by our previously reported observation that `Profile Popular K' (personalized retrieval) outperformed the `Most Popular K' (collaborative retrieval).

\begin{figure*}
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_nDCG5_variations}
     \caption{FRLM nDCG@5 variations}

     \label{fig:ndcg5vary}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_nDCG5_variations}
     \caption{KDEFRLM nDCG@5 variations}

     \label{fig:KDEFRLM_ndcg5vary}
\end{subfigure}
\quad
\begin{subfigure}[b]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/FRLM_nDCG_variations}

     \caption{FRLM nDCG variations}
     \label{fig:ndcgvary}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/KDEFRLM_nDCG_variations}

     \caption{KDEFRLM nDCG variations}
     \label{fig:KDEFRLM_ndcgvary}
\end{subfigure}
\quad
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_P5_variations}
     \caption{FRLM P@5 variations}

     \label{fig:P5vary}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_P5_variations}
     \caption{KDEFRLM P@5 variations}

     \label{fig:KDEFRLM_P5vary}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_MAP_variations}
     \caption{FRLM MAP variations}

     \label{fig:MAPvary}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_MAP_variations}
     \caption{KDEFRLM MAP variations}

     \label{fig:KDEFRLM_MAPvary}
\end{subfigure}
\caption{Effect of precision at top ranks (nDCG@5 and P@5) and recall (nDCG and MAP) with respect to changes in number of terms used in FRLM ($\psi_l$) Vs KDEFRLM ($\psi_l$) estimation ($\tau$) and the relative importance assigned to user profile information ($\gamma_H$).}
\label{fig:FRLM_variation}
\end{figure*}

\begin{figure*}
\centering
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_withPsiJ_nDCG5_variations.pdf}
     \caption{FRLM nDCG@5 variations}

     \label{fig:ndcg5vary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_withPsiJ_nDCG5_variations.pdf}
     \caption{KDEFRLM nDCG@5 variations}

     \label{fig:KDEFRLM_ndcg5vary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/FRLM_withPsiJ_nDCG_variations.pdf}

     \caption{FRLM nDCG variations}
     \label{fig:ndcgvary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
     \includegraphics[width=\textwidth]{image/KDEFRLM_withPsiJ_nDCG_variations.pdf}

     \caption{KDEFRLM nDCG variations}
     \label{fig:KDEFRLM_ndcgvary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_withPsiJ_P5_variations.pdf}
     \caption{FRLM P@5 variations}

     \label{fig:P5vary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_withPsiJ_P5_variations.pdf}
     \caption{KDEFRLM P@5 variations}

     \label{fig:KDEFRLM_P5vary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/FRLM_withPsiJ_MAP_variations.pdf}
     \caption{FRLM MAP variations}

     \label{fig:MAPvary_withPsiJ}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\centering
    \includegraphics[width=\textwidth]{image/KDEFRLM_withPsiJ_MAP_variations.pdf}
     \caption{KDEFRLM MAP variations}

     \label{fig:KDEFRLM_MAPvary_withPsiJ}
\end{subfigure}

\caption{Effect of precision at top ranks (nDCG@5 and P@5) and recall (nDCG and MAP) with respect to changes in number of terms used in FRLM ($\psi_j$) Vs KDEFRLM ($\psi_j$) estimation ($\tau$) and the relative importance assigned to user profile information ($\gamma_H$).}
\label{fig:FRLM_variation_withPsiJ}
\end{figure*}

\para{A combination of content and tags is more effective than tag-matching alone}
The BL10 (Content + Tag matching) baseline involves a hard classification step, and then an aggregation over tag matching scores. In contrast, our proposed models (FRLM and KDEFRLM) do not involve hard selections for either documents or tags/terms, which means that they are able to selectively leverage the information from each source.

\para{Joint context modeling is better for modeling soft constraints}

From Table \ref{Table:ResultsCombined2}, we observe that including trip-qualifier based information in the form of joint context ($\psi_j$) generally improves POI retrieval effectiveness, e.g. improvements are observed for RLM, NeuMF, etc. (compare the results between $\psi_j$ and $\psi_l$ for each method).
Standard approaches do not benefit much from the inclusion of the trip-qualifiers in the form of single-context driven scores, a plausible reason for which can be attributed to the fact that relevant single-context matches may not lead to the conjunctive relevance for the joint context. However, including even the single context based similarity scores as part of the query term weights in standard IR and RS (recommender system) approaches tends to improve the recall. E.g. effectiveness measures such as MAP and nDCG mostly improve at the cost of a decrease in nDCG@5 or P@5.

It can be seen that using soft constraint scores as a part of a model is usually more effective than a simple post-hoc combination of these scores with content matching scores (e.g. the relative improvements in FRLM as compared to that of Popular K or Content + Tag).

Additionally, in contrast to a parametric approach, such as SVM, the proposed similarity function $\psi_j$ (Equation \ref{eq:psi}) works better. This is because supervised approaches typically require
large quantities of training data to work well. Moreover, the SVM based approach of \cite{Aliannejadi_ToISJournal} did not take into account the semantic similarities between words to estimate the trip-qualifier based appropriateness. It is observed that computing similarities with the embedded word vectors turns out to be more effective.

Finally, it can be observed that the best results are obtained when the joint-context based similarity function is incorporated into the factored models. Incorporating term semantics in combination with the soft constraints (KDEFRLM with joint context modeling, $\psi_j$) further improves the results.

\para{Better precision-oriented and recall-oriented retrieval}
In addition to the aforementioned observations, we also note that KDEFRLM results in the best nDCG@5 value (a precision-oriented metric). This indicates that the model is able to retrieve documents assessed to be most relevant towards the top ranks in comparison to the other baselines. This is particularly beneficial from a user satisfaction point-of-view because a user does not need to scroll-down a list of retrieved suggestions to find her likely best matches.
It is particularly worth noting the considerable improvements
in the nDCG values (which is both a precision and a recall oriented measure) obtained with KDEFRLM. This indicates that KDEFRLM achieves high recall, in addition to achieving high precision. The high recall implies that, in real-life situations, it is also beneficial for patient users who are prepared to explore a list of recommendations to find a set of likely matching venues.

\begin{comment}
\para{Consistency}
Table \ref{Table:ResultsCombined2} reveals the consistency of our proposed approach. Similar to other baselines, the results obtained by our models with multiple contextual constraints ($\psi_s$ and $\psi_j$) are considerably better than the results obtained when only one contextual constraint ($\psi_l$) was considered. This complies with the intuition that higher the quantity of information available to a model, better should be its effectiveness. This trend also gives an indication that a combination of post-processing approaches, such as rule-based heuristics crafted from external knowledge sources can be applied over our proposed models, to potentially improve the results reported by our proposed methodology further which is not in the scope of this paper.
\end{comment}

\subsection{Sensitivity Analysis}
Table \ref{Table:ResultsCombined2} presents a summary of the best results obtained with each method (parameters optimized with grid-search for the nDCG@5 metric).
In order to investigate a more wide spectrum of results,
we now investigate the effects of varying the parameter $\gamma_H$ (i.e. the trade-off between exploration and exploitation) on the performance of FRLM and KDEFRLM. To obtain the sensitivity results, we set the value of $M$ (number of top-retrieved documents to consider for the RLM feedback) to $3$.

Figure \ref{fig:FRLM_variation} shows the sensitivity of FRLM versus KDEFRLM (measured with nDCG@5, nDCG, P@5 and MAP) with respect to the number of feedback terms, $\tau$, used to define the term-weight distribution, and the relative importance of the user's historical context with respect to the POIs in the current context, i.e. $\gamma_H$.

An interesting observation is that factored relevance models perform best with a balanced trade-off between exploitation and exploration. In particular, the optimal results for FRLM (both in terms of precision oriented measure nDCG@5 and recall oriented measure nDCG) are achieved when $\gamma_H=0.8$. Moreover, the effectiveness of FRLM degrades with the user profile history only ($\gamma_H=1$), which indicates that the history information itself is likely to contain noise in the form of topical diversity. This also demonstrates the benefit of selectively extracting chunks of information from the preference history that are contextually appropriate in the present state. We observe a similar trend in the kernel density based extension of FRLM.

It is also observed that a very small or a very large number of feedback terms tends to decrease retrieval performance. While the former case is unable to sufficiently capture the relevant semantics required to match the user profile with the present context, the latter introduces noise from pieces of profile that are not contextually relevant to the present state in the estimated FRLM or KDEFRLM distributions.
While FRLM achieves the optimal results with a smaller number of expansion terms, $\tau$, KDEFRLM being a more complex model requires a larger number of expansion terms to perform well. However, KDEFRLM is less sensitive to the number of terms and hence a more robust model as compared to FRLM.

\section{Related Work} \label{Sec:RelatedWork}

The problem of contextual recommendation has been investigated by a number of studies from the point of view of matching the contents of a user profile (query) representation and the POI (document) representation.
Among these, the studies in \cite{yang2012exploration,jiang2013pitt} combined similarities between POI categories and user profile content. Generally speaking,
for the POI categories, these approaches made use of external tag information from location-based social networks (LBSNs), such as Yelp or Foursquare, to match past user preferences and POIs in the current context. Note that contextual suggestion systems based on this thread of work primarily rely on \emph{exploiting} the available preferential knowledge of users from their profiles.

On the contrary, a different thread of work \cite{cheng2012fused,Griesner:2015:PRT:2792838.2799679} makes use of rating-based collaborative filtering, i.e. information from other users, to estimate a POI's popularity in a current context with the hypothesis that POIs with frequent positive ratings from other users could also be appropriate to the current user. In contrast to \emph{exploitation}, this thread of work based on collaborative filtering, mainly relies on \emph{exploring} the POIs in the current context.

The contextual suggestion track\footnote{\url{https://sites.google.com/site/treccontext/}} (TREC-CS) provides a common evaluation platform for researchers working on the contextual recommendation problem.
A very popular approach among the task participants was to retrieve POIs from different LBSNs such as Google Place, Foursquare or Yelp based on geographical context, and then to apply some heuristics such as ``night club will not be preferred in morning'' or ``museum will be closed at night'' to filter out POIs that do not match the given temporal context \cite{dean2012overview, hashemi2016overview}.
Arampatzis et al. \cite{Arampatzis_ToIS2017} experimented with different content-based, collaborative filtering based and hybrid approaches on TREC-CS, and found that the content-based approaches performed better than other approaches.

Most of the TREC-CS participants formulated the task as a content-based recommendation problem \cite{yang2012exploration,jiang2013pitt,roy2013simple,li2014user}. A common approach was to estimate a user profile based on the POIs that the user preferred previously, and then rank the candidate POIs based on their similarities to the estimated profile, assuming that a user would prefer POIs that are similar to those they liked before. Some of these studies used the descriptive information of the POIs and/or the web pages of the preferred POIs to build user profiles, and then used several similarity measures to rank the POIs \cite{yang2012exploration,jiang2013pitt}. The authors of \cite{li2014bjut,li2014user} explored the use of LBSNs' category information for user modeling and POI ranking. A recent work by Aliannejadi and Crestani \cite{Aliannejadi:2017:VAP:3077136.3080754}, then extended in \cite{Aliannejadi_ToISJournal}, applied linear interpolation and learning-to-rank to combine multiple scores such as review-based score and tag matching score for context-aware venue suggestion.

It is becoming increasingly popular among researchers to make use of online user reviews for contextual recommendation.
The study in \cite{chen2015recommender} leverages users' opinions about a POI based on reviews that are available online. Use of a single LBSN may not be sufficient to capture the information about all POIs and/or all the available types of information about the POIs. In another recent study, Aliannejadi et al. \cite{aliannejadi2017personalized} show that the amalgamated use of a user's current context and the ratings and reviews of previously rated POIs from multiple LBSNs improve recommendation accuracy. This thread of work for contextual recommendation is mainly based on \emph{exploiting} the user's existing preference history information and essentially performs content matching between the POIs in the user's preference history and the candidate POIs.

Recommendation-based algorithms mainly involve applying rating-based collaborative filtering approaches that are based on finding features that are common among multiple users' interests, and then recommending POIs to users who share similar preferences.
Matrix factorization, a standard technique that represents both users and items in a latent space,
forms the core of most of these recommendation based approaches. It is common to make use of the check-in information collected from LBSNs for recommending POIs \cite{cheng2012fused,Griesner:2015:PRT:2792838.2799679}.

However, collaborative filtering based techniques often suffer from the data sparsity problem. This problem is even worse for POI recommendation where a single user can only visit (and rate) a small
number of the POIs available in a city. As a result, the user-item matrix \cite{Gemulla:2011} becomes very sparse which leads to poor recommender system performance.
Due to this data sparsity problem, it can be difficult for purely recommendation based approaches to yield effective outcomes for POI recommendation.

Some existing work \cite{Ye_SIGIR2011, Yuan_SIGIR2013} has addressed this data sparsity problem of collaborative filtering by incorporating supplemental information into the model. Specifically, Ye et al. \cite{Ye_SIGIR2011} argued that the spatial influence of locations affects users' check-in behaviour. They incorporated spatial and social influence to build a unified location recommender system. On the other hand, the system developed by Yuan et al. \cite{Yuan_SIGIR2013} which is a time-aware collaborative filtering model, recommends locations to users at a certain time of the day by leveraging other users' historical check-in information. To address the cold-start situation for hotel recommendation, Levi et al. \cite{Levi:2012:FNH:2365952.2365977} designed a context-aware recommender system. They constructed context groups based on user reviews and regarded the user's preferences in trip intent i.e. the purpose of the trip, and the similarity of the current user with other users such as their nationality. They also consider user preferences for different hotel features in their model. Fang et al. \cite{Fang_2016_TIST} developed a model that consider use of both spatial and temporal context information to handle the data sparsity problem.

Existing research that use time as a context includes \cite{Gao_RecSys2013,Deveaud:2015:EVM:2806416.2806484}. Deveaud et al. \cite{Deveaud:2015:EVM:2806416.2806484} designed a time-aware venue suggestion system which modeled popularity or appropriateness of venues (POIs) in the immediate future with the help of time series. In contrast to \emph{exploitation}, this thread of work for contextual recommendation primarily relies on \emph{exploring} the candidate POIs using the current contextual information.

\begin{comment}
To provide an essential context to understand our proposed model, in this section, we first review relevance model \cite{Lavrenko_RLM2001:RBL:383952.383972} and it's close variants in short. Traditional relevance model (RLM) \cite{Lavrenko_RLM2001:RBL:383952.383972}
is a relevance feedback technique which estimates the importance of terms for relevance feedback by making use of the co-occurrences between a set of given query terms and the ones in a set of top retrieved documents. Independent and identically distributed (i.i.d.) sampling or conditional sampling method can be used to estimate a relevance model. These two forms of RLM are commonly known as `RM1' and `RM2', respectively, in the literature \cite{ComparativeRLM}. `RM1' does not take the original query terms into account while estimating the density function. It has been shown \cite{ComparativeRLM} that the `RM3' version of the relevance model, as proposed in \cite{NasreenJaleel_RM3}, which is a mixture model in conjunction with the query likelihood model works better than `RM1' and other close variants. Although the paper \cite{NasreenJaleel_RM3} used the notation `RM3' to refer to the mixture model of original query and feedback terms, for the sake of simplicity, we denote it as RLM and employ it as one of the baselines in our experiments.

\end{comment}

\subsection{Notations for User Profile}  \label{ss:irsetupforcs}

A user profile is comprised of a descriptive text, a set of tag terms added to it and a score (see the bottom part of Figure \ref{fig:schematic}). It should be noted that a document representation in a user profile does not have information about trip qualifiers, as indicated by the dotted arrows from the upper part of Figure \ref{fig:schematic} into each review.
The current context which forms part of query, comprises a pair of trip qualifiers of the form $(L, Q)$, which is composed of location of the trip, $L$, and other non-location type qualifiers, $Q=Q_1\times\ldots Q_c$ (a total of $c$ trip qualifier types, each type denoted as $Q_i$).
The reason to differentiate between the location and the non-location types is that the location constraint is \emph{hard} (the system must make recommendations for the current location only because a POI in a different location is obviously useless), whereas the non-location constraint is instead a \emph{soft} one (i.e., a POI which is usually popular for family dinner may still be relevant to be a solo traveller).
Specifically, for the TREC-CS dataset \cite{hashemi2016overview} used in our experiments, the number of such non-location qualifiers is $3$ (i.e. $c=3$). Each non-location type context $q_U$ is hence a $3$-dimensional categorical vector comprised of the attributes $Q_1$=\texttt{trip-type}, e.g. vacation, $Q_2$=\texttt{trip-duration}, e.g. day-trip, and $Q_3$=\texttt{accompanied-by}, e.g. solo or with friends etc.

From a general IR point-of-view, we assume that a user profile $U$ is composed of a set of $N_U$ profile $P_i$'s
and an instance of the user's current context specified by the location and trip qualifiers $(l_U, q_U) \in (L,Q)$.
Each profile $P_i$ is a 3-tuple consisting of a document ($D$ which belongs to a static collection $\mathcal{D}$), a set of user assigned tags ($T$ which is a subset of a controlled tag vocabulary $\mathcal{T}$), and a user provided rating ($r$ normalized within $[0, 1]$, higher the better). This is stated formally in Equation \ref{eq:profile}.
\begin{equation}
U = \cup_{i=1}^{N_U} \{P_i: P_i = (D, T, r) \in \mathcal{D}\times \mathcal{T} \times [0,1]\} \label{eq:profile}
\end{equation}

The objective of a tag $t \in \mathcal{T}$ is to express a POI as a set of single words or short phrases that best represents the POI, real instances of which are `beer', `American Restaurant', etc. assigned to the POI e.g. a restaurant. The document representation of the POI is composed of the text description accumulated from the POI's home page, customers' reviews on social networks etc.
The definition of every each document in the collection is assumed static.

For the sake of convenience in referring back to the notations,
we give their definitions
in Table \ref{Table:Notations}.
\input{tables/notations}

\subsection{Retrieval with the Location Constraint}
The objective then is to \emph{rank} a set of POIs (hard constrained by $L=l_U$) in decreasing order of their estimated relevance scores within the current context.
A simple way to estimate the relevance scores is to first restrict the set of candidate POIs to only the ones in the specific location (by employing the hard constraint), i.e. $S(l_U)=\cup\{d: L(d)=l_U\}$ ($L$ denoting the location attribute of a POI). The next step then makes use of the text in the user profile, $U$, and this candidate set of POI descriptors $S(l_U)$ to estimate the relevance scores,
\begin{equation}

    \phi: U \times S(l_U) \mapsto \mathbb{R},\,\,
    S(l_U)=\cup\{d: L(d)=l_U\},
\label{eq:phi}
\end{equation}
where the output of the function, $\phi$ (e.g. with BM25 or a pseudo-relevance feedback method), does not depend on the non-location type qualifiers $q_U \in Q$.

A simple content matching technique is then to employ a standard ranking function, e.g. BM25, or language model
computing the similarity between a candidate POI $d: L(d)=l_U$ and all POIs in the user profile,
\begin{equation}
\mathcal{S}(d,U) = \sum_{P=(D,T,r) \in U} \phi(P,d),\,\, d \in S(l_U), \label{eq:simqd}
\end{equation}
where $\mathcal{S}(d,U)$ is the text-based content matching score between a candidate POI $d$, and the user profile $U$.
Each POI in the current location context can then be sorted in descending order of their similarity scores and presented to the user.

Figure \ref{fig:IRSetup_pictorial} shows a pictorial representation of our proposed IR setup for contextual suggestion where each POI is represented as a document (bag-of-words). A sample profile $P_i = (D, T, r)$ for a user's preference history is shown as a collection of three components (tuples): the document representation ($D$) of the POI, a set of tags ($T$) and the rating ($r$), provided by the user, for the POI. From the ranking perspective, we then need to perform content matching between a candidate document (representation of a candidate POI) $d: L(d) = l_U$ and every document (representation of profile $P_i = (D, T, r) \in U$) in the user's preference history.

\subsection{Representation of POIs and user profiles} \label{ss:poi-profile}
In our experiment setup, each document $D \in \mathcal{D}$ is represented as a bag-of-words which is comprised of descriptive information about the POI (available as a part of the crawled TREC web corpus) and other available information such as review texts collected from a location based social network (LBSN), viz. Foursquare. The combined use of the web crawl and content collected from LBSN as a static corpus complies with the standard experimental setup of most systems which participated in the TREC contextual suggestion (TREC-CS) tracks over a number of years \cite{hashemi2016overview}.

We
note
at this point that since the crawled web content is likely to have been substantially different across different systems participating over a number of years in the TREC-CS tracks (primarily due to the dynamic nature of the content present in different LBSNs, and also because of changes in the APIs used to obtain the data). Consequently, the results reported by different TREC-CS participating systems are somewhat difficult to compare against one another.
Instead of directly comparing against the reported results from the TREC-CS track overview papers, to ensure reproducibility and fairness in comparison of results, we apply a number of approaches within the same experimental framework.

Moreover, a majority of the TREC-CS participating systems made use of external data, such as ratings from other users, category information, external review texts etc. for their experimental setup. These systems, therefore, depend heavily on a number of different LBSN data sources, such as Trip Advisor, Yelp, Foursquare etc., which again makes the results difficult to compare due to the dynamic nature of the data and the APIs.
To overcome reproduciblity and fairness concerns,
our experiment setup makes use of a static data collection of POI contents. Moreover, while it may be argued that applying a combination of post-processing techniques such as rule based heuristics developed from external knowledge resources \cite{MostafaTRECCS16}, may further enhance the effectiveness of the methods investigated (including our proposed approaches), we do not employ any post processing techniques in our experiments. This is primarily because the purpose of our experiments is to investigate the effectiveness of different POI retrieval approaches under a data-driven controlled setup, and relying on a set of pre-existing rules defeats the purpose, because these rules are prone to changes with changes in the data, thus making such rule-based approaches not scalable.

For all our experiments, we only use a part of the user profile information, specifically, the POIs with
a user-assigned rating higher than a threshold value. In the TREC-CS 2016 data, ratings are integers within $[-1, 4]$. As per the general user profile representation (Equation \ref{eq:profile}), each rating value is normalized within $[0, 1]$ (by min-max normalization). We then apply a threshold of $0.8$ to define the \emph{relevant} set of POIs for a user, i.e., these are the ones that are eventually used to construct the user profile for FRLM and KDEFRLM estimation. Formally speaking, in our experiments, the user profile $U$ (Section \ref{ss:irsetupforcs}) is comprised of only those triples, of the form $(D, T, r)$, where $r\geq 0.8$. We selected this threshold value of $0.8$ after a round of initial experiments,
which is consistent with the instructions provided by TREC-CS 2016 task organizers.

\begin{table}[t]
\centering
\small
\caption{TREC-CS 2016 collection statistics.}
\label{Table:Dataset}
\begin{tabular}{ll}
    \toprule
    Information & Value\\
    \midrule
    Total number of POIs in corpus & 1,235,844\\
    Number of cities per user profile & 1 or 2\\
    Number of rated POIs per user profile & 30 or 60\\
    Total number of candidate cities & 164\\
    Number of candidate cities used by TREC & 48\\
    Maximum number of POIs per city & 23,939\\
    Minimum number of POIs per city & 1,070\\
    Average number of POIs per city & 4,543.54\\
    Total number of user profiles & 438\\
    Number of user profiles used by TREC & 61\\

    \bottomrule
\end{tabular}
\end{table}

\subsection{Dataset} \label{Data}

\para{TREC-CS 2016 Data}
A static web crawl of the TREC-CS 2016 collection has been released by TREC \cite{hashemi2016overview}. There are around 1.2 million POIs in the TREC-CS 2016 collection that are based on 164 seed cities, out of which 48 of these seed cities were officially considered by TREC for experiments.
Although the collection has a total of 438 user profiles, TREC officially used 61 profiles for the Phase-1 task, and released corresponding relevance assessments for these 61 user profiles. Table \ref{Table:Dataset} shows a brief statistics of the TREC-CS 2016 collection. In each user profile, preference history is available for 1 or 2 seed cities with 30 or 60 POIs (i.e. 30 POIs per city), that have been rated by the user. Technically, a system needs to make contextual suggestion from overall 48 seed cities for those 61 user profiles.

\para{Details of the resource for modeling \emph{soft} contextual constraints}
We noted earlier in Section \ref{ss:irsetupforcs} that Aliannejadi et al. \cite{Aliannejadi_crowdsourceData} released a manually assessed dataset\footnote{Available at \url{https://www.inf.usi.ch/phd/aliannejadi/data.html}} comprising two different types of knowledge bases for
information corresponding to a seed set of term-context associations. Single context based appropriateness scores of some instances of association between a term or a short phrase and a single context are shown in Table \ref{Table:CrowdsourcedContextualRelevanceSingle}. The appropriateness scores lie within $[-1, +1]$, $-1$ being completely inappropriate and $+1$ being completely appropriate. The first row of Table \ref{Table:CrowdsourcedContextualRelevanceSingle} shows that 12 assessors agreed that `American Restaurant' is appropriate for the `trip-duration=Weekend-trip' context. The average appropriateness score (from 7 assessors) for `American Restaurant' is $0.7142$ when the context is `trip-duration=Longer'. `Nightlife Spot', as expected, is judged to be inappropriate for `accompanied-by=Family'.

For the joint context based appropriateness measure (Table \ref{Table:CrowdsourcedContextualRelevanceJoint}), the scores are either $-1$ or $+1$, $+1$ being contextually appropriate and $-1$ being contextually inappropriate. It can be seen that an `Irish pub' or a `Movie Theater' is very appropriate (appropriateness score of 1.0), when a user is accompanied by her friends on a holiday trip. Similarly a `Steakhouse' is appropriate when the joint context is business trip (trip-type), family (accompanied-by) and longer trip (trip-duration). Although a `bar' is appropriate for the joint context ``Holiday, Alone, Weekend trip'', it is judged to be inappropriate in the context of a weekend trip with family.

The contextual appropriateness data contains a total of 11 different contextual categories - $3$ instances of `trip-type' context (business trip, holiday or other trip), $4$ instances of `trip-duration' context (day trip, longer, night out or weekend trip), and $4$ instances of `accompanied-by' context (alone, family, friends or other). Assessments are available for $179$ most frequent Foursquare category tags and $27$ unique combinations of three contextual constraints.
For our experimental setup, as shown in Equation \ref{eq:kappa}, we normalized the contextual appropriateness scores for both single and joint context, within $[0, 1]$.

\subsection{Methods Investigated}   \label{ss:methods}

We employ a number of standard IR based and recommender system (RecSys) based methodologies as baselines for comparison against our proposed models.
In addition to investigating the overall effectiveness of alternative approaches, with respect to our proposed models, we explore the following.
\begin{itemize}
    \item Finding an optimal trade-off between a user's preference history (\emph{exploitation}) and the information about the POIs constrained to a \emph{hard} contextual constraint such as `location' (\emph{exploration}) for contextual POI recommendation.
    \item Finding the most effective way to include \emph{soft} contextual constraints such as `trip-type', `accompanied-by' of a given user profile into the POI recommendation framework with a particular focus to improve the precision at top ranks.
\end{itemize}

With respect to the second objective above, the choice of the \emph{soft} constraint similarity function $\psi=\{\psi_l, \psi_s, \psi_j\}$ yields three different versions for each method investigated, corresponding to: i) not using the soft constraints (i.e. location-only based retrieval), ii) using the single-context, iii) using the joint-context based similarities, respectively. In our results reported in Table \ref{Table:ResultsCombined2}, we denote this choice of our model instantiation by an additional parameter for the function $\psi$. The function corresponding to only location (\emph{hard}) constraints corresponds to the constant function $\psi_l: (w, q) \mapsto \{1\}$.

\subsubsection{IR Baselines}
To acquire the comparative effectiveness of our proposed approaches
we choose a number of baselines based on ablations of components/factors from our proposed models.
The IR baselines are enlisted below.
\begin{enumerate}[leftmargin=*]
    \item \textbf{BL1 - BM25}:
    We employ the standard BM25 retrieval model as the similarity measure function of Equation \ref{eq:simqd}. We select user assigned tags ($T'$, as we used in Equation \ref{eq:rlmprofile}) from the set of tuples $(D, T, r)$, where $r \geq 0.8$ to form a weighted query, where for each query term $t \in T'$, we include the value of $\psi(t, q_U)$ as the weight of that term in the query. BM25 parameters $k, b$  are optimized by grid search with respect to nDCG@5.

    \item \textbf{BL2 - Term Selection}:
    Since our proposed models estimate a weighted term distribution, we apply a method of extracting a set of terms
    from the set of documents from the set of tuples $(D, T, r)$, where $r \geq 0.8$
    (based on BM25 weights) as one of the baselines. Note that the parameter settings of $k$ and $b$ for BM25 remain the same as that of BL1. We optimize the number of selected terms to $25$ by grid search. Additionally, similar to BL1, we include the value of $\psi(t, q_U)$ as the weight of each selected term $t$, in the query. This model is able to take into account exploitation by selecting terms from user profile.

    \item \textbf{BL3 - BM25 with Term Selection:}
    Since we combine both the user preference history and information about the POIs within a current context for FRLM and KDEFRLM estimation, we apply a CombSUM \cite{Fox94combSUM} technique to merge the two ranked lists obtained with BL1 (BM25) and BL2 (Term Selection). This offers a naive method of combining two sources of information, i.e. user preference history and the POI content in current contexts.

    \item \textbf{BL4 - RLM}:
    Since, at its core, our proposed approach relies on estimating a factored relevance model, we select the traditional relevance model (RLM) of Equation \ref{eq:traditional_rlm} as a baseline. Similar to BL1 (BM25), we consider the user assigned tags from the user profile with ratings $r \geq 0.8$ as observed terms (analogous to a query). We then estimate a relevance model (RLM) to rank the POIs within the current context. To incorporate the \emph{soft} contextual constraints into the traditional RLM framework,
    we include the weights obtained from the $\psi$ function (external knowledge resource) as weights into the standard RLM equation (Equation \ref{eq:rlmprofile}).

    In contrast to the factored relevance model, this baseline model only makes use of the \emph{exploration} part while formulating the query, i.e., with respect to the standard RLM \cite{Lavrenko_RLM2001:RBL:383952.383972}, the set of tags in a user history acts as the query and the RLM term weights are computed using the local co-occurrences from the top-retrieved POI descriptors constrained to a given user-specified location.

    \item \textbf{BL5 - KDERLM}: We choose word vector compositionality based relevance feedback using kernel density estimation \cite{DoiKDERLM_CIKM16} (Equation \ref{eq:KDERLM_1D}) as another baseline. This baseline corresponds to a KDE based generalized version of traditional RLM (the factored part corresponding to an enriched matching between the user profile and POIs in a current location being ablated).

    Similar to BL4 (RLM), in this baseline we also use the tags from a user profile with ratings higher than or equal to $0.8$ as observed terms (analogous to a query), and then estimate a KDE-based RLM to score POIs within a current context.

    Again, the \emph{soft} contextual constraints are incorporated within KDERLM (Equation \ref{eq:KDERLM_1D}) as weighting factors
    computed with the $\psi$ function.

\end{enumerate}

Parameters for each method were separately tuned with the help of a grid search. Since our proposed models are unsupervised (without involving any parameter learning with the help of gradient descent updates), we do not employ a separate train and test split for conducting grid search.
Two common parameters to all the relevance feedback models are the number of feedback documents, $M$, and the number of feedback terms, $\tau$.
It was found after a grid search that RLM and FRLM yielded optimal results with the values $5$ (\#documents) and $25$ (\#terms). Similarly for KDERLM, $M$ and $\tau$ were optimized to the values $3$ and $80$, whereas for KDEFRLM, the optimal values of $M$ and $\tau$ were found to be $2$ and $100$, respectively.

\subsubsection{Recommender System Baselines}

In the absence of other users' ratings, it is not possible to apply standard recommender system (RecSys) approaches such as, collaborative filtering directly to predict the relevance of a POI (considered as an item in RecSys research). However, a disparate analogy allows us to employ standard RecSys methodologies as a pre-processing step in our experimental setup. Specifically, one may imagine that the contents in user profiles are analogous to users in RecSys terminology, whereas the set of user-assigned tags used to describe POIs are analogous to items. This user-item analogy allows us to learn semantic associations between a user profile and the tag vocabulary. Given a user profile, it is thus possible to enrich the set of tags (analogous to suggesting more items for a user in the traditional framework of RecSys research).
Following this general set up for our RecSys based experiments, we now explain the details of each RecSys based baseline approach.

\begin{enumerate}[leftmargin=*]
\setcounter{enumi}{5}
    \item \textbf{BL6 - Most Popular K}:
    A simple (but effective) RecSys methodology is the recommendation of the \emph{most popular} items based on overall ratings across all users, with the expectation that these items will be appropriate to the new user as well \cite{mostpop}. With respect to our experimental setup, we extract the $K$ most popular tags across each user's preference history. We then use these selected tags to form the query for each user. For instance, if the tag `beer' is one of the most popular tags in the tag vocabulary across all users, suggesting pubs as candidate POIs for a new user is likely to be a good recommendation.

    After formulating an enriched query based on the most popular tags, we apply the standard BM25 retrieval model as the similarity matching function (Equation \ref{eq:simqd}) with the same settings of $k, b$, as that in BL1. $K$ (the number of popular tags to extract for enriching the query) is optimized based on the average rating of tags across the set of all users. The threshold for this average rating was set to $0.8$. A \emph{soft} constraint based variant of this baseline includes the value of $\psi(t, q_U)$ as the weight of each selected tag $t$ in a query.

    \item \textbf{BL7 - Profile Popular K}:
    In contrast to the previous approach of finding the globally most popular tags across all users, this approach restricts the selection of the most popular tags to each user profile only. It can be argued that this approach extracts tags in an entirely personalized manner. For instance, this method selects the tag `seafood' as a query term if it is one of the most popular tags in the preference history of only the current user. Similar to BL6 (Most Popular K), BM25 is used as the similarity function (Equation \ref{eq:simqd}) with the same settings of $k, b$, as that in BL6. $K$ is optimized based on the user profile specific average rating of tags and the cut-off for average rating is set to $0.8$. Again, \emph{soft} constraints are included as $\psi(t, q_U)$ weights associated with each tag $t$ in the query.

    \item \textbf{BL8 - NeuMF}:
    We used a state-of-the-art neural network based matrix factorization method \cite{NCF_WWW2017}, which makes use of a fusion of generalized matrix factorization (GMF) and multi-layer perceptron (MLP) to better model the complex user versus item interactions (in our case, an item corresponding to a tag). Similar to the Popular-K baselines (both collaborative and personalized), the $K$ most likely tags, as predicted by the NeuMF model, are then used to construct a weighted query, using the $\psi$ function as the weight values similar to the previously described approaches.

    \item \textbf{BL9 - Bayesian content-based recommendation}:
    A standard text classification based content matching technique, widely used in recommender systems, is employing a Bayesian classifier \cite{bayesian_classifier}. As per the requirement of a supervised binary classification approach, we consider the set of all positively rated documents in a user profile, i.e. all $D$s from the set of tuples $(D, T, r)$, where $r \geq 0.8$, as the `positive' class, whereas the set of all negatively rated documents in a user profile, i.e. all $D$s from the set of tuples $(D, T, r)$, where $r < 0.8$, are considered to define the `negative' class. We then train a binary Naive-Bayes classifier. During recommendation, for each POI that is classified as `positive', we consider the posterior likelihood value of the classifier as the score of the POI. We then present the ranked list by sorting the POIs in decreasing order of these likelihood scores.

    Since BL9 (Bayesian) is primarily a text classification based approach, and there is no direct notion of weighted query with varying term importance, we limit use of this baseline to our \emph{hard} constraint only experiments.

\end{enumerate}

\subsubsection{Hybrid baselines}

\begin{enumerate}[leftmargin=*]
\setcounter{enumi}{9}

    \item \textbf{BL10 - Content + Tag Matching}:
    As mentioned earlier in Section \ref{ss:poi-profile}, due to the use of external data resources by the
    TREC-CS participating systems, the
    results reported therein are not directly comparable with our results (in terms of the absolute values of the measured metrics). We therefore conduct experiments with the recorded best performing method of TREC-CS 2016 within our setup. This method involves a
    hybrid of content and tag matching \cite{Aliannejadi:2017:VAP:3077136.3080754, Aliannejadi_ToISJournal}.

    More precisely speaking, the similarity matching function of this method is a combination of

    %

    query words/tags and document (POI) words/tags similarity (Content + Tag score) with a predicted likelihood score of the relevance between a query word and a given non-location \emph{soft} constraint category \cite{Aliannejadi:2017:VAP:3077136.3080754,Aliannejadi_ToISJournal}.

    As per \cite{Aliannejadi:2017:VAP:3077136.3080754,Aliannejadi_ToISJournal}, we trained an SVM-based binary classifier on the joint-context knowledge resource \cite{Aliannejadi_crowdsourceData} (with relevance labels 0/1) using as inputs the scores for the single contexts. While testing (i.e., at query time), the distance of a $3$-dimensional joint context input from the classifier boundary is added to the text (tag-word) matched score (higher the distance, the higher is the likelihood of a tag to be appropriate to the given joint context). We employ this approach as a baseline and denote it by `Content + Tag + SVM'.
    Additionally, we also investigate the method of adding the scores obtained from the $\psi_s$ and $\psi_j$ functions in conjunction with the `Content + Tag' approach.

    \item \textbf{BL11 - Hybrid}: We employ a CombSUM \cite{Fox94combSUM} of the two ranked lists obtained with the best performing IR-based baseline BL5 (KDERLM), and another strong baseline BL10 (Content + Tag Matching), which allows provision for an ensemble of content and tag matching.

\end{enumerate}

Distances between word vectors are used in
the kernel density based approaches and in modeling the soft constraints. Specifically, for our experiments the embedded space of word vectors is obtained by executing skipgram \cite{Word2vec_NIPS2013} with default values for the parameters of window-size (5) and the number of negative samples (5), as set in the \texttt{word2vec} tool\footnote{\url{https://github.com/tmikolov/word2vec}}. Skipgram was trained on the collection of the POI descriptors in the TREC-CS collection.
\subsection{Relevance Model for IR} \label{RelevanceModelRevisited}
The relevance model (RLM) \cite{Lavrenko_RLM2001:RBL:383952.383972} is a relevance feedback method which estimates a term's importance for relevance feedback by using the co-occurrence information between a set of given query terms and those occurring in the top-retrieved documents. RLM hypothesizes that the terms frequently co-occurring with a query term are semantically related to the information need and, therefore, could be used to enrich the query with additional information.

Formally speaking, given a query $Q=\{q_1,\ldots,q_n\}$, the RLM estimates a term weight distribution from a latent relevance model $R$, $P(w|R) \approx P(w|Q)$, from a set of $M$ top-retrieved documents $\mathcal{M}=\{D_1,\ldots,D_M\}$, as shown in Equation \ref{eq:traditional_rlm}.
\begin{equation} \label{eq:traditional_rlm}
	P(w|Q) = \sum_{D \in \mathcal{M}} P(w|D) \prod_{q \in Q} P(q|D)
\end{equation}
From Equation \ref{eq:traditional_rlm}, it can be noted that higher $P(w|Q)$ values, i.e. RLM term weights are achieved for a term $w$, when it occurs frequently in a top-retrieved document, i.e. $P(w|D)$ is large, in conjunction with the frequent occurrence of a query term $q \in Q$ such that $P(q|D)$ is also a large value.

This original version of the relevance model is commonly known as `RM1' in the literature. `RM1' does not take the original query terms into account while estimating the density function, which usually results in a query drift \cite{ComparativeRLM}. It has been shown that a mixture model of the estimated density of other term weights in conjunction with the original query terms yields more robust feedback results \cite{ComparativeRLM}.
This mixture model, commonly known by the name `RM3' \cite{NasreenJaleel_RM3}, is represented as shown in Equation \ref{eq:RM3}.
\begin{equation} \label{eq:RM3}
	P'(w|R) = \lambda P(w|R) + (1-\lambda) P(w|Q)
\end{equation}
Each mention of `relevance model' or `RLM' in this paper is to be interpreted as its more effective mixture model variant, i.e. `RM3'.

\subsection{User Profile based RLM}  \label{ss:profile_rlm}

The primary challenge in matching a user profile with a POI descriptor in the current context (Equation \ref{eq:simqd}) is to extract a set of contextually relevant terms from the documents and tags of the user profile.
A naive way to compute the similarity scores in Equation \ref{eq:simqd} is to consider each document along with the user tags as a simple bag-of-words representation. This could potentially lead to noisy similarity estimation. To be more precise, there are two likely reasons that this naive similarity estimation may be ineffective. First, the information present in a user profile may be quite diverse in nature with only a specific aspect of it being likely to be useful in the current context, e.g. a user is likely to visit many different locations under different contexts in her past, however only a small number of them would be relevant within a present context).
Second, it is often the case that the POI descriptors are long documents likely to introduce noise in the estimated similarities. Instead, focusing on relevant parts of these documents that are contextually related with the query rather than the whole document may lead to better similarity estimation.

With this motivation, we propose to employ a RLM to estimate a weighted distribution of terms extracted from the user profile, and use this term distribution $\theta_{U, q_U}$ to rank the POIs (documents) in the current context, $(l_U, q_U) \in (L,Q)$, where $l_U$ is user's current location qualifier and $q_U$ is the non-location type trip qualifier.

To estimate a relevance model based on a user profile $U$, we consider the set of tags in a POI descriptor $P=(D,T,r) \in U$ (Equations \ref{eq:simqd}) as the observed or known terms (which are analogous to query terms in the IR framework of RLM). Let $T'$ be the set of user assigned tags, i.e. union of all $T$s from the set of tuples $(D, T, r) \in U$. A sample set $T' = \{$\texttt{American-restaurant, beer, beach, caf\'{e}, fast-food, shopping-for-wine}$\}$ is shown in Fig. \ref{fig:frlm}. The set of top ranked documents on this occasion is the provided set of documents in the user preference history, i.e. union of all $D$s from the set of tuples $(D, T, r) \in U$. Formally,
\begin{equation}
    P(w|\theta_{U, q_U}) = \sum_{(D,T,r) \in U} r P(w|D) \prod_{t \in T'}P(t|D) \label{eq:rlmprofile},

\end{equation}
where the estimated RLM captures the semantic relationship between a user specified tag and a term presented in the documents, by co-occurrence corroboration from the user profile.

The rating values are used as confidence scores for the co-occurrences which allows the relevance model to assign more weight to terms that co-occur more frequently with the user assigned tags in highly rated POI content. Note that, we do not use these ratings as \emph{labels} to optimize an objective function, as in a supervised learning set up,
which means that we can use the unsupervised relevance model without problem.
If there are no POI specific ratings available,
our relevance model simply sets the confidence scores as $1$, i.e. uniform weights for all POIs in the user profile.

\begin{figure}
	\centering
	\includegraphics[width=0.6\textwidth]{image/FRLM_tree_annotated2}
	\caption{Schematic Diagram of a Factored Relevance Model (FRLM).}
    \label{fig:frlm}
\end{figure}

\subsection{Factored RLM for Contextual Relevance} \label{ss:factoredrlm}

To impose the \emph{hard} constraint of the location qualifier $l_U$, we estimate another relevance model $\theta_{U,q_U,l_U}$, by making use of both the user profile based relevance model estimated only with the soft constraints (Equation \ref{eq:rlmprofile}) and the selected subset of location-specific POIs (documents). This time the terms estimated in the user profile based RLM
$\theta_{U, q_U}$
are considered to be the observed terms and the set of top ranked documents are the
documents, denoted by $M(\theta_U,q_U,l_U)$, are top $M$ documents retrieved in response to the query constrained to be satisfying the \emph{hard} location constraint $l_U$. This is stated formally in Equation \ref{eq:flm}.
\begin{equation}
    P(w|\theta_{U, q_U, l_U}) = \sum_{d \in M(\theta_U,q_U,l_U)} P(w|d) \prod_{t \in \theta_{U, q_U}} P(t|d) \label{eq:flm}.

\end{equation}
Equation \ref{eq:flm} is a factored relevance model in which estimating $\theta_{U,q_U,l_U}$ needs $\theta_{U,q_U}$ to be estimated first, which acts as the factor model. This factored relevance model \emph{explores} the potentially relevant POIs in the user's current location context $l_U$, to achieve a better ranking of the POIs.

As a generalization, we use a linear combination of the two relevance models of Equations \ref{eq:rlmprofile} (\emph{exploitation} part) and Equation \ref{eq:flm} (\emph{exploration} part), into a combined model,
\begin{equation}
    P(w|\theta) = \gamma_H P(w|\theta_{U, q_U}) + (1-\gamma_H)P(w|\theta_{U, q_U, l_U}), \label{eq:frlm_linearcomb}
\end{equation}
where $\gamma_H$ is the trade-off parameter to control the relative importance of the two relevance models. We call this version of our proposed model the Factored ReLevance Model (FRLM).

redpajama_set_name: RedPajamaArXiv