intelligent systems (ai-2)carenini/teaching/cpsc422-19/... · 2019. 10. 12. · cpsc 422, lecture...
TRANSCRIPT
![Page 1: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/1.jpg)
CPSC 422, Lecture 17 Slide 1
Intelligent Systems (AI-2)
Computer Science cpsc422, Lecture 17
Oct, 11, 2019
Slide SourcesD. Koller, Stanford CS - Probabilistic Graphical Models D. Page, Whitehead Institute, MIT
Several Figures from “Probabilistic Graphical Models: Principles and Techniques” D. Koller, N. Friedman 2009
![Page 2: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/2.jpg)
422 big picture: Where are we?
Query
Planning
Deterministic Stochastic
• Value Iteration
• Approx. Inference
• Full Resolution
• SAT
Logics
Belief Nets
Markov Decision Processes and
Partially Observable MDP
Markov Chains and HMMsFirst Order Logics
OntologiesTemporal rep.
Applications of AI
Approx. : Gibbs
Undirected Graphical ModelsMarkov Networks
Conditional Random Fields
Reinforcement Learning Representation
Reasoning
Technique
Prob CFGProb Relational ModelsMarkov Logics
Forward, Viterbi….
Approx. : Particle
Filtering
CPSC 322, Lecture 34 Slide 2
StarAI (statistical relational
AI)
Hybrid: Det +Sto
![Page 3: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/3.jpg)
CPSC 422, Lecture 17 3
Lecture Overview
Probabilistic Graphical models
• Intro
• Example
• Markov Networks Representation (vs. Belief
Networks)
• Inference in Markov Networks (Exact and Approx.)
• Applications of Markov Networks
![Page 4: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/4.jpg)
Probabilistic Graphical Models
CPSC 422, Lecture 17 Slide 4
From “Probabilistic Graphical Models: Principles and Techniques” D. Koller, N. Friedman 2009
![Page 5: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/5.jpg)
Misconception Example
• Four students (Alice, Bill, Debbie, Charles) get together in
pairs, to work on a homework
• But only in the following pairs: AB AD DC BC
• Professor misspoke and might have generated
misconception
• A student might have figured it out later and told study
partner
CPSC 422, Lecture 17 Slide 5
![Page 6: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/6.jpg)
Example: In/Depencencies
Are A and C independent because they never spoke?
No, because A might have figured it out and told B
who then told C
But if we know the values of B and D….
And if we know the values of A and C
CPSC 422, Lecture 17 Slide 6
a. Yes b. No c. Cannot Tell
![Page 7: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/7.jpg)
Which of these two Bnets captures the two
independencies of our example?
CPSC 422, Lecture 17 Slide 7
a. b.
c. Both d. None
![Page 8: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/8.jpg)
Parameterization of Markov Networks
CPSC 422, Lecture 17 Slide 8
Factors define the local interactions (like CPTs in Bnets)
What about the global model? What do you do with Bnets?
X
X
![Page 9: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/9.jpg)
How do we combine local models?
As in BNets by multiplying them!
CPSC 422, Lecture 17 Slide 9
![Page 10: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/10.jpg)
Multiplying Factors (same seen in 322 for VarElim)
CPSC 422, Lecture 17 Slide 10
![Page 11: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/11.jpg)
Factors do not represent marginal
probs. !
CPSC 422, Lecture 17 11
a0 b0 0.13
a0 b1 0.69
a1 b0 0.14
a1 b1 0.04
Marginal P(A,B)
Computed from the joint
![Page 12: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/12.jpg)
Step Back…. From structure to
factors/potentialsIn a Bnet the joint is factorized….
CPSC 422, Lecture 17 Slide 12
In a Markov Network you have one factor for each
maximal clique
![Page 13: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/13.jpg)
Directed vs. Undirected
Independencies
CPSC 422, Lecture 17 Slide 13
Factorization
![Page 14: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/14.jpg)
General definitions
Two nodes in a Markov network are independent
if and only if ...
So the markov blanket of a node is... ?
eg for C
eg for A C
CPSC 422, Lecture 17 14
a. All the parents of its children
b. The whole network
c. All its neighbors
![Page 15: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/15.jpg)
Markov Networks Applications (1): Computer Vision
Called Markov Random Fields
• Stereo Reconstruction
• Image Segmentation
• Object recognition
CPSC 422, Lecture 17 15
Typically pairwise MRF
• Each vars correspond to a pixel (or superpixel )
• Edges (factors) correspond to interactions
between adjacent pixels in the image
• E.g., in segmentation: from generically penalize
discontinuities, to road under car
![Page 16: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/16.jpg)
Image segmentation
CPSC 422, Lecture 17 16
![Page 17: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/17.jpg)
Markov Networks Applications (1): Computer Vision
CPSC 422, Lecture 17 17
• Each vars correspond to a pixel (or superpixel )
• Edges (factors) correspond to interactions
between adjacent pixels in the image
• E.g., in segmentation: from generically penalize
discontinuities, to road under car
![Page 18: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/18.jpg)
Markov Networks Applications (2): Sequence
Labeling in NLP and BioInformatics
Conditional random fields (next class Fri)
CPSC 422, Lecture 17 18
![Page 19: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/19.jpg)
CPSC 422, Lecture 17 Slide 19
Learning Goals for today’s class
➢You can:
• Justify the need for undirected graphical model (Markov
Networks)
• Interpret local models (factors/potentials) and combine them
to express the joint
• Define independencies and Markov blanket for Markov
Networks
• Perform Exact and Approx. Inference in Markov Networks
• Describe a few applications of Markov Networks
![Page 20: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/20.jpg)
CPSC 422, Lecture 17 Slide 20
• Keep Working on assignment-2 !
• Go to Office Hours x
• Learning Goals (look at the end of the slides for each lecture – complete list will be posted)
• Revise all the clicker questions and practice exercises
• More practice material will be posted next week
• Check questions and answers on Piazza
Two weeks to Midterm, Fri, Oct 25, we will start at 4pm sharp
How to prepare….
![Page 21: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/21.jpg)
How to acquire factors?
CPSC 422, Lecture 17 21
![Page 22: Intelligent Systems (AI-2)carenini/TEACHING/CPSC422-19/... · 2019. 10. 12. · CPSC 422, Lecture 17 Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 17 Oct, 11,](https://reader035.vdocuments.us/reader035/viewer/2022071003/5fc048300dbd1e6ae66d8d54/html5/thumbnails/22.jpg)
CPSC 422, Lecture 17 22