\documentclass[jidm,a4paper]{jidm} 

\usepackage{graphicx,url}  
\usepackage[T1]{fontenc}   

\usepackage{amsfonts}
\usepackage{multirow}
\usepackage{float}
\usepackage{capt-of}
\usepackage{subfigure}
\usepackage{rotfloat}
\usepackage{tikz,pgfplots}
\usepackage[ruled,lined,linesnumbered]{algorithm2e}
\usepackage{algorithmic}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newdef{definition}[theorem]{Definition}
\newdef{remark}[theorem]{Remark}

\newenvironment{latexcode}
{\ttfamily\vspace{0.1in}\setlength{\parindent}{18pt}}
{\vspace{0.1in}}

\newcommand{\otoprule}{\midrule[\heavyrulewidth]}

\jidmVolume{0}
\jidmNumber{0}
\jidmYear{16}
\jidmMonth{month}
\setcounter{page}{1}
\pgfplotsset{compat=1.12}

\markboth{C. Z. Fel\'icio et al.}{Exploiting social information in pairwise preference recommender system}

\hyphenation{re-commen-der ty-pi-cal con-si-de-ring PrefRec pre-fe-ren-ce col-la-bo-ra-ti-ve}

\title{Exploiting social information in pairwise preference recommender system}

\author{Cr\'icia Z. Fel\'icio\inst{1,2}, Kl\'erisson V. R. Paix\~ao\inst{2}, Guilherme Alves\inst{2}, Sandra de Amo\inst{2}, Philippe Preux\inst{3}
}

\institute{Federal Institute of Tri\^angulo Mineiro, Brazil \\ \email{cricia@iftm.edu.br}
 \and Federal University of Uberl\^andia, Brazil \\ \email{klerisson@doutorado.ufu.br}, \email{guilhermealves@mestrado.ufu.br}, \email{deamo@ufu.br}
 \and University of Lille \& INRIA Lille - Nord Europe, France \\ \email{philippe.preux@inria.fr}
}

\begin{abstract}
There has been an explosion of social approaches that leverage recommender systems, mainly to deal with cold start problems. However, most of the approaches are designed to handle explicit user's ratings. We have envisioned Social PrefRec, a social recommender that applies user preference mining and clustering techniques to incorporate social information on the pairwise preference recommenders. Our approach relies on the hypothesis that user's preference is similar to or influenced by their connected friends. This study reports experiments evaluating the recommendation quality of this method to handle the cold start problem. Moreover, we investigate the effects of several social metrics on pairwise preference recommendations. We also demonstrate the effectiveness of our proposed social preference learning approach in contrast to state-of-the-art social recommenders, expanding our understanding of how contextual social information affects pairwise recommenders.
\end{abstract}

\category{H.3.3}{Information Storage and Retrieval}{Clustering-Information filtering}
\category{J.4}{Computer Applications}{Social and behavioral sciences}

\keywords{Pairwise preferences, Social Network, Social Recommender System}

\begin{document}

\begin{bottomstuff}
C. Z. Fel\'icio would like to thank Federal Institute of Tri\^{a}ngulo Mineiro for study leave granted. K. V. R. Paix\~{a}o and G. Alves are sponsored by scholarships from CAPES. We also thank the Brazilian research agencies CAPES, CNPq and FAPEMIG for supporting this work.
\end{bottomstuff}

\maketitle

\section{Introduction}
Social recommender (SR) could shatter the barriers for users to consume information. Thus, there has been an explosion of social approaches in this context \cite{srreview}, mainly to deal with cold start problems. Typical SR system assumes a social network among users and makes recommendations based on the ratings of the users who have direct or indirect social relations with the target user \cite{Jamali:2010}. However, explicit user's ratings may be insufficient to capture all the user's interests without loss of information \cite{Balakrishnan:2012}. Thereby pairwise preference learning demonstrates clear utility to tackle such problem \cite{deAmo:2014}. Moreover, the ``marriage'' between pairwise preference recommender and social network can be used in a unique manner to enhance the recommender effectiveness.

In such way, we advance previous work, \textsc{PrefRec} \cite{prefrec}, which is a model-based hybrid recommender system framework based on pairwise preference mining and preferences aggregation techniques. We propose \textsc{Social PrefRec}, an approach to incorporate social networks information in recommendation task to minimize user cold start problem. Different factors of social relationships have influence on users. Some of these factors contribute or even harmed social recommender systems \cite{Yuan201570}. Understanding the extent to which these factors impact SR systems provides valuable insights for building recommenders. Herein, we aim to investigate the role of several social metrics on pairwise preference recommendations. Given that user's preference is similar to or influenced by their connected friends \cite{srreview}, we also aim to study how to apply social similarities in a pairwise preference recommender. Towards our goals, our study is done against two different data sets, namely, Facebook and Flixster to verify the integrity of our results. Focusing on social pairwise preference recommendation, our study addresses six questions:

\textit{Q1: How accurately does social information help on item recommendation?} We intend to assess the accurateness of \textsc{Social PrefRec} by comparing it to \textsc{PrefRec}. This is the key to determine whether a pairwise preference recommender can benefit from social information. In comparison to the original system, our new approach achieves equivalent results. Please note that \textsc{Social PreRec} does not require any user's historical ratings to perform a recommendation, which is not the case regarding \textsc{PreRec}. Thus, to make a fair comparison, we bootstrap \textsc{PreRec} with 30 item's ratings per test user, i.e., twice as much widely adopted quantity on the literature to test cold start scenarios.

\textit{Q2: How relevant are the recommendations made by a social pairwise preference recommender?} One of the main reasons for the relevance of our proposed model is that it is able to mitigate the cold start problem for users through social information. To further assess our model, we compare \textsc{Social PrefRec} to three state-of-art social recommenders.

\textit{Q3: Which social metrics are more important for item recommendation?} The previous questions focus on understanding whether pairwise recommenders could benefit from contextual social information. Here, we want to evaluate the overall performance of each social metric: friendship, mutual friends, similarity, centrality and interaction.

\textit{Q4: How effective is \textsc{Social PrefRec} to data sparsity?} In social recommender systems it is a common assumption that contextual social information mitigates data sparsity problems. To assess our model in this context, we evaluate the effectiveness of \textsc{Social PrefRec} compared to \textsc{PrefRec} against five data sparsity levels.

\textit{Q5: What are the influence of user's profile length and its social degree?} To achieve high-quality personalization, recommender systems must maximize the information gained about users from item ratings. The more ratings a user's profile has, the merrier it is. Controversially, we show that increasing the number of friends, does not positively influence social recommender systems.

\textit{Q6: Are there major differences between recommendations quality of popular and unpopular users?} Since a high social degree does not correlate with high-quality recommendations, here we further investigate social popularity effects on recommender systems. This question complements Q5, offering
valuable insights into when and which social metric affects the recommender predictions. To that end, we divided our sets into two groups: (i) popular users, who have more friends than average; and (ii) unpopular users, who have half of  the average friends. We find that for some social metrics (Q3) the results are very similar across all datasets for popular users. Nonetheless, centrality social metric is not affected by high social degrees.

This work is a follow up on our previous study of social information on pairwise preference recommendation \cite{2015_kdmile_felicio_et_al}, which tackled only Q1 and Q2. We here extend it by completely revisiting how Q2 is addressed, and introducing Q3, Q4, Q5 and Q6 to provide thoughtful discussions about the practical implications of our findings for pairwise recommender systems.

This article is organized as follows. Section \ref{sec:background} presents the background knowledge undertaking in this work. Section \ref{sec:social_prefrec} describes our proposed framework the \textsc{Social PrefRec}, as well as the applied social metrics and recommender model selection strategies. Section \ref{sec:experiments} describes our experimental settings and Section \ref{res} presents the results. Then, Section \ref{sec:related_work} discusses related work and, finally, Section \ref{sec:conclusions} concludes the article.

\section{Background}
\label{sec:background}

\begin{table}[t]
\caption{Movie attributes.\label{tab:dataset}}
\sffamily
  \begin{center}
    \begin{tabular}{cccccc}
    \hline
    Item & Title & Decade & Director & Star & Genre \\ \hline
    $i_1$ & Gangs of New York & 2000 & Scorsese & Di Caprio & Drama \\ 
    $i_2$ & Catch me If You Can & 2000 & Spielberg & Di Caprio & Drama \\ 
    $i_3$ & The Terminal & 2000 & Spielberg & Tom Hanks & Drama \\ 
    $i_4$ & The Departed & 2000 & Scorsese & Di Caprio & Thriller \\ 
    $i_5$ & Shutter Island & 2010 & Scorsese & Di Caprio & Thriller \\ 
    $i_6$ & Saving Private Ryan & 1990 & Spielberg & Tom Hanks & Drama \\ 
    $i_7$ & Artificial Intelligence & 2000 & Spielberg & Haley J. Osment & Drama \\ \hline
    \end{tabular}
  \end{center}
\rmfamily
\end{table}

In this section, we briefly introduce the main concepts underlying this work, such as pairwise preference mining, and the \textsc{PrefRec} framework. Please refer to \cite{prefrec} for more details on pairwise preference recommender systems.

Let $U$ be a set of users and $I$ be a set of items. An user $u$ is represented by an identifier and others attributes, where $A_{u}=\{a_{1},...,a_{r}\}$ is a set of user attributes. Each item $i$ is composed by an identifier and others attributes, where $A_{i}=\{a_{1},...,a_{t}\}$ is a set of item attributes. The user-item rating matrix in a system with $m$ users and $n$ items is represented by $R = [r_{u,i}]_{m \times n}$, where each entry $r_{u,i}$ represents the rating given by user $u$ on item $i$. In Table \ref{tab:dataset} a set of 7 items (movies) and their attributes are exemplified. A user-item rating matrix with 7 users and movies ratings in the range $[1,5]$ is illustrated in Table \ref{utilmatrixorig}.

In traditional recommender systems, the recommendation task is based on the predictions of the missing values in the user-item matrix. Pairwise preference recommender systems predicts the preference between a pair of items with missing values in the user-item matrix. Both types of systems use the predictions to extract a ranking of items and recommend the top-k. 

In our work, we focus on the \textsc{PrefRec} framework, a hybrid model-based approach to design pairwise preference recommender systems. It can be formalized as a quintuple $(R,\mathcal{C},\mathcal{A},\mathcal{P},>_R)$, where $R$ is the user-item rating matrix, $\mathcal{C}$ is a clustering algorithm, $\mathcal{A}$ is a consensus technique, $\mathcal{P}$ is a pairwise preference miner, and $>_R$ is a ranking algorithm. 
Essentially \textsc{PrefRec} works on two phases: (a) construction of the recommendation models, and (b) recommendation. \\

\textit{A) Construction of the recommendation models.} The main activities of this phase are Preferences Clustering, Consensus Calculus and Preference Miner.

\textbf{Preferences Clustering}: First, \textsc{PrefRec} clusters users according to their preferences. This process applies a distance function and the clustering algorithm $\mathcal{C}$ over the rows of user-item rating matrix. A preference vector of user $u_j$ is defined as $\theta_u=R_{u_j}$, where $R_{u_j}$ is a row of matrix $R$. The output of the clustering algorithm is a set of clusters $C$, where each cluster $C_i$ contains a set of users with the most similar preference vectors.

\textbf{Consensus Calculus}: For each cluster $C_i$, a consensus operator $\mathcal{A}$ is applied to compute $\hat{\theta}_{i}$, the consensual preference vector of $C_i$. $\hat{\theta}_{i}$ has its $i^{th}$ element constituted by the average of the $i^{th}$ element from each users' preference vectors $\theta_u$ in $C_i$. Please note that the $\hat{\theta}_{i}$ $i^{th}$ element is computed if and only if more than half of users in $C_i$ rated the item. Otherwise, this position will be empty.

An example of cluster process and consensus calculus can be seen in Table \ref{utilmatrix}. The users from Table \ref{utilmatrixorig} were clustered in two groups according to their preference vectors, and a consensual preference vector for each cluster was computed using the group average rate per item.

In comparison with the original PrefRec, one main enhancement done in these two activities, Preferences Clustering and Consensus Calculus, was the replacement of preference matrix and consensual matrix by vectors. This new representation does not only reduce the algorithm complexity and execution time, but remarkably allows a better clustering step.

\textbf{Preferences Mining}: Having the consensual preference vector from each cluster, the system could establish the preference relation between pairs of items. Formally, a \textit{preference relation} is a strict partial order over $I$, that is a binary relation $P_r \subseteq I \times I$ satisfying the irreflexibility and transitivity properties. We denote by $i_1 > i_2$ the fact that $i_1$ is preferred to $i_2$. According to the previous example, a preference relation over consensual preference vector $\theta_1$ is presented in Table \ref{prefDatabase}.

A preference miner $\mathcal{P}$ builds a recommendation model for each group using item's features. The recommendation models comprise the set $\mathcal{M} = \{\mathcal{M}_0=(\hat{\theta}_{1},P_1), \ldots, \mathcal{M}_k=(\hat{\theta}_{k},P_k)\}$, where $k$ is the number of clusters, $\hat{\theta}_{i}$ is the consensual preference vector, and $P_i$ is the preference model extracted from $\theta_{i}$, for $1 \leq i \leq k$.

In this scenario, a recommendation model is a contextual preference model. This model is designed as a \textit{Bayesian Preference Network} (BPN) over a relational schema $R(A_1,...,A_n)$. A BPN is a pair $(G,\varphi)$ where $G$ is a directed acyclic graph whose nodes are attributes and edges represent attribute dependency; the $\varphi$ is a mapping that associates to each node of $G$ a set of conditional probabilities $P[E_2|E_1]$  of the form of probability's rules: $A_1 = a_1 \wedge \ldots \wedge A_m = a_m \rightarrow X = x_1 > X = x_2$ where $A_1, \ldots, A_m$, $X$ are item attributes. The left side of the rule (condition event $E_1$ in conditional probability) is called the context and the right side (condition event $E_2$ in conditional probability) is the preference on the values of the attribute $X$. This rule reads: \textit{if the values of the attributes $A_1, \ldots, A_m$ are respectively $a_1, \ldots, a_m$ then the value $x_1$ to $x_2$ for the attribute $X$}. Please note that the preferences on $X$ depend on the values of the context attributes. A contextual preference model is able to compare items: given two items $i_1$ and $i_2$, the model is able to predict which is preferred.

\textit{Example Overview.} Considering the relational schema of movie attributes in Table \ref{tab:dataset} and the user-item rating matrix in Table \ref{utilmatrixorig}: \textsc{PrefRec} cluster users, extract preference consensual vector and builds, from $\hat{\theta}_1$ (Table \ref{utilmatrix}), the pairwise preference relation (Table \ref{prefDatabase}). Then, \textsc{CPrefMiner} \cite{Deamo2012}, the preference miner used in this work, can build the BPN depicted in Figure \ref{fig:bpnet1}. And, finally, compare a set of pairs of items. The main idea behind \textsc{PrefRec} is to establish the preference order between pairs of items using an appropriate contextual preference model for a target user $u_k$.

\begin{table}
\begin{minipage}[b]{0.45\linewidth}
\begin{center}
  \caption{User-item rating matrix.\label{utilmatrixorig}}
  \sffamily
 	\begin{tabular}{cccccccc}
      \hline
      & $i_1$ & $i_2$ & $i_3$ & $i_4$ & $i_5$ & $i_6$ & $i_7$ \\ \hline
      Ted & 5 & 2 & - & 1 & -  & 2 & 1 \\ 
      Zoe & 5 & 2 & 4 & 1 & 5 & 1 & - \\ 
      Fred & 4 & - & 5 & - & 5 & - & 1 \\
      Mary & 2 & 5 & 3 & 5 & - & - & - \\ 
      Rose & 1 & - & 2 & - & 2 & - & - \\ 
      Paul & - & - & 3 & 4 & 1 & - & - \\ 
      John & 2 & - & - & 5 & 2 & - & - \\ \hline
       \end{tabular}
 \end{center}
 \rmfamily
\end{minipage}
\hspace{0.25cm}
\begin{minipage}[]{0.5\linewidth}
\begin{center}
\caption{Clusters of users with consensual preferences.\label{utilmatrix}}
\sffamily
\begin{tabular}{cccccccc}
      \hline
      & $i_1$ & $i_2$ & $i_3$ & $i_4$ & $i_5$ & $i_6$ & $i_7$ \\ \hline
      Ted & 5 & 2 & - & 1 & -  & 2 & 1 \\ 
      Zoe & 5 & 2 & 4 & 1 & 5 & 1 & - \\ 
      Fred & 4 & - & 5 & - & 5 & - & 1 \\ \hline
      $\hat{\theta}_1$ & \textbf{4.7} & \textbf{2.0} & \textbf{4.5} & \textbf{1.0} & \textbf{5.0} & \textbf{1.5} & \textbf{1.0} \\ \hline
      Mary & 2 & 5 & 3 & 5 & - & - & - \\ 
      Rose & 1 & - & 2 & - & 2 & - & - \\ 
      Paul & - & - & 3 & 4 & 1 & - & - \\ 
      John & 2 & - & - & 5 & 2 & - & - \\ \hline
      $\hat{\theta}_2$ & \textbf{1.3} & \textbf{*} & \textbf{2.7} & \textbf{4.7} & \textbf{1.7} & \textbf{*} & \textbf{*} \\ \hline
   \end{tabular}
  \rmfamily
\end{center}
\end{minipage}
\end{table}

\begin{table}
    \begin{minipage}[]{0.2\textwidth}
    \begin{center}
    \caption{$C_1$ pairwise preference relation\label{prefDatabase}}
    \sffamily
       \begin{tabular}{c} \hline
       $(i_1 > i_2)$ \\  
       $(i_1 > i_3)$ \\ 
       $(i_3 > i_6)$ \\ 
       $(i_5 > i_6)$ \\ 
       $(i_2 > i_6)$ \\  
       $(i_5 > i_3)$ \\  
       $(i_2 > i_4)$ \\  
       $(i_6 > i_7)$ \\ \hline
     \end{tabular}
     \rmfamily
     \end{center}
    \end{minipage}%
\hspace{0.2cm}
    \begin{minipage}[]{0.7\textwidth}
        \begin{center}
       \includegraphics[scale=0.45]{Figs/BPNet1.png}
        \captionof{figure}{Bayesian Preference Network \textbf{PNet$_1$} over $C_1$ preferences.\label{fig:bpnet1}}
        \end{center}
     \end{minipage}
\end{table}

\textit{B) Recommendation.} In its second phase, PrefRec aims to use a recommendation model $\mathcal{M}_i$ to recommend items for a \textbf{new user}. It is executed online, differently from the previous phase which is offline. The recommendation process is executed according to the following steps:

\begin{enumerate}

\item Given a target user $u_k$ and a (small) set of ratings provided by $u_k$ over some items of $I$, the first task consists in obtaining the consensual preference vector $\hat{\theta}_s$ corresponding to $u_k$'s ratings. 

\item Compute the similarity between $\theta_u$ (the $u_k$'s preference vector)  and each $\hat{\theta}_i$ correspond to consensual preference vector of each cluster $C_i$. Let $\hat{\theta}_s$ be the consensual preference vector most similar to $\theta_u$. 

\item Consider the preference model $P_s$ corresponding to $\hat{\theta}_s$. $P_s$ is used to infer the preference between pairs of items in $I$ which have not been rated by the user $u_k$ in the past. From this set of pairs of items $(i_j,i_k)$ indicating that user $u_k$ prefers item $i_j$ to item $i_k$, a ranking can be built by applying a ranking algorithm adapted from the algorithm \textsc{Order By Preferences} \cite{Cohen1999}. Thus, the output is a ranking $(i_1, i_2, \ldots, i_n)$ where an item $i_k$ is preferred or indifferent to an item $i_m$, for $k < m$ and $k,m \in \{1,...,n\}$.

\end{enumerate}

\textit{Example.} For instance of how a preference model can be used in a recommendation phase, suppose that $\theta_u$ of a new user $u_k$ is most the similar to consensual preference vector of group $C_1$, $\hat{\theta}_1$. Let us consider the BPN \textbf{PNet$_1$}, which is depicted in Figure \ref{fig:bpnet1}, built over $\hat{\theta}_1$. This BPN allows to infer a preference ordering on items over relational schema $R(Decade, Director, Star, Genre)$ of data movie setting. According to this ordering, a \textbf{new item} $i_8=($2010, Spielberg, Tom Hanks, Drama) is preferred to previous item $i_5=($2010, Spielberg, Di Caprio, Thriller) in Table \ref{tab:dataset}. In order to conclude that, we execute the following steps: 

\begin{enumerate}

\item Let $\Delta : I \times I \rightarrow \{A_i,...,A_j\}$ be the set of attributes for which two items differ. In this example, $\Delta(i_8,i_5) = \{Director,$ $Star, Genre\}$. 

\item Let min$(\Delta(i_8,i_5)) \subseteq \Delta(i_8,i_5)$ such that the attributes in min$(\Delta(i_8,i_5))$ have no ancestors in $\Delta(i_8,i_5)$. According to the \textbf{PNet$_1$} structure, the directed edge linking \textit{Genre} and \textit{Star} implies remove \textit{Star}, therefore, in this example, min$(\Delta(i_8,i_5)) = \{Director, Genre\}$. To have $i_8$ preferred rather than $i_5$ is necessary and sufficient that $i_8[Director] > i_5[Director]$ and $i_8[Genre] > i_5[Genre]$. 

\item Computing the probabilities: $p_1 =$ \textit{probability that} $i_8 > i_5 = P[\textit{Martin Scorsese} > Spielberg] * P[Thriller > Drama] = 0.8 * 0.66 = 0.53$; $p_3 = $ \textit{probability that} $i_5 > i_8 = P[Spielberg > \textit{Martin Scorsese}] * P[Drama > Thriller] = 0.2 * 0.33 = 0.06$; $p_2 = $ \textit{probability that} $i_8$ \textit{and} $i_5$ \textit{are incomparable} $ = 1 - (p_1 + p_3) = 0.41$.

\end{enumerate}

In order to compare $i_8$ and $i_5$ we focus only on $p_1$ and $p_3$ and select the larger one. In this example, $p_1 > p_3$ and so, we infer that $i_8$ is preferred to $i_5$. If $p_1 = p_3$ was true, we would conclude that $i_8$ and $i_5$ are incomparable. \\

\section{Social PrefRec}
\label{sec:social_prefrec}
\textsc{Social PrefRec} proposes a new approach to address the new user problem through social information. It is a \textsc{PrefRec} framework extension, incorporating social information at recommendation phase. There were no modification on how models are built, but at recommendation phase we propose an alternative based on social information to recommend items for new users.

In a simple way, a recommendation for new users using social information could recommend items well rated by his direct friends. Another option is to leverage the tie strength among friends to provide better recommendations. The challenge here is to determine how much influence or similarities exist among user's relationship. Tie strength among users can be computed through similarities on profiles (profession, age bracket, location, etc.), interaction between users (messaging, photos, etc.) and degree of influence.

To support this feature, \textsc{PrefRec} was extended and we devise \textsc{Social PrefRec}. Figure \ref{prefrecmodel} presents its new structure. To better understand it, assume the set of users $U$ and the set of items $I$ aforementioned in Section \ref{sec:background}, the weight function $w : U \times I \to \mathbb{R}$ computes an \textit{user preference degree} for an item and can be represented by a rate $r_{u,i}$ from an user-item rating matrix $R$. In order to represent a social network, let $G=(V,E)$ be a social graph, and $u_k$ and $u_j$ vertices of this graph (users of a social network). A set of friends (neighbors) of a vertex $u_k$ is $F(u_k)=\{u_j | u_j \in V \wedge (u_k,u_j) \in E\}$ and a function $l : F \to \mathbb{R}$ defines \textit{tie strength} between $u_k$ and $u_j$ in $[0,1]$. 

An illustrative example of a social graph in \textsc{Social PrefRec} is shown on Figure \ref{exemplorede}. Nodes represent users, and edges are friendship relations. Labels on edges indicate computed tie strength (see Section \ref{socialmetrics}). Dashed groups are clusters of users, and each cluster is associated with a recommendation model. Suppose that Paty is a new user; therefore, there were no historical preferences associated to her. However, the system already clustered Paty's friends according to their preferences. As soon as Paty shows up, the tie strength is computed, and a suitable recommendation model is selected.   

\begin{figure}
	\begin{center}
		\begin{subfigure}[]{\label{prefrecmodel}}
	 		\includegraphics[width=0.475\textwidth]{Figs/SocialPrefRec-structure.png}
    	\end{subfigure}
    \hfill
	    \begin{subfigure}[]{\label{exemplorede}}
 			\includegraphics[width=0.35\textwidth]{Figs/redesocialprefrec_c.jpg}
	    \end{subfigure}
		\caption{(a) \textsc{Social PrefRec} structure, (b) Social network example.}
    \end{center}
\end{figure}

\subsection{\textsc{Social PrefRec} Framework}
The general architecture of \textsc{Social PrefRec}, the interactions among the five modules, as well as their respective input and output are presented in Figure \ref{prefrecsocial}. Modules from 1 to 4 are from \textsc{PrefRec}, but in module 5 (Recommendation), \textsc{Social PrefRec}, unlike its predecessor, chooses appropriate recommendation model using one social metric according to following steps.  

\begin{enumerate}
\item Given a target user $u_k$ and his social graph $G$, the first task of module 5 consists in applying one of the social strategies (described in Section \ref{socialmetrics}) to compute the tie strength between $u_k$ and his friends ($F(u_k)$). 

\item Using one of the selection model methods and a tie strength metric (both described in Section \ref{socialmetrics})  select the preference model  $P_s$ corresponding to the cluster $C_s$ with more similar friends. 

\item $P_s$ is used to infer the preference between pairs of items in $I$ which have not been rated by the user $u_k$ in the past. From this set of pairs of items $(i_j,i_k)$ indicating that user $u_k$ prefers item $i_j$ to item $i_k$, a ranking can be built as showed in \textsc{PrefRec} approach.

\end{enumerate}

Note that by using this strategy it is possible to recommend to a given user without taking into account any previous ratings, but relying on the user's relations in the cluster set.

\begin{figure}[!th]
\begin{center}
\includegraphics[width=0.825\textwidth]{Figs/frameworkPrefRec.png}\\
\caption{\textsc{Social PrefRec} Framework.\label{prefrecsocial}}
\end{center}
\end{figure}

\subsection{Tie strength calculus and Recommendation model selection \label{socialmetrics}}
Given the social graph $G$ for a target user $u_k$ and for each $u_j \in F(u_k)$, we compute user's tie strength according the following metrics:

\begin{itemize}
\item \textit{Friendship}: In this metric, tie strength is measured by $l(u_k,u_j)=1$, where $1(\cdot)$ is the characteristic function (1 if argument is true, 0 otherwise).
\item \textit{Interaction level}: Computed as $\frac{a(u_k,u_j)}{\widehat{a}(u_k)}$, where $a(u_k,u_j)$ is the number of times that user $u_j$ appears at $u_k$'s timeline, and $\widehat{a}(u_k)$ is the number of all occurrences of users $u_j$ at  $u_k$'s timeline.

\item \textit{Mutual friends}: Represents the fraction of common friends or Jaccard similarity using $l(u_k,u_j) = \frac{F(u_k) \cap F(u_j)}{F(u_k) \cup F(u_j)}$.

\item \textit{Similarity score}: Given by demographic similarity between $u_k$ and $u_j$ according to function $l(u_k,u_j)= sims(u_k,u_j)$. We compute this value by the average of individual similarity in each demographic attribute (Age bracket, Sex, Religion, etc), using the binary function $similarity(u_k,u_j,A_i)$, wich returns 1 if attribute $A_i$ is similar for $u_k$ and $u_j$, 0 otherwise.

\item \textit{Centrality}: Calculated by average of closeness, betweenness and eigenvector centrality measures with $l(u_k,u_j)=centrality(u_j)$.

\end{itemize}

\textsc{Social PrefRec} allows the definition of any strategy to find an appropriate recommendation model. To do it, Module 5 provides a function to select a recommendation model. Let $select : U \rightarrow \mathcal{M}$ be a function that selects the appropriate recommendation model from $\mathcal{M}$ for a target user $u_k$. In this work, \textsc{Social PrefRec} uses two strategy for recommendation model selection based on tie strength value: minimum threshold and average tie strength. Each strategy has a different type of implementation to function $select$, as explained below:

\begin{itemize}

\item \textit{Minimum threshold}: Let $\varepsilon \in [0,1]$ be a minimum threshold to tie strength value. The minimum threshold strategy will select the preference model $P_i$ (associated with model $\mathcal{M}_i \in \mathcal{M}$) with more users who have a tie strength with the target user $u_k$ equal or above a minimum threshold according to Eq. \ref{eq:minimunThreshold}.

\begin{equation} \label{eq:minimunThreshold}
select(u_k) = \arg\max_{\mathcal{M}_i \in \mathcal{M}}{\left | \{u_j \in F(u_k) \wedge l(u_k,u_j) \geq \varepsilon \} \right |} 
\end{equation}

\item \textit{Average}: The average strategy will select the preference model $P_i$ with users who have the highest average tie strength with the target user $u_k$ according to Eq.\ref{eq:average}.

\begin{equation} \label{eq:average}
select(u_k)=\arg\max_{\mathcal{M}_i \in \mathcal{M}} \frac{1}{|F(u_k)|}\sum_{(u_k,u_j) \in F(u_k)} l(u_k,u_j) 
\end{equation}

\end{itemize}

\section{Experimental Setting}
\label{sec:experiments}

\subsection{Datasets}

\textit{Facebook Dataset.} We surveyed this data set through a developed Facebook web application. With volunteers permission we crawled relationship status, age bracket, gender, born-in, lives-in, religion, study-in, last 25 posts in user's timeline, posts shared and posts' likes, as well as movies previously rated on Facebook platform. In addition, we asked each volunteer to rate 169 Oscar nominated movies in 1 to 5 star scale. We obtained data from 720 users and 1,454 movies, resulting in 56,903 ratings. 

In our experiments, we consider only ratings from the 169 Oscar nominated movies, which represent movies rated by most users. We split Facebook data into two datasets, FB50 and FB100, to represent the set of users who rated at least 50 and 100 movies, respectively. This was done to evaluate the overall system performance under data sets with different sparsity and social information levels. In Table \ref{tabeladataset} summarizes our datasets. The movie's attributes are: genres, directors, actors, year, languages and countries. In FB50 and FB100, user similarity metric was computed using the attributes: relationship status, age bracket, gender, born-in, lives-in, religion and study-in. The $interaction\_level$ was computed considering the last 25 posts in the user timeline, posts shared and likes.

\textit{Flixster Dataset.} \citeN{Jamali:2010} published this dataset. However, movie information was restricted to its title, then we improved it by adding genres, directors, actors, year, languages and countries information retrieved from IMDB.com public data.
We also use two datasets from Flixster with different sparsity level, Flixster 175K and Flixster 811K.
Flixster social information includes friend's relationships, mutual friends, friends centrality and users similarities. Similarity between users is computed only through three attributes: gender, age bracket and location. Interaction information is not available on Flixster dataset. 

\begin{table}[b]
\caption{Dataset features. \label{tabeladataset}}
\sffamily
\begin{center}
\begin {tabular}{ cccccccc }
\hline %
$Dataset$ & Users & Items & Ratings & Sparsity & Rates $/$ User & Links & Links $/$ User \\ 
& & & & (\%) & (Average) & & (Average) \\ \hline
$FB50$ & 361 & 169 & 44.925 & 26.36\% & 124.44 & 2,926 & 8.6 \\ 
$FB100$ & 230 & 169 & 35,459 & 8.77\% & 154.16 & 1,330 & 6.4 \\ 
$Flixster$ $175K$ & 357 & 625 & 175,523 & 26.36\% & 491 & 706 & 2.8 \\ 
$Flixster$ $811K$ & 1,323 & 1,175 & 811,726 & 47.78\% & 613.54 & 6,526 & 5.34 \\ \hline
\end{tabular}
\end{center}
\rmfamily
\end{table}

\subsection{Experimental Protocol\label{sec:protocol}}
Each experiment was performed against the datasets split into two parts: training and test sets. 

\textsc{PrefRec} and \textsc{Social PrefRec} make use of training data to build clusters (K-Means clustering) of similar users. For each cluster $C_i$ they associate a recommendation model $\mathcal{M}_i$. Then, to recommend items for a given user $u_k$, is necessary to select the most similar model (cluster) that fits $u_k$. This process is done during test phase. However, those approaches take different directions. Since \textsc{PrefRec} is not able to deal with social information, it relies on previous ratings of $u_k$ to select its best recommendation model, whereas \textsc{Social PrefRec} requires social information for this task. We employ the \textit{``All but One''} protocol \cite{Breese:1998} to better validate our tests and simulate a realistic cold start scenario. Thus, for each test iteration, one user is taken for test purposes, and the remaining users assemble the training set. Each experiment is composed by $n$ iterations, where $n$ is the number of users. Importantly, we do not provide any rate from test users for the social approaches, which is not the case to test \textsc{PrefRec}, because it can not perform under full cold start scenarios.

\noindent \textit{\textsc{PrefRec} protocol.} The \textsc{PrefRec} recommendation model is built offline. For the test phase $x$ random ratings of the current test user $u_k$ were considered for the choice of the most similar cluster $C_i$. Then, calculating similarity between $u_k$ and $c_i$ is a matter of computing the \textit{Euclidian distance} between their respective ratings arrays $p = (p_1, \ldots, p_n)$ and $q = (q_1, \ldots, q_n)$ weighted by the number of common ratings (y), where $RecEuclidian(p,q)=\frac{\sqrt{\sum_{i=1}^n {(p_i - q_i)}^2}}{y}$. Please note that this similarity distance was used for models clustering (training) and selection models (test) phases. Finally, for validation purpose, the remaining ratings of the current test user $u_k$ were used.

\noindent \textit{\textsc{Social PrefRec} protocol.} Here, there is no difference regarding recommendation model building from \textsc{PrefRec}. However, during test phase, we do not take any rating into account. It demands solely social information to find the most similar cluster, $C_i$, according to a given social metric and a model selection strategy.

\noindent \textit{Matrix Factorization social approaches protocol.} For SoRec \cite{Ma:2008}, SocialMF \cite{Jamali:2010} and TrustMF \cite{Yang:2013} the experimental protocol builds a model $M_i$ for each user $u_i$ using friendship preferences information as training set, which comprehends all friend's item rates. Differently from previous protocols, the recommendation model, $M_i$, is not a clustered preference model, but a specific preference model for each user.

\noindent\textit{\textbf{Parameter Settings.}} In our experiments, we use LibRec \cite{librec} library implementation of SoRec, SocialMF and TrustMF methods with default parameters. Matrix factorization approaches were executed with 10 latent factors and number of interactions equal to 100. We use K-means as our clustering algorithm for PrefRec and Social PrefRec. In addition, we chose the following number of clusters for each dataset: FB50 = 7, FB100 = 6, Flixster 175k = 4, and Flixter 811 = 2.

\subsection{Evaluation methods}

Regarding our evaluation methods, we present results using two metrics: (1) \textit{\textbf{nDCG}} is a standard ranking quality metric to evaluate the ability of the recommender to rank the list of top-k items \cite{rsEval}. (2) We also compute the standard \textit{\textbf{F1 score}}, based on precision and recall, to evaluate the prediction quality of pairwise preferences \cite{prefrec}. 

Besides those metrics, we further analysis how the user ratings profile length and the number of friends impact the recommendation quality through other two metrics: (1) profile length factor and (2) social degree:

\textit{Profile length Factor.} Let $\bar{R}$ be an average number of user ratings and $\alpha$ coefficient, where $\alpha \in \mathbb{R}$. Thus, profile length factor is the product of $\alpha$ and $\bar{R}$. The F1 score is computed for different profile length factors in order to determine the number of ratings necessary to have better predictions in a given dataset.

\textit{Social Degree.} The social degree is given by the average degree of social network (average number of friends)  and an $\alpha$ coefficient where $\alpha \in \mathbb{R}$. Computing social degree as the product of $\alpha$ and social degree will show how the number of friends impact in F1 score values.

\section{Results}\label{res}

In this section, we thoroughly assess the effectiveness of our proposed pairwise preference recommender approach. We start by analyzing the quality of recommendations against our aforementioned datasets (Q1). Then, we measure the relevance of recommendations (Q2), focusing on the ranking relevance of  \textsc{Social PrefRec} comparatively evaluated against three social recommender systems, besides original \textsc{PrefRec}. Further to our discussion, we measure the performance for each social metric (Q3) and also under different sparsity levels (Q4). We end this section by analyzing the performance implications of user's profile length versus its social degree (Q5) and popular versus unpopular users (Q6).

\subsection{How accurately social information help on pairwise preference recommendation? (Q1)}
The $F_1$ scores results can be seen in Figure \ref{modelestrategy_res}, for minimum threshold ($\epsilon=0.4$ for Facebook's dataset and $\epsilon=0.1$ for Flixster dataset) and tie strength average selection model strategies. In all datasets with a profile length of 30-ratings for \textsc{PrefRec} versus 0-ratings for Social PrefRec, social metrics achieved better results using Minimum threshold strategy. Rate-15-items baseline is widely used to bootstrap traditional recommender systems \cite{Chang:2015}. Thus, to make a fair comparison we provide 30-ratings for PrefRec, which means that all runs have a good safe margin and should not harm its performance. Nevertheless, our social approach when does not super-pass its predecessor, still achieving equivalent results as we further discuss on Q3. Note that those results are regarding cold start scenarios. Because under scenarios where a user provides enough rates, social approaches would not add up much value.

\begin{figure}[t]
	\begin{center}
	\begin{subfigure}[]{}
		\begin{tikzpicture}[scale=0.75]
		\begin{axis}[
        height = 5.5cm,
        width = 8cm,
		ymin=0.58,
		ymax=0.735,
		ylabel=$F_1$,
		symbolic x coords={Mutual,Interaction,Similarity,Friendship, Centrality, PrefRec},
		x tick label style={at={(0.5,-0.25)},rotate=45,anchor=east},
		legend style={anchor=north east}
		]
		\addplot coordinates {
		(Mutual, 0.7104)
		(Interaction, 0.6724)
		(Similarity, 0.6616)
		(Friendship, 0.6585)
		(Centrality, 0.6593)
		(PrefRec, 0.6714)
		
		};
		\addplot coordinates {
		(Mutual, 0.6906)
		(Interaction, 0.6330)
		(Similarity, 0.6343)
		(Friendship, 0.6352)
		(Centrality, 0.6452)
		(PrefRec, 0.6364)
		};
		\addplot [color=green,mark=triangle] coordinates {
		(Mutual, 0.6353)
		(Similarity, 0.6008)
		(Friendship, 0.5980)
		(Centrality, 0.6012)
		(PrefRec, 0.5961)
		
		};
		\legend{FB100,FB50,Flixster 175K}
		\end{axis}
		\end{tikzpicture}
    \end{subfigure}
    \begin{subfigure}[]{\label{avgmodel}}
	 \begin{tikzpicture}[scale=0.75]
		\begin{axis}[
		height = 5.5 cm,
		width = 8cm,
		ymin=0.58,
		ymax=0.73,
		ylabel=$F_1$,
		symbolic x coords={Mutual,Interaction,Similarity,Friendship, Centrality, PrefRec},
		x tick label style={at={(0.5,-0.25)},rotate=45,anchor=east},
		legend style={anchor=north east}
		]
		\addplot coordinates {
		(Mutual, 0.6584)
		(Interaction, 0.6527)
		(Similarity, 0.6543)
		(Friendship, 0.6508)
		(Centrality, 0.6523)
		(PrefRec, 0.6714)
		};
		\addplot coordinates {
		(Mutual, 0.6101)
		(Interaction, 0.6237)
		(Similarity, 0.6143)
		(Friendship, 0.6363)
		(Centrality, 0.6257)
		(PrefRec, 0.6364)
		};
		\addplot [color=green,mark=triangle] coordinates {
		(Mutual, 0.6013)
		(Similarity, 0.6013)
		(Friendship, 0.5971)
		(Centrality, 0.5946)
		(PrefRec, 0.5961)
		};
		\legend{FB100,FB50,Flixster 175K}
		\end{axis}
		\end{tikzpicture}

	\end{subfigure}
	\caption{$F_1$ results to Social PrefRec and PrefRec according to model selection strategy: (a) Minimum threshold, (b) Tie strength average.\label{modelestrategy_res}}
    \end{center}
\end{figure}

\subsection{How relevant are the recommendations made by a social pairwise preference recommender? (Q2)}
Table \ref{ndcgs} shows the $nDCG$ results for rank size 5, 10, 15 and 20, under minimum threshold strategy, Section \ref{socialmetrics}, and 0-ratings scenario. We test every approach, described in Section \ref{sec:protocol}, against each dataset to attest the robustness of each proposed model. We observe that \textsc{Social PrefRec} shows a superior result for new user compared to the other social recommenders. One of the main reasons for the effective performance of our approach is that it chooses a suitable recommendation model based on a consensual set of friends' preferences. The other approaches not only consider all friends' preferences, but SocialMF for example, also relies on trust propagation mechanism, which incorporates preferences from friends of friends. Thus, we argue that a specific set of friends (neighbors) might be a better source to provide more relevant recommendations. 

Another main difference is regarding how each approach deal with item' attributes. Matrix factorization profiles both users and items in an user-item rating matrix and through latent factor models transform both items and users to the same latent factor space. Thus, making them comparable. Whereas \textsc{Social PrefRec} makes directly use of item's attributes, as summarized in Section \ref{sec:background}, thus characterizing it as \textit{hybrid} recommender system, opposed by the others which are classified as collaborative filtering \cite{adomavicius2005toward}.

Kruskal-Wallis test of statistical significance shows, with 95\% confidence, that \textsc{Social PrefRec} metrics are significantly better than social matrix factorization approaches. Mutual Friends is better than others \textsc{Social PrefRec} metrics in ndcg@5. For ndcg@10, there is not significant difference between Mutual Friends, Centrality, Friendship, Similarity and Interaction. The performance with Centrality achieves an equivalent score as Mutual Friends in ndcg@15 results. Finally, the ndcg@20 values show that Mutual Friends, Centrality, Friendship and Similarity are not significantly different.

\begin{sidewaystable}
\caption{Resulting values of nDCG@5,@10,@15 and @20 for different social recommenders approaches.\label{ndcgs}}
\sffamily
\begin{center}
\begin {tabular}{ lccccccccc }

\hline 
\multirow{2}*{$Dataset$} & \multirow{2}*{$nDCG$} & \multirow{2}*{\textsc{SoRec}} & \multirow{2}*{\textsc{SocialMF}} & \multirow{2}*{\textsc{TrustMF}} & \multicolumn{5}{c}{\textsc{Social PrefRec}} \\ \cline{6 -10}
 & & & & & Friendship & Similarity & Centrality & Mutual & Interaction \\ \hline 
 
\multirow {4}*{$FB50$}
& $@5$ & 0.8515 \scriptsize{$\pm$ .138}& 0.7469 \scriptsize{$\pm$ .183}&  0.8373 \scriptsize{$\pm$ .147}& 0.9870 \scriptsize{$\pm$ .035}& 0.9860 \scriptsize{$\pm$ .036}& 0.9881 \scriptsize{$\pm$ .033}& \textbf{0.9934} \scriptsize{$\pm$ .025} & 0.9822 \scriptsize{$\pm$ .043} \\

 & $@10$ & 0.8412 \scriptsize{$\pm$ .123}& 0.7536 \scriptsize{$\pm$ .158}& 0.8296 \scriptsize{$\pm$ .133}& 0.9779 \scriptsize{$\pm$ .039}& 0.9770 \scriptsize{$\pm$ .040}& 0.9802 \scriptsize{$\pm$ .038}& \textbf{0.9890} \scriptsize{$\pm$ .028}& 0.9733 \scriptsize{$\pm$ .046}\\

 & $@15$ & 0.8340 \scriptsize{$\pm$ .114}& 0.7550 \scriptsize{$\pm$ .146}& 0.8259 \scriptsize{$\pm$ .122}& 0.9697 \scriptsize{$\pm$ .040} & 0.9683 \scriptsize{$\pm$ .042} & 0.9721 \scriptsize{$\pm$ .039} & \textbf{0.9752} \scriptsize{$\pm$ .033} & 0.9661 \scriptsize{$\pm$ .047}\\
 
 & $@20$ & 0.8297 \scriptsize{$\pm$ .108}& 0.7576 \scriptsize{$\pm$ .139}& 0.8250 \scriptsize{$\pm$ .114}& 0.9612 \scriptsize{$\pm$ .042} & 0.9601 \scriptsize{$\pm$ .045} & 0.9647 \scriptsize{$\pm$ .041} & \textbf{0.9665} \scriptsize{$\pm$ .038} & 0.9589 \scriptsize{$\pm$ .046} \\ \hline
  
 % % % % % %
 
\multirow {4}*{$FB100$}
& $@5$ & 0.8358 \scriptsize{$\pm$ .141}& 0.7124 \scriptsize{$\pm$ .193}&  0.7742 \scriptsize{$\pm$ .149}& 0.9852\scriptsize{$\pm$ .036} & 0.9850 \scriptsize{$\pm$ .038}& 0.9897 \scriptsize{$\pm$ .028} & \textbf{0.9933} \scriptsize{$\pm$ .023} &  0.9762 \scriptsize{$\pm$ .053} \\

 & $@10$ & 0.8251 \scriptsize{$\pm$ .124}& 0.7100 \scriptsize{$\pm$ .173}& 0.7819 \scriptsize{$\pm$ .128}& 0.9746 \scriptsize{$\pm$ .042} & 0.9740 \scriptsize{$\pm$ .042} & 0.9797 \scriptsize{$\pm$ .037} & \textbf{0.9836} \scriptsize{$\pm$ .027} & 0.9762 \scriptsize{$\pm$ .060}\\
 
 & $@15$ & 0.8180 \scriptsize{$\pm$ .119}& 0.7111 \scriptsize{$\pm$ .163}& 0.7835 \scriptsize{$\pm$ .120}& 0.9666 \scriptsize{$\pm$ .044} & 0.9667 \scriptsize{$\pm$ .043} & 0.9706 \scriptsize{$\pm$ .041} & \textbf{0.9715} \scriptsize{$\pm$ .037} & 0.9603 \scriptsize{$\pm$ .061} \\
 
 & $@20$ & 0.8114 \scriptsize{$\pm$ .115}& 0.7166 \scriptsize{$\pm$ .155}& 0.7804 \scriptsize{$\pm$ .115}& 0.9582 \scriptsize{$\pm$ .046} & 0.9587 \scriptsize{$\pm$ .046} & 0.9621 \scriptsize{$\pm$ .044} & \textbf{0.9636} \scriptsize{$\pm$ .042} & 0.9547 \scriptsize{$\pm$ .061} \\ \hline
 
 % % % % % %
 
\multirow {4}{1cm}{$Flixster$ $175K$}
 & $@5$ & 0.8209 \scriptsize{$\pm$ .134}& 0.7715 \scriptsize{$\pm$ .138} &  0.7603 \scriptsize{$\pm$ .136} & 0.9840 \scriptsize{$\pm$ .039} & 0.9852 \scriptsize{$\pm$ .038} & 0.9830 \scriptsize{$\pm$ .039}& \textbf{0.9916} \scriptsize{$\pm$ .023} & -\\

 & $@10$ & 0.8236 \scriptsize{$\pm$ .120} & 0.7753 \scriptsize{$\pm$ .126} & 0.7521 \scriptsize{$\pm$ .127} & 0.9769 \scriptsize{$\pm$ .038} & 0.9779 \scriptsize{$\pm$ .037} & 0.9758 \scriptsize{$\pm$ .039}& \textbf{0.9810} \scriptsize{$\pm$ .030} & - \\
 
 & $@15$ & 0.8224 \scriptsize{$\pm$ .115} & 0.7755 \scriptsize{$\pm$ .123} & 0.7494 \scriptsize{$\pm$ .123} & 0.9713 \scriptsize{$\pm$ .038} & 0.9726 \scriptsize{$\pm$ .037} & 0.9704 \scriptsize{$\pm$ .038}& \textbf{0.9772} \scriptsize{$\pm$ .032} & -\\
 
 & $@20$ & 0.8214 \scriptsize{$\pm$ .111} & 0.7751 \scriptsize{$\pm$ .120} & 0.7485 \scriptsize{$\pm$ .120} & 0.9671 \scriptsize{$\pm$ .039} & 0.9675 \scriptsize{$\pm$ .039} & 0.9657 \scriptsize{$\pm$ .040} & \textbf{0.9766} \scriptsize{$\pm$ .030} & - \\ \hline
 
 % % % % % %
 
 \multirow {4}{1cm}{$Flixster$ $811K$}
 & $@5$ & 0.8198 \scriptsize{$\pm$ .131} & 0.7279 \scriptsize{$\pm$ .139} & 0.7204 \scriptsize{$\pm$ .135} & 0.9810  \scriptsize{$\pm$ .044}&0.9804 \scriptsize{$\pm$ .045}  &0.9809 \scriptsize{$\pm$ .044}  & \textbf{0.9908} \scriptsize{$\pm$ .029} & -\\
 
 & $@10$ & 0.8173 \scriptsize{$\pm$ .118} & 0.7335 \scriptsize{$\pm$ .122} &0.7246  \scriptsize{$\pm$ .122}& 0.9748 \scriptsize{$\pm$ .044}  &0.9744 \scriptsize{$\pm$ .044}  &0.9742 \scriptsize{$\pm$ .044}  & \textbf{0.9812} \scriptsize{$\pm$ .036} & -\\
 
 & $@15$ &0.8145 \scriptsize{$\pm$ .113} & 0.7359 \scriptsize{$\pm$ .116} & 0.7246 \scriptsize{$\pm$ .117} & 0.9699 \scriptsize{$\pm$ .043} &0.9696 \scriptsize{$\pm$ .044}  &0.9699 \scriptsize{$\pm$ .043}  & \textbf{0.9747} \scriptsize{$\pm$ .038} & -\\
 
 & $@20$ &0.8133 \scriptsize{$\pm$ .109} &0.7374 \scriptsize{$\pm$ .113} & 0.7298 \scriptsize{$\pm$ .113} & 0.9662 \scriptsize{$\pm$ .042} & 0.9661 \scriptsize{$\pm$ .043} &0.9667 \scriptsize{$\pm$ .042} & \textbf{0.9685} \scriptsize{$\pm$ .041} & -\\ \hline
\end{tabular}
\end{center}
\rmfamily
\end{sidewaystable}

\subsection{Which social metrics are more important for item recommendation? (Q3)}
We perform Kruskal-Wallis test to check statistical significance among \textsc{Social PrefRec} metrics results and \textsc{PrefRec}, see Figure \ref{avgmodel}. Regarding Mutual Friends, Interaction, Similarity there are no significant differences. Furthermore, Friendship and Centrality results are not significantly different from \textsc{PrefRec} (profile length = 30-ratings) result. Thus, the test shows, with 95\% confidence,  that with the three first metrics we can better  recommend in social 0-rating profile scenario than 30-rating profile in a traditional recommender approach. The others social metrics achieved the same result as the traditional approach, but they do not need any previous rate from a given user.

\subsection{How effective is \textsc{Social PrefRec} to data sparsity? (Q4)}
As sparsity is a big challenge faced by recommendation systems in general, we assume five sub sets obtained from FB100 by eliminating a certain amount of ratings. The basic idea is to simulate sparse scenarios, where input datasets contains too many item to be rated and few ratings per user. For instance, $FB100_{50}$ was obtained by eliminating around 50\% of the ratings in FB100 in a stratified way. Table \ref{esparsas} shows the datasets extracted from FB100 and their respective sparsity.

\begin{table}
 \begin{minipage}[c]{0.35\textwidth}
 \begin{center}
  \caption{FB100 sparse subsets.\label{esparsas}}
  \sffamily
   \begin{tabular}{ccc}
      \hline
      $FB100$ &Rates per user& Sparsity\\ 
      $(Dataset)$ & (Average)& (\%) \\ \hline
      $10$&137,9&18.4 \\ 
      $20$&122,6&27.4 \\  
      $30$&107,28&36.6\\ 
      $40$&91,8&45.7 \\ 
      $50$&76,3&54.8 \\ \hline
   \end{tabular}
	\end{center} 
    \rmfamily 
   \end{minipage}
 \hfill
 \begin{minipage}[]{0.6\textwidth}
 	\begin{center}
    \begin{tikzpicture}[scale=0.7]
		\begin{axis}[
		ymin=0.52,
		ymax=0.72,
		ylabel=$F_1$,
		symbolic x coords={Mutual, Interaction, Similarity,Friendship,Centrality,PrefRec},
		x tick label style={at={(0.5,-0.25)},rotate=45,anchor=east},
		legend pos=outer north east,
		]
			\addplot[color=red,mark=x,style={line width=1pt}] coordinates {
			(Mutual, 0.7104)
            (Interaction, 0.6724)
            (Similarity, 0.6616)
            (Friendship, 0.6585)
            (Centrality, 0.6593)
			(PrefRec, 0.6714)
		};
		
		\addplot[color=blue,mark=x,style={line width=1pt}] coordinates {
        	(Mutual,0.7003)
            (Interaction,0.6673)
            (Similarity,0.6613)
            (Friendship,0.6526)
            (Centrality,0.6549)
			(PrefRec,0.6679)
		};
		
		\addplot[color=green,mark=x,style={line width=1pt}] coordinates {
			(Mutual,0.6808)
            (Interaction,0.6528)
            (Similarity,0.6424)
            (Friendship,0.6347)
			(Centrality,0.6322)
            (PrefRec,0.6529)
		};
		\addplot[color=purple,mark=x,style={line width=1pt}] coordinates {
			(Mutual,0.6376)
            (Interaction,0.6021)
            (Similarity,0.5948)
            (Friendship,0.5932)
			(Centrality,0.5996)
            (PrefRec,0.6092)
		};
		\addplot[color=orange,mark=x,style={line width=1pt}] coordinates {
			(Mutual, 0.5876)
            (Interaction,0.5767)
            (Similarity,0.5686)
            (Friendship,0.5668)
			(Centrality,0.5686)
			(PrefRec,0.5646)
		};
		\addplot[color=violet,mark=x,style={line width=1pt}] coordinates {
			(Mutual, 0.5755)
            (Interaction,0.5561)
            (Similarity,0.5495)
            (Friendship,0.5509)
			(Centrality,0.5519)
			(PrefRec,0.5424)
		};
		\legend{FB100,$FB100_{10}$,$FB100_{20}$,$FB100_{30}$,$FB100_{40}$,$FB100_{50}$}
		\end{axis}
		\end{tikzpicture}
	\captionof{figure}{\textsc{PrefRec} and \textsc{Social PrefRec} metrics across sparse scenarios with \textit{minimum threshold} of 40\%. \label{esparsidadeexp}}
    \end{center}
 \end{minipage} 
\end{table}

Figure \ref{esparsidadeexp} shows that \textsc{PrefRec} is superior in less sparse dataset. However the social approaches against sparser dataset, i.e. $FB100_{50}$ and $FB100_{40}$, exhibit better recommendations quality, particularly for Mutual tie strength metric. These results complement previous analyses of \textsc{Social PrefRec}, where we did not demonstrate the effectiveness of our approach under sparser scenarios \cite{2015_kdmile_felicio_et_al}. 

\subsection{What are the influence of user's profile length and its social degree? (Q5)}
Consistent with our assumption, traditional recommender systems present better performance when they know more user's preferences information. Figure \ref{efsda} shows the prediction performance of \textsc{PrefRec} across two Facebook datasets. We note the recommender predictions getting better as we increase the user's profile length. 

For \textsc{Social PrefRec}, we do not note a correlation between social degree and prediction performance. Figures \ref{efsdb} - \ref{efsdf} show the results for different social degrees. The overall picture is the same across all two datasets and all other social metrics. This leads us to the next question that further evaluates all social metrics for higher and lower social degrees.

\begin{figure}[t]
\centering  
\begin{subfigure}[]{\label{efsda}}
   \begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\alpha$,
	xmin=0.0,
	xmax=1.1,
	ymin=0.63,
	ymax=0.75,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.05,  0.6618)
		(0.1,  0.6767)
		(0.2,  0.685)
		(0.3, 0.6963)
		(0.4,  0.6961)
		(0.5,  0.6955)
		(0.6, 0.6964)
		(0.7, 0.7027)
		(0.8, 0.7118)
		(0.9, 0.7148)
		(1.0, 0.7215)
	};
	
	\addplot coordinates {
		(0.05,  0.6390)
		(0.1,  0.6509)
		(0.2,  0.6569)
		(0.3, 0.6625)
		(0.4,  0.6737)
		(0.5,  0.6728)
		(0.6, 0.6751)
		(0.7, 0.6834)
		(0.8, 0.69)
		(0.9, 0.6892)
		(1.0, 0.6912)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}
\begin{subfigure}[]{\label{efsdb}}
	\begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\beta - Friendship$,
	xmin=0.0,
	xmax=2.4,
	ymin=0.61,
	ymax=0.68,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.2,0.6519)
		(0.4,0.6602)
		(0.6, 0.6664)
		(0.8,0.6663)
		(1.0, 0.6671)
		(1.2,0.6652)
		(1.4,0.6678)
		(1.6,0.6680)
		(1.8,0.6627)
		(2.0,0.6635)
		(2.2,0.6620)
	};
	\addplot coordinates {
		(0.2,0.6429)
		(0.4,0.6434)
		(0.6,0.6445)
		(0.8,0.6480)
		(1.0,0.6494)
		(1.2,0.6498)
		(1.4,0.6462)
		(1.6,0.6443)
		(1.8,0.6419)
		(2.0,0.6264)
		(2.2,0.6213)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}
\begin{subfigure}[]{}
	\begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\beta - Similarity$,
	xmin=0.0,
	xmax=2.4,
	ymin=0.62,
	ymax=0.68,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.2,0.6519)
		(0.4,0.6602)
		(0.6,0.6664)
		(0.8,0.6663)
		(1.0, 0.6671)
		(1.2,0.6652)
		(1.4,0.6678)
		(1.6,0.6680)
		(1.8,0.6627)
		(2.0,0.6635)
		(2.2,0.6620)
	};
	\addplot coordinates {
		(0.2,0.6427)
		(0.4,0.6452)
		(0.6,0.6467)
		(0.8,0.6479)
		(1.0,0.6506)
		(1.2,0.6522)
		(1.4,0.6457)
		(1.6,0.6469)
		(1.8,0.6448)
		(2.0,0.6405)
		(2.2,0.6385)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}

\begin{subfigure}[]{}
	\begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\beta - MutualFriends$,
	xmin=0.0,
	xmax=2.4,
	ymin=0.61,
	ymax=0.68,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.2,0.6418)
		(0.4,0.6562)
		(0.6,0.6615)
		(0.8,0.6613)
		(1.0, 0.6678)
		(1.2,0.6626)
		(1.4,0.6652)
		(1.6,0.6673)
		(1.8,0.6585)
		(2.0,0.6611)
		(2.2,0.6586)
	};
	\addplot coordinates {
		(0.2,0.6370)
		(0.4,0.6404)
		(0.6,0.6396)
		(0.8,0.6480)
		(1.0,0.6475)
		(1.2,0.6454)
		(1.4,0.6403)
		(1.6,0.6422)
		(1.8,0.6393)
		(2.0,0.6249)
		(2.2,0.6190)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}
\begin{subfigure}[]{}
	\begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\beta - Centrality$,
	xmin=0.0,
	xmax=2.4,
	ymin=0.61,
	ymax=0.68,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.2,0.6596)
		(0.4,0.6613)
		(0.6,0.6679)
		(0.8,0.6636)
		(1.0, 0.6682)
		(1.2,0.6652)
		(1.4,0.6666)
		(1.6,0.6619)
		(1.8,0.6552)
		(2.0,0.6562)
		(2.2,0.6581)
	};
	\addplot coordinates {
		(0.2,0.6476)
		(0.4,0.6453)
		(0.6,0.6442)
		(0.8,0.6477)
		(1.0,0.6503)
		(1.2,0.6505)
		(1.4,0.6454)
		(1.6,0.6444)
		(1.8,0.6421)
		(2.0,0.6264)
		(2.2,0.6231)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}
\begin{subfigure}[]{\label{efsdf}}
	\begin{tikzpicture}[scale=0.6]
	\begin{axis}[
	xlabel=$\beta - Interaction$,
	xmin=0.0,
	xmax=2.4,
	ymin=0.59,
	ymax=0.68,
	ylabel=$F_1$]
	\addplot coordinates {
		(0.2,0.6524)
		(0.4,0.6412)
		(0.6,0.6502)
		(0.8,0.6598)
		(1.0, 0.6609)
		(1.2,0.6607)
		(1.4,0.6625)
		(1.6,0.6637)
		(1.8,0.65144)
		(2.0,0.65146)
		(2.2,0.65148)
	};
	\addplot coordinates {
		(0.2,0.6226)
		(0.4,0.6313)
		(0.6,0.6455)
		(0.8,0.6415)
		(1.0,0.6419)
		(1.2,0.6392)
		(1.4,0.6304)
		(1.6,0.6220)
		(1.8,0.6167)
		(2.0,0.5986)
		(2.2,0.6015)
	};
	\legend{FB100,FB50}
	\end{axis}
	\end{tikzpicture}
\end{subfigure}
	\caption{(a) $\alpha$ effect over $F_1$ measure (PrefRec), $\beta$ effect over $F_1$ measure: (b) Friendship, (c) Similarity, (d) Mutual Friends, (e) Centrality and (f) Interaction.}	
	\label{efsd}
\end{figure}

\subsection{Are there major differences between recommendations quality of (un)popular users? (Q6)}
In order to investigate the effects of social degree on \textsc{Social PrefRec}, we begin by recalling the definition of popular and unpopular users. First, we calculate the average number of friends on the subset $FB50$ and $FB100$. Thus, popular users are those that hold more friends than the average number of friends; and unpopular ones are those whom hold half of average. 

Figure \ref{ruinsebons} shows the ($F_{1}$) achieved by \textsc{Social PrefRec} for each social metric against each subset. Note that, the overall performance is similar between each subset. These results might indicate that profile length does not affect our model. Regarding the major differences between popular and unpopular users, the mutual friends social metric achieves the worse results, which indicates the need of larger quantities of friends. On the other hand, the centrality social metric performance shows that it is not affected by the number of friends.

\begin{figure}[h]
\centering
\begin{subfigure}[]{}
		\begin{tikzpicture}[scale=0.75]
		\begin{axis}[
        height = 5.5 cm,
		width = 8cm,
		ymin=0.62,
		ymax=0.69,
		ylabel=$F_1$,
		symbolic x coords={Mutual,Interaction, Similarity,Friendship,Centrality},
		x tick label style={at={(0.5,-0.25)},rotate=45,anchor=east},
		legend style={anchor=north east}
		]
		\addplot coordinates {
            (Mutual, 0.6667)
            (Interaction, 0.6653)
            (Similarity, 0.6657)
            (Friendship, 0.6655)
			(Centrality, 0.6661)
		};
		
		\addplot coordinates {
            (Mutual, 0.6278)
            (Interaction, 0.6488)
            (Similarity, 0.6451)
            (Friendship, 0.6442)
			(Centrality, 0.6691)   
		};
		\legend{FB100-Popular,FB100-Unpopular}
		\end{axis}
		\end{tikzpicture}
		\end{subfigure}
\begin{subfigure}[]{}	
	\begin{tikzpicture}[scale=0.75]
		\begin{axis}[
          height = 5.5 cm,
		width = 8cm,
		ymin=0.59,
		ymax=0.66,
		ylabel=$F_1$,
		symbolic x coords={Mutual,Interaction,  Similarity,Friendship,Centrality},
		x tick label style={at={(0.5,-0.25)},rotate=45,anchor=east},
		legend style={anchor=north east}
		]
			\addplot coordinates {
            (Mutual, 0.6375)
            (Interaction, 0.6355)
            (Similarity, 0.6375)
            (Friendship, 0.6375)
            (Centrality, 0.6396)
		};
		
		\addplot coordinates {
			(Mutual,0.5944)
            (Interaction, 0.6038)
            (Similarity, 0.6203)
            (Friendship, 0.6203)
            (Centrality, 0.6349)
		};
		\legend{FB50-Popular,FB50-Unpopular}
		\end{axis}
		\end{tikzpicture}
\end{subfigure}
\caption{(a) $F_1$ metric for Popular users and Unpopular users in FB100 and (b) FB50 with \textit{minimum threshold} of 10\%.}	
\label{ruinsebons}
\end{figure}

\section{Related Work} \label{sec:related_work}
We are unaware of work that evaluates how to incorporate contextual social information in pairwise preference recommenders. Thus, this work engages two research fields:

\textit{Pairwise Preference Recommendation.} \citeN{Balakrishnan:2012} have proposed an adaptive scheme in which users are explicitly asked for their relative preference between a pair of items. Though it may provide an accurate measure of a user's preference, explicitly asking users for their preference may not be feasible for large numbers of users or items, or desirable as a design strategy in certain cases. \citeN{Park:2009} proposed a pairwise preference regression model to deal with the cold start user problem. We corroborate with their idea. They argue that ranking of pairwise users preferences minimize the distance between real rank of items and then could lead to better recommendation for a new user. On the same direction, \citeN{Sharma:2013} propose a probabilistic latent semantic indexing model for pairwise learning, which assumes a set of users' latent preferences between pairs of items. We build on previous work \cite{prefrec} by adapting a pairwise preference recommender to leverage a graph of information, social network.

\textit{Social Recommender.} This research field especially started because social media content and recommender systems can mutually benefit from one another. Many social-enhanced recommendation algorithms are proposed to improve recommendation quality of traditional approaches \cite{rsweb2014} \cite{recsysAlexandridisSS13}. In terms of using user's social relationships to enhance recommender systems effectiveness, there are some common themes between \textsc{Social PrefRec} and the works of \citeN{Ma:2008} \citeyear{Ma:2011} \citeyear{Ma:2011:2}. They developed two approaches called SoRec and SoReg. The former is based on probabilistic matrix factorization to better deal with data sparsity and accuracy problems. The latter also relies on a matrix factorization framework, but incorporates social constraints into its built models. 

Furthermore, TrustMF is an adaption of matrix factorization technique to map users in terms of their trust relationship, aiming to reflect reciprocal users' influence on their own opinions \cite{Yang:2013}. SocialMF also explores the concept of trusting among users, but in the sense of propagation into the model \cite{Jamali:2010}. In comparison, the goal of \textsc{Social PrefRec} is to exploit social networks in pairwise preference fashion. Although we also employ both users' social network information and rating records, we do it in a different way. Instead of embedding social information in recommendation models, we built a loosely coupled approach based on clustering techniques to choose a suitable model for a given user.

\section{Conclusion}\label{sec:conclusions}
We have devised and evaluated \textsc{Social PrefRec}, an approach whose ultimate goal is to help pairwise preferences recommender systems to deal with 0-rating user's profile. Driven by six research questions, we expand previous work by analyzing and demonstrating the effectiveness of our proposed social preference learning approach. Our analyses were performed on three real datasets. We also carefully investigate the role of five well known social metrics in pairwise preference recommendation and proposed a clustering based approach to incorporate social networks into recommender systems, which in turn can bring novel ways to extend traditional recommenders.

Finally, although focused on social networks, our work could be extended to tackle other networks (graphs) where we can compute a tie from similarities scores among nodes, such as scientific networks or inferred networks \cite{2016_ai_felicio_et_al}. Another interesting direction for future work is the study of how to choose more influential nodes, e.g., find out which are the friends who have strong influence on an user and apply their preferences to tackle cold start recommendations.

\bibliographystyle{jidm}
\bibliography{jidmb}

\begin{received}
\end{received}
\end{document}
