SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Università degli studi di Padova
Anno accademico 2016/2017
Study of Probabilistic Programming Languages
MSc in Computer Science
Aspetti Avanzati dei Linguaggi di Programmazione
Stefano Campese 1127711
Index
Table of contents
● Introduction
● Main ideas
● Application cases
● Some languages and frameworks
● WebPPL examples
● References
Stefano Campese 2Anno accademico 2016/2017
Introduction
Introduction
● High-level languages (WebPPL, Church, Figaro, PyMC, Infer.net ...)
● Easy definition of Probability Models
● Specialized language primitives (random event, probabilistic variable..)
● Reduction of complexity of probabilistic inference
● Reduce time to understand data
● Abstract details of CPUs and memory
Stefano Campese 3Anno accademico 2016/2017
Introduction
What is a Probabilistic Programming System
● Programming Language
○ WebPPL (http://webppl.org/)
○ Curch (http://projects.csail.mit.edu/church/wiki/Church)
● Libraries or Frameworks
○ Figaro (https://github.com/p2t2/figaro)
○ PyMc (https://pymc-devs.github.io/)
○ Infer.net (http://infernet.azurewebsites.net/)
Stefano Campese 4Anno accademico 2016/2017
Introduction
Probabilistic Programming System Model
Stefano Campese 5Anno accademico 2016/2017
● Data can be modeled directly even with their imperfections
● Model can represent and use uncertain knowledge
● Low model complexity
● Efficient probabilistic inference
● Essential aspects of data
Main ideas
Data model with uncertain knowledge in ML
Stefano Campese 6Anno accademico 2016/2017
… Machine-learning way of problem approach is modeling the situation with random variables …
Main ideas
Decision Tree
Stefano Campese 7Anno accademico 2016/2017
Main ideas
Data model with uncertain knowledge in PPL
Stefano Campese 8Anno accademico 2016/2017
● PPL runtime environment run program both
forward and backward
● Forward is the simulation
● Inference is the backward
● Same background assumption
● Different approaches
Main ideas
Forward
Stefano Campese 9Anno accademico 2016/2017
… Instructions follow the same direction of the process that is going to be modeled ...
Main ideas
Backward
Stefano Campese 10Anno accademico 2016/2017
… Inverse problem, from result will be generated a configuration that can explain it ...
Case of application
Case of application
Stefano Campese 11Anno accademico 2016/2017
● Climate models
● Machine perceptions (Google’s self-driving cars)
● IoT with massively distributed sensors
● Recommendation systems (Reduce long tail matrix problem)
● Shorter and more humane clinical trials
● Reduction of side effects and more accurate outcomes
● Natural language processing
● Approximate computation
● Security
… all field where exists complex interactions with some levels of uncertain knowledge ...
Case of application
Why use PPL
Giacomo Manzoli 12Anno accademico 2016/2017
● Unifying anecdotal reasoning with reliable statistical approaches
● Improve the modeling with heterogeneous data as:
○ mixed dataset
○ relational dataset
○ computer vision
○ textual dataset
● Great fit in Artificial Intelligence fields
○ Google’s self driving car
○ IBM’s Watson
○ General predictions and classifications
Some languages and frameworks
Some languages and frameworks: FIGARO
Stefano Campese 13Anno accademico 2016/2017
Figaro framework:
● Scala library
● Born in 2004
● Open-source license
● Built-in reasoning algorithms
● Rich models supports
● Easy draws conclusion from models
● Possibility to integrate with Apache Spark
● Java interoperability (adapt to enterprise world)
Some languages and frameworks
Some languages and frameworks: PyMC
Stefano Campese 14Anno accademico 2016/2017
PyMC framework:
● Python module that works over numpy
● Born in 2003
● Academic Free License
● Bayesian statistical models
● MCMC supports
● Only high probability values are being computed
● Optimized probability distributions
Some languages and frameworks
Some languages and frameworks: CHURCH
Stefano Campese 15Anno accademico 2016/2017
Church programming language:
● Lisp-like family
● Born in 2008
● Founded and grants by Naval Research of US
● Derived from Scheme PPL
● Designed for expressive generation of probabilistic models
● Different implementation in JavaScript or Scheme
● Defined as “Universal probabilistic programming language”
● Used to implement “Model of Cognition”
Some languages and frameworks
Some languages and frameworks: WebPPL
Stefano Campese 16Anno accademico 2016/2017
WebPPL programming language:
● Called “Web people”
● Subset of purely functional JavaScript language
● Integrable both in Web pages and JavaScript server (NPM and Node)
● Built-in several inference algorithms (MCMC or HMC)
● Non-commercial license
● No loops (while, for…)
● CPS philosophy
● Supported by DARPA and Naval Research
WebPPL
Generic information about WebPPL
Stefano Campese 17Anno accademico 2016/2017
● Installable by using NodeJs (>= 6.x) and NPM
dependency management
● WebPPL file must have .wppl extension
● To execute from command line: webppl
myprogram.wppl
● Inclusion of native or other JavaScript function
is allowed
● Docker allows to have preinstalled and ready
environment
WebPPL
Simple Example WebPPL
Stefano Campese 18Anno accademico 2016/2017
● Not only a JavaScript subset
● Possible separate distribution models from
distributions
● Possibility to retrieve distribution sample
● Possibility to retrieve the log probability of a
sample value
● Possibility to retrieve the support of the
distribution
WebPPL
Simple Inference Example WebPPL
Stefano Campese 19Anno accademico 2016/2017
.. Inference is called also marginalization. Other built-in inference paradigm such as enumerate and MCMC ...
WebPPL
Other Examples
Stefano Campese 20Anno accademico 2016/2017
● Bayesian language comprehender
● Computer Vision
References
References
Stefano Campese 21Anno accademico 2016/2017
● The Design and Implementation of Probabilistic Programming Languages, Noah D. Goodman and Andreas
Stuhlmuller, 2016
● What is probabilistic programming?, Beau Cronin, 2013
● Probabilistic Programming: Why, What, How, When?, Beau Cronin, 2014
● What is probabilistic programming?, Michael Hicks, 2014
● The State of Probabilistic Programming, Mohammed AlQuraishi, 2015
● Lifted Inference for Probabilistic Programming, Department of CS of KU Leuven
● Probabilistic Programming, Department of CS of Cornell University, 2016
● The Principles and Practice of Probabilistic Programming, Noah D. Goodman - Stanford University, 2013
● Probabilistic-Programming.org
● Why Probabilistic Programming Matters, Rob Zinkov, 2012
● Probabilistic Programming for Advancing Machine Learning (PPAML), Dr. Jennifer Roberts
● What is Probabilistic Computing, Navia Systems, 2010

Weitere ähnliche Inhalte

Ähnlich wie Probabilistic Programming Languages Approaches

Portable data analysis infrastracture for LHC at INFN -vCHEP2021
Portable data analysis infrastracture for LHC at INFN -vCHEP2021Portable data analysis infrastracture for LHC at INFN -vCHEP2021
Portable data analysis infrastracture for LHC at INFN -vCHEP2021
Diego Ciangottini
 

Ähnlich wie Probabilistic Programming Languages Approaches (20)

Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
 Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F... Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
 
Fugue: Unifying Spark and Non-Spark Ecosystems for Big Data Analytics
Fugue: Unifying Spark and Non-Spark Ecosystems for Big Data AnalyticsFugue: Unifying Spark and Non-Spark Ecosystems for Big Data Analytics
Fugue: Unifying Spark and Non-Spark Ecosystems for Big Data Analytics
 
Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper API
 
OpenACC Monthly Highlights: July 2020
OpenACC Monthly Highlights: July 2020OpenACC Monthly Highlights: July 2020
OpenACC Monthly Highlights: July 2020
 
Session3 01.clemens neudecker
Session3 01.clemens neudeckerSession3 01.clemens neudecker
Session3 01.clemens neudecker
 
OCR-D: An end-to-end open source OCR framework for historical printed documents
OCR-D: An end-to-end open source OCR framework for historical printed documentsOCR-D: An end-to-end open source OCR framework for historical printed documents
OCR-D: An end-to-end open source OCR framework for historical printed documents
 
Common Design of Deep Learning Frameworks
Common Design of Deep Learning FrameworksCommon Design of Deep Learning Frameworks
Common Design of Deep Learning Frameworks
 
Portable data analysis infrastracture for LHC at INFN -vCHEP2021
Portable data analysis infrastracture for LHC at INFN -vCHEP2021Portable data analysis infrastracture for LHC at INFN -vCHEP2021
Portable data analysis infrastracture for LHC at INFN -vCHEP2021
 
AI LAB using IBM Power 9 Processor
AI LAB using IBM Power 9 ProcessorAI LAB using IBM Power 9 Processor
AI LAB using IBM Power 9 Processor
 
Programming Models for Exascale Systems
Programming Models for Exascale SystemsProgramming Models for Exascale Systems
Programming Models for Exascale Systems
 
Power9 aihpc bigdataeducationserver
Power9 aihpc bigdataeducationserverPower9 aihpc bigdataeducationserver
Power9 aihpc bigdataeducationserver
 
NAG December 2012
NAG December 2012NAG December 2012
NAG December 2012
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the Bay
 
openFoam Hangout on Air #2 - Cloud Simulation, presentation by SimScale
openFoam Hangout on Air #2 - Cloud Simulation, presentation by SimScaleopenFoam Hangout on Air #2 - Cloud Simulation, presentation by SimScale
openFoam Hangout on Air #2 - Cloud Simulation, presentation by SimScale
 
OpenACC Monthly Highlights- December
OpenACC Monthly Highlights- DecemberOpenACC Monthly Highlights- December
OpenACC Monthly Highlights- December
 
Cloud operations with streaming analytics using big data tools
Cloud operations with streaming analytics using big data toolsCloud operations with streaming analytics using big data tools
Cloud operations with streaming analytics using big data tools
 
Near Data Computing Architectures: Opportunities and Challenges for Apache Spark
Near Data Computing Architectures: Opportunities and Challenges for Apache SparkNear Data Computing Architectures: Opportunities and Challenges for Apache Spark
Near Data Computing Architectures: Opportunities and Challenges for Apache Spark
 
Near Data Computing Architectures for Apache Spark: Challenges and Opportunit...
Near Data Computing Architectures for Apache Spark: Challenges and Opportunit...Near Data Computing Architectures for Apache Spark: Challenges and Opportunit...
Near Data Computing Architectures for Apache Spark: Challenges and Opportunit...
 
Technologies comparison: Genuino 101 vs uTensor
Technologies comparison: Genuino 101 vs uTensor Technologies comparison: Genuino 101 vs uTensor
Technologies comparison: Genuino 101 vs uTensor
 
OpenACC Monthly Highlights: June 2020
OpenACC Monthly Highlights: June 2020OpenACC Monthly Highlights: June 2020
OpenACC Monthly Highlights: June 2020
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Kürzlich hochgeladen (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

Probabilistic Programming Languages Approaches

  • 1. Università degli studi di Padova Anno accademico 2016/2017 Study of Probabilistic Programming Languages MSc in Computer Science Aspetti Avanzati dei Linguaggi di Programmazione Stefano Campese 1127711
  • 2. Index Table of contents ● Introduction ● Main ideas ● Application cases ● Some languages and frameworks ● WebPPL examples ● References Stefano Campese 2Anno accademico 2016/2017
  • 3. Introduction Introduction ● High-level languages (WebPPL, Church, Figaro, PyMC, Infer.net ...) ● Easy definition of Probability Models ● Specialized language primitives (random event, probabilistic variable..) ● Reduction of complexity of probabilistic inference ● Reduce time to understand data ● Abstract details of CPUs and memory Stefano Campese 3Anno accademico 2016/2017
  • 4. Introduction What is a Probabilistic Programming System ● Programming Language ○ WebPPL (http://webppl.org/) ○ Curch (http://projects.csail.mit.edu/church/wiki/Church) ● Libraries or Frameworks ○ Figaro (https://github.com/p2t2/figaro) ○ PyMc (https://pymc-devs.github.io/) ○ Infer.net (http://infernet.azurewebsites.net/) Stefano Campese 4Anno accademico 2016/2017
  • 5. Introduction Probabilistic Programming System Model Stefano Campese 5Anno accademico 2016/2017 ● Data can be modeled directly even with their imperfections ● Model can represent and use uncertain knowledge ● Low model complexity ● Efficient probabilistic inference ● Essential aspects of data
  • 6. Main ideas Data model with uncertain knowledge in ML Stefano Campese 6Anno accademico 2016/2017 … Machine-learning way of problem approach is modeling the situation with random variables …
  • 7. Main ideas Decision Tree Stefano Campese 7Anno accademico 2016/2017
  • 8. Main ideas Data model with uncertain knowledge in PPL Stefano Campese 8Anno accademico 2016/2017 ● PPL runtime environment run program both forward and backward ● Forward is the simulation ● Inference is the backward ● Same background assumption ● Different approaches
  • 9. Main ideas Forward Stefano Campese 9Anno accademico 2016/2017 … Instructions follow the same direction of the process that is going to be modeled ...
  • 10. Main ideas Backward Stefano Campese 10Anno accademico 2016/2017 … Inverse problem, from result will be generated a configuration that can explain it ...
  • 11. Case of application Case of application Stefano Campese 11Anno accademico 2016/2017 ● Climate models ● Machine perceptions (Google’s self-driving cars) ● IoT with massively distributed sensors ● Recommendation systems (Reduce long tail matrix problem) ● Shorter and more humane clinical trials ● Reduction of side effects and more accurate outcomes ● Natural language processing ● Approximate computation ● Security … all field where exists complex interactions with some levels of uncertain knowledge ...
  • 12. Case of application Why use PPL Giacomo Manzoli 12Anno accademico 2016/2017 ● Unifying anecdotal reasoning with reliable statistical approaches ● Improve the modeling with heterogeneous data as: ○ mixed dataset ○ relational dataset ○ computer vision ○ textual dataset ● Great fit in Artificial Intelligence fields ○ Google’s self driving car ○ IBM’s Watson ○ General predictions and classifications
  • 13. Some languages and frameworks Some languages and frameworks: FIGARO Stefano Campese 13Anno accademico 2016/2017 Figaro framework: ● Scala library ● Born in 2004 ● Open-source license ● Built-in reasoning algorithms ● Rich models supports ● Easy draws conclusion from models ● Possibility to integrate with Apache Spark ● Java interoperability (adapt to enterprise world)
  • 14. Some languages and frameworks Some languages and frameworks: PyMC Stefano Campese 14Anno accademico 2016/2017 PyMC framework: ● Python module that works over numpy ● Born in 2003 ● Academic Free License ● Bayesian statistical models ● MCMC supports ● Only high probability values are being computed ● Optimized probability distributions
  • 15. Some languages and frameworks Some languages and frameworks: CHURCH Stefano Campese 15Anno accademico 2016/2017 Church programming language: ● Lisp-like family ● Born in 2008 ● Founded and grants by Naval Research of US ● Derived from Scheme PPL ● Designed for expressive generation of probabilistic models ● Different implementation in JavaScript or Scheme ● Defined as “Universal probabilistic programming language” ● Used to implement “Model of Cognition”
  • 16. Some languages and frameworks Some languages and frameworks: WebPPL Stefano Campese 16Anno accademico 2016/2017 WebPPL programming language: ● Called “Web people” ● Subset of purely functional JavaScript language ● Integrable both in Web pages and JavaScript server (NPM and Node) ● Built-in several inference algorithms (MCMC or HMC) ● Non-commercial license ● No loops (while, for…) ● CPS philosophy ● Supported by DARPA and Naval Research
  • 17. WebPPL Generic information about WebPPL Stefano Campese 17Anno accademico 2016/2017 ● Installable by using NodeJs (>= 6.x) and NPM dependency management ● WebPPL file must have .wppl extension ● To execute from command line: webppl myprogram.wppl ● Inclusion of native or other JavaScript function is allowed ● Docker allows to have preinstalled and ready environment
  • 18. WebPPL Simple Example WebPPL Stefano Campese 18Anno accademico 2016/2017 ● Not only a JavaScript subset ● Possible separate distribution models from distributions ● Possibility to retrieve distribution sample ● Possibility to retrieve the log probability of a sample value ● Possibility to retrieve the support of the distribution
  • 19. WebPPL Simple Inference Example WebPPL Stefano Campese 19Anno accademico 2016/2017 .. Inference is called also marginalization. Other built-in inference paradigm such as enumerate and MCMC ...
  • 20. WebPPL Other Examples Stefano Campese 20Anno accademico 2016/2017 ● Bayesian language comprehender ● Computer Vision
  • 21. References References Stefano Campese 21Anno accademico 2016/2017 ● The Design and Implementation of Probabilistic Programming Languages, Noah D. Goodman and Andreas Stuhlmuller, 2016 ● What is probabilistic programming?, Beau Cronin, 2013 ● Probabilistic Programming: Why, What, How, When?, Beau Cronin, 2014 ● What is probabilistic programming?, Michael Hicks, 2014 ● The State of Probabilistic Programming, Mohammed AlQuraishi, 2015 ● Lifted Inference for Probabilistic Programming, Department of CS of KU Leuven ● Probabilistic Programming, Department of CS of Cornell University, 2016 ● The Principles and Practice of Probabilistic Programming, Noah D. Goodman - Stanford University, 2013 ● Probabilistic-Programming.org ● Why Probabilistic Programming Matters, Rob Zinkov, 2012 ● Probabilistic Programming for Advancing Machine Learning (PPAML), Dr. Jennifer Roberts ● What is Probabilistic Computing, Navia Systems, 2010