einsum networks
play

Einsum Networks Fast and Scalable Learning ofTractable Probabilistic - PowerPoint PPT Presentation

Einsum Networks Fast and Scalable Learning ofTractable Probabilistic Circuits Robert Peharz Steven Lang Antonio Vergari Eindhoven University of Technology Technical University of Darmstadt University of California, Los Angeles Karl Stelzner


  1. Einsum Networks Fast and Scalable Learning ofTractable Probabilistic Circuits Robert Peharz Steven Lang Antonio Vergari Eindhoven University of Technology Technical University of Darmstadt University of California, Los Angeles Karl Stelzner Alejandro Molina Martin Trapp Technical University of Darmstadt Technical University of Darmstadt Graz University of Technology Guy Van den Broeck Kristian Kersting Zoubin Ghahramani University of Cambridge; Uber AI Labs University of California, Los Angeles Technical University of Darmstadt International Conference on Machine Learning (ICML), July 2020

  2. In This Paper Probabilistic Circuits (PCs) — Just a special type of neural network Yet, they are slow Computational graphs highly sparse and cluttered Operations implemented in the log-domain ∼ 50 times slower than neural net of comparable size We propose Einsum Networks (EiNets) PC architecture using a few monolithic einsum operations Run and train PCs up to two orders of magnitude faster Scale PCs to datasets previously out of reach (CelebA, SVHN) 2 /21

  3. Probabilistic Circuits

  4. Probabilistic Circuits Computational graph containing 3 types of operations: Distributions (leaves), products, and weighted sums. 4 /21

  5. Probabilistic Circuits Computational graph containing 3 types of operations: Distributions (leaves) , products, and weighted sums. 4 /21

  6. Probabilistic Circuits Computational graph containing 3 types of operations: Distributions (leaves), products , and weighted sums. 4 /21

  7. Probabilistic Circuits Computational graph containing 3 types of operations: Distributions (leaves), products, and weighted sums . 4 /21

  8. Probabilistic Circuits — Leaf Distributions 5 /21

  9. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … 6 /21

  10. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … x 6 /21

  11. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … p ( x ) x 6 /21

  12. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … p ( x ) θ x 6 /21

  13. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … p ( x ) h ( x ) exp( θ T T ( x ) − A ( θ )) x 6 /21

  14. Probabilistic Circuits — Leaf Distributions Arbitrary probability function (pdf, pmf, mixed) over some set of random variables X . Should facilitate tractable inference routines, e.g. marginalization, conditioning, MAP, … p ( x ) h ( x ) exp( θ T T ( x ) − A ( θ )) Gaussian, Bernoulli, Dirichlet, Poisson, Gamma, … x 6 /21

  15. Probabilistic Circuits — Products 7 /21

  16. Probabilistic Circuits — Products Simply product units 8 /21

  17. Probabilistic Circuits — Products Simply product units 0 . 5 1 . 4 8 /21

  18. Probabilistic Circuits — Products Simply product units 0 . 7 0 . 5 1 . 4 8 /21

  19. Probabilistic Circuits — Sums 9 /21

  20. Probabilistic Circuits — Sums Weighted sums 10 /21

  21. Probabilistic Circuits — Sums Weighted sums w 1 w 2 10 /21

  22. Probabilistic Circuits — Sums Weighted sums w 1 w 2 3 . 14 42 . 10 /21

  23. Probabilistic Circuits — Sums Weighted sums w 1 3 . 14 + w 2 42 . w 1 w 2 3 . 14 42 . 10 /21

  24. Probabilistic Circuits — Sums Weighted sums w 1 3 . 14 + w 2 42 . w k ≥ 0 w 1 w 2 3 . 14 42 . 10 /21

  25. Probabilistic Circuits — Sums Weighted sums w 1 3 . 14 + w 2 42 . w k ≥ 0 ∑ k w k = 1 w 1 w 2 3 . 14 42 . 10 /21

  26. Plus: Structural properties! Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. 11 /21

  27. Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. Plus: Structural properties! 11 /21

  28. Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. Plus: Structural properties! X 3 X 1 X 2 11 /21

  29. Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. Plus: Structural properties! =: p ( X 1 , X 2 , X 3 ) X 3 X 1 X 2 11 /21

  30. Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. Plus: Structural properties! =: p ( X 1 , X 2 , X 3 ) Smoothness sum children have same scope X 3 X 1 X 2 11 /21

  31. Probabilistic Circuits Computational graph containing distributions, products, and weighted sums. Plus: Structural properties! =: p ( X 1 , X 2 , X 3 ) Smoothness sum children have same scope Decomposability product children have disjoint scope X 3 X 1 X 2 11 /21

  32. Smoothness and decomposability Single bottom up pass! Check out our AAAI tutorial on Probabilistic Circuits! Upcoming tutorials at ECAI, ECML/PKDD, IJCAI ! Probabilistic Circuits — Inference Example: Marginalization and Conditioning X = X q ∪ X m ∪ X e ∫ p ( X q , x ′ m , x e )d x ′ m p ( X q | x e ) = ∫ ∫ p ( x ′ m , x e )d x ′ q d x ′ q , x ′ m 12 /21

  33. Check out our AAAI tutorial on Probabilistic Circuits! Upcoming tutorials at ECAI, ECML/PKDD, IJCAI ! Probabilistic Circuits — Inference Example: Marginalization and Conditioning X = X q ∪ X m ∪ X e ∫ p ( X q , x ′ m , x e )d x ′ m p ( X q | x e ) = ∫ ∫ p ( x ′ m , x e )d x ′ q d x ′ q , x ′ m Smoothness and decomposability ⇒ Single bottom up pass! 12 /21

  34. Probabilistic Circuits — Inference Example: Marginalization and Conditioning X = X q ∪ X m ∪ X e ∫ p ( X q , x ′ m , x e )d x ′ m p ( X q | x e ) = ∫ ∫ p ( x ′ m , x e )d x ′ q d x ′ q , x ′ m Smoothness and decomposability ⇒ Single bottom up pass! Check out our AAAI tutorial on Probabilistic Circuits! Upcoming tutorials at ECAI, ECML/PKDD, IJCAI ! 12 /21

  35. The Problem

  36. Einsum Networks

  37. Step I – Vectorize Nodes 15 /21

  38. single einsum -operation Step II – The Basic Einsum Operation 16 /21

  39. Step II – The Basic Einsum Operation single einsum -operation S k = W kij N i N ′ j 16 /21

  40. single einsum -operation Step III – Einsum Layers 17 /21

  41. Step III – Einsum Layers S lk = W lkij N li N ′ single einsum -operation lj 17 /21

  42. Results

  43. Runtime and Memory Comparison K D (depth) R (# replicas) 40 10 1 EiNets (x) 10 1 SPFlow (+) GPU memory (GB) LibSPN (*) 30 10 0 10 0 10 0 20 10 −1 10 −1 10 10 −1 10 −2 10 −2 10 0 10 1 10 −1 10 0 10 1 10 2 10 −1 10 0 10 1 10 2 Training time (sec/epoch) Training time (sec/epoch) Training time (sec/epoch) 0 19 /21

  44. Generative Image Models 20 /21

  45. https://github.com/SPFlow/SPFlow https://github.com/cambridge-mlg/EinsumNetworks Conclusion PCs: intersection of classical graphical models and neural networks. Crucial advantage: many exact inference routines. But, they used to be painful to scale. In this paper, we made a big step to close the gap. More to come! 21 /21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend