Subjective Logic

REASONING UNDER UNDER UNCERTAINTY
WITH SUBJECTIVE LOGIC
UAI 2016, New York
Audun Jøsang, University of Oslo
http://folk.uio.no/josang
Audun Jøsang
Subjective Logic – UAI 2016
1
About me
• Prof. Audun Jøsang,
University of Oslo, 2008
• Research interests
– Information Security
– Bayesian Reasoning
• Bio
–
–
–
–
–
MSc Telecom, NTH, 1988
Engineer, Alcatel Telecom
MSc Security, London 1993
PhD Security, NTNU 1998
A.Prof. QUT, Australia, 2000
Audun Jøsang
Subjective Logic – UAI 2016
Department of Informatics
@ University of Oslo
2
Tutorial overview
1. Representations of subjective opinions
2. Operators of subjective logic
3. Applications of subjective logic:
–
–
–
–
Trust fusion and transitivity
Trust networks
Bayesian reasoning
Subjective networks
Audun Jøsang
Subjective Logic – UAI 2016
3
The General Idea of Subjective Logic
Logic
Probability
Probabilistic Logic
Uncertainty & Subjectivity
Subjective Logic
Audun Jøsang
Subjective Logic – UAI 2016
4
Probabilistic Logic Examples
Binary Logic
Probabilistic logic
AND:
x∧y
OR:
x∨y
MP: { x→y, x } ⇒ y
p(x∧y) = p(x)p(y)
p(x∨y) = p(x) + p(y) − p(x)p(y)
p( y ) = p( x) p( y | x) + p( x ) p( y | x )
p( x | y ) =
a( x) p ( y | x)
a( x) p( y | x) + a ( x ) p ( y | x )
MT: { x→y, y } ⇒ x
a( x) p( y | x)
p( x | y ) =
a( x) p( y | x) + a( x ) p( y | x )
p( x) = p ( y ) p ( x | y ) + p ( y ) p ( x | y )
Audun Jøsang
Subjective Logic – UAI 2016
a: base rate
5
Probability and Uncertainty
Frequentist (aleatory):
Subjective (epistemic):
• Confident when based on
much observation evidence
• Unconfident when based on
little observation evidence
• E.g.: Probability of heads
when flipping coin is ½
and confident
• Confident when dynamics
of situation are known
• Unconfident when
dynamics of situation are
unknown
• E.g. Probability of Oswald
killed Kennedy is ½ but
unconfident
Audun Jøsang
Subjective Logic – UAI 2016
6
Domains, variables and opinions
Binary domain X = {x, x}
Binary variable X = x
X
x
x
Binomial opinion
X
3-ary domain X
Random variable X∈X
Multinomial opinion
x2
x1
x3
Hyperdomain R (X)
Hypervariable X ∈R (X)
Hypernomial opinion
Audun Jøsang
Subjective Logic – UAI 2016
R (X)
x2
x1
x3
7
Domains and Hyperdomains
•
•
•
•
•
•
A domain X is a state space of distinct possibilities
Powerset P (X) = 2X , set of subsets, including {X,∅}
Reduced powerset R (X) = P (X) \ {X, ∅}
R (X) = { x1, x2, x3, x4, x5, x6 }
R (X) called Hyperdomain
Cardinalities
| X | = 3 in this example
• |P (X)| = 2|X|
= 8 in this example
• |R (X)| = 2|X| − 2
R (X)
x4
x2
x1
x6
x5
x3
= 6 in this example
Audun Jøsang
Subjective Logic – UAI 2016
8
Binomial Opinion
Multinomial Opinion
Binary domain X
Binary variable X= x
n-ary domain X
Random variable X ∈ X
X
X
Domain
x
x2
x1
Hypernomial Opinion
hyperdomain R (X)
Hypervariable X ∈ R (X)
R (X)
x2
x1
x
x3
x3
Opinion
representation
Beta PDF over x
Dirichlet PDF over X
Hyper Dirichlet over X
PDF
representation
Audun Jøsang
Subjective Logic – UAI 2016
9
Binomial subjective opinions
• Belief mass and base rate on binary domains
–
–
–
–
bxA = b(x) is observer A’s belief in x
d xA = b(x ) is observer A’s disbelief in x
u xA = b( X ) is observer A’s uncertainty about x
a xA
is the base rate of x
Binomial opinion
ω xA = (bxA , d xA , u xA , a xA )
Binary domain
Audun Jøsang
x
X
x
Subjective Logic – UAI 2016
base rate of x
b + d +u =1
A
x
A
x
A
x
10
Binomial opinions
u vertex
(uncertainty)
•
Ordered quadruple:
ω x = (bx , d x , u x , a x )
– bx : belief
– dx : disbelief
bx
– ux : uncertainty (vacuity of evidence)
ωx
dx
– ax : base rate
uX
•
bx + d x + u x = 1
x vertex
P(x) ax x vertex
(belief)
(disbelief)
• Projected probability: P( x ) = bx + a x⋅ u x
Example ωx =(0.4, 0.2, 0.4, 0.9),
Audun Jøsang
Subjective Logic – UAI 2016
P(x) = 0.76
11
Opinion types
Absolute opinion: bx=1 .
Equivalent to TRUE.
Dogmatic opinion: ux=0 .
Equivalent to probabilities.
Vacuous opinion: ux=1 .
Equivalent to UNDEFINED.
General uncertain opinion: ux≠0 .
Audun Jøsang
Subjective Logic – UAI 2016
12
Beta PDF representation
Γ(α + β )
Beta ( p ( x), α , β ) =
p ( x)α −1 (1 − p ( x)) β −1
Γ(α )Γ( β )
r: # observations of x
a: base rate of x
Beta Probability Density Function
x
W = 2: non-informative
prior weight
E(x): Expected probability
E(x)
p(x)
E(x) = P(x)
Example: r = 2,
Audun Jøsang
β = s + W(1-a)
Beta(p(x))
s: # observations of
α = r + Wa
s = 1,
a = 0.9,
Subjective Logic – UAI 2016
E(x)= 0.76
13
Binomial Opinion ↔ Beta PDF
• (r,s,a) represents Beta PDF evidence parameters.
• (b,d,u,a) represents binomial opinion.
• P(x) = E(x)
 r = Wb / u

• Op → Beta:  s = Wd / u
b + d + u = 1

 b = r + sr+W

• Beta → Op: d = r + ss+W
u = W
r + s +W

W=2
Audun Jøsang
Subjective Logic – UAI 2016
14
Online demo
http://folk.uio.no/josang/sl/
Audun Jøsang
Subjective Logic – UAI 2016
15
Likelihood and Confidence
Very unlikely
Unlikely
Somewhat unlikely
Chances about even
Somewhat likely
Likely
Very likely
Absolutely
Confidence categories:
Absolutely not
Likelihood categories:
9
8
7
6
5
4
3
2
1
No confidence
E
9E 8E 7E 6E 5E 4E 3E 2E 1E
Low confidence
D
9D 8D 7D 6D 5D 4D 3D 2D 1D
Some confidence
C
9C 8C 7C 6C 5C 4C 3C 2C 1C
High confidence
B
9B 8B 7B 6B 5B 4B 3B 2B 1B
Total confidence
A
9A 8A 7A 6A 5A 4A 3A 2A 1A
Audun Jøsang
Subjective Logic – UAI 2016
16
Mapping qualitative to opinion
• Category mapped to corresponding field of triangle
• Mapping depends on base rate
• Non-existent categories depending on base-rates
9E 8E 7E
6E 5E 4E 3E 2E 1E
9D 8D 7D 6D 5D 4D 3D 2D 1D
9C 8C 7C 6C 5C 4C 3C 2C 1C
9E 8E 7E 6E 5E 4E 3E 2E 1E
9D 8D 7D 6D 5D 4D 3D 2D 1D
9C 8C 7C 6C 5C 4C 3C 2C 1C
9B 8B 7B
6B 5B 4B 3B 2B 1B
9B 8B 7B 6B 5B 4B 3B 2B 1B
9A 8A 7A
6A 5A 4A 3A 2A 1A
9A 8A 7A 6A 5A 4A 3A 2A 1A
base rate a = 1/3
Audun Jøsang
base rate a = 2/3
Subjective Logic – UAI 2016
17
Mapping categories to opinions
• Overlay category matrix with opinion triangle
• Matrix skewed as a function of base rate
• Not all categories map to opinions
– For a low base rate, it is impossible to describe an
event as highly likely and uncertain, but possible to
describe it as highly unlikely and uncertain.
– E.g. with regard to tuberculosis which has a low base
rate, it would be wrong to say that a patient is likely to
be infected, with high uncertainty. Similarly it would
be possible to say that the patient is probably not
infected, with high uncertainty
Audun Jøsang
Subjective Logic – UAI 2016
18
Multinomial domain
• Generalisation of binary domain
• Set of exclusive and exhaustive singletons.
• Example domain: X={x1, x2, x3, x4}, | X | = 4.
X
x1
Audun Jøsang
x2
x3
Subjective Logic – UAI 2016
x4
19
Multinomial Opinions
• Domain:
X={x1…xk}
• Random variable X ∈X
• Multinomial opinion: ωX = (bX, uX, aX)
• Belief mass distribution bX where
bX (x) is belief mass on x ∈X
u + ΣbX (x) = 1
• Uncertainty mass: uX is a single value in range [0,1]
• Base rate distribution aX where ΣaX (x) = 1
aX (x) is base rate of x ∈X
• Projected probability:
Audun Jøsang
PX (x)= bX(x) + aX(x)⋅uX
Subjective Logic – UAI 2016
20
Opinion tetrahedron (ternary domain)
u - axis
Opinion
ωX
x2 axis
Projector
x3 axis
x1 axis
PX
Projected probability distribution
Audun Jøsang
aX
Base rate distribution
Subjective Logic – UAI 2016
21
Dirichlet PDF representation
 k

Γ ∑ α X ( xi )  k
α ( xi )−1
i =1


Dir ( p X ) = k
p X ( xi )
∏
∏ Γ(α X ( xi )) i =1
i =1
rX (xi) : # observations of xi
aX (xi) : base rate of xi
Density
Dir(pX)
Σ pX(xi) = 1
αX(xi) = rX(xi) + W⋅aX(xi)
Trinomial Dirichlet
Probability Density Function
EX: Expected proba. distr.
EX = PX
Example:
– 6 red balls
– 1 yellow ball
– 1 black ball
Audun Jøsang
Subjective Logic – UAI 2016
22
Multinomial Opinion ↔ Dirichlet PDF
• Dirichlet PDF evidence parameters: (rX, aX)
• Multinomial opinion parameters:
• Op → Dir:
W=2
• Dir → Op:
Audun Jøsang
(bX, uX, aX)
W ⋅ bX ( x )

r
(
x
)
=
X
uX



 u X + ∑ bX ( x) = 1
rX ( x)

bX ( x) = W + r ( x)
∑X



W
=
u
 X
W + ∑ rX ( x)

Subjective Logic – UAI 2016
23
Non-informative prior weight: W
• Value normally set to W = 2.
• When W is equal to the frame cardinality, then
the prior Dirichlet PDF is a uniform.
• Normally required that the prior Beta is uniform,
which dictates W = 2
• Beta PDF is a binomial Dirichlet PDF
• Setting W > 2 would make Dirichlet PDF
insensitive to new observations, which would be
an inadequate model.
Audun Jøsang
Subjective Logic – UAI 2016
24
Prior trinomial Dirichlet PDF, W = 2
Example:
Urn with balls of 3
different colours.
– t1: Red
– t2: Yellow
– t3: Black
Ternary a priori
probability density.
Audun Jøsang
Subjective Logic – UAI 2016
25
Posterior trinomial Dirichlet PDF
A posteriori
probability density
after picking:
– 6 red balls (t1)
– 1 yellow ball (t2)
– 1 black ball (t3)
– W=2
Audun Jøsang
Subjective Logic – UAI 2016
26
Posterior trinomial Dirichlet PDF
A posteriori
probability density
after picking:
– 20 red balls (t1)
– 20 yellow balls (t2)
– 20 black balls (t3)
– W=2
Audun Jøsang
Subjective Logic – UAI 2016
27
Posterior trinomial Dirichlet PDF
A posteriori
probability density
after picking:
– 20 red balls (t1)
– 20 yellow balls (t2)
– 50 black balls (t3)
– W=2
Audun Jøsang
Subjective Logic – UAI 2016
28
Hyper-Opinions
•
•
•
•
•
•
•
Domain:
X={x1…xk}
P (X) is the powerset of X
Hyperdomain R (X) = P (X) \ {X, ∅}
R (X) is the reduced powerset
Hypervariable: X ∈R (X)
Hyper opinion: ωX = (bX, uX, aX)
Belief mass distribution: bX where u X +
bX (x) is belief mass on x ∈R (X)
• Base rate distribution: aX where
aX (x) is base rate of x ∈X
• Proj. probability: PX ( x) = a X ( x) ⋅ u X +
Audun Jøsang
Subjective Logic – UAI 2016
∑a
X ∈X
X
a
∑
R
X
x j∈ (X)
b
∑
R
X
X∈ (X)
( x) = 1
( x) = 1
( x | x j ) ⋅ bX ( x j )
29
Hyper Dirichlet PDF
Audun Jøsang
Subjective Logic – UAI 2016
30
Opinions v. Fuzzy membership functions
Fuzzy logic
250 cm
Domain of
fuzzy
categories
Tall
200 cm
Average
Short
Fuzzy
membership
functions
150 cm
100 cm
Crisp
measures
50 cm
0 cm
Subjective logic
Friendly
aircraft
Domain of
crisp
categories
Audun Jøsang
Enemy
aircraft
Subjective
opinions
ω
Uncertain
measures
Civilian
aircraft
Subjective Logic – UAI 2016
31
Subjective Logic Operators
Audun Jøsang
Subjective Logic – UAI 2016
32
Homomorphic correspondence
Generalisation
Probabilistic logic
Binary logic
• Booleans
• Truth tables
Generalisation
Homomorphic i.c.o.
probability 0 or 1
• Probabilities
• PL operators
Subjective logic
Homomorphic i.c.o.
dogmatic multi-nomial
opinions
• Opinions ω X
• SL operators
Homomorphic in case of absolute binomial opinions
• P(ωx ·ωy) = P(ωx)· P(ωy)
• B(ωx ·ωy) = B(ωx) ∧ B(ωy)
Audun Jøsang
for probabilistic multiplication
for Boolean conjunction
Subjective Logic – UAI 2016
33
Subjective logic operators 1
Opinion operator name
Opinion
Logic
operator
operator
symbol
symbol
Addition
+
∪
UNION
Subtraction
-
\
DIFFERENCE
Complement
¬
x
NOT
P(x)
n.a.
n.a.
Projected probability
Multiplication
·
Division
/
Comultiplication
п
Codivision
п
Audun Jøsang
∧
∧
∨
∨
Subjective Logic – UAI 2016
Logic operator name
AND
UN-AND
OR
UN-OR
34
Subjective logic operators 2
Opinion operator name
Opinion
Logic
operator
operator
symbol
symbol
Transitive discounting
⊗
:
TRANSITIVITY
Cumulative fusion
⊕
◊
n.a.
Averaging fusion
⊕
◊
n.a.
Constraint fusion

&
n.a.
Inversion,
Bayes’ theorem
~
~
|
CONTRAPOSITION
φ
Conditional deduction
Conditional abduction
Audun Jøsang
Logic operator name
DEDUCTION
~
||
(Modus Ponens)
~
||
ABDUCTION
Subjective Logic – UAI 2016
(Modus Tollens)
35
Subjective Trust Networks
Audun Jøsang
Subjective Logic – UAI 2016
36
Trust transitivity
Thanks to Bob’s advice,
Alice Alice trusts Eric to be a
good mechanic.
Indirect functional trust
4
Direct
referral trust
Eric
1
2
Bob has proven to Alice that
he is knowledgeable in matters
relating to car maintenance.
Bob
Direct
functional
Eric has proven to
trust
Bob that he is a
good mechanic.
3
Advice
Audun Jøsang
Subjective Logic – UAI 2016
37
Functional trust derivation requirement
Alice
2
adv.
1
referral
trust
Bob
2
adv.
Claire
1
referral
trust
Eric
1
functional
trust
functional trust
3
•
Functional trust derivation through transitive paths
requires that the last trust edge represents
functional trust (or an opinion) and that all previous
trust edges represent referral trust.
•
Functional trust can be an opinion about a variable.
Audun Jøsang
Subjective Logic – UAI 2016
38
Trust transitivity characteristics
Trust is diluted in a transitive chain.
A
B
C
adv.
adv.
trust
trust
E
trust
diluted trust
Computed with discounting/transitivity operator of SL
Graph notation:
SL notation:
Audun Jøsang
[A, E] = [A; B] : [B; C] : [C, E]
ω
( A ; B ;C )
E
= ω ⊗ω ⊗ω
A
B
Subjective Logic – UAI 2016
B
C
C
E
39
Trust Fusion
Combination of serial and parallel trust paths
Bob
Alice
Eric
David
Trusting
party
1
func-trust
Trusted
party
Claire
derived func-trust
3
Graph notation: [A, E] = (( [A;B] : [B;D] ) ◊ ( [A;C] : [C;D] )) : [D,E]
SL not.: ω E
[ A; B ; D ] ◊[ A;C ; D ]
Audun Jøsang
= ((ω ⊗ ω ) ⊕ (ω ⊗ ω )) ⊗ ω
A
B
Subjective Logic – UAI 2016
B
D
A
C
C
D
40
D
E
Discount and Fuse: Dilution and Confidence
B
adv.
A
D
trust
trust
trust
C
trust
adv.
confident
trust
diluted trust
Discounting dilutes trust confidence
Fusion strengthens trust confidence
Audun Jøsang
Subjective Logic – UAI 2016
41
Incorrect trust / belief derivation
3
B
1
2
A
D
X
C
1
3
Beware!
2
incorrect belief
4
ref. trust
belief /
func. trust
advice
Perceived: ([A, B] : [B, X]) ◊ ([A, C] : [C, X])
Hidden:
Audun Jøsang
([A, B] : [B, D] : [D, X]) ◊ ([A, C] : [C, D] : [D, X])
Subjective Logic – UAI 2016
42
Hidden and perceived topologies
Perceived topology:
Hidden topology:
B
A
B
D
C
D
A
C
X
X
([A, B] : [B, X]) ◊ ([A, C] : [C, X])
≠ ([A, B] : [B, D] : [D, X]) ◊ ([A, C] : [C, D] : [D, X])
(D, E) is taken into account twice
Audun Jøsang
Subjective Logic – UAI 2016
43
Correct trust / belief derivation
1
1
B
A
D
X
C
1
correct belief
SAFE
2
Perceived and real
topologies are equal:
Audun Jøsang
ref. trust
belief /
func. trust
advice
( ([A; B] : [B; D]) ◊ ([A; C] : [C; D]) ) : [D, X]
Subjective Logic – UAI 2016
44
Computing discounted trust
ω
A
ω
A
B
B
B
u
B
X
X
ω
A
b
⊗
d BA
ω BA
t
PBA
A’s trust in B
Audun Jøsang
aBA
=
B
bXB ω XB d X
u BA
t x2
u XB
a XB
X
u
u
bXA:B
A
B
( A; B )
X
PXB
B’s opinion about X
Subjective Logic – UAI 2016
x1
ω
A: B
X
d XA:B
PBA
u XA:B
x2
a XA:B PXA:B
x1
A’s derived opinion about X
45
Example: Weighing testimonies
•
•
•
Computing beliefs about statements in court.
J is the judge.
W1, W2 , W3 are witnesses providing testimonies.
J
ω
Audun Jøsang
W1
W2
W3
statement X
( J ;W1 ) ◊ ( J ;W2 ) ◊ ( J ;W3 )
X
Subjective Logic – UAI 2016
46
Computational trust with
subjective logic
http://folk.uio.no/josang/sl/
Audun Jøsang
Subjective Logic – UAI 2016
47
Bayesian Reasoning
Audun Jøsang
Subjective Logic – UAI 2016
48
Deduction and Abduction
Child node Y
Audun Jøsang
ωY|X
Subjective Logic – UAI 2016
ωY||X
~
ωX||Y
Abdduction
Causal
conditionals
Deduction
Parent node X
ωX
49
Deduction visualisation
• Evidence pyramid is mapped inside hypothesis
pyramid as a function of the conditionals.
• Conclusion opinion is linearly mapped
Opinions on parent X
Opinions on child Y
uX
ωY || X
ω X
uY
ωY |x
ωY || X
ωX
ωY |x
ωY |x
bx2
2
1
3
by2
bx3
Audun Jøsang
bx1
by3
Subjective Logic – UAI 2016
by1
50
Deduction – online operator demo
http://folk.uio.no/josang/sl/
Audun Jøsang
Subjective Logic – UAI 2016
51
Bayes’ Theorem
• Traditional statement of
Bayes’ theorem:
p( x | y) =
p ( x ) p ( y| x )
p( y)
• Bayes’ theorem with
base rates:
p( x | y) =
a ( x ) p ( y| x )
a( y)
• Marginal base rates:
a( y ) = a( x) p ( y | x) + a ( x ) p ( y | x )
• Bayes’ theorem with
marginal base rates
Audun Jøsang
p( x | y) =
a ( x ) p ( y| x )
a ( x ) p ( y| x ) + a ( x ) p ( y| x )
p( x | y ) =
a ( x ) p ( y| x )
a ( x ) p ( y| x ) + a ( x ) p ( y| x )
Subjective Logic – UAI 2016
52
The Subjective Bayes’ Theorem
X
X
(ω x ~| y , ω x ~| y ) = ~φ (ω y| x , ω y| x , a x )
Binomial:
Y
Y
X
X
ω X ~| Y =
Multinomial:
~
φ
(ωY | X , a x )
Y
Audun Jøsang
Y
Subjective Logic – UAI 2016
53
Inversion Visualisation
(Subjective Bayes’ theorem)
uX vertex
ωY || X
ωX
Antecedent
X
uY vertex
Consequent
Y
Conditionals
ωY |x2
ωY | X
x2
ωY |x3
x3
ωY |x1
y2
y3
x1
y1
Inversion of
conditional opinions
ω X ||Y
uX vertex
uY vertex
ωY
Consequent
ω X ~| y
X
ω X ~| y
x3
Audun Jøsang
3
x2
Conditionals
2
ω X ~| Y
ω X ~| y
Subjective Logic – UAI 2016
Y
y2
1
x1
Antecedent
y3
y1
54
Deduction and abduction notation
ωY|X
ωY||X
ωY || X = ω X
ωY | X
ωY | X
Y
~ X
ωX||Y
ω X~||Y = ωY
= ωY
= ωY
Audun Jøsang
~
ωY|X
(ωY | X , a X )
~
φ (ωY | X , a X ) ω
Y
ω X ~| Y
Subjective Logic – UAI 2016
Y
Abdduction
Deduction
ωX
X
55
Example: Medical reasoning
• Medical test reliability determined by:
– true positive rate p ( y | x)
where x: infected
– false positive rate p ( y | x )
y: positive test
p( x) p( y | x)
a( x) p( y | x)
=
p( x | y) =
p( y)
a( x) p( y | x) + a( x ) p( y | x )
• Bayes’ theorem:
• Probabilistic model hides uncertainty
• Use subjective Bayes’ theorem to determine
ω(infected)
ω X ~| Y = ~φ (ωY | X , a X )
• GP derives ω(infected ~| positive) and ω(infected~| negative)
• Finally compute diagnosis ω(infected ~|| test result)
• Medical reasoning with SL reflects uncertainty
Audun Jøsang
Subjective Logic – UAI 2016
56
Abduction – Online operator demo
http://folk.uio.no/josang/sl/
Audun Jøsang
Subjective Logic – UAI 2016
57
The General Idea of Subjective Networks
Bayesian Networks
Subjective Logic
Subjective Bayesian Networks
Subjective Trust Networks
Subjective Networks
Audun Jøsang
Subjective Logic – UAI 2016
58
Example SN Model
ω
B
ω
A
B
C
ω
B
X
X
C
X
A
ω
A
ωY | X
A
C
ω
A
Z|Y
Y
ω
A
Z
Z
ω ZA = (((ω BA ⊗ ω XB ) ⊕ (ωCA ⊗ ω XC )) ωYA| X ) ω ZA|Y
Audun Jøsang
Subjective Logic – UAI 2016
59
Subjective Networks
S
u
b
j
e
c
t
i
v
e
N
e
t
w
o
r
k
Subjective
Trust
Network:
B
C
D
Frame of variables
X
Subjective
Bayesian
Network:
Legend:
Audun Jøsang
Frame of agents
A
Y
Z
Trust relationship
Belief relationship
Conditional relationship
Subjective Logic – UAI 2016
60
New Book on Subjective Logic
Audun Jøsang
Subjective Logic – UAI 2016
61