a bayesian model for recommendation in social rating networks with trust relationships
DESCRIPTION
A Bayesian generative model is presented for recommending interesting items and trustworthy users to the targeted users in social rating networks with asymmetric and directed trust relationships. The proposed model is the first unified approach to the combination of the two recommendation tasks. Within the devised model, each user is asso- ciated with two latent-factor vectors, i.e., her susceptibility and expertise. Items are also associated with corresponding latent-factor vector repre- sentations. The probabilistic factorization of the rating data and trust relationships is exploited to infer user susceptibility and expertise. Sta- tistical social-network modeling is instead used to constrain the trust relationships from a user to another to be governed by their respec- tive susceptibility and expertise. The inherently ambiguous meaning of unobserved trust relationships between users is suitably disambiguated. An intensive comparative experimentation on real-world social rating networks with trust relationships demonstrates the superior predictive performance of the presented model in terms of RMSE and AUC.TRANSCRIPT
A Bayesian Model for Recommenda3on in Social Ra3ng Networks with Trust Rela3onships
Gianni Costa, Giuseppe Manco, Riccardo Ortale
Mo3va3ng example
• Joe is looking for a restaurant – Likes fish – Enjoys rock music – No smoker
Chez Marcel
• Ra3ng 2 – “Came there with some
friends. Too loud, and the choice was very limited. I had one steak which wasn’t great”
– Doesn’t like fish – Doesn’t like rock music
1
• Ra3ng 2 – “Too noisy. But good
assortment of cigars” – Doesn’t like rock music – Smoker 2
• Ra3ng 5 – “GoSa try the seabass.
Wonderful!” – Member of “Slow Food” 3
• Ra3ng 4 – “Jam night every
Wednesday. Good local groups. A must-‐see place.”
– Writes on “Rolling Stone” 4
Overall ra3ng:
Mo3va3ng example
• Joe is looking for a restaurant – Likes fish – Enjoys rock music – No smoker
Chez Marcel
• Ra3ng 2 – “Came there with some
friends. Too loud, and the choice was very limited. I had one steak which wasn’t great”
– Doesn’t like fish – Doesn’t like rock music
1
• Ra3ng 2 – “Too noisy. But good
assortment of cigars” – Doesn’t like rock music – Smoker 2
• Ra3ng 5 – “GoSa try the seabass.
Wonderful!” – Member of “Slow Food” 3
• Ra3ng 4 – “Jam night every
Wednesday. Good local groups. A must-‐see place.”
– Writes on “Rolling Stone” 4
Overall ra3ng:
• Joe’s profile doesn’t match 1 and par3ally matches 2
• 3 and 4 are authorita3ve in their fields
Mo3va3ng example
• Joe is looking for a restaurant – Likes fish – Enjoys rock music – No smoker
Chez Marcel • Ra3ng 5 – “GoSa try the seabass.
Wonderful!” – Member of “Slow Food” 3
• Ra3ng 4 – “Jam night every
Wednesday. Good local groups. A must-‐see place.”
– Writes on “Rolling Stone” 4
Overall ra3ng:
Recommenda3on with trust (and distrust)
• We need to only consider compa3ble profiles • Authorita3veness and suscep3bility play a role • Recommenda3on is twofold
– Who should we trust? – What should we get suggested according to our trustees’ preferences?
Formal Framework
Input: Users, items
Basic assump3on: an underlying social network of trust rela3onships exists among users
Formal Framework Output: (Signed) Network of trust rela3onships + item adop3ons
-‐ +
Related works • Ra3ng predic3on for item recommenda3on in social networks with – unilateral rela3onships
• e.g., trust networks – coopera-ve and mutual rela3onships
• e.g., friends, rela3ves, classmates and so forth • Link predic3on – temporal vs structural approaches
• Assume graphs with evolving (resp. fixed) sets of nodes – unsupervised vs supervised approaches
• Compute scores for node pairs based on the topology of network graph alone.
• Cast link predic3on as a binary classifica3on task
Basic Idea: Latent Factor Modeling
• Three factor matrices: P, Q, F – Pu,k represents the suscep3bility of user u to factor k
– Fu,k represents the exper3se of user u into factor k
– Qi,k represents the characteriza3on of item i within factor k
Modeling item adop3ons
Ru,i | P,Q,F,↵ ⇠ N ((Pu + Fu)0 Qi,↵
�1)
• Likes fish • Enjoys rock
music • No smoker
u i
• Seafood • Live music • Smoking areas
Modeling trust rela3onships
• Likes fish • Enjoys rock
music • No smoker
• Member of “Slow Food”
Ru,i | P,Q,F,↵ ⇠ N ((Pu + Fu)0 Qi,↵
�1)
Au,v | P,F,� ⇠ N (P0uFv,�
�1)
Pr(Ru,i|A,R) Pr(Au,v|A,R)
Pr(Ru,i|A,R) =
Z X
Y
Pr(Ru,i|P,Q,F) Pr(Y,P,Q,F|A,R) dP dF dQ
Pr(Au,v|A,R)
Z X
Y
Pr(Au,v|P,Q,F) Pr(Y,P,Q,F|A,R) dP dF dQ
u
v
The Bayesian Genera3ve Model
ra ↵�
PF Q
⇤P
µP⇤
F
µF
⇤Q
µQ
µ0,�0W0, ⌫0
N ⇥MN ⇥N
N M
Fig. 1. Graphical representation of the proposed Bayesian hierarchical model.
1. Sample
⇥P ⇠NW(⇥0)
⇥Q ⇠NW(⇥0)
⇥F ⇠NW(⇥0)
2. For each item i 2 I sample
Qi ⇠ N (µQ,⇤�1Q )
3. For each user u 2 N sample
Pu ⇠N (µP,⇤�1P )
Fu ⇠N (µF,⇤�1F )
4. For each pair hu, vi 2 N ⇥N sample
Au,v ⇠ N (�P0
uFv
�,��1)
5. For each pair hu, ii 2 N ⇥ I sample
Ru,i ⇠ N ((Pu + Fu)Q0j ,↵
�1)
Fig. 2. Generative process for the proposed Bayesian hierarchical model.
Pr(A⇤uv|R,A,⌅) relative to the prior ⌅ = {⇥0,�,↵}. Exact inference consists
in computing these predictive distributions as reported at Eq. 3.3 and Eq. 3.4,where we set ⇥ = {P,⇥
P
,F,⇥F
,Q,⇥Q
} for readability sake.
ra ↵�
PF Q
⇤P
µP⇤
F
µF
⇤Q
µQ
µ0,�0W0, ⌫0
N ⇥MN ⇥N
N M
Fig. 1. Graphical representation of the proposed Bayesian hierarchical model.
1. Sample
⇥P ⇠NW(⇥0)
⇥Q ⇠NW(⇥0)
⇥F ⇠NW(⇥0)
2. For each item i 2 I sample
Qi ⇠ N (µQ,⇤�1Q )
3. For each user u 2 N sample
Pu ⇠N (µP,⇤�1P )
Fu ⇠N (µF,⇤�1F )
4. For each pair hu, vi 2 N ⇥N sample
Au,v ⇠ N (�P0
uFv
�,��1)
5. For each pair hu, ii 2 N ⇥ I sample
Ru,i ⇠ N ((Pu + Fu)Q0j ,↵
�1)
Fig. 2. Generative process for the proposed Bayesian hierarchical model.
Pr(A⇤uv|R,A,⌅) relative to the prior ⌅ = {⇥0,�,↵}. Exact inference consists
in computing these predictive distributions as reported at Eq. 3.3 and Eq. 3.4,where we set ⇥ = {P,⇥
P
,F,⇥F
,Q,⇥Q
} for readability sake.
Inference and Predic3on • Given observed trust rela3onships (A) and item adop3ons (R)
we want to infer
• Problem: trust bias – Observed rela3onships in a social network are rarely nega3ve: people
only make posi3ve connec3ons explicit
Ru,i | P,Q,F,↵ ⇠ N ((Pu + Fu)0 Qi,↵
�1)
Au,v | P,F,� ⇠ N (P0uFu,�
�1)
Pr(Ru,i|A,R) Pr(Au,v|A,R)
Inference and Predic3on
• Solu3on: latent variable modeling
• Yu,v represents a (bernoulli) latent variable sta3ng
whether a nega3ve trust rela3onship exists between u and v
v
u
Inference, model learning
• Inference by averaging on latent variables
• Posteriors sampled through Gibbs sampling
Ru,i | P,Q,F,↵ ⇠ N ((Pu + Fu)0 Qi,↵
�1)
Au,v | P,F,� ⇠ N (P0uFu,�
�1)
Pr(Ru,i|A,R) Pr(Au,v|A,R)
Pr(Ru,i|A,R) =
Z X
Y
Pr(Ru,i|P,Q,F) Pr(Y,P,Q,F|A,R) dP dF dQ
Pr(Au,v|A,R)
Z X
Y
Pr(Au,v|P,Q,F) Pr(Y,P,Q,F|A,R) dP dF dQ
Evalua3on • Two datasets
– Product evalua3on, trust rela3onships
– 5-‐star ra3ng system
Gibbs sampling(N , ⇥0 = {µ0, �0, ⌫0,W0}, �, ↵, �)1: Sample a subset U ✓ N ⇥ N such that u ! v 62 A;
2: Initialize P
(0), F(0), Q(0), Y(0);3: for h = 1 to H do
4: Sample ⇥(h)P ⇠ NW(⇥n) where ⇥n is computed by updating ⇥0 with P, SP;
5: Sample ⇥(h)F ⇠ NW(⇥n) where ⇥n is computed by updating ⇥0 with F, SF;
6: Sample ⇥(h)F ⇠ NW(⇥n) where ⇥n is computed by updating ⇥0 with Q, SQ
7: for each (u, v) 2 U do
8: Sample ✏(h)u,v according to Eq. 4.4;
9: end for
10: for each (u, v) 2 U do
11: Sample Y (h)uv according to Eq. 4.3;
12: end for
13: for each u 2 N do
14: Sample Pu ⇠ N✓µ⇤(u)P ,
h⇤
⇤(u)P
i�1◆
;
15: Sample Fu ⇠ N✓µ⇤(u)F ,
h⇤
⇤(u)F
i�1◆;
16: end for
17: for each i 2 I do
18: Sample Qi ⇠ N✓µ⇤(i)Q ,
h⇤
⇤(i)Q
i�1◆;
19: end for
20: end for
Fig. 4. The scheme of Gibbs sampling algorithm in pseudo code
Ciao Epinions
Users 7,375 49,289Trust Relationships 111,781 487,181
Items 106,797 139,738Ratings 282,618 664,823
InDegree (Avg/Median/Min/Max) 15.16/6/1/100 9.8/2/1/2589OutDegree (Avg/Median/Min/Max) 16.46/4/1/804 14.35/3/1/1760
Ratings on items (Avg/Median/Min/Max) 2.68/1/1/915 4.75/1/1/2026Ratings by Users (Avg/Median/Min/Max) 38.32/18/4/1543 16.55/6/1/1023
Table 1. Summary of the chosen social rating networks.
– Thirdly, we analyze the structure of the model and investigate the propertiesthat can be derived, such as relationships among factors and propensities ofusers within given factors.
Datasets. We conducted experiments on two datasets representing social ratingnetworks from the popular product review sites Epinions and Ciao, describedin [29]. Users in these sites can share their reviews about products. Also they canestablish their trust networks from which they may seek advice to make decisions.Both sites employ a 5-star rating system. Some statistics of the datasets areshown in Table 1 and in Fig. 5. We can notice that both the trust relationshipsand the rating distributions are heavy-tailed. Epinions exhibits a larger numberof users, as well as a larger sparsity coe�cient on A.
Evaluation setting. We chose some state-of-the-art baselines from the current lit-erature. For rating prediction, we compared our approach against SocialMF [14].The metric used here is the standard RMSE. We exploited the implementationof SocialMF made available at http://mymedialite.net. For trust prediction, we
●
●
●
●
●
●
●
●●
●
●●●
●●●●●●
●●●
●●●●●
●●●
●●
●
●
●
●
●●●●
●●●●
●●
●
●
●
●●●
●
●●
●
●
●●
●
●●
●
●
●
●
●
●●
●
●
●●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●●●
●●
●
●
●●
●
●
●
●
●
●●●
●●●
●
●
●
●●
●
●
●●
●
●
●
●●●
●
●●●
●
●●
●
●●
●
●●
●
●
●●●●
●●
●
●
●●
●
●●
●
●
●
●●●●●●●●●●●●●●●
●
●●●●●●●
●
●●●●●●●●
●
●●
●●
●
●
●
●
●●●●●●●● ●
InDegree − Epinions
InDegree
Frequency
1 10 100 1000
10100
1000
10000
●
●
●
●
●
●
●
●
●●●
●●●
●●●
●●●
●●●●●
●
●●●●
●●
●
●●
●●
●
●●●
●
●
●
●●●
●
●●
●
●
●●
●
●
●
●
●
●●●●
●
●
●
●
●
●
●
●●●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●●
●●
●
●
●
●
●●
●
●
●●●●
●
●
●
●
●
●
●
●●
●
●
●
●●
●
●●●●●●●●
●
●
●●
●
●●
●●●●●●●●●●
●
●●●●●●●●●●●●●●●● ● ●● ●●
OutDegree − Epinions
OutDegree
Frequency
1 10 100 1000
10100
1000
10000
●
●
●
●
●
●
●
●
●●●●●●●●●●●●●●●●●
●●●●●●
●●●●●●●
●●●●●●
●
●●
●
●●●●●●
●
●●
●●
●
●●
●●
●
●●●●
●●●●
●
●
●
●
●
●
●●●●
●
●●●
●●
●●
●●
●●
●
●●
●●
●●●
●
●
●●●
●
●
●
●
●●●
●
●
●
●
●●●
●
●●
●●
●
●
●●●
●
●●●●
●
●●
●
●●
●
●
●●●
●
●●
●
●
●●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●●
●
●
●
●
●
●
●●
●
●●
●
●●
●●
●●
●
●
●
●
●
●●●
●
●
●●
●
●
●
●
●●
●
●
●
●
●●
●●●●
●
●●●
●
●
●
●
●●
●
●
●
●●●
●
●
●●
●
●
●●
●
●
●
●
●
●●●
●
●
●
●●
●
●●●●
●
●●
●
●●●●●
●
●●●
●
●
●●
●●●
●●●
●
●●●●
●
●●
●
●●●●●●●●●●●●●●
●
●●●●●●●●●●●●●●●●●●●●●● ● ●● ●
ItemRatings − Epinions
ItemRatings
Frequency
1 10 100 1000
10100
1000
10000
1e+05
●
●
●
●
●
●
●●
●●
●●
●●
●●
●●●●
●●●●●●●●
●
●
●
●
●●●●
●●●
●
●
●●
●
●
●●●
●
●
●●●●
●●
●●
●
●●
●
●
●
●
●
●
●
●●
●●
●
●
●●
●
●●
●
●
●
●
●●●
●
●
●
●
●
●
●●
●
●
●
●●●
●●
●
●●●
●●●
●●
●●
●
●
●
●
●
●
●
●
●●
●
●
●●●●
●●●
●●
●
●●
●●
●●●●●●
●
●●
●
●●●●●●●●●●●●●
●●
●●
●●
●●●●●●●●●●●
●
●●●● ●●●●
UserRatings − Epinions
UserRatings
Frequency
1 10 100 1000
10100
1000
10000
●
●
●
●
●
●
●
●●
●
●
●●
●●●
●
●
●●
●
●
●
●
●
●
●●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
InDegree − Ciao
InDegree
Frequency
1 10 100
10100
1000 ●
●
●
●
●
●
●
● ●
●
●
●
●
●●
●
●●
●
●
●
●
●
●
●
●●●
●
●●
●
●
●
●●
●
●●
●
●
●
●●●
●
●
●
●
●●●
●
●
●
●
●
●
●●
●
●
●
●
●●
●
●
●●●●
●●
●
●
●
●●
●
●
●●●●
●
●●●●●●●●●
●
●●●●●●●●●● ●●
●
●● ●
OutDegree − Ciao
OutDegree
Frequency
1 10 100
10100
1000
●
●
●
●
●
●
●
●
●
●
●
●●
●●
●
●
●●●●
●●●●
●●
●
●
●
●●
●
●
●●●
●
●●
●
●
●
●●
●
●
●
●
●
●●
●
●●
●
●●●
●
●●●●●●●
●●
●●●●●●
●
●●● ●● ●●● ●
ItemRatings − Ciao
ItemRatings
Frequency
1 10 100
10100
1000
10000
1e+05
●
●
●●
● ●●●
●●●●●
●
●●
●●●●●●
●
●
●
●●●
●
●
●
●●
●
●●
●
●
●
●●
●
●
●●●●
●
●
●
●●●●
●
●
●●●
●●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●●
●
●
●●●●
●●
●
●
●
●
●●
●
●
●
●
●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●
●●
●
●●
●
●
●●●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●●
●
●
●
●
●
●
●●●●
●
●
●
●
●●
●●
●
●
●
●
●●
●●
●●●
●
●
●●
●
●
●●●●
●●
●
●●
●
●●●●
●
●
●
●●●●
●
●●
●
●●
●
●●●
●
●●●●●
●●
●
●
●
●
●
●
●●
●
●
●●●●●
●
●●
●
●
●
●●●●
●
●●●●●●●●●●●●●
●
●●●●●●●●●●●●●●
●
●●●●●●●●●●●●●●●●●●●●●●
●
●●●●●●●●●●●●●●●●●●● ● ●
UserRatings − Ciao
UserRatings
Frequency
10 100 1000
10100
Fig. 5. Distributions of trust relationships and ratings in Epinions and Ciao.
adapted the framework described in [20]. For each user, we considered the rat-ings as user features and we trained the factorization model which minimizes theAUC loss. We exploited the implementation made available by the authors athttp://cseweb.ucsd.edu/ akmenon/code. We refer to this method as AUC-MFin the following. In addition, we considered a further comparison in terms ofboth RMSE and AUC against a basic matrix factorization approach based onSVD named Joint SVD (JSVD) [11]. We computed a low-rank factorization ofthe joint adjacency/feature matrix X = [A R] as X ⇡ U · diag(�1, . . . ,�K) ·VT ,where K is the rank of the decomposition and �1, . . . ,�K are the square roots ofthe K greatest eigenvalues of XT
X. The matrices U and V resemble the rolesof P, F and Q: The term Uu,k can be interpreted as the tendency of u to trustusers, relative to factor k. Analogously, Vu,k represents the tendency of u to betrusted, and Vi,k represents the rating tendency of item i in k. The score can be
hence computed as [26] score(u, x) =PK
k=1 Uu,k�kVx,k, where x denotes eithera user v or an item i.
In all the experiments, we performed a Monte-Carlo Cross Validation, byperforming 5 training/test splits. Within the partitions, 70% of the data wereretained as training, and the remaining 30% as test. The splitting was accom-plished for the sole data upon which to measure the performance (i.e., ratingsfor the RMSE and links for the AUC).
Concerning the AUC, it is worth noticing that Epinions and Ciao only con-tain positive trust relationships, and the computation of the AUC relies onthe presence of negative values. Negative values are indeed crucial in the ap-proach [20], since the latter relies on a loss function which penalizes situationswhere the score of negative links is higher than the score of positive links. Inprinciple, we can consider all links in the test-set as positive examples, and allnon-existing links as negative example. However, the sparsity of the networksposes a major tractability issue, as it would make the computation of the AUCinfeasible. A better estimation strategy in [2, 26] consists in narrowing the nega-
Evalua3on • RMSE on Ra3ng Predic3on • AUC on Link Predic3on • Compe3tors
– RMSE: SocialMF, JSVD (SVD on the combined matrices) – AUC: Matrix Factoriza3on tuned on AUC loss (AUC-‐MF), JSVD
• Experiments – 5-‐Fold Monte-‐Carlo Cross Valida3on (70/30 split on each trial, for the
matrix to predict)
RMSE
tive examples to all the 2-hops non-existing links, i.e., all triplets (u, v, w) whereboth (u, v) and (v, w) exhibit a trust relationship in A, but (u,w) does not.
Results. Fig. 6 reports the averaged results of the evaluation. We ran the exper-iments on a variable number of latent factors, ranging from 4 to 128. We cannotice that the proposed hierarchical model, denoted as HBPMF, achieves theminimum RMSE on both datasets. There is a tendency of the RMSE to pro-gressively decrease. However, this tendency is more evident on SocialMF, whilethe other two methods exhibit negligible di↵erences.
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
4 8 16 32 64 128
Epinions
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4 HBPMF
JSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Ciao
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Epinions
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDAUC−MF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
4 8 16 32 64 128
Ciao
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 6. Prediction results.
The opposite trend is observed in trust prediction. Here, all methods tend toprefer a low number of factors, as the best results are achieved with K = 4. Thedevised HBPMF model achieves the maximum AUC on the Epinions dataset,and results comparable to JSVD on Ciao. The detailed results are shown inFig. 7, where the ROC curves are reported. In general, the predictive accuracyof the Bayesian hierarchical model is stable with regards to the number of factors.This is a direct result of the Bayesian modeling, which makes the model robustto the growth of the model complexity. Fig. 8 also shows how the accuracyvaries according to the distributions which characterize the data. We can noticea correlation between accuracy and node degrees, as well as the number of ratingsprovided by a user or received by an item.
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 7. ROC curves on trust prediction for K = 4.
To evaluate the e↵ects of the joint modeling of both the trust relationshipsand the ratings, we conducted some further experiments withK = 4. In a first ex-periment, we performed the sampling without considering the trust relationships.
AUC
tive examples to all the 2-hops non-existing links, i.e., all triplets (u, v, w) whereboth (u, v) and (v, w) exhibit a trust relationship in A, but (u,w) does not.
Results. Fig. 6 reports the averaged results of the evaluation. We ran the exper-iments on a variable number of latent factors, ranging from 4 to 128. We cannotice that the proposed hierarchical model, denoted as HBPMF, achieves theminimum RMSE on both datasets. There is a tendency of the RMSE to pro-gressively decrease. However, this tendency is more evident on SocialMF, whilethe other two methods exhibit negligible di↵erences.
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
4 8 16 32 64 128
Epinions
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4 HBPMF
JSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Ciao
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Epinions
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDAUC−MF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
4 8 16 32 64 128
Ciao
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 6. Prediction results.
The opposite trend is observed in trust prediction. Here, all methods tend toprefer a low number of factors, as the best results are achieved with K = 4. Thedevised HBPMF model achieves the maximum AUC on the Epinions dataset,and results comparable to JSVD on Ciao. The detailed results are shown inFig. 7, where the ROC curves are reported. In general, the predictive accuracyof the Bayesian hierarchical model is stable with regards to the number of factors.This is a direct result of the Bayesian modeling, which makes the model robustto the growth of the model complexity. Fig. 8 also shows how the accuracyvaries according to the distributions which characterize the data. We can noticea correlation between accuracy and node degrees, as well as the number of ratingsprovided by a user or received by an item.
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 7. ROC curves on trust prediction for K = 4.
To evaluate the e↵ects of the joint modeling of both the trust relationshipsand the ratings, we conducted some further experiments withK = 4. In a first ex-periment, we performed the sampling without considering the trust relationships.
tive examples to all the 2-hops non-existing links, i.e., all triplets (u, v, w) whereboth (u, v) and (v, w) exhibit a trust relationship in A, but (u,w) does not.
Results. Fig. 6 reports the averaged results of the evaluation. We ran the exper-iments on a variable number of latent factors, ranging from 4 to 128. We cannotice that the proposed hierarchical model, denoted as HBPMF, achieves theminimum RMSE on both datasets. There is a tendency of the RMSE to pro-gressively decrease. However, this tendency is more evident on SocialMF, whilethe other two methods exhibit negligible di↵erences.
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
4 8 16 32 64 128
Epinions
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4 HBPMF
JSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Ciao
N. of factors
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDSocialMF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
1.2
4 8 16 32 64 128
Epinions
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
1.2
HBPMFJSVDAUC−MF
4 8 16 32 64 128
0.0
0.2
0.4
0.6
0.8
1.0
4 8 16 32 64 128
Ciao
N. of factors
AUC
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 6. Prediction results.
The opposite trend is observed in trust prediction. Here, all methods tend toprefer a low number of factors, as the best results are achieved with K = 4. Thedevised HBPMF model achieves the maximum AUC on the Epinions dataset,and results comparable to JSVD on Ciao. The detailed results are shown inFig. 7, where the ROC curves are reported. In general, the predictive accuracyof the Bayesian hierarchical model is stable with regards to the number of factors.This is a direct result of the Bayesian modeling, which makes the model robustto the growth of the model complexity. Fig. 8 also shows how the accuracyvaries according to the distributions which characterize the data. We can noticea correlation between accuracy and node degrees, as well as the number of ratingsprovided by a user or received by an item.
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
HBPMFJSVDAUC−MF
Fig. 7. ROC curves on trust prediction for K = 4.
To evaluate the e↵ects of the joint modeling of both the trust relationshipsand the ratings, we conducted some further experiments withK = 4. In a first ex-periment, we performed the sampling without considering the trust relationships.
4 factors
Cold/Warm start effects Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
InDegree < 1010 < InDegree < 100InDegree > 100
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
OutDegree < 1010 < OutDegree < 100OutDegree > 100
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
InDegree < 1010 < InDegree < 100
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
OutDegree < 1010 < OutDegree < 100OutDegree > 100
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
UserRatings(src) < 1010 < UserRatings(src) < 100UserRatings(src) > 100
Epinions
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
UserRatings(dst) < 1010 < UserRatings(dst) < 100UserRatings(dst) > 100
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
UserRatings(src) < 1010 < UserRatings(src) < 100UserRatings(src) > 100
Ciao
False positive rate
True
pos
itive
rate
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
UserRatings(dst) < 1010 < UserRatings(dst) < 100UserRatings(dst) > 100
0.0
0.2
0.4
0.6
0.8
1.0
Epinions
RM
SE
0.0
0.2
0.4
0.6
0.8
1.0
ItemRatings < 1010<ItemRatings < 100100< ItemRatings < 1000ItemRatings > 1000
UserRatings < 1010<UserRatings < 100UserRatings > 100
0.0
0.2
0.4
0.6
0.8
1.0
epinions
RMSE
0.0
0.2
0.4
0.6
0.8
1.0
InDegree < 1010<InDegree < 100OutDegree < 10
10<OutDegree < 100OutDegree > 100
0.0
0.2
0.4
0.6
0.8
1.0
CiaoR
MSE
0.0
0.2
0.4
0.6
0.8
1.0
ItemRatings < 1010<ItemRatings < 100ItemRatings > 100
UserRatings < 1010<UserRatings < 100UserRatings > 100
0.0
0.2
0.4
0.6
0.8
Ciao
RMSE
0.0
0.2
0.4
0.6
0.8
InDegree < 1010<InDegree < 100OutDegree < 10
10<OutDegree < 100OutDegree > 100
Fig. 8. Data distribution vs. AUC and rating prediction.
More precisely, we performed a simple BPMF (as described in [25]). Dually, wediscarded the rating matrix and performed the sampling by only considering thetrust relationships. The first graph of Fig. 9 shows the comparison between theresults of these partial models against those achieved through the full HBPMFmodel. The e↵ects of the joint modeling can be appreciated on the RMSE: inpractice, the additional information provided by the trust relationships refinesthe modeling of the data, thus lowering the RMSE. By contrast, the e↵ects ofthe joint modeling on the AUC do not highlight substantial improvements.
Finally, the last two graphs of Fig. 9 report the running times relative to themethods. For the HBPMF, we achieved stable results for the RMSE after 100iterations, whereas the AUC result was stable after 20 iterations. Both SocialMFand AUC-MF exhibited stable results with 20 iterations. The computationaloverhead of the Gibbs Sampling procedure plays a crucial role here. Therein,it would be interesting to investigate alternative inference strategies based onvariational approximation, which are known to guarantee fast convergence.
6 Conclusions and Future Research
We presented the first unified approach to the recommendation of interestingitems and trustworthy users in social rating networks with trust relationships.The key intuition is that the interactions from users to users as well as betweenusers and items are explained by the same latent factors, which ultimately allowsto combine user and item recommendation into a simple and intuitive Bayesian
Joint modeling
• Significant on RMSE
RMSE (1) AUC (1) RMSE (2) AUC (2)
0.0
0.2
0.4
0.6
0.8
1.0
RMSE (1) AUC (1) RMSE (2) AUC (2)
Met
ric (R
MSE
/AU
C)
0.0
0.2
0.4
0.6
0.8
1.0
Full ModelPartial Model
4 8 16 32 64 128
010
0020
0030
0040
0050
0060
00
4 8 16 32 64 128
Epinions
N. of factors
Tim
e (s
ecs.
)
010
0020
0030
0040
0050
0060
00 HBPMFJSVDSocialMFAUC−MF
4 8 16 32 64 128
050
100
150
200
250
300
350
4 8 16 32 64 128
Ciao
N. of factors
Tim
e (s
ecs.
)
050
100
150
200
250
300
350
HBPMFJSVDSocialMFAUC−MF
Fig. 9. (a) E↵ects of the joint modeling. (1 denotes Epinions, and 2 denotes Ciao). (b)Average running time for iteration (JSVD reports the total time).
generative model. A comparative experimentation over real-world social ratingnetworks confirmed such an intuition: the devised model was shown to deliver asuperior predictive performance in terms of both RMSE and AUC.
Future research will focus on two major directions. We planned to study anextension of our model in which the Indian Bu↵et Process [12] is exploited toautomatically infer the most appropriate number of latent factors from the inputsocial rating network. In addition, variational approximate inference and relatedlearning algorithms will be studied to improve the computational e�ciency. Fi-nally, a further line of research is relative to how the proposed models can beadapted to support recommendation tasks behind rating prediction [24, 5, 4].
References
1. E.M. Airoldi, D.M. Blei, S.E. Fienberg, and E.P. Xing. Mixed membership stochas-tic blockmodels. The Journal of Machine Learning Research, 9:1981 – 2014, 2008.
2. L. Backstrom and J. Leskovec. Supervised random walks: Predicting and recom-mending links in social networks. In Proc. ACM WSDM Conf., pages 635 – 644,2011.
3. N. Barbieri, F. Bonchi, and G. Manco. Cascade-based community detection. InProc. of ACM WSDM Conf., pages 33–42, 2013.
4. N. Barbieri and G. Manco. An analysis of probabilistic methods for top-n recom-mendation in collaborative filtering. In Proc. ECML/PKDD Conf., pages 172–187,2011.
5. N. Barbieri, G. Manco, R. Ortale, and E. Ritacco. Balancing prediction and rec-ommendation accuracy: Hierarchical latent factors for preference data. In Proc. ofSIAM Int. Conf. on Data Mining, pages 1035 – 1046, 2012.
6. G. Costa and R. Ortale. A bayesian hierarchical approach for exploratory analysisof communities and roles in social networks. In Proc. of the IEEE/ACM ASONAMConf., pages 194 – 201, 2012.
7. G. Costa and R. Ortale. A Unified Generative Bayesian Model for CommunityDiscovery and Role Assignment based upon Latent Interaction Factors. In Proc.of the IEEE/ACM ASONAM Conf., To appear, 2014.
8. G. Costa and R. Ortale. Probabilistic analysis of communities and inner roles innetworks: Bayesian generative models and approximate inference. Social NetworkAnalysis and Mining, 3(4):1015 – 1038, 2013.
9. M. DeGroot. Optimal Statistical Decisions. McGraw-Hill, 1970.
Computa3onal cost
RMSE (1) AUC (1) RMSE (2) AUC (2)
0.0
0.2
0.4
0.6
0.8
1.0
RMSE (1) AUC (1) RMSE (2) AUC (2)
Met
ric (R
MSE
/AU
C)
0.0
0.2
0.4
0.6
0.8
1.0
Full ModelPartial Model
4 8 16 32 64 128
010
0020
0030
0040
0050
0060
00
4 8 16 32 64 128
Epinions
N. of factors
Tim
e (s
ecs.
)
010
0020
0030
0040
0050
0060
00 HBPMFJSVDSocialMFAUC−MF
4 8 16 32 64 128
050
100
150
200
250
300
350
4 8 16 32 64 128
Ciao
N. of factors
Tim
e (s
ecs.
)
050
100
150
200
250
300
350
HBPMFJSVDSocialMFAUC−MF
Fig. 9. (a) E↵ects of the joint modeling. (1 denotes Epinions, and 2 denotes Ciao). (b)Average running time for iteration (JSVD reports the total time).
generative model. A comparative experimentation over real-world social ratingnetworks confirmed such an intuition: the devised model was shown to deliver asuperior predictive performance in terms of both RMSE and AUC.
Future research will focus on two major directions. We planned to study anextension of our model in which the Indian Bu↵et Process [12] is exploited toautomatically infer the most appropriate number of latent factors from the inputsocial rating network. In addition, variational approximate inference and relatedlearning algorithms will be studied to improve the computational e�ciency. Fi-nally, a further line of research is relative to how the proposed models can beadapted to support recommendation tasks behind rating prediction [24, 5, 4].
References
1. E.M. Airoldi, D.M. Blei, S.E. Fienberg, and E.P. Xing. Mixed membership stochas-tic blockmodels. The Journal of Machine Learning Research, 9:1981 – 2014, 2008.
2. L. Backstrom and J. Leskovec. Supervised random walks: Predicting and recom-mending links in social networks. In Proc. ACM WSDM Conf., pages 635 – 644,2011.
3. N. Barbieri, F. Bonchi, and G. Manco. Cascade-based community detection. InProc. of ACM WSDM Conf., pages 33–42, 2013.
4. N. Barbieri and G. Manco. An analysis of probabilistic methods for top-n recom-mendation in collaborative filtering. In Proc. ECML/PKDD Conf., pages 172–187,2011.
5. N. Barbieri, G. Manco, R. Ortale, and E. Ritacco. Balancing prediction and rec-ommendation accuracy: Hierarchical latent factors for preference data. In Proc. ofSIAM Int. Conf. on Data Mining, pages 1035 – 1046, 2012.
6. G. Costa and R. Ortale. A bayesian hierarchical approach for exploratory analysisof communities and roles in social networks. In Proc. of the IEEE/ACM ASONAMConf., pages 194 – 201, 2012.
7. G. Costa and R. Ortale. A Unified Generative Bayesian Model for CommunityDiscovery and Role Assignment based upon Latent Interaction Factors. In Proc.of the IEEE/ACM ASONAM Conf., To appear, 2014.
8. G. Costa and R. Ortale. Probabilistic analysis of communities and inner roles innetworks: Bayesian generative models and approximate inference. Social NetworkAnalysis and Mining, 3(4):1015 – 1038, 2013.
9. M. DeGroot. Optimal Statistical Decisions. McGraw-Hill, 1970.
Conclusions • Unified approach item recommenda3on and trust
rela3onships – Mi3gates the effect of not matching profiles – Simple, intui3ve, robust mathema3cal formula3on – Good predic3ve performance
• Issues – Inferring the number of factors
• Indian Buffet Process easy to plug – Modeling alterna3ves
• Logis3c, probit – Computa3onal cost
• Paralleliza3on • Reformula3on as tensor decomposi3on?