2. domains, including collective classification [3], ontology alignment [4], personalized medicine [2],
r p as well, whereas the second makes the same statement for spouses. The rule weights ¬ l1 = 1 ˜ [8]. In the following,
I(`1 ),
at spouses are more likely to vote for the socialparty than friends. graph summarization
opinion diffusion [1], trust in same networks [7], and
Probabilistic Soft Logic
we provide an overview of the PSL modeling language and its efficient algorithms for most probable B
where we use ˜ to indicate the relaxation from the
Consider of itsconcrete persons a and b and party p truth values from the inter-
any rules with first order logic, it uses soft instantiating logical variables A, B, and P
L sharesexplanation and marginal inference.
the syntax
the extremes 0 (false) and 1 (true)ronly. is ! head and votesrbody . , ` there , an interpretation
body a friend of b ⌘ ` {` party r },
˜ ˜
nstead of respectively. The first rule states that if a Given arset of atoms ¬=for 1 , . ._p,nheadis a chance that
e mapping I : ` ! [0, 1]n well, whereas the is satisfied, interpretation. PSL defines a The rule satisfaction.
b votes for p as from atoms to soft truth values an and, statement for spouses.
second makes the same if not, its distance to weights
• Declarative language for relational
indicate that spouses are more likely to vote for the same party than friends.
y distributionPSL interpretations that makes those satisfying more ground rule instances
2 over Semantics to logical formulas. The truth value of a formula is
able. In the exampleshares the syntax of its rules with first orderperson’s uses soft truth values from the inter-
While PSL above, we prefer interpretations where a logic, it vote agrees with
nds, that is, satisfies many groundings of 0the (1), and (true) only.aGiven a set of atoms ` = {`1 ,truth },
val [0, 1] instead of the extremes Rule logical operators starting from the . . . , `n values o
(false) and 1 in case of tradeoff between a
probabilistic models
a spouse,we call the mapping I : ` ! is preferred due to thesoftI(r)values an if and onlyPSL I(rsingle literal
A PSL program consists of [0,setnof first order logic rules with conjunctive bodies and a
agreement with the spouse a 1] satisfied, i.e., truth = of Rule (2).
from atoms to higher weight 1, interpretation. if defines ) I
heads. Rules are labeled with non-negative makes those satisfying moreexample program encodes a
weights. The following ground rule instances body
ine the simple to which a predict ruleinterpretations thatuses thesocial network withand types of links denoting
probability distribution over is satisfied, PSL
degree model to ground voter behaviorvalue on athe body. Again, two coincides with the
truth prefer as Lukasiewicz t-norm this
• Syntax based on first-order logic
above, we based interpretations where a relax-
more probable. In the examplelogical AND and OR, respectively. Theseperson’s vote agrees with
onding co-norm as the relaxation of the
exact at the extremes, but provide a consistent groundings ofvalues (1), and in case 0 and 1. The rule’s dista
friend and spouse is, satisfies many mapping for are restricted Given antradeoff between a
many friends, that relationships:truth values Rule in-between. to of a
ion I, thefriend and for the relaxation of with the spouse is preferred due tothe higher and P of Rule (2). is violate
formulas a spouse, agreement the logical ^ votesFor (A, P ) ! votesFor (B, condition
measures the degree to which this )
conjunction (^), disjunction (_), weight
0.3 : friend (B, A) (1)
¬) are as follows:
To determine the degree to which a ground rule is satisfied, PSL uses the Lukasiewicz t-norm and
its corresponding co-normspouse(B,I(`2 ^of 1}, logical AND ! votesFor (B, P ).These relax- I(rbod
`1 ^ `2 =0.8 : as I(`1relaxation votesFor (A, P ) and OR, respectively.
˜ max{0, the ) + A) ) the
dr (I) = max{0, (2)
• Soft truth values via Lukasciewicz t-norm
ations are exact at the extremes, but provide a consistent mapping for values in-between. Given an
⇤
Also at`KU `2 =formulas 1 ) +For ), instance, consider the interpretation I
1_˜ min{I(` I(`2 1},
interpretation I,Leuven, Belgium the relaxation of the logical conjunction (^), disjunction (_), and
the for
=
negation (¬) arel1 = 1 I(`1 ), 0.9, votesFor (b, p) 7! 0.3}, and let r be the corre
¬ as follows:
˜
use ˜ to indicate the relaxation from the ^We get I(rbody ) I(`2 ) 1}, rule +⌘
`1 Boolean domain. For a = max{0, 1 r 0.9
˜ `2 = max{0, I(`1 ) + ground PSL 1} = 0.9 and th
rhead ⌘ ¬ rbody _ rhead , an interpretation I over the atoms in
˜ ˜ 1 r determines whether r
d, and, if not, its distance to satisfaction. _the distance +we expand theif the of I
`1 ˜Abusing notation, I(`2 ), 1}, 0 usage head had truth value 0.
`2 = min{I(`1 ) would be
formulas. The truth value of a formula is¬ l1 = 1 by applying the above definitions of
˜obtained I(`1 ),
• Resulting probability distribution computed
l operators starting from˜ the indicate the relaxationasa set of by I. Given I, a rule rof interest, a PSL prog
where we use to truth values ofGivenfrom the Boolean domain. For a ground PSL rule r ⌘
atoms specified ground atoms ` is
.e., I(r) = 1, if andhead ⌘ I(rbody ) head ,headinterpretationLet R the atoms the r of all ground rules that
rbody ! r only if ¬ r body _ r I(r an ), that is,I. head has at least setsame
˜ ˜ pretations the I over be the in determines whether r
e as the body. Again, this coincides with the usualsatisfaction. Abusing notation, wewhen
is satisfied, and, if not, its distance to definition of satisfaction of a rule expand the usage of I
using distance to satisfaction
to logical and 1. The rule’s distance to formula is under `. The probability density function
mention atoms in interpretation then
es are restricted to 0formulas. The truth value of asatisfaction obtained by applyingIthe above definitions of
the which operators starting from the 1 X
the degree to logicalthis condition is violated: truth values of atoms as specified by I. Given I, a rule r is
satisfied, i.e.,(I) = = 1, if and body ) if I(rbody ))}. I(rhead ), that is, the head (3) at least (drsame p ] ;
dr I(r) max{0, I(r only I(rhead f (I) = exp[ has r the (I))
Z
truth value as the body. Again, this coincides with the usual definition of satisfaction of a rule when
nce, consider the interpretation I = {spouse(b, a) 7! 1, votesFor (a, p) 7! r2R
truth values are restricted to 0 and 1. The rule’s distance to satisfaction under interpretation I then
For (b, p) 7! 0.3}, and let r be the corresponding ground instance of Rule (2) above.
3. Trust Modeling with PSL
TRUSTS (A, B) ^ TRUSTS (B, C) ) TRUSTS(A, C),
TRUSTS (A, B) ^ ¬ TRUSTS (B, C) ) ¬TRUSTS(A, C),
¬TRUSTS(A, B) ^ ¬TRUSTS(B, C) ) TRUSTS(A, C),
TRUSTS (A, B) ^ TRUSTS (A, C) ) TRUSTS(B, C),
TRUSTS (A, C) ^ TRUSTS (B, C) ) TRUSTS(A, B),
TRUSTS (A, B) ) TRUSTS(B, A),
¬TRUSTS(A, B) ) ¬TRUSTS(B, A).
Figure 1: Rules for PSL model of triadic closure (PSL-Triadic). Triadic closure implies the transitivity of trust, such that
individuals tend to determine whom to trust based on the opinions of those they trust.
TRUSTS (A, B) ) TRUSTING(A),
¬TRUSTS(A, B) ) ¬TRUSTING(A),
TRUSTS (A, B) ) TRUSTWORTHY(B),
¬TRUSTS(A, B) ) ¬TRUSTWORTHY(B),
TRUSTING (A) ^ TRUSTWORTHY (B) ) TRUSTS(A, B),
¬TRUSTING(A) ^ ¬TRUSTWORTHY(B) ) ¬TRUSTS(A, B),
4. Figure 1: Rules for PSL model of triadic closure (PSL-Triadic). Triadic closure implies the transitivity of trust, such that
Trust Modeling with PSL
individuals tend to determine whom to trust based on the opinions of those they trust.
TRUSTS (A, B) ) TRUSTING(A),
¬TRUSTS(A, B) ) ¬TRUSTING(A),
TRUSTS (A, B) ) TRUSTWORTHY(B),
¬TRUSTS(A, B) ) ¬TRUSTWORTHY(B),
TRUSTING (A) ^ TRUSTWORTHY (B) ) TRUSTS(A, B),
¬TRUSTING(A) ^ ¬TRUSTWORTHY(B) ) ¬TRUSTS(A, B),
TRUSTING (A) ) TRUSTS(A, B),
¬TRUSTING(A) ) ¬TRUSTS(A, B),
TRUSTWORTHY (B) ) TRUSTS(A, B),
¬TRUSTWORTHY(B) ) ¬TRUSTS(A, B).
Figure 2: Rules for PSL model of basic personality (PSL-Personality). This model maintains predicates for whether users
are trusting or trustworthy, and uses these predicates to determine each pairwise trust. Trusting individuals are more prone
to offer trust, while trustworthy individuals are more prone to receive trust.
SAME T RAITS (A, B) ) TRUSTS(A, B),
¬SAME T RAITS(A, B) ) ¬TRUSTS(A, B),
TRUSTS (A, B) ^ SAME T RAITS (B, C) ) TRUSTS(A, C),
6. Note that in the above example, we include the false (0.0) NEGATIVE predicate for completeness,
though PSL uses a closed-world assumption, so in practice one does not need to enumerate false
Group Modeling with PSL
statements.
The previously defined predicates will be fully observed in our experimental setup. We also reason
about (mostly) unobserved, latent predicates, which will be inferred. The latent group affiliations are
represented by the predicate MEMBERO F(U, G), which indicates that user U is a member of group
G. We additionally model group sentiment toward topics by inferring predicates LIKES(G, T ) and
DISLIKES (G, T ), which encode group G’s attitude toward tag T .
• Group memberships of Twitter users
From these predicates, we write rules that encode the ideas that: (1) users that message one another
We include the share group memberships, and (2) members of a group share rule, sincesentiment toward
are likely to POSITIVE predicate to filter out negative messages from this common users who
message each other with negative sentiment may be attacking one another, and thus are unlikely to
topics. The following rules encode the propagation of group affiliations through messages:
We include affiliations.
share group the POSITIVE predicate to ˜ filter out negative messages from this rule, since users who
message eachFother with negative sentiment may be attackingPOSITIVE(P ) ) MEMBERO F(B, G) to
MEMBERO (A, G) ^ POSTED (A, P ) ^ MESSAGE T O (P, B) ^ one another, ˜
˜ ˜
and thus are unlikely
The following rules encode the shared sentiment within groups: ˜
share group O F(A, G) ^ POSTED(B, P ) ^ MESSAGE T O(P, A) ^ POSITIVE(P ) ) MEMBERO F(B, G).
MEMBER affiliations. ˜ ˜ ˜
POSTED (U, P ) ^ TAGGED (P, T ) ^ POSITIVE (T ) ^ LIKES (G, T ) ) MEMBERO F (U, G)
˜ ˜ ˜ ˜
The following rules encode the shared sentiment within groups:
POSTED (U, P ) ^ TAGGED (P, T ) ^ NEGATIVE(T ) ^ DISLIKES (G, T ) ) MEMBERO F (U, G).
˜ ˜ ˜ ˜
3
POSTED (U, P ) ^ TAGGED (P, T ) ^ POSITIVE(T ) ^ LIKES(G, T ) ) MEMBERO F (U, G)
˜ ˜ ˜ ˜
Since the group sentiment is also latent, ˜ include the conceptual inverse to the above rules, which
we
POSTED (U, P ) ^ TAGGED (P, T ) ^ NEGATIVE(T ) ^ DISLIKES (G, T ) ) MEMBERO F (U, G).
˜ ˜ ˜
attributes the sentiment of posts by group members to the group’s own sentiment. These rules allow
this model to collectively infer group sentiment and affiliation:
Since the group sentiment is also latent, we include the conceptual inverse to the above rules, which
MEMBERO F (A, G) ^ POSTED (A, P ) ^ TAGGED (P, T ) ^ POSITIVE (P ) ) LIKES (G, T )
˜ ˜ ˜ ˜
attributes the sentiment of posts by group members to the group’s own sentiment. These rules allow
this MEMBEROcollectively infer (A, P ) sentiment (P, Taffiliation: (P ) ) DISLIKES(G, T ).
˜ ˜ ˜
model to F(A, G) ^ POSTED group ^ TAGGED and ) ^ NEGATIVE ˜
To MEMBERO F(A, G) ^ POSTED(A, P ) ^ TAGGED(P, T ) ^truth values(P ) LIKES(G, (G,and
enforce consistency ˜ group sentiment, we constrain the˜ POSITIVE of ) LIKES T ) T )
in ˜ ˜
DISLIKES (G, TF (A, G) ^ POSTED (A, P ) ^to sum to (P,more than 1.0, which ) ) DISLIKES (G, T ).
MEMBERO ) for any ˜ group G and tag T˜ TAGGED no T ) ^ NEGATIVE(P in˜effect prevents
˜
both from being true. We additionally constrain group membership for any individual user to sum
To no more than 1.0,depending aon thecan only fully belong to one the truth it appliesof LIKES(G, T ) and
to
enforce consistency thatgroup sentiment, we being considered, but values intuitively to
always appropriate,
such
in user types of groups constrain group. This last constraint is not
DISLIKES (G, T ) for anyour experiments.
the groups we consider in group G and tag T to sum to no more than 1.0, which in effect prevents
both from being true. We additionally constrain group membership for any individual user to sum
to no more than 1.0, such thateach of can only fully belong to one group. This last constraint is not
In our experiments, we weight a user these rules uniformly with weight 1.0. In settings where
fully-labeled training data is available, we can learn ideal weights for particular data sources. To
always appropriate, depending on the types of groups being considered, but it applies intuitively to
make predictions with this model, we seed inference with a small set of group affiliations and group
the groupsinformation. Theour experiments.
sentiment
we consider in next section describes the application of the model described here to
real social media data sets.
In our experiments, we weight each of these rules uniformly with weight 1.0. In settings where
7. Olympic Soccer Final
(a) Mexico Group Preferred Hashtags (b) Brazil Group Preferred Hashtags
(c) Ch´ vez Supporter Preferred Hashtags
a
(a) Mexico Group Heat Map (b) Brazil Group Heat Map
Figure 1: Heat maps indicating the concentration of geotagged tweets from users predicted by PSL
8. Venezuelan Election
(a) Mexico Group Preferred Hashtags
(a) Mexico Group Preferred Hashtags
(b) Brazil Group Preferred Hashtags
(b) Brazil Group Preferred Hashtags
(c) Ch´ vez Supporter Preferred Hashtags
a
(c) Ch´ vez Supporter Preferred Hashtags
a
(d) Capriles Supporter Preferred Hashtags
Figure 2: Hashtag clouds for predicted LIKES predicate. The font size is scaled according to
truth value of the inferred, latent LIKES predicate.