Top Banner
Exact Lifted Inference on Relational Temporal Models Marcel Gehrke, University of Lübeck Statistical Relational AI Tutorial at ICCS 2019
42

Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Sep 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Exact Lifted Inference on Relational Temporal Models

Marcel Gehrke, University of Lübeck

Statistical Relational AITutorial at ICCS 2019

Page 2: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Dynamic Model

2

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

• Temporal pattern• Instantiate and unroll pattern• Infer on unrolled model

Page 3: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Dynamic Model: Inference Problems

3

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

• Marginal distribution query: : ;<= 2>:") w.r.t. the model:• Hindsight: A < . (was there an epidemic A − . days ago?) • Filtering: A = . (is there an currently an epidemic?)• Prediction: A > . (is there an epidemic in A − . days?)

Page 4: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Dynamic Model

4

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

• Problems with unrolling:• Huge model (unrolled for T timesteps)• Redundant temporal information and calculations• Redundant calculations to answer multiple queries

Page 5: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

5

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

• Main idea: Use temporal conditional independences to perform inference on smaller model

Murphy (2002)

Page 6: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

6

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

• Main idea: Use temporal conditional independences to perform inference on smaller model• Normally only a subset of random variables influence next time step

Murphy (2002)

Page 7: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

7

!"#$%&'

(#)*. ,-,%&'

.%/ .%0 .%0

123-,4.,-, % 12,35.,-,.62%

12,35.,-,.61%

!"#$%

(#)*. ,-,%

.9

• Main idea: Use temporal conditional independences to perform inference on smaller model• Normally only a subset of random variables influence next time step• State description of interface variables (!"#$%&' and (#)*. ,-,%&')

suffice to perform inference on time slice t• Proceed forward one time step at a time, using the same structure

Murphy (2002)

Page 8: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

8

• Build Junction Tree from reoccurring structure• Ensure that interface variable for time slice ! − 1

occur in one cluster and that interface variable for time slice ! occur in one cluster

$%&

$%' $%'

()*+% ,*-.. 010%234105. 010%

()*+% ,*-.. 010%2304!. 010.61%

()*+% ,*-.. 010%2304!. 010.62%

()*+%89,*-.. 010%89

()*+%

$:

Murphy (2002)

Page 9: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

9

• Perform inference on time slice 3• How to perform inference on time slice 4?• Store state descriptions of interface variables in !• Distribute ! with message pass

"#$

"## "##

%&'(# )'*+. -.-#/01.-2. -.-#

%&'(# )'*+. -.-#/0-13. -.-.!1#

%&'(# )'*+. -.-#/0-13. -.-.!2#

%&'($)'*+. -.-$%&'(#

"6 "7$

"7# "7#

%&'(7 )'*+. -.-7/01.-2. -.-7

%&'(7 )'*+. -.-7/0-13. -.-.!17

%&'(7 )'*+. -.-7/0-13. -.-.!27

%&'(#)'*+. -.-#%&'(7

"6

!

Murphy (2002)

Page 10: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Dynamic Model

10

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

6478. ),47+"#$

6478. :;:"#$'(+). …'()*+, …

!"#$%

!"#$% !"#$&

!"#$& 6478. ),47+"

6478. :;:"'(+). …'()*+, …

!"%

!"% !"&

!"&

!9!9

Page 11: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

11

!"#$% !"#$& !"#$&

'()*+,.+*+ "#$ '(+)..+*+./2"#$

'(+)..+*+./1"#$

2345"#$

6478. +*+"#$

!"% !"& !"&

'()*+,.+*+ " '(+)..+*+./2"

'(+)..+*+./1"

2345"

6478. +*+"

!9

6478. ),47+"#$

6478. :;:"#$'(+). …'()*+, …

!"#$%

!"#$% !"#$&

!"#$& 6478. ),47+"

6478. :;:"'(+). …'()*+, …

!"%

!"% !"&

!"&

!9!9

Murphy (2002)

Page 12: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

12

!"#$%&'

(#)*. ,-,%&'

.%/ .%0 .%0

123-,4.,-, % 12,35.,-,.62%

12,35.,-,.61%

!"#$%

(#)*. ,-,%

.9

(#)*. 34#),%&'

(#)*. :;:%&'

(#)*. 34#),%

(#)*. :;:%12,35 …123-,4 …

.%/

.%/ .%0

.%0

.9

.9

Murphy (2002)

Page 13: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

13

!"#$%&' (#)*. ,-,%&'(#)*. ./#)0%&'

(#)*. 010%&'!"#$%

23!"#$%&' (#)*. ,-,%&'(#)*. ./#)0%&'

!"#$%!"#$%&' (#)*. ,-,%&'

!"#$%

2323

!"#$% (#)*. 010%450.6. 010.71%

!"#$% (#)*. 010%450.6. 010.72%

2%: 2%:!"#$% (#)*. ,-,%450.6. ,-,.71%

!"#$% (#)*. ,-,%450.6. ,-,.72%

2%: 2%:!"#$% (#)*. ./#)0%450.6. ./#)0.71%

!"#$% (#)*. ./#)0%450.6. ./#)0.72%

2%;

2%: 2%:

!"#$% (#)*. 010%(#)*. ./#)0%(#)*. ,-,%45.10/. 010% 2%;!"#$%

(#)*. ,-,_645.10/. ,-,_6

2%;!"#$%(#)*. ./#)0%

45.10/. ./#)0_6

Murphy (2002)

Page 14: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Propositional: Interface Algorithm

14

• For the static example increasing the domain size only increased the number of clusters

• Increasing the domain size of interface variables, increases the number of clusters and cluster size

• Inference is exponential in the largest cluster• Can we lift the interface algorithm?

Page 15: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Lifted: Dynamic Model

15

!"#$% !"#$&

'()*+,(X)"#$ '(+)0(X,M)"#$3456"#$

7589(:)"#$

!;

!"% !"&'()*+,(X)" '(+)0(X,M)"

3456"

7589(:)"

Gehrke et al. (2018)• Marginal distribution query: < =>? 3@:") w.r.t. the

model:• Hindsight: B < 0 (was there an epidemic B − 0 days ago?) • Filtering: B = 0 (is there an currently an epidemic?)• Prediction: B > 0 (is there an epidemic in B − 0 days?)

Page 16: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Lifted Dynamic Junction Tree Algorithm: LDJT

• Input• Temporal model !• Evidence "• Queries #

• Algorithm1. Identify interface variables2. Build FO jtree structures $ for !3. Instantiate $%4. Restore state description of interface variables from &%'(5. Enter evidence "% into $%6. Pass messages in $%7. Answer queries #)8. Store state description of interface variables in &%9. Proceed to next time step (step 3)

16

Gehrke et al. (2018)

Page 17: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Identify Interface Variables

• !"#$ = {'"#$( | ∃ + , |- ∈ / ∶ '"#$( ∈ , ∧ '"#$2 ∈ ,}

• Set of interface variable !"#$ consists of all PRVs from time slice 4 − 1 that occur in a parfactor with PRVs from time slice 4

17

7"#$8 7"#$9

:;<=>?(X)"#$ :;><4(X,M)"#$EFGH"#$

IGJK(L)"#$

7M

7"8 7"9

:;<=>?(X)" :;><4(X,M)"

EFGH"

IGJK(L)"

Gehrke et al. (2018)

Page 18: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Construct FO jtree Structure• Turn model in 1.5 time slice model• Suffices to perform inference over time slice !• From 1.5 time slice model construct FO jtree structure• Ensure "#$%is contained in a parcluster and "#is contained in

a parcluster• Label parcluster with "#$% as in-cluster and parcluster with "# as out-cluster

18

&'()#$%

*(+,(.)#$%

01

0#2 0#3456789(X)# 4586!(X,M)#

&'()#

*(+,(.)#0#2 0#3

&'()# *(+, . #456789 . #

&'()# *(+, . #4586! . #

&'()#$% *(+, . #$%&'()#

01

In-cluster Out-cluster

Gehrke et al. (2018)

=#2 =#3=#%

Page 19: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Query answering• Instantiate FO jtree structure

• Restore state description of interface variables

• Enter evidence

• Pass messages

• Query answering:• Find parcluster contain query term

• Extract submodel

• Answer query with LVE

19

!"# !""

$%&'" (&)* + ",-./01 + "

$%&'" (&)* + ",-0.2 + "

$%&'# (&)* + #$%&'"

!3

Gehrke et al. (2018)

4#

5"# 5""5"6

4#6 46# 4"# 4#"

In-cluster Out-cluster

Page 20: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Proceed in time• Calculate !" using out-cluster (#"$)• Eliminate %&'()* + " from #"$’s local model• Instantiate next FO jtree and enter !"• Enter evidence and pass messages

20

Gehrke et al. (2018)

#"$

!,$ !"$-"$

./01" 2034 + "%&'()* + "

!$

#",

!$,

./01$ 2034 + $./01"

-5

-""

./01" 2034 + "%&)'6 + "

#""

!$"

In-cluster Out-cluster

!,$ !"$!$,

!$"

#7,In-cluster #7$

-7$

./017 2034 + 7%&'()* + 7

!"

./01" 2034 + "./017

-5

-7"

./017 2034 + 7%&)'6 + 7

#7"

Out-cluster

!"

Page 21: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Intermediate Overview• So far only a temporal forward pass• Reason over one time step• Keep only one time step in memory• Filtering queries• Prediction queries (filtering without new evidence)• Hindsight queries

21

Gehrke et al. (2018)

Page 22: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Forward and Backward Pass• Use same FO jtree structures for backward pass• Calculate a message ! using an in-cluster over

interface variables and pass ! to previous time step• LDJT needs to keep FO jtrees of previous time steps• Different instantiation approaches during a

backward pass • Keep all computations for all time steps in memory (not

always feasible) • Instantiate time steps on demand (same as for the

forward pass, possible due to the separation between time steps)

22

Gehrke et al. (2019)

Page 23: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Backward Pass• Calculate !" using in-cluster (#"$)• Eliminate %&'(" from #"$’s local model, without )"*$• Add !" to local model of out-cluster #"*$+

• Pass messages for , − 1 to account for !"

23

Gehrke et al. (2019)

#"*$+

)$+ )/+ !"0"*$+

%&'("*$ 1'23 4 "*$56789: 4 "*$

)"*+

#"*$$

)+$

%&'("*+ 1'23 4 "*+%&'("*$

0;

0"*$/

%&'("*$ 1'23 4 "*$5697, 4 "

#"*$/

)+/

In-cluster Out-cluster

)$+ )/+)+$

)+/

#"$In-cluster #"+

0"+

%&'(" 1'23 4 "56789: 4 "

)"*$

%&'("*$ 1'23 4 "*$%&'("0;

0"/

%&'(" 1'23 4 "5697, 4 "

#"/

Out-cluster

)"*$!"

Page 24: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

24

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Gehrke et al. (2019)

Keep Instantiations Instantiate on demandMessages to prepare for queriesMessages to solely calculate ("#$Additional memory for each time step

Page 25: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

25

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1Messages to solely calculate ("#$Additional memory for each time step

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 26: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

26

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1Messages to solely calculate ("#$ ≤ ( − 1Additional memory for each time step

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 27: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

27

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1Messages to solely calculate ("#$ ≤ ( − 1Additional memory for each time step All local models

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 28: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

28

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1 2 ∗ (( − 1)Messages to solely calculate ("#$ ≤ ( − 1Additional memory for each time step All local models

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 29: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

29

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1 2 ∗ (( − 1)Messages to solely calculate ("#$ ≤ ( − 1 ( − 1Additional memory for each time step All local models

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 30: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Instantiations during a Backward Pass

30

!"#$%

&$% &'% (")"#$%

*+,-"#$ .,/0 1 "#$234567 1 "#$

&"#%

!"#$$

&%$

*+,-"#% .,/0 1 "#%*+,-"#$

)8

)"#$'

*+,-"#$ .,/0 1 "#$23649 1 "

!"#$'

&%'

In-cluster Out-cluster

&$% &'%&%$

&%'

!"$In-cluster !"%

)"%

*+,-" .,/0 1 "234567 1 "

&"#$

*+,-"#$ .,/0 1 "#$*+,-")8

)"'

*+,-" .,/0 1 "23649 1 "

!"'

Out-cluster

&"#$

("

Keep Instantiations Instantiate on demandMessages to prepare for queries ( − 1 2 ∗ (( − 1)Messages to solely calculate ("#$ ≤ ( − 1 ( − 1Additional memory for each time step All local models Only forward (&") messages

n is the number of parclusters for each time step

Gehrke et al. (2019)

Page 31: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Relational Forward Backward Algorithm • LDJT can answer hindsight queries, even to the first

time step • By combining the instantiation approaches, LDJT

can trade off memory consumption and reusing computations • LDJT is in the worst case quadratic to T, but

normally remains linear w.r.t. T (T max # time steps)• But does it really suffice to lift the interface

algorithm?

31

Gehrke et al. (2019)

Page 32: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Preventing Unnecessary Groundings• Groundings in inter time slice messages (especially

forward messages) can lead to grounding the

model for all time steps

• Elimination order predetermined in FO jtree

• Non-ideal elimination order leads to groundings

• Minimal set of interface variables not always ideal

• Delay eliminations for inter time slice messages to

prevent unnecessary groundings

• Simply lifting the interface algorithm does not suffice,

one also needs to ensure preconditions of lifting

• Trade off between lifting and handling temporal

aspects due to restrictions on elimination orders

32

Gehrke et al. (2018b,c)

Page 33: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

0 200 400 600 800 1000

10-1

100

101

102

103

104

105

LDJTLDJT GroundingsLJT Model

33

LDJT: Preven,ng Unnecessary Groundings• Depending on the settings, either lifting or handling

of temporal aspects is more efficient• Preventing groundings to calculate a lifted solution

pays off

Gehrke et al. (2018b,c)

Page 34: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Additional Queries• Conjunctive queries over different time steps

• Can be used for event detection

• What is the probability that someone travelled from X to

Y and that afterwards there is a epidemic in Y given

there is an epidemic in X?

• Maximum expected utility

• Decision support

• Well studied within one time step (Apsel and Brafman

(2011), Nath and Domingos (2009))

• Assignment queries

• Most likely state sequence

• Well studied for static models (Dawid (1992), Dechter

(1999), de Salvo Braz et al. (2006), Apsel and Brafman

(2012), Braun and Möller (2018))

34

Page 35: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

LDJT: Maximum expected utility• Extend representation with actions and utilities• Problem: Find the action sequence that maximises

the expected utility value w.r.t. a utility function.• Only possible for a finite horizon• Combinatorial in horizon • Combinatorial in splits of logvar(s) of action PRV(s)

35

!"#$% !"#$&

'(eat(X,M)"#$ '(1234(X)"#$5678"#$

97:;(<)"#$

!=

!"% !"&'(eat(X,M)" '(1234(X)"

5678"

97:;(<)"

Gehrke et al. (2018b,c)

>?74"#$ >?74"

@ < "

@ < "#$ !"#$A!"A

!B

Page 36: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Outlook• Continue optimising

• Parallelisation• Caching

• From discrete time interval to time continuous• Preserving symmetries• Learning?

• Structure• Potentials (Idea of Baum Welch now possible)• Symmetries• Transfer learning

• Open world?• Unknown domains• Unknown behaviour

36

Page 37: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Wrap-up Exact Lifted Dynamic Inference• Parfactor models for sparse encoding• Factorisation of full joint distribution• Logical variables to model objects

• Algorithms for exact query answering• LDJT for repeated inference• Extensions possible

• Parameterised, conjunctive queries• Maximum expected utility• Assignment queries (Tomorrow)

37

Page 38: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Mission and Schedule of the Tutorial*

• Introduction 20 min• StaR AI

• Overview: Probabilistic relational modeling 30 min• Semantics (grounded-distributional, maximum entropy)• Inference problems and their applications• Algorithms and systems

• Scalable static inference 40 + 30 min• Exact propositional inference• Exact lifted inference

• Scalable dynamic inference 50 min• Exact propositional inference• Exact lifted inference

• Summary 10 min

Providing an introduction into inference in StaRAI

*Thank you to the SRL/StaRAI crowd for all their exciting contributions! The tutorial is necessarily incomplete. Apologies to anyone whose work is not cited

38

✓✓

Page 39: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

References

• Apsel and Brafman (2012) Udi Apsel and Ronen I. Brafman. Exploiting Uniform Assignments in First-Order MPE. Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, 2012.

• Apsel and Brafman (2011)Udi Apsel and Ronen I. Brafman. Extended Lifted Inference with Joint Formulas. Proceedings of the 27th Conference on Uncertainty in Artificial Intelligence. pp. 11–18, 2011.

• Dawid (1992)Alexander Philip Dawid. Applications of a General Propagation Algorithm for Probabilistic Expert Systems. Statistics and Computing, 2(1):25–36, 1992.

• Dechter (1999)Rina Dechter. Bucket Elimination: A Unifying Framework for Probabilistic Inference. In Learning and Inference in Graphical Models, pages 75–104. MIT Press, 1999.

39

Page 40: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

References

• De Salvo Braz et al. (2006)Rodrigo de Salvo Braz, Eyal Amir, and Dan Roth. MPE and Partial Inversion in Lifted Probabilistic Variable Elimination. AAAI-06 Proceedings of the 21st Conference on Artificial Intelligence, 2006.

• Murphy (2002)Kevin P. Murphy. Dynamic Bayesian Networks: Representation, Inference and Learning. PhD Thesis University of California, Berkeley, 2002.

• Nath and Domingos (2009)Aniruddh Nath and Pedro Domingos, A language for relational decision theory, Proceedings of the International Workshop on Statistical Relational Learning, 2009.

40

Page 41: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Work @ IFIS• Braun and Möller (2018b)

Tanya Braun and Ralf Möller. Lifted Most Probable Explanation. In Proceedings of the International Conference on Conceptual Structures, 2018.

• Gehrke et al. (2018)Marcel Gehrke, Tanya Braun, and Ralf Möller. Lifted Dynamic Junction Tree Algorithm. In Proceedings of the International Conference on Conceptual Structures, 2018.

• Gehrke et al. (2018b)Marcel Gehrke, Tanya Braun, and Ralf Möller. Towards Preventing UnnecessaryGroundings in the Lifted Dynamic Junction Tree Algorithm. In Proceedings of KI 2018: Advances in Artificial Intelligence, 2018.

• Gehrke et al. (2018c)Marcel Gehrke, Tanya Braun, and Ralf Möller. Preventing UnnecessaryGroundings in the Lifted Dynamic Junction Tree Algorithm. In Proceedings of theAI 2018: Advances in Artificial Intelligence, 2018.

41

Page 42: Exact Lifted Inference on Relational Temporal Modelsbraun/Tutorial/iccs-19/... · 2019. 7. 1. · •Normally only a subset of random variables influence next time step •State description

Work @ IFIS• Gehrke et al. (2019)

Marcel Gehrke, Tanya Braun, and Ralf Möller. Rela=onal Forward Backward Algorithm for Mul=ple Queries. In FLAIRS-32 Proceedings of the 32nd

Interna9onal Florida Ar9ficial Intelligence Research Society Conference, 2019.

• Gehrke et al. (2019b)Marcel Gehrke, Tanya Braun, Ralf Möller, Alexander Waschkau, Christoph Strumann, and Jost Steinhäuser. LiQed Maximum Expected U=lity. In Ar=ficialIntelligence in Health, 2019.

• Gehrke et al. (2019c)Marcel Gehrke, Tanya Braun, and Ralf Möller. LiQed Temporal Maximum Expected U=lity. In Proceedings of the 32nd Canadian Conference on Ar=ficialIntelligence, Canadian AI 2019, 2019.

42