You are on page 1of 4

Supplementary material for: Content-Based Social

Recommendation with Poisson Matrix Factorization


Eliezer de Souza da Silva, Helge Langseth and Heri Ramampiaro

1 Variational inference
Variational updates for q(Ydv ):
We know that the complete conditional of Ydv and Zud are Multinomial distributions, so we will take
a look in general form of the variational updates when we have a multinomial complete conditional.

p(x|) = Mult(x|m, p = (p1 , , pn ))


n
X
log p(x|) = log m! + xi log(pi ) log(xi !)
i=1
n
X
Eq(p1 , ,pn ) log p(x|) = log m! + xi Eq(pi ) [log(pi )] log(xi !)
i=1
n
Y exp{Eq(pi ) [log(pi )]}xi
exp{Eq(p1 , ,pn ) log p(x|)} = m!
i=1
xi !
q(x) = Mult(x|m, p = (p1 , , pn ))
with pi = exp(Eq(pi ) [log(pi )])
X
and pi = 1
i

The above result is saying that if the complete conditional of a variable is a multinomial, the
approximate variational distribuition is also a multinomial with parameters proportional to
exp(Eq(pi ) [log(pi )]) (or alternatively, the log of the parameters proportional to Eq(pi ) [log(pi )]).
Now we shall apply this result to Ydv .

Ydv | Mult(Wdv ; dv = (dv,1 , , dv,K ))


vk dk
with dv,k = P
k vk dk
q(Ydv ) = Mult(Wdv ; dv = (dv,1 , , dv,K ))
X
log dv,k = Eq [log(vk ) + log(dk )] Eq [log( vk dk )]
k

P
From the multinomial properties we know that k dv,k = 1, implying that eEq [log( k vk dk )] =
P

, in other words, we can compute dv,k exp{Eq [log(vk ) + log(dk )]} and
P Eq [log(vk )+log(dk )]
ke
normalize after. From the properties of gamma distribution we have the following results:

1
Eq [log(vk )] = (avk ) log(bvk )
Eq [log(dk )] = (adk ) log(bdk )
exp{(avk ) (adk )}
dv,k
bvk bdk
X
with dv,k = 1
k

Note that (.) is the Digamma function.


Variational updates for q(vk ): we will look with some detail to the variational updates equations
for q(vk ) because this is be used as a template for all the variational update for variables with
Gamma distributed complete conditionals.
a b
z X }| { z X }| {
log p(vk |) = log Gamma(vk | a + Ydv,k , b + dk )
d d
= a log b log (a ) + log(vk )(a 1) vk b
Eq(vk ) [log p(vk |)] = Eq [a log b log (a )] + log(vk ) Eq [a 1] vk Eq [b ]
E [a 1]
q(vk ) exp{Eq [a log b log (a )]}vkq exp(vk Eq [b ])

E [a ]1
vkq exp(vk Eq [b ])
q(vk ) = Gamma(vk |avk , bvk )
X
with, avk = Eq [a ] = a + Eq [Ydv,k ]
d
X
bvk = Eq [b ] = b + Eq [dk ]
d

At this point we already have the update equation for the parameter of the approximate variational
distribution q(vk ), however we need to calculate the expected value of variational distribution
of Ydv,k and dk . Because of the mean field, we assume that we know this distributions (Gamma
a
and Multinomial). So q(dk ) = Gamma(adk , bdk ), implying that Eq [dk ] = bdk . Also q(Ydv ) is a
dk
multinomial with parameters dv,k , so Eq [Ydv,k ] = wdv dv,k .
Now we may write the parameter coordinate ascent equation in a closed-form

q(vk ) = Gamma(vk |avk , bvk )


X
with, avk = Eq [a ] = a + wdv dv,k
d
X a
dk
bvk = Eq [b ] = b +
bdk
d

Note that this equations are valid for any variable with a gamma distributed complete conditional.
In other words, the approximate variational distribution of a variable with a gamma distributed
complete conditional is gamma distributed and the parameter of the approximate distribution is the
expected value of the parameters of the complete conditional. So we can apply the same equation
to all other latent variables, but making the necessary adjustments to the proper compute Eq [a ]
and Eq [b ].

2 Experiments
Here we present some plots omitted from the main article.

2
0.55 0.55
PoissonMF-CS PoissonMF-CS
0.50 CTR-SMF 0.50 CTR-SMF
0.45 CTR 0.45 CTR
PMF PMF
0.40 0.40
Avg. recall@M

Avg. recall@M
0.35 0.35
0.30 0.30
0.25 0.25
0.20 0.20
0.15 0.15
50 100 150 200 250 50 100 150 200 250
# returned items (M) # returned items (M)

(a) K=5 (b) K=10

0.55 0.55
PoissonMF-CS PoissonMF-CS
0.50 CTR-SMF 0.50 CTR-SMF
0.45 CTR 0.45 CTR
PMF PMF
0.40 0.40
Avg. recall@M

Avg. recall@M
0.35 0.35
0.30 0.30
0.25 0.25
0.20 0.20
0.15 0.15
50 100 150 200 250 50 100 150 200 250
# returned items (M) # returned items (M)

(c) K=15 (d) K=20

0.55 0.55
PoissonMF-CS PoissonMF-CS
0.50 CTR-SMF 0.50 CTR-SMF
0.45 CTR 0.45 CTR
PMF PMF
0.40 0.40
Avg. recall@M

Avg. recall@M

0.35 0.35
0.30 0.30
0.25 0.25
0.20 0.20
0.15 0.15
50 100 150 200 250 50 100 150 200 250
# returned items (M) # returned items (M)

(e) K=50 (f) K=100

Figure 1: Comparison of PoissonMF-SC with CTR with SMF, CTR and PMF. Each subplot is the result
of running the PoissonMF-SC recommendation algorithm over 30 random splits of the Hetrec2011-lastfm
dataset for a fixed number of latent features k (in this case, K = 5, 15, 50, 100). The values for CTR with
SMF, CTR and PMF are taken from [?], and according to the reported results, they are the best values
given a grid search of the parameters

3
2.0.1 Impact of parameters

0.31 0.39

0.30 0.38

Avg. recall@M (M=100.0)


Avg. recall@M (M=50.0)

0.29 0.37

0.28 0.36

0.27 0.35

0.26 0.34

0.25 0.33
5 10 15 20 50 100 5 10 15 20 50 100
#latent factors (K) #latent factors (K)

(a) m=50 (b) m=100

0.45 0.49
0.44 0.48
Avg. recall@M (M=150.0)

Avg. recall@M (M=200.0)


0.43
0.47
0.42
0.46
0.41
0.45
0.40
0.39 0.44

0.38 0.43
5 10 15 20 50 100 5 10 15 20 50 100
#latent factors (K) #latent factors (K)

(c) m=150 (d) m=200

0.52

0.51
Avg. recall@M (M=250.0)

0.50

0.49

0.48

0.47

0.46
5 10 15 20 50 100
#latent factors (K)

(e) m=250

Figure 2: Impact of the number of latent variables (K) parameter on the Average recall at M metric
for different number of returned items (M ). Each subplot is the result of running the PoissonMF-SC
recommendation algorithm over 30 random splits of the Hetrec2011-lastfm dataset with K varying in
(5,10,15,20,50,100)

You might also like