Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deep probabilistic programming - The road to in...

Deep probabilistic programming - The road to intelligence

Michael Green

May 03, 2018
Tweet

More Decks by Michael Green

Other Decks in Science

Transcript

  1. Agenda Overview of AI and Machine learning Why do we

    need more? Our Bayesian Brains Probabilistic programming Tying it all together · · · · · 2/44
  2. AI is the behaviour shown by an agent in an

    environment that seems to optimize the concept of future freedom “ 4/44
  3. What is Artificial Intelligence? Artificial Narrow Intelligence Artificial General Intelligence

    Artificial Super Intelligence Classifying disease Self driving cars Playing Go · · · Using the knowledge of driving a car and applying it to another domain specific task In general transcending domains · · Scaling intelligence and moving beyond human capabilities in all fields Far away? · · 5/44
  4. Comparison 1 Simple linear regression Robust noise regression data {

    int<lower=0> N; vector[N] x; vector[N] y; } parameters { real alpha; real beta; real<lower=0> sigma; } model { real mu[N] = alpha + beta * x; y ~ normal(mu, sigma); } data { int<lower=0> N; vector[N] x; vector[N] y; } parameters { real alpha; real beta; real<lower=0> nu; real<lower=0> sigma; } model { real mu[N] = alpha + beta * x; y ~ student_t(nu, mu, sigma); } 7/44
  5. Comparison 2 Linear regression Negative binomial regression data { int<lower=0>

    N; vector[N] x; vector[N] y; } parameters { real alpha; real beta; real<lower=0> sigma; } model { real mu[N] = alpha + beta * x; y ~ normal(mu, sigma); } data { int<lower=0> N; vector[N] x; vector[N] y; } parameters { real alpha; real beta; real<lower=0> sigma; } model { vector[N] mu = exp(x*beta+alpha); y ~ neg_binomial_2(mu, sigma); } 8/44
  6. Machine learning can only take us so far Why is

    that? Data: Data is not available in cardinality needed for many real world interesting applications Structure: Problem structure is hard to detect without domain knowledge Identifiability: For any given data set there are many possible models that fit really well to it with fundamentally different interpretations Priors: The ability to add prior knowledge about a problem is crucial as it is the only way to do science Uncertainty: Machine learning application based on maximum likelihood cannot express uncertainty about it's model · · · · · 10/44
  7. The Bayesian brain Domain space Machine learning Inference p (x,

    y, θ) p (y|θ, x) p (θ|y, x) = p (y|θ, x) p (θ|x) ∫ p (y, θ|x) dθ 11/44
  8. The importance of uncertainty It's my belief that uncertainty is

    a key missing piece in most AI applications today A probabilistic framework readily includes this It does not fix all kinds of uncertainties though! · · · 12/44
  9. Overview This spiral data feature two classes and the task

    is to correctly classify future data points Features of this data Spiral data Highly nonlinear Noisy Apparent structure · · · 15/44
  10. How can we include uncertainty? The fully Bayesian way A

    middle ground You can read more about it here: (https://alexgkendall.com/computer_vision/bayesian_deep_learning_for_safe_ai/) p( | , θ, σ) = N( , σ) y t x x t θ μ t p(θ) = N(0, 10) θ E(y, , θ) = + log σ y y ^ y ^ θ 1 T ∑ t=1 T ( − ) y y t y ^ y ^ t 2 2σ 16/44
  11. The probabilistic formulation What is being done Learning the data

    x y μx μ y δ ∼ ∼ = = ∼ N ( , ) μx σx N ( , ) μy σy (r + δ) cos( ) t 2π (r + δ) sin( ) t 2π N (0.5, 0.1) Instead of throwing a lot of nonlinear generic functions at this beast we could do something different From just looking at the data we can see that the generating functions must look like Which fortunatly can be programmed using a probabilistic programming language · · · 20/44
  12. What we gain from this We get to put our

    knowledge into the model solving for mathematical structure A generative model can be realized Direct measures of uncertainty comes out of the model No crazy statistical only results due to identifiability problems · · · · 21/44
  13. Enter the Datasaurus All datasets, and all frames of the

    animations, have the same summary statistics ( , , , , ). = 54.26 μx = 47.83 μy = 16.76 σ x = 26.93 σ y = −0.06 ρ x,y 23/44
  14. Visualization matters! Seven distributions of data, shown as raw data

    points (or strip-plots), as box- plots, and as violin-plots. 24/44
  15. Degeneracy in Neural Networks A neural network is looking for

    the deepest valleys in this landscape As you can see there are many available Are they equivalent? Parameter space may have multiple "optimal" configurations not corresponding to physical reality As a consequence most Neural network models are overparameterized · · · · · 27/44
  16. So what's my point? The point is that these spurious

    patterns will be realized in most if not all neural networks and their representation of the reality they're trying to predict will be inherently wrong. Read the paper by Nguyen A, Yosinski J, Clune J 28/44
  17. A real world example from Blackwood Every node in the

    network represents a latent or observed variable and the edges between them represents interactions · 31/44
  18. About cognitive strength Our brain is so successful because it

    has a strong anticipation about what will come Look at the tiles to the left and judge the color of the A and B tile To a human this task is easy because we know what to expect and we quickly realize that A and B have different hues · · · 33/44
  19. What is it? Probabilistic programming creates systems that help make

    decisions in the face of uncertainty. Probabilistic reasoning combines knowledge of a situation with the laws of probability. Until recently, probabilistic reasoning systems have been limited in scope, and have not successfully addressed real world situations. It allows us to specify the models as we see fit Curse of dimensionality is gone We get uncertainty measures for all parameters We can stay true to the scientific principle We do not need to be experts in MCMC to use it! · · · · · 36/44
  20. Enter Stan a probabilistic programming language Users specify log density

    functions in Stan’s probabilistic programming language and get: Stan’s math library provides differentiable probability functions & linear algebra (C++ autodiff). Additional R packages provide expression-based linear modeling, posterior visualization, and leave-one-out cross-validation. full Bayesian statistical inference with MCMC sampling (NUTS, HMC) approximate Bayesian inference with variational inference (ADVI) penalized maximum likelihood estimation with optimization (L-BFGS) · · · 37/44
  21. Task Further information Solution A note about uncertainty Suppose I

    gave you a task of investing 1 million USD in either Radio or TV advertising The average ROI for Radio and TV is How would you invest? · · 0.5 · Now I will tell you that the ROI's are actually distributions Radio and TV both have a minimum value of 0 Radio and TV have a maximum of 9.3 and 1.4 respectively Where do you invest? · · · · How to think about this? You need to ask the following question What is ? The answer to that question is around 40 and 90 percent for Radio and TV respectively! · · · p(ROI > 0.3) · 38/44
  22. A note about uncertainty - Continued Radio TV Mean 0.5

    0.5 Min 0.0 -0.3 Max 9.0 1.3 Median 0.2 0.5 Mass 0.4 0.8 Sharpe 0.7 2.5 39/44
  23. Take home messages The time is ripe for marrying machine

    learning and inference machines Don't get stuck in patterns using existing model structures Stay true to the scientific principle Always state your mind! Be free, be creative and most of all have fun! · · · · · 43/44
  24. Session Information For those who care ## setting value ##

    version R version 3.4.4 (2018-03-15) ## system x86_64, linux-gnu ## ui X11 ## language en_US:en ## collate en_US.UTF-8 ## tz Europe/Copenhagen ## date 2018-05-03 ## ## package * version date source ## abind 1.4-5 2016-07-21 CRAN (R 3.4.2) ## assertthat 0.2.0 2017-04-11 cran (@0.2.0) ## backports 1.1.1 2017-09-25 CRAN (R 3.4.2) ## base * 3.4.4 2018-03-16 local ## bindr 0.1 2016-11-13 CRAN (R 3.4.2) ## bindrcpp * 0.2 2017-06-17 CRAN (R 3.4.2) ## cellranger 1.1.0 2016-07-27 CRAN (R 3.4.2) ## colorspace 1.3-2 2016-12-14 CRAN (R 3.4.2) ## compiler 3.4.4 2018-03-16 local ## cowplot 0.9.1 2017-11-16 CRAN (R 3.4.2) ## data.table 1.10.0 2016-12-03 CRAN (R 3.4.2) ## datasets * 3.4.4 2018-03-16 local ## datools * 0.0.0.9000 2018-01-11 local ## dautility * 2.0.0 2018-02-01 local ## DBI 0.7 2017-06-18 CRAN (R 3.4.2) ## dbplyr 1.1.0 2017-06-27 CRAN (R 3.4.2) 44/44