SlideShare a Scribd company logo
Probabilistic Programming: a Broad Overview
Eli Sennesh
Bayesian Statistics in One Graph
Bayesian Role-Playing Games
● With enough paper, we could just write out every possible play
based on every possible dice-roll and the fixed player levels.
● How many ways could we have gotten from the start of the
game to the board we see? That's a likelihood.
● Which dice rolls were more common in games that gave us the
real play? That's a posterior probability.
● Bayesianism: unknown levels are just more dice.
– And are the actual dice weighted?
Bayesian Reasoning is Hard!
● P(H | E) = P(E | H)*P(H) / ∫ P(E | H)*P(H) dH
● Bayesian reasoning: how to update beliefs in response to
evidence
● But the integral in the denominator often cannot be solved
analytically.
● Approaches: conjugate priors and posteriors (for which we don't
need to evaluate it), various numerical methods
The Trouble with Bayesian Modeling (1)
Calculating probabilities takes time exponential in the number of relevant variables!
The Trouble with Bayesian Modeling (2)
The Trouble with Bayesian Modeling (3)
● Exact Bayesian inference methods only support possible-worlds
with a finite number of things in them.
● Every combination of model and inference method currently has
to be combined manually into non-reusable code.
● Probabilistic modeling as we think we know it is inexpressive
and slow, ranging in complexity from NP-complete to
DEXPTIME.
Programs have generative structure
● Generative model = Rules + Randomness + Random
Parameters
– A program for generating random outcomes, given unknown
parameters.
● Probabilistic Program = Probability Distribution
● The Stochastic Lambda Calculus: a Turing-complete language
with random choices.
– In jargon: the 'probability monad'.
What sorts of queries?
● Sampling: 'What are some possibilities?'
● Expectation: 'What should we expect to see?'
● Support: 'What could happen?'
● Probability mass/density: 'What's the chance this happens?'
● Conditional query: 'Given this, what about that? What about
when X happens more than Y?'
– 'Given that I saw 18 black ravens, what proportion of all ravens are
black?'
What sorts of inference?
● Mostly sampling-based approximate inference, but there are
some exact algorithms.
● By sampling, we can reason about models where each possible
world might contain a different number of actual entities.
● Approximate inference only has a small cost of its own after we
generate many samples from the distribution.
– And advanced inference algorithms can re-use parts of computations
to sample even faster.
What can probabilistic programs express?
● In a 'code as data' language like Church (based on Scheme),
programs can include eval and learn arbitrary code.
● Or they can do a query about a query: inference about
inference.
● Generative structure generalizes logical and physical structure:
'The λ-calculus does not focus on the sequence of time, but rather o
The Elegance of Probabilistic Programming
● Programs = Distributions.
– Running a program = sampling an outcome from the distribution
– Monadic semantics: every function maps input values to output
distributions.
● Queries are just functions; language runtime performs
inference.
● '[H]allucinate possible worlds', and reason about them.
Probabilistic Programs Can Explain Themselves
Slide taken from Olivi
How can we use probabilistic programming?
● 'We would like to build computing machines that can interpret
and learn from their sensory experience, act effectively in real
time, and - ultimately - design and program themselves.'
● Professor Vikash Mansinghka, 'Natively Probabilistic Computation'
● Applications in: computer vision, cognitive science, machine
learning, natural language processing, and artificial intelligence.
How can I use probabilistic programming?
● Write a program simulating whatever you want to reason about.
Where you don't know which specific choice to make, choose
randomly.
● Present the language runtime's inference engine with real-world
data compatible with your model.
– And go get some coffee.
● The inference engine will learn which random choices generate
data like yours.
Computer Vision in 20 Lines of Code (1)
Computer Vision in 20 Lines of Code (2)
● The prior model 'knows' how to render pictures, but chooses
what to render completely at random. Inference then 'learns'
which choices most likely drew the real image.
● 'Our probabilistic graphics program did not originally support
rotation, which was needed for the AOL CAPTCHAs; adding it
required only 1 additional line of probabilistic code.'
– http://probcomp.csail.mit.edu/gpgp/
● Homework takes more than 20 lines of code!
Which bar should we meet at?
Social reasoning and cooperation in 11 LOC.
Modeling where to meet for drinks
(define (sample-location) (if (flip .55) 'popular-bar 'unpopular-bar))
(define (alice depth)
(query
(define alice-location (sample-location))
alice-location
(equal? alice-location (bob (- depth 1)))))
(define (bob depth)
(query
(define bob-location (sample-location))
bob-location
(or (= depth 0) (equal? bob-location (alice depth)))))
The correct answer is actually Libirah!
Generating Scenes Under Constraints
● Sample fresh coffee shops, conditioned on the constraints of good design.
● Scene generation is an open-world task: not just where to put furniture but how
much to generate is random.
● Exact inference can't even handle these models!
What more needs doing?
● Sampling-based approximation helps, but we need better inference
algorithms. No real-time reasoning yet.
● Techniques from compilers research help.
– One recent paper got a 600x speed-up by caching the nonrandom parts of
each computation and applying Just-In-Time compilation.
● Halting Problem, Rice's Theorem: we can't prove one inference
algorithm supreme in all circumstances.
● Reusable data: export what we've learned and pass it on to others.
● Ways to treat intractability probabilistically
Conclusions
● Rules = Programs, Uncertain knowledge = Random choice.
● Rules + Uncertainty = Programs + Randomness = Probabilistic
Programming
● Probabilistic programs can express any complex model, but need to
improve our inference algorithms to make reasoning tractable.
● Fields of application: cognitive science, procedural content
generation, machine learning, computer vision, Bayesian statistics,
artificial intelligence.
Bibliography (1)
● Probabilistic Models of Cognition
● http://probabilistic-programming.org/research/, http://forestdb.org/
● Vikash Mansinghka. Natively Probabilistic Computation. PhD thesis, Massachusetts
Institute of Technology, 2009.
● Noah D. Goodman, Vikash K. Mansinghka, Daniel M. Roy, Keith Bonawitz, and
Joshua B. Tenenbaum. Church: a language for generative models. In Proc. of
Uncertainty in Artificial Intelligence, 2008.
● Fritz Obermeyer. Automated equational reasoning in nondeterministic lambda-calculi
modulo theories H*. PhD thesis, Carnegie-Mellon University, 2009.
Bibliography (2)
● Vikash Mansinghka, Tejas Kulkarni, Yura Perov, Josh Tenenbaum. Approximate Bayesian
Image Interpretation using Generative Probabilistic Graphics Programs. Neural Information
Processing Systems 2013.
●
Andrew D. Gordon, Thomas A. Henzinger, Aditya V. Nori, and Sriram K. Rajamani. Probabilistic
programming. In International Conference on Software Engineering (ICSE, FOSE track), 2014.
● Andreas Stuhlmüller and Noah D. Goodman. Reasoning about Reasoning by Nested
Conditioning: Modeling Theory of Mind with Probabilistic Programs. In Cognitive Systems
Research, 2013.
● Yi-Ting Yeh, Lingfeng Yang, Matthew Watson, Noah D. Goodman, and Pat Hanrahan. 2012.
Synthesizing open worlds with constraints using locally annealed reversible jump MCMC. ACM
Trans. Graph. 31, 4, Article 56 (July 2012).

More Related Content

What's hot

Naive bayes
Naive bayesNaive bayes
Naive bayes
ChetnaChandwani3
 
Arabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer IdentificationArabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer Identification
Mustafa Salam
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learning
ShareDocView.com
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
DataminingTools Inc
 
Artificial Intelligence: What Is Reinforcement Learning?
Artificial Intelligence: What Is Reinforcement Learning?Artificial Intelligence: What Is Reinforcement Learning?
Artificial Intelligence: What Is Reinforcement Learning?
Bernard Marr
 
Learning to Learn by Gradient Descent by Gradient Descent
Learning to Learn by Gradient Descent by Gradient DescentLearning to Learn by Gradient Descent by Gradient Descent
Learning to Learn by Gradient Descent by Gradient Descent
Katy Lee
 
ML_Unit_1_Part_C
ML_Unit_1_Part_CML_Unit_1_Part_C
ML_Unit_1_Part_C
Srimatre K
 
Module 4 part_1
Module 4 part_1Module 4 part_1
Module 4 part_1
ShashankN22
 
Machine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative ModelsMachine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative Modelsbutest
 
Introduction to text classification using naive bayes
Introduction to text classification using naive bayesIntroduction to text classification using naive bayes
Introduction to text classification using naive bayes
Dhwaj Raj
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
Tajim Md. Niamat Ullah Akhund
 
Nlp
NlpNlp
Role of Tensors in Machine Learning
Role of Tensors in Machine LearningRole of Tensors in Machine Learning
Role of Tensors in Machine Learning
Anima Anandkumar
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learningbutest
 
Attention
AttentionAttention
Attention
SEMINARGROOT
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
Hemantha Kulathilake
 
Waltz algorithm in artificial intelligence
Waltz algorithm in artificial intelligenceWaltz algorithm in artificial intelligence
Waltz algorithm in artificial intelligence
Minakshi Atre
 
Chapter3 Search
Chapter3 SearchChapter3 Search
Chapter3 SearchKhiem Ho
 
CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)
Mostafa G. M. Mostafa
 
Lecture 1 graphical models
Lecture 1  graphical modelsLecture 1  graphical models
Lecture 1 graphical modelsDuy Tung Pham
 

What's hot (20)

Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Arabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer IdentificationArabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer Identification
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learning
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Artificial Intelligence: What Is Reinforcement Learning?
Artificial Intelligence: What Is Reinforcement Learning?Artificial Intelligence: What Is Reinforcement Learning?
Artificial Intelligence: What Is Reinforcement Learning?
 
Learning to Learn by Gradient Descent by Gradient Descent
Learning to Learn by Gradient Descent by Gradient DescentLearning to Learn by Gradient Descent by Gradient Descent
Learning to Learn by Gradient Descent by Gradient Descent
 
ML_Unit_1_Part_C
ML_Unit_1_Part_CML_Unit_1_Part_C
ML_Unit_1_Part_C
 
Module 4 part_1
Module 4 part_1Module 4 part_1
Module 4 part_1
 
Machine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative ModelsMachine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative Models
 
Introduction to text classification using naive bayes
Introduction to text classification using naive bayesIntroduction to text classification using naive bayes
Introduction to text classification using naive bayes
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
Nlp
NlpNlp
Nlp
 
Role of Tensors in Machine Learning
Role of Tensors in Machine LearningRole of Tensors in Machine Learning
Role of Tensors in Machine Learning
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Attention
AttentionAttention
Attention
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
 
Waltz algorithm in artificial intelligence
Waltz algorithm in artificial intelligenceWaltz algorithm in artificial intelligence
Waltz algorithm in artificial intelligence
 
Chapter3 Search
Chapter3 SearchChapter3 Search
Chapter3 Search
 
CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)
 
Lecture 1 graphical models
Lecture 1  graphical modelsLecture 1  graphical models
Lecture 1 graphical models
 

Viewers also liked

Probabilistic Programming in Python
Probabilistic Programming in PythonProbabilistic Programming in Python
Probabilistic Programming in Python
Peadar Coyle
 
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBoosterDigital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
Webanalisten .nl
 
Datomic
DatomicDatomic
Datomic
Jordan Leigh
 
Datomic
DatomicDatomic
Datomic
DatomicDatomic
Datomic
jperkelens
 
Tesco
TescoTesco
Tesco
ramyagolla
 
Waldorf Education
Waldorf EducationWaldorf Education
Waldorf Education
xMerodi
 
Selena Gomez
Selena GomezSelena Gomez
Selena Gomez
guest5fa9931
 
French Property Market 2014
French Property Market 2014French Property Market 2014
French Property Market 2014
David Bourla
 
Management Consulting
Management ConsultingManagement Consulting
Management Consulting
Alexandros Chatzopoulos
 
ReactJs
ReactJsReactJs
ReactJs
LearningTech
 
Medical devices
Medical devicesMedical devices
Medical devices
Somnath Zambare
 
French Property market 2015 - Cushman & Wakefield
French Property market 2015 - Cushman & WakefieldFrench Property market 2015 - Cushman & Wakefield
French Property market 2015 - Cushman & Wakefield
David Bourla
 
ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는
Taegon Kim
 
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
Marketing Festival
 

Viewers also liked (20)

Probabilistic Programming in Python
Probabilistic Programming in PythonProbabilistic Programming in Python
Probabilistic Programming in Python
 
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBoosterDigital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
Digital Data Tips Tuesday #1 - Tag Management: Simo Ahava - NetBooster
 
Datomic
DatomicDatomic
Datomic
 
Datomic
DatomicDatomic
Datomic
 
Datomic
DatomicDatomic
Datomic
 
Workshop
WorkshopWorkshop
Workshop
 
Jim rohn
Jim  rohnJim  rohn
Jim rohn
 
Tesco
TescoTesco
Tesco
 
Waldorf Education
Waldorf EducationWaldorf Education
Waldorf Education
 
Tesco
TescoTesco
Tesco
 
Selena Gomez
Selena GomezSelena Gomez
Selena Gomez
 
French Property Market 2014
French Property Market 2014French Property Market 2014
French Property Market 2014
 
Management Consulting
Management ConsultingManagement Consulting
Management Consulting
 
Oprah Winfrey
Oprah WinfreyOprah Winfrey
Oprah Winfrey
 
ReactJs
ReactJsReactJs
ReactJs
 
Medical devices
Medical devicesMedical devices
Medical devices
 
French Property market 2015 - Cushman & Wakefield
French Property market 2015 - Cushman & WakefieldFrench Property market 2015 - Cushman & Wakefield
French Property market 2015 - Cushman & Wakefield
 
Cerebral Palsy
Cerebral PalsyCerebral Palsy
Cerebral Palsy
 
ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는ReactJS | 서버와 클라이어트에서 동시에 사용하는
ReactJS | 서버와 클라이어트에서 동시에 사용하는
 
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
Simo Ahava - Tag Management Solutions – Best. Data. Ever. MKTFEST 2014
 

Similar to Probabilistic programming

Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015
Big Data Spain
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
Anton Kirillov
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
Diana Dymolazova
 
AI Presentation 1
AI Presentation 1AI Presentation 1
AI Presentation 1
Mustafa Kuğu
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
Anton Kirillov
 
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Bayes Nets meetup London
 
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Ian Morgan
 
Interactive Narrative Intelligence: Modeling, Design, and Support
Interactive Narrative Intelligence: Modeling, Design, and SupportInteractive Narrative Intelligence: Modeling, Design, and Support
Interactive Narrative Intelligence: Modeling, Design, and Support
Rogelio E. Cardona-Rivera
 
Introduction to Soft Computing (intro to the building blocks of SC)
Introduction to Soft Computing (intro to the building blocks of SC)Introduction to Soft Computing (intro to the building blocks of SC)
Introduction to Soft Computing (intro to the building blocks of SC)
Amit Kumar Rathi
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273Abutest
 
Computational Thinking - 101
Computational Thinking - 101Computational Thinking - 101
Computational Thinking - 101
WhizThinkers
 
The year was 1967
The year was 1967The year was 1967
The year was 1967
John Thomas
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Universitat Politècnica de Catalunya
 
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
L. Thorne McCarty
 
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Jonathan Stray
 
AGI: Still relevant?
AGI: Still relevant?AGI: Still relevant?
AGI: Still relevant?
Helgi Páll Helgason, PhD
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
HJ van Veen
 
GDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game DevelopmentGDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game Development
Electronic Arts / DICE
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
Abhimanyu Dwivedi
 
Basics of Soft Computing
Basics of Soft  Computing Basics of Soft  Computing
Basics of Soft Computing
Sangeetha Rajesh
 

Similar to Probabilistic programming (20)

Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
 
AI Presentation 1
AI Presentation 1AI Presentation 1
AI Presentation 1
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
 
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
 
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
Professor Steve Roberts; The Bayesian Crowd: scalable information combinati...
 
Interactive Narrative Intelligence: Modeling, Design, and Support
Interactive Narrative Intelligence: Modeling, Design, and SupportInteractive Narrative Intelligence: Modeling, Design, and Support
Interactive Narrative Intelligence: Modeling, Design, and Support
 
Introduction to Soft Computing (intro to the building blocks of SC)
Introduction to Soft Computing (intro to the building blocks of SC)Introduction to Soft Computing (intro to the building blocks of SC)
Introduction to Soft Computing (intro to the building blocks of SC)
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
 
Computational Thinking - 101
Computational Thinking - 101Computational Thinking - 101
Computational Thinking - 101
 
The year was 1967
The year was 1967The year was 1967
The year was 1967
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
 
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
How to Ground A Language for Legal Discourse In a Prototypical Perceptual Sem...
 
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
Frontiers of Computational Journalism week 1 - Introduction and High Dimensio...
 
AGI: Still relevant?
AGI: Still relevant?AGI: Still relevant?
AGI: Still relevant?
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
GDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game DevelopmentGDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game Development
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
 
Basics of Soft Computing
Basics of Soft  Computing Basics of Soft  Computing
Basics of Soft Computing
 

Recently uploaded

plant biotechnology Lecture note ppt.pptx
plant biotechnology Lecture note ppt.pptxplant biotechnology Lecture note ppt.pptx
plant biotechnology Lecture note ppt.pptx
yusufzako14
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
muralinath2
 
justice-and-fairness-ethics with example
justice-and-fairness-ethics with examplejustice-and-fairness-ethics with example
justice-and-fairness-ethics with example
azzyixes
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
Anemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditionsAnemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditions
muralinath2
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Sérgio Sacani
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
 
insect morphology and physiology of insect
insect morphology and physiology of insectinsect morphology and physiology of insect
insect morphology and physiology of insect
anitaento25
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
subedisuryaofficial
 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
Cherry
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
ossaicprecious19
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
Cherry
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
Areesha Ahmad
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
 

Recently uploaded (20)

plant biotechnology Lecture note ppt.pptx
plant biotechnology Lecture note ppt.pptxplant biotechnology Lecture note ppt.pptx
plant biotechnology Lecture note ppt.pptx
 
platelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptxplatelets_clotting_biogenesis.clot retractionpptx
platelets_clotting_biogenesis.clot retractionpptx
 
justice-and-fairness-ethics with example
justice-and-fairness-ethics with examplejustice-and-fairness-ethics with example
justice-and-fairness-ethics with example
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
Anemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditionsAnemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditions
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
 
insect morphology and physiology of insect
insect morphology and physiology of insectinsect morphology and physiology of insect
insect morphology and physiology of insect
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
 
Penicillin...........................pptx
Penicillin...........................pptxPenicillin...........................pptx
Penicillin...........................pptx
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
Large scale production of streptomycin.pptx
Large scale production of streptomycin.pptxLarge scale production of streptomycin.pptx
Large scale production of streptomycin.pptx
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
 

Probabilistic programming

  • 1. Probabilistic Programming: a Broad Overview Eli Sennesh
  • 3. Bayesian Role-Playing Games ● With enough paper, we could just write out every possible play based on every possible dice-roll and the fixed player levels. ● How many ways could we have gotten from the start of the game to the board we see? That's a likelihood. ● Which dice rolls were more common in games that gave us the real play? That's a posterior probability. ● Bayesianism: unknown levels are just more dice. – And are the actual dice weighted?
  • 4. Bayesian Reasoning is Hard! ● P(H | E) = P(E | H)*P(H) / ∫ P(E | H)*P(H) dH ● Bayesian reasoning: how to update beliefs in response to evidence ● But the integral in the denominator often cannot be solved analytically. ● Approaches: conjugate priors and posteriors (for which we don't need to evaluate it), various numerical methods
  • 5. The Trouble with Bayesian Modeling (1) Calculating probabilities takes time exponential in the number of relevant variables!
  • 6. The Trouble with Bayesian Modeling (2)
  • 7. The Trouble with Bayesian Modeling (3) ● Exact Bayesian inference methods only support possible-worlds with a finite number of things in them. ● Every combination of model and inference method currently has to be combined manually into non-reusable code. ● Probabilistic modeling as we think we know it is inexpressive and slow, ranging in complexity from NP-complete to DEXPTIME.
  • 8. Programs have generative structure ● Generative model = Rules + Randomness + Random Parameters – A program for generating random outcomes, given unknown parameters. ● Probabilistic Program = Probability Distribution ● The Stochastic Lambda Calculus: a Turing-complete language with random choices. – In jargon: the 'probability monad'.
  • 9. What sorts of queries? ● Sampling: 'What are some possibilities?' ● Expectation: 'What should we expect to see?' ● Support: 'What could happen?' ● Probability mass/density: 'What's the chance this happens?' ● Conditional query: 'Given this, what about that? What about when X happens more than Y?' – 'Given that I saw 18 black ravens, what proportion of all ravens are black?'
  • 10. What sorts of inference? ● Mostly sampling-based approximate inference, but there are some exact algorithms. ● By sampling, we can reason about models where each possible world might contain a different number of actual entities. ● Approximate inference only has a small cost of its own after we generate many samples from the distribution. – And advanced inference algorithms can re-use parts of computations to sample even faster.
  • 11. What can probabilistic programs express? ● In a 'code as data' language like Church (based on Scheme), programs can include eval and learn arbitrary code. ● Or they can do a query about a query: inference about inference. ● Generative structure generalizes logical and physical structure: 'The λ-calculus does not focus on the sequence of time, but rather o
  • 12. The Elegance of Probabilistic Programming ● Programs = Distributions. – Running a program = sampling an outcome from the distribution – Monadic semantics: every function maps input values to output distributions. ● Queries are just functions; language runtime performs inference. ● '[H]allucinate possible worlds', and reason about them.
  • 13. Probabilistic Programs Can Explain Themselves Slide taken from Olivi
  • 14. How can we use probabilistic programming? ● 'We would like to build computing machines that can interpret and learn from their sensory experience, act effectively in real time, and - ultimately - design and program themselves.' ● Professor Vikash Mansinghka, 'Natively Probabilistic Computation' ● Applications in: computer vision, cognitive science, machine learning, natural language processing, and artificial intelligence.
  • 15. How can I use probabilistic programming? ● Write a program simulating whatever you want to reason about. Where you don't know which specific choice to make, choose randomly. ● Present the language runtime's inference engine with real-world data compatible with your model. – And go get some coffee. ● The inference engine will learn which random choices generate data like yours.
  • 16. Computer Vision in 20 Lines of Code (1)
  • 17. Computer Vision in 20 Lines of Code (2) ● The prior model 'knows' how to render pictures, but chooses what to render completely at random. Inference then 'learns' which choices most likely drew the real image. ● 'Our probabilistic graphics program did not originally support rotation, which was needed for the AOL CAPTCHAs; adding it required only 1 additional line of probabilistic code.' – http://probcomp.csail.mit.edu/gpgp/ ● Homework takes more than 20 lines of code!
  • 18. Which bar should we meet at? Social reasoning and cooperation in 11 LOC.
  • 19. Modeling where to meet for drinks (define (sample-location) (if (flip .55) 'popular-bar 'unpopular-bar)) (define (alice depth) (query (define alice-location (sample-location)) alice-location (equal? alice-location (bob (- depth 1))))) (define (bob depth) (query (define bob-location (sample-location)) bob-location (or (= depth 0) (equal? bob-location (alice depth))))) The correct answer is actually Libirah!
  • 20. Generating Scenes Under Constraints ● Sample fresh coffee shops, conditioned on the constraints of good design. ● Scene generation is an open-world task: not just where to put furniture but how much to generate is random. ● Exact inference can't even handle these models!
  • 21. What more needs doing? ● Sampling-based approximation helps, but we need better inference algorithms. No real-time reasoning yet. ● Techniques from compilers research help. – One recent paper got a 600x speed-up by caching the nonrandom parts of each computation and applying Just-In-Time compilation. ● Halting Problem, Rice's Theorem: we can't prove one inference algorithm supreme in all circumstances. ● Reusable data: export what we've learned and pass it on to others. ● Ways to treat intractability probabilistically
  • 22. Conclusions ● Rules = Programs, Uncertain knowledge = Random choice. ● Rules + Uncertainty = Programs + Randomness = Probabilistic Programming ● Probabilistic programs can express any complex model, but need to improve our inference algorithms to make reasoning tractable. ● Fields of application: cognitive science, procedural content generation, machine learning, computer vision, Bayesian statistics, artificial intelligence.
  • 23. Bibliography (1) ● Probabilistic Models of Cognition ● http://probabilistic-programming.org/research/, http://forestdb.org/ ● Vikash Mansinghka. Natively Probabilistic Computation. PhD thesis, Massachusetts Institute of Technology, 2009. ● Noah D. Goodman, Vikash K. Mansinghka, Daniel M. Roy, Keith Bonawitz, and Joshua B. Tenenbaum. Church: a language for generative models. In Proc. of Uncertainty in Artificial Intelligence, 2008. ● Fritz Obermeyer. Automated equational reasoning in nondeterministic lambda-calculi modulo theories H*. PhD thesis, Carnegie-Mellon University, 2009.
  • 24. Bibliography (2) ● Vikash Mansinghka, Tejas Kulkarni, Yura Perov, Josh Tenenbaum. Approximate Bayesian Image Interpretation using Generative Probabilistic Graphics Programs. Neural Information Processing Systems 2013. ● Andrew D. Gordon, Thomas A. Henzinger, Aditya V. Nori, and Sriram K. Rajamani. Probabilistic programming. In International Conference on Software Engineering (ICSE, FOSE track), 2014. ● Andreas Stuhlmüller and Noah D. Goodman. Reasoning about Reasoning by Nested Conditioning: Modeling Theory of Mind with Probabilistic Programs. In Cognitive Systems Research, 2013. ● Yi-Ting Yeh, Lingfeng Yang, Matthew Watson, Noah D. Goodman, and Pat Hanrahan. 2012. Synthesizing open worlds with constraints using locally annealed reversible jump MCMC. ACM Trans. Graph. 31, 4, Article 56 (July 2012).