What I wont talk about Luc De Raedt (KULeuven) Dagstuhl Seminar - - PowerPoint PPT Presentation

what i won t talk about
SMART_READER_LITE
LIVE PREVIEW

What I wont talk about Luc De Raedt (KULeuven) Dagstuhl Seminar - - PowerPoint PPT Presentation

What I wont talk about Luc De Raedt (KULeuven) Dagstuhl Seminar on ML and Formal Methods September 2017 TaCLe Learning constraints in spreadsheets and tabular data Sergey Paramonov, Samuel Kolb, Tias Guns, Luc De Raedt KU Leuven


slide-1
SLIDE 1

What I won’t talk about

Luc De Raedt (KULeuven) Dagstuhl Seminar on ML and Formal Methods September 2017

slide-2
SLIDE 2

TaCLe

Learning constraints in spreadsheets and tabular data Sergey Paramonov, Samuel Kolb, Tias Guns, Luc De Raedt

KU Leuven

(Machine Learning 2017, ECMLPKDD Track, CIKM 2017 demo track)

slide-3
SLIDE 3

Reverse Engineering Formulae / Constraints

Illustration

slide-4
SLIDE 4

SERIES(T1[:, 1]) T2[1, :] = SUMcol(T1[:, 3:7]) T1[:, 1] = RANK(T1[:, 5])∗ T2[2, :] = AVERAGEcol(T1[:, 3:7]) T1[:, 1] = RANK(T1[:, 6])∗ T2[3, :] = MAXcol(T1[:, 3:7]) T1[:, 1] = RANK(T1[:, 10])∗ T2[4, :] = MINcol(T1[:, 3:7]) T1[:, 8] = RANK(T1[:, 7]) T4[:, 2] = SUMcol(T1[:, 3:6]) T1[:, 8] = RANK(T1[:, 3])∗ T4[:, 4] = P REV (T4[:, 4]) + T4[:, 2] − T4[:, 3] T1[:, 8] = RANK(T1[:, 4])∗ T5[:, 2] = LOOKUP(T5[:, 3], T1[:, 2], T1[:, 1])∗ T1[:, 7] = SUMrow(T1[:, 3:6]) T5[:, 3] = LOOKUP(T5[:, 2], T1[:, 1], T1[:, 2]) T1[:, 10] = SUMIF(T3[:, 1], T1[:, 2], T3[:, 2]) T1[:, 11] = MAXIF(T3[:, 1], T1[:, 2], T3[:, 2])

(b) Constraints learned for the tables above, except 19 ALLDIFFERENT, 2 PERMUTATION and 5 FOR- EIGNKEY and 5 ASCENDING constraints not shown. Constraints marked with ∗ were not present in the

  • riginal spreadsheets.

We are working on learning constraints and CSPs

slide-5
SLIDE 5

What I will talk about

Luc De Raedt (KULeuven) Dagstuhl Seminar on ML and Formal Methods August 2017

slide-6
SLIDE 6

Dynamic Probabilistic Logic Programs

Luc De Raedt (KULeuven) Dagstuhl Seminar on ML and Formal Methods August 2017

slide-7
SLIDE 7

Dynamics: Evolving Networks

  • Travian: A massively multiplayer real-time strategy game
  • Commercial game run by TravianGames GmbH
  • ~3.000.000 players spread over different “worlds”
  • ~25.000 players in one world

[Thon et al. MLJ 11]

7

slide-8
SLIDE 8

World Dynamics

Alliance 2 Alliance 3 Alliance 4 P 2 1081 895 1090 1090 1093 1084 915 1081 1040 770 1077 955 1073 804 1054 830 942 1087 786 621 P 3 744 P 5 P 6 950 644 985 932 837 871 777 946 878 864 913 P 9

Fragment of world with ~10 alliances ~200 players ~600 cities alliances color-coded Can we build a model

  • f this world ?

Can we use it for playing better ? [Thon, Landwehr, De Raedt, ECML08]

8

slide-9
SLIDE 9

World Dynamics

Alliance 2 Alliance 4 P 2 904 1090 917 770 959 1073 820 762 946 1087 794 632 P 3 761 961 1061 988 924 P 5 951 935 948 938 P 6 950 644 985 888 844 875 783 946 878 864 913

Fragment of world with ~10 alliances ~200 players ~600 cities alliances color-coded Can we build a model

  • f this world ?

Can we use it for playing better ? [Thon, Landwehr, De Raedt, ECML08]

9

slide-10
SLIDE 10

World Dynamics

Alliance 2 Alliance 4 P 2 918 1090 931 779 977 835 781 958 1087 808 701 P 3 838 947 1026 1081 1002 987 994 P 5 1032 1026 1024 1049 905 P 6 986 712 985 920 877 807 P 7 895 959 P 10 824

Fragment of world with ~10 alliances ~200 players ~600 cities alliances color-coded Can we build a model

  • f this world ?

Can we use it for playing better ? [Thon, Landwehr, De Raedt, ECML08]

10

slide-11
SLIDE 11

Moldovan et al. ICRA 12, 13, 14, PhD 15 Nitti et al MLJ 15, 17 (forthcoming), Phd 16

Learning relational affordances

Learn probabilistic model From two object interactions Generalize to N

Shelf push Shelf tap Shelf grasp

slide-12
SLIDE 12

0.4 :: heads.
 0.3 :: col(1,red); 0.7 :: col(1,blue) <- true. 0.2 :: col(2,red); 0.3 :: col(2,green);
 0.5 :: col(2,blue) <- true.
 win :- heads, col(_,red). win :- col(1,C), col(2,C). annotated disjunction: second ball is red with probability 0.2, green with 0.3, and blue with 0.5 logical rule encoding background knowledge ProbLog by example:

A bit of gambling

h

  • toss (biased) coin & draw ball from each urn
  • win if (heads and a red ball) or (two balls of same color)

probabilistic fact: heads is true with probability 0.4 (and false with 0.6) annotated disjunction: first ball is red with probability 0.3 and blue with 0.7 probabilistic choices consequences

12

slide-13
SLIDE 13

Possible Worlds

W

R R

H W

R R G

×0.3

0.4 :: heads. 0.3 :: col(1,red); 0.7 :: col(1,blue) <- true. 0.2 :: col(2,red); 0.3 :: col(2,green); 0.5 :: col(2,blue) <- true. win :- heads, col(_,red). win :- col(1,C), col(2,C).

×0.3 0.4 ×0.2 ×0.3 (1−0.4) ×0.3 ×0.3 (1−0.4)

G

13

slide-14
SLIDE 14

Questions

  • Probability of win?

  • Probability of win given col(2,green)?

  • Most probable world where win is true?

0.4 :: heads. 0.3 :: col(1,red); 0.7 :: col(1,blue) <- true. 0.2 :: col(2,red); 0.3 :: col(2,green); 0.5 :: col(2,blue) <- true. win :- heads, col(_,red). win :- col(1,C), col(2,C).

marginal probability conditional probability MPE inference

14

Inference is #P-complete — weighted model counting

slide-15
SLIDE 15
  • Discrete- and continuous-valued random variables

Distributional Clauses (DC)

length(Obj) ~ gaussian(6.0,0.45) :- type(Obj,glass). stackable(OBot,OTop) :- 
 ≃length(OBot) ≥ ≃length(OTop), 
 ≃width(OBot) ≥ ≃width(OTop).

  • ntype(Obj,plate) ~ finite([0 : glass, 0.0024 : cup,


0 : pitcher, 0.8676 : plate,
 0.0284 : bowl, 0 : serving, 
 0.1016 : none]) 
 :- obj(Obj), on(Obj,O2), type(O2,plate). [Gutmann et al, TPLP 11; Nitti et al, IROS 13]

random variable with Gaussian distribution comparing values of random variables random variable with discrete distribution

15

slide-16
SLIDE 16

16

Magnetic scenario

  • 3 object types: magnetic, ferromagnetic, nonmagnetic
  • Nonmagnetic objects do not interact
  • A magnet and a ferromagnetic object attract each other
  • Magnetic force that depends on the distance
  • If an object is held magnetic force is compensated.
slide-17
SLIDE 17

17

Magnetic scenario

  • 3 object types: magnetic, ferromagnetic, nonmagnetic
  • 2 magnets attract or repulse

  • Next position after attraction

type(X)t ~ finite([1/3:magnet,1/3:ferromagnetic,1/3:nonmagnetic]) ←

  • bject(X).

interaction(A,B)t ~ finite([0.5:attraction,0.5:repulsion]) ← 


  • bject(A), object(B), A<B,type(A)t = magnet,type(B)t = magnet.

pos(A)t+1 ~ gaussian(middlepoint(A,B)t,Cov) ←
 near(A,B)t, not(held(A)), not(held(B)),
 interaction(A,B)t = attr, c/dist(A,B)t

2 > friction(A)t.

pos(A)t+1 ~ gaussian(pos(A)t,Cov) ← not( attraction(A,B) ).

slide-18
SLIDE 18

18

slide-19
SLIDE 19

Moldovan et al. ICRA 12, 13, 14, PhD 15 Nitti et al MLJ 15, 17 (forthcoming), Phd 16

Learning relational affordances

Learn probabilistic model From two object interactions Generalize to N

Shelf push Shelf tap Shelf grasp

slide-20
SLIDE 20

What is an affordance ?

Clip 8: Relational O before (l), and E after the action execution (r).

  • Formalism — related to STRIPS / to PDDL but models delta
  • but also joint probability model over A, E, O

Table 1: Example collected O, A, E data for action in Figure 8

Object Properties Action Effects shapeOMain : sprism shapeOSec : sprism distXOMain,OSec : 6.94cm distYOMain,OSec : 1.90cm tap(10) displXOMain : 10.33cm displYOMain : −0.68cm displXOSec : 7.43cm displYOSec : −1.31cm

slide-21
SLIDE 21

Relational Affordance Learning

  • Learning the Structure of Dynamic Hybrid Relational Models


Nitti, Ravkic, et al. ECAI 2016

− Captures relations/affordances − Suited to learn affordances in


robotics set-up, continuous and discrete variables

− Planning in hybrid robotics domain

DDC Tree learner

action(X)

slide-22
SLIDE 22

Planning

[Nitti et al ECML 15]

slide-23
SLIDE 23

Conclusions

  • Static version (~ prob. data and knowledge

bases)

  • Dynamic formalism is related to PDDL,

can represent relational MDPs, can be learned (small problems) and can be used for planning — continuing work on scaling up

  • We can learn these formalisms

23

slide-24
SLIDE 24

Questions that I have

  • What kind of relationships exist between

PCTL and Prob. Planning ?

  • What verification techniques work with

relational worlds ? (relational MDPs versus propositional ones)

  • I d like to impose constraints on what is

being learned … how do I do that ?

24

slide-25
SLIDE 25

ILP, Porto, Portugal, 2004

a b

Curse of Dimension

d c e e a b d c a b d c e a b d e c move(e,c) move(e,floor) move(c,e)

#blocks #states 3 5 8 10 13 501 394,353 58,941,091

  • Flat represention
  • No notions of objects and

relations among the

  • bjects
  • Generalization (similar

situations / individuals)?

  • Parameter Reduction /

Compression ?

– on(a,b) for 10 blocks

  • <150 values
  • 58,941,091 states