ECE 6504: Advanced Topics in Machine Learning Probabilistic - - PowerPoint PPT Presentation

ece 6504 advanced topics in machine learning
SMART_READER_LITE
LIVE PREVIEW

ECE 6504: Advanced Topics in Machine Learning Probabilistic - - PowerPoint PPT Presentation

ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Topics Bayes Nets: Inference Marginals, MPE, MAP Variable Elimination Readings: KF 9.1,9.2; Barber 5.1 Dhruv Batra Virginia Tech


slide-1
SLIDE 1

ECE 6504: Advanced Topics in Machine Learning

Probabilistic Graphical Models and Large-Scale Learning

Dhruv Batra Virginia Tech

Topics

– Bayes Nets: Inference – Marginals, MPE, MAP – Variable Elimination

Readings: KF 9.1,9.2; Barber 5.1

slide-2
SLIDE 2

Administrativia

  • HW1

– Out – Due in 2 weeks: Feb 17, Feb 19, 11:59pm – Please please please please start early – Implementation: TAN, structure + parameter learning – Please post questions on Scholar Forum.

  • HW2

– Out soon – Due in 2 weeks: Mar 5, 11:59pm

  • Project Proposal

– Due: Mar 12, 11:59pm – <=2pages, NIPS format

(C) Dhruv Batra 2

slide-3
SLIDE 3

Recap of Last Time

(C) Dhruv Batra 3

slide-4
SLIDE 4

Learning Bayes nets

Known structure Unknown structure Fully observable data Missing data

x(1) … x(m)

Data

structure parameters

CPTs – P(Xi| PaXi)

(C) Dhruv Batra 4 Slide Credit: Carlos Guestrin

Very easy Somewhat easy (EM) Hard Very very hard

slide-5
SLIDE 5

Main Issues in PGMs

  • Representation

– How do we store P(X1, X2, …, Xn) – What does my model mean/imply/assume? (Semantics)

  • Learning

– How do we learn parameters and structure of P(X1, X2, …, Xn) from data? – What model is the right for my data?

  • Inference

– How do I answer questions/queries with my model? such as – Marginal Estimation: P(X5 | X1, X4) – Most Probable Explanation: argmax P(X1, X2, …, Xn)

(C) Dhruv Batra 5

slide-6
SLIDE 6

Plan for today

  • BN Inference

– Queries: Marginals, Conditional Probabilities, MAP, MPE – Variable Elimination

(C) Dhruv Batra 6

slide-7
SLIDE 7

Example

  • HW1 Inference:

(C) Dhruv Batra 7

Tree-Augmented Naïve Bayes (TAN)

slide-8
SLIDE 8

Possible Queries

  • Evidence: E=e (e.g. N=t)
  • Query variables of interest Y
  • Conditional Probability: P(Y | E=e)

– E.g. P(F,A | N=t) – Special case: Marginals P(F)

  • Maximum a Posteriori: argmax P(All variables | E=e)

– argmax_{f,a,s,h} P(f,a,s,h | N = t)

  • Marginal-MAP: argmax_y P(Y | E=e)

– = argmax_{y} Σo P(Y=y, O=o | E=e)

(C) Dhruv Batra 8 Flu Allergy Sinus Headache Nose=t

Old-school terminology: MPE Old-school terminology: MAP

slide-9
SLIDE 9

Car starts BN

  • 18 binary attributes
  • Inference

– P(BatteryAge|Starts=f)

  • 218 terms, why so fast?

(C) Dhruv Batra 9 Slide Credit: Carlos Guestrin

slide-10
SLIDE 10

10

Application: Computer Vision

Image Credit: Simon JD Prince

Grid model Markov random field (blue nodes) Semantic segmentation

(C) Dhruv Batra

slide-11
SLIDE 11

11

Application: Computer Vision

Image Credit: Simon JD Prince

Tree model Parsing the human body

(C) Dhruv Batra

slide-12
SLIDE 12

Application: Coding

(C) Dhruv Batra 12

Observed Bits True Bits Parity Constraints

slide-13
SLIDE 13

Application: Medical Diagnosis

(C) Dhruv Batra 13 Image Credit: Erik Sudderth

slide-14
SLIDE 14

Sinus Nose P(S=f)=0.6 P(S=t)=0.4 P(N|S)

Are MAP and Max of Marginals Consistent?

slide-15
SLIDE 15

Hardness

  • Find P(All variables)
  • MAP

– Find argmax P(All variables | E=e) – Find any assignment P(All variables | E=e) > p

  • Conditional Probability / Marginals

– Is P(Y=y | E=e) > 0 – Find P(Y=y | E=e) – Find |P(Y=y | E=e) – p| <= ε

  • Marginal-MAP

– Find argmax_{y} Σo P(Y=y, O=o | E=e)

(C) Dhruv Batra 15

NP-hard NP-hard #P-hard NP-hard NP-hard

for any ε<0.5

NPPP-hard Easy for BN: O(n)

slide-16
SLIDE 16

Inference in BNs hopeless?

  • In general, yes!

– Even approximate!

  • In practice

– Exploit structure – Many effective approximation algorithms

  • some with guarantees
  • Plan

– Exact Inference – Transition to Undirected Graphical Models (MRFs) – Approximate inference in the unified setting

slide-17
SLIDE 17

Algorithms

  • Conditional Probability / Marginals

– Variable Elimination – Sum-Product Belief Propagation – Sampling: MCMC

  • MAP

– Variable Elimination – Max-Product Belief Propagation – Sampling MCMC – Integer Programming

  • Linear Programming Relaxation

– Combinatorial Optimization (Graph-cuts)

(C) Dhruv Batra 17

slide-18
SLIDE 18

Marginal Inference Example

  • Evidence: E=e (e.g. N=t)
  • Query variables of interest Y
  • Conditional Probability: P(Y | E=e)

– P(F | N=t) – Derivation on board

(C) Dhruv Batra 18 Flu Allergy Sinus Headache Nose=t

slide-19
SLIDE 19

Marginal Inference Example

Inference seems exponential in number of variables! Actually, inference in graphical models is NP-hard L L

Flu Allergy Sinus Headache Nose=t (C) Dhruv Batra 19 Slide Credit: Carlos Guestrin

slide-20
SLIDE 20

Variable elimination algorithm

  • Given a BN and a query P(Y|e) ≈ P(Y,e)
  • Choose an ordering on variables, e.g., X1, …, Xn
  • For i = 1 to n, If Xi ∉{Y,E}

– Collect factors f1,…,fk that include Xi – Generate a new factor by eliminating Xi from these factors – Variable Xi has been eliminated!

  • Normalize P(Y,e) to obtain P(Y|e)

IMPORTANT!!!

(C) Dhruv Batra 20 Slide Credit: Carlos Guestrin

slide-21
SLIDE 21

Exponential in number of variables in largest factor generated

Complexity of variable elimination – Graphs with loops

(C) Dhruv Batra 21 Slide Credit: Carlos Guestrin

slide-22
SLIDE 22

Pruning irrelevant variables

Prune all non-ancestors of query variables More generally: Prune all nodes not on active trail between evidence and query vars

Flu Allergy Sinus Headache Nose=t