1 / 73

Compiling Bayesian Networks

Compiling Bayesian Networks. Sophisticated Platform (desktop). evaluator n. evaluator 1. evaluator 2. compiler. Engine. AC. AC. AC. Primitive Platforms (embedded). Embedding Probabilistic Inference. +. *. *. +. +. *. *. *. *. *. *. θ a. λ a. λ b. θ ab. θ a~b. θ ~ab.

sera
Download Presentation

Compiling Bayesian Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compiling Bayesian Networks

  2. Sophisticated Platform (desktop) evaluator n evaluator 1 evaluator 2 compiler Engine AC AC AC Primitive Platforms (embedded) Embedding Probabilistic Inference

  3. + * * + + * * * * * * θa λa λb θab θa~b θ~ab λ~b θ~a~b λ~a θ~a

  4. Local CPT Structure A B E S A B E Pr(S|A,B,E) a b e 0.95 a b e 0.95 a b e 0.20 a b e 0.05 a b e 0.00 a b e 0.00 a b e 0.00 a b e 0.00 Tabular CPT qs|abe -Functional constraints -Context-specific independence

  5. JT vs AC size

  6. AC Compile Time

  7. AC vs JT Inference Time

  8. How does it work?

  9. Ø A B true true .03 true false .27 false true .56 false false false .14 false Pr(a) = .03 + .27 = .3

  10. A B Ø true true .03 true false .27 false true .56 false false false .14 false Pr(~b) = .27 + .14 = .41

  11. A B Ø λaλb .03 .03 true true .27 λaλ~b .27 true false λ~aλb .56 .56 false true false λ~aλ~b .14 .14 false false false F(λ~a,λ~b,λb,λa) = .03λaλb + .27λaλ~b + .56λ~aλb + .14λ~a λ~b

  12. + * * * * .14 .56 .27 .03 λ~a λ~b λb λa F(λ~a,λ~b,λb,λa) = .03λaλb + .27λaλ~b + .56λ~aλb + .14λ~a λ~b

  13. Effect of Evidence on Values of Evidence Indicators

  14. .03 + * * * * .14 .56 .27 .03 λ~a λ~b λb λa 0 0 1 1 Evidence: a & b

  15. .27 + * * * * .14 .56 .27 .03 λ~a λ~b λ b λa 0 1 0 1 Evidence: a & ~b

  16. .30 + * * * * .14 .56 .27 .03 λ~a λ~b λ b λa 0 1 1 1 Evidence: a

  17. 1 + * * * * .14 .56 .27 .03 λ~a λ~b λ b λa 1 1 1 1 Evidence: true

  18. The Network Polynomial

  19. B D A θc|a C θa θd|bc θb|a F = λa λb λc λd θa θb|a θc|a θd|bc + λa λb λc λ~d θa θb|a θc|a θ~d|bc + …. Each term has 2n variables (n indicators, n parameters) Each variable has degree one (multi-linear function)

  20. C B A F = λa λb λc θa θb|a θc|a + λa λb λ~c θa θb|a θ~c|a + λa λ~b λc θa θ~b|a θc|a + λa λ~b λ~c θa θ~b|a θ~c|a ….

  21. B D A θc|a C θa θd|bc θb|a F = λa λb λc λd θa θb|a θc|a θd|bc + λa λb λc λ~d θa θb|a θc|a θ~d|bc + …. F(b,~c,d) = F(λa=1, λ~a=1, λb=1, λ~b=0, λc=0, λ~c=1, λd=1,λ~d=0) = θa θb|a θ~c|a θd|b~c + θ~a θb|a θ~c|~a θd|b~c = Pr(b,~c,d)

  22. Factoring the Network Polynomialinto an Arithmetic Circuit (AC)

  23. + * * + + * * * * * * θa λa λb θ~a θab θa~b θ~ab λ~b θ~a~b λ~a Arithmetic Circuits F = λa λb θa θb|a+ λa λ~b θa θ~b|a+ λ~aλb θ~a θb|~a+ λ~a λ~b θ~a θ~b|~a

  24. Evaluating and Differentiating Circuits

  25. .3 + .3 0 * * + + 1 1 .3 .1 .9 .8 .2 0 * * * * * * .3 1 .1 1 .9 .8 1 .2 0 .7 θa λa λb θab θa~b θ~ab λ~b θ~a~b λ~a θ~a

  26. 1 .3 .3 .03 .3 0 .27 0 .7 0 .3 + 1 1 1 * * .3 0 + + .3 0 1 1 1 .3 .3 1 0 0 * * * * * .3 .1 .9 .8 .2 0 * θa λa λb θab θa~b θ~ab λ~b θ~a~b λ~a θ~a .3 1 .1 1 .9 .8 1 .2 0 .7

  27. The Partial Derivatives

  28. ØB A B A ØA true true .1 true .3 true false .9 false .7 false true .8 false false .2 false B A false

  29. 1 .3 .3 .03 .3 0 .27 0 .7 0 Pr(a) .3 + * * + + * * * * * * θa λa λb θab θa~b θ~ab λ~b θ~a~b λ~a θ~a .3 1 .1 1 .9 .8 1 .2 0 .7

  30. When X does not appear in e: Pr(x,e) =F(e) / λx Pr(x | e) =F(e) / λx F(e)

  31. If variable X is instantiated in e: Pr(e – X, x́) = F(e)/ λx́

  32. For variable X that appears instantiated in e: Σx F(e) λx Pr(e - X) =

  33. For every family X U in Network N: F(e) /  θx|u θx|u F(e ) Pr(x,u|e) =

  34. Second Partial Derivatives F2(e)/ λx λy = Pr(x,y,e)

  35. Generating Circuits

  36. Bayesian network A Jointree ABC B C D E BCD H F G BH CE EF EG Representational factorization (17 parameters) Computational factorization (32 parameters) Factorizations

  37. Bayesian network A Jointree ABC B C D E BCD H F G BH CE EF EG Representational factorization (17 parameters) Computational factorization (32 parameters) Factorizations Network topology Network parameters

  38. A B E S A B E Pr(S|A,B,E) a b e 0.95 Pr(S=s|A=a,B=b)=.95 a b e 0.95 a b e 0.20 a b e 0.05 a b e 0.00 a b e 0.00 a b e 0.00 a b e 0.00 Tabular CPT Local Structure

  39. Bayesian network A Jointree ABC B C D E BCD H F G BH CE EF EG Representational factorization Computational factorization Factorizations Network topology Network parameters

More Related