SlideShare une entreprise Scribd logo
1  sur  8
Probabilistic Soft Logic
 for Social Sentiment
 LINQS - University of Maryland, College Park
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.
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),
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),
Trust Modeling with PSL
                            PSL−Triadic                                           PSL−TriadPers                                          PSL−TriadPersSim                                           sameTraits
               1                                    80                                                                        1                                                       1

              0.8                                                     0.8                                  60                0.8                                   80
                                                                                                                                                                                     0.8
                                                    60                                                                                                                                                                     100
  Predicted




                                                          Predicted




                                                                                                                 Predicted




                                                                                                                                                                         Predicted
                                                                                                                                                                   60
              0.6                                                     0.6                                  40                0.6                                                     0.6
                                                    40
                                                                                                                                                                   40                0.4
              0.4                                                     0.4                                                    0.4                                                                                           50
                                                    20                                                     20
                                                                                                                                                                   20                0.2
              0.2                                                     0.2                                                    0.2
                                                    0                                                      0                                                       0                                                       0
                    0.2    0.4     0.6    0.8   1                           0.2   0.4     0.6    0.8   1                           0.2     0.4  0.6   0.8      1                            0.2    0.4     0.6   0.8   1
                                 True                                                   True                                                  True                                                       True
                          PSL−Personality                                         PSL−TriadSim                                            Avg−Incoming                                              EigenTrust
               1                                                       1                                                     0.8
                                                                                                           150                                                                                                             300
                                                                                                                                                                                     0.12
              0.8                                   60                                                                                                             60
                                                                      0.8                                                    0.6                                                      0.1




                                                                                                                 Predicted
  Predicted




                                                                                                           100                                                                                                             200
                                                          Predicted




                                                                                                                                                                         Predicted
              0.6                                                                                                                                                                    0.08
                                                    40                0.6                                                                                          40
                                                                                                                             0.4
                                                                                                                                                                                     0.06
              0.4                                                     0.4                                  50                                                                        0.04                                  100
                                                    20                                                                       0.2                                   20
              0.2                                                     0.2                                                                                                            0.02
                                                    0                                                      0                  0                                    0                                                       0
                    0.2    0.4  0.6      0.8    1                           0.2   0.4  0.6    0.8      1                           0.2     0.4  0.6    0.8     1                             0.2   0.4    0.6    0.8   1
                              True                                                   True                                                     True                                                     True
                          PSL−Similarity                                          PSL−PersSim                                             Avg−Outgoing                                              TidalTrust
               1                                                       1                                                                                                              1
                                                                                                                             0.8                                   100
                                                    150
              0.8                                                     0.8                                  100                                                                       0.8                                   150
                                                                                                                                                                   80
                                                                                                                             0.6
  Predicted




                                                          Predicted




                                                                                                                 Predicted




                                                                                                                                                                         Predicted
              0.6                                   100               0.6                                                                                          60                0.6                                   100
                                                                                                                             0.4
                                                                                                           50                                                      40
              0.4                                   50                0.4                                                                                                            0.4
                                                                                                                             0.2                                                                                           50
                                                                                                                                                                   20
              0.2                                                     0.2                                                                                                            0.2
                                                    0                                                      0                  0                                    0                                                       0
                    0.2    0.4     0.6    0.8   1                           0.2   0.4     0.6   0.8    1                           0.2    0.4      0.6   0.8   1                            0.2    0.4     0.6   0.8   1
                                 True                                                   True                                                     True                                                    True



Figure 4: Histograms of predicted trust values over true trust annotations. The brightness of each grid cell indicates the
number of edges with the corresponding true trust (horizontal axis) and predicted trust (vertical axis). More mass along the
diagonal indicates predictions consistent with the ground truth.
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
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
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.

Contenu connexe

Similaire à Probabilistic Soft Logic for Social Sentiment Analysis

Propositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicPropositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicpendragon6626
 
Multinomial Model Simulations
Multinomial Model SimulationsMultinomial Model Simulations
Multinomial Model Simulationstim_hare
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdf
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdfA Bayesian Networks Analysis of the Duhem-Quine Thesis.pdf
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdfLiz Adams
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...mathsjournal
 
An improved demspter shafer algorithm for resolving conflicting events
An improved demspter shafer algorithm for resolving conflicting eventsAn improved demspter shafer algorithm for resolving conflicting events
An improved demspter shafer algorithm for resolving conflicting eventsGauravv Prabhu
 
Godels First Incompleteness Theorem
Godels First Incompleteness TheoremGodels First Incompleteness Theorem
Godels First Incompleteness Theoremmmanning02474
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...mathsjournal
 
First order predicate logic(fopl)
First order predicate logic(fopl)First order predicate logic(fopl)
First order predicate logic(fopl)surbhi jha
 
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...mathsjournal
 
Probability/Statistics Lecture Notes 4: Hypothesis Testing
Probability/Statistics Lecture Notes 4: Hypothesis TestingProbability/Statistics Lecture Notes 4: Hypothesis Testing
Probability/Statistics Lecture Notes 4: Hypothesis Testingjemille6
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics NANDINI SHARMA
 
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...inventionjournals
 

Similaire à Probabilistic Soft Logic for Social Sentiment Analysis (20)

Propositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicPropositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logic
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Multinomial Model Simulations
Multinomial Model SimulationsMultinomial Model Simulations
Multinomial Model Simulations
 
eatonmuirheadsoaita
eatonmuirheadsoaitaeatonmuirheadsoaita
eatonmuirheadsoaita
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdf
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdfA Bayesian Networks Analysis of the Duhem-Quine Thesis.pdf
A Bayesian Networks Analysis of the Duhem-Quine Thesis.pdf
 
APAL2032
APAL2032APAL2032
APAL2032
 
Simple linear regressionn and Correlation
Simple linear regressionn and CorrelationSimple linear regressionn and Correlation
Simple linear regressionn and Correlation
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
 
An improved demspter shafer algorithm for resolving conflicting events
An improved demspter shafer algorithm for resolving conflicting eventsAn improved demspter shafer algorithm for resolving conflicting events
An improved demspter shafer algorithm for resolving conflicting events
 
AppTheories_L3
AppTheories_L3AppTheories_L3
AppTheories_L3
 
Godels First Incompleteness Theorem
Godels First Incompleteness TheoremGodels First Incompleteness Theorem
Godels First Incompleteness Theorem
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
 
First order predicate logic(fopl)
First order predicate logic(fopl)First order predicate logic(fopl)
First order predicate logic(fopl)
 
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
 
Probability/Statistics Lecture Notes 4: Hypothesis Testing
Probability/Statistics Lecture Notes 4: Hypothesis TestingProbability/Statistics Lecture Notes 4: Hypothesis Testing
Probability/Statistics Lecture Notes 4: Hypothesis Testing
 
True but Unprovable
True but UnprovableTrue but Unprovable
True but Unprovable
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Ch5
Ch5Ch5
Ch5
 
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...
Oscillation and Convengence Properties of Second Order Nonlinear Neutral Dela...
 

Probabilistic Soft Logic for Social Sentiment Analysis

  • 1. Probabilistic Soft Logic for Social Sentiment LINQS - University of Maryland, College Park
  • 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),
  • 5. Trust Modeling with PSL PSL−Triadic PSL−TriadPers PSL−TriadPersSim sameTraits 1 80 1 1 0.8 0.8 60 0.8 80 0.8 60 100 Predicted Predicted Predicted Predicted 60 0.6 0.6 40 0.6 0.6 40 40 0.4 0.4 0.4 0.4 50 20 20 20 0.2 0.2 0.2 0.2 0 0 0 0 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 True True True True PSL−Personality PSL−TriadSim Avg−Incoming EigenTrust 1 1 0.8 150 300 0.12 0.8 60 60 0.8 0.6 0.1 Predicted Predicted 100 200 Predicted Predicted 0.6 0.08 40 0.6 40 0.4 0.06 0.4 0.4 50 0.04 100 20 0.2 20 0.2 0.2 0.02 0 0 0 0 0 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 True True True True PSL−Similarity PSL−PersSim Avg−Outgoing TidalTrust 1 1 1 0.8 100 150 0.8 0.8 100 0.8 150 80 0.6 Predicted Predicted Predicted Predicted 0.6 100 0.6 60 0.6 100 0.4 50 40 0.4 50 0.4 0.4 0.2 50 20 0.2 0.2 0.2 0 0 0 0 0 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 True True True True Figure 4: Histograms of predicted trust values over true trust annotations. The brightness of each grid cell indicates the number of edges with the corresponding true trust (horizontal axis) and predicted trust (vertical axis). More mass along the diagonal indicates predictions consistent with the ground truth.
  • 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.

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n