43
ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics Summary of Class Advanced Topics

L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

ECE 6504: Advanced Topics in Machine Learning

Probabilistic Graphical Models and Large-Scale Learning

Dhruv Batra Virginia Tech

Topics –  Summary of Class –  Advanced Topics

Page 2: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

HW1 Grades •  Mean: 28.5/38 ~= 74.9%

(C) Dhruv Batra 2

0 10 20 30 400

1

2

3

4

5

6

7

Score

#Students

Page 3: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

HW2 Grades •  Mean: 33.2/45 ~= 73.8%

(C) Dhruv Batra 3

0 10 20 30 400

2

4

6

8

10

12

Score

#Students

Page 4: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Administrativia •  (Mini-)HW4

–  Out now –  Due: May 7, 11:55pm –  Implementation:

•  Parameter Learning with Structured SVMs and Cutting-Plane

•  Final Project Webpage –  Due: May 7, May 13 11:55pm –  Can use late days Can’t use late days any more –  1-3 paragraphs

•  Goal •  Illustrative figure •  Approach •  Results (with figures or tables)

•  Take Home Final –  Out: May 8 –  Due: May 13, 11:55pm –  No late days –  Open book, open notes, open internet. Cite your sources. –  No discussions!

(C) Dhruv Batra 4

Page 5: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

A look back: PGMs •  One of the most exciting advancements in statistical

AI in the last 10-20 years

•  Marriage –  Graph Theory + Probability

•  Compact representation for exponentially-large probability distributions –  Exploit conditional independencies

•  Generalize –  naïve Bayes –  logistic regression –  Many more …

(C) Dhruv Batra 5

Page 6: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

A look back: what you learnt •  Directed Graphical Models (Bayes Nets)

–  Representation: Directed Acyclic Graphs (DAGs), Conditional Probability Tables (CPTs), d-Separation, v-structures, Markov Blanket, I-Maps

–  Parameter Learning: MLE, MAP, EM –  Structure Learning: Chow-Liu, Decomposable scores, hill climbing –  Inference: Marginals, MAP/MPE, Variable Elimination

•  Undirected Graphical Models (MRFs/CRFs) –  Representation: Junction trees, Factor graphs, treewidth, Local Makov

Assumptions, Moralization, Triangulation –  Inference: Belief Propagation, Message Passing, Linear Programming

Relaxations, Dual-Decomposition, Variational Inference, Mean Field –  Parameter Learning: MLE, gradient descent –  Structured Prediction: Structured SVMs, Cutting-Plane training

•  Large-Scale Learning –  Online learning: perceptrons, stochastic (sub-)gradients –  Distributed Learning: Dual Decomposition, Alternating Direction Method

of Multipliers (ADMM)

(C) Dhruv Batra 6

Page 7: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Main Issues in PGMs •  Representation

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

•  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)

•  Learning –  How do we learn parameters and structure of

P(X1, X2, …, Xn) from data? –  What model is the right for my data?

(C) Dhruv Batra 7

Page 8: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

What is this class about? •  Making global predictions from local observations

(C) Dhruv Batra 8

Page 9: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

A look forward •  Stuff we couldn’t teach you

–  A.K.A: Stuff that’s not on the exam!

•  What do people in this area work on? –  What is being published in PGMs / Structured Prediction?

(C) Dhruv Batra 9

Page 10: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Error Decomposition

(C) Dhruv Batra 10

Reality

model class

Page 11: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Error Decomposition

(C) Dhruv Batra 11

Reality

Page 12: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Error Decomposition

(C) Dhruv Batra 12

Reality model class

Higher-Order Potentials

Page 13: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Error Decomposition

(C) Dhruv Batra 13

Reality model class

Higher-Order Potentials

Focus of MAP Inference

Page 14: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Continuous-Variable PGMs

(C) Dhruv Batra 14

Page 15: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Multivariate Gaussian

Page 16: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Canonical form

•  Standard form and canonical forms are related:

•  Conditioning is easy in canonical form •  Marginalization easy in standard form

Page 17: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Sampling

(C) Dhruv Batra 17

Page 18: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

What you’ve learned so far •  VE & Junction Trees

–  Exact inference –  Exponential in tree-width

•  Belief Propagation, Mean Field –  Approximate inference for marginals/conditionals –  Fast, but can get inaccurate estimates

•  Sample-based Inference –  Approximate inference for marginals/conditionals –  With “enough” samples, will converge to the right answer (or

a high accuracy estimate)

(If you want to be cynical, replace “enough” with “ridiculously many”)

Page 19: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Goal •  Often we want expectations given samples

x[1] … x[M] from a distribution P.

P (X = x) ≈ 1M

M�

m=1

1(x[m] = x)

EP [f ] ≈ 1M

M�

m=1

f(x[m])

X = {X1, . . . ,Xn}Discrete Random Variables: Number of samples from P(X): M

x[i] ∼ P (X)

Page 20: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Forward Sampling

• Sample nodes in topological order

D

I

G

S

L

x[m, D] ∼ (Easy : 0.6, Hard : 0.4)

x[m, I] ∼ (Low : 0.7, High : 0.3)

x[m, G|D = d, I = i] ∼ ([80, 100] : 0.9, [50, 80) : 0.08, [0, 50) : 0.02)

x[m, S|I = i] ∼ (Bad : 0.2, Good : 0.8)

x[m, L|G = g] ∼ (Fail : 0.1, Pass : 0.9)

D = Easy

I = High

G = [80,100]

S = Bad

L = Pass

• End result is one sample from P(X)

• Assignment to parents selects P(X|Pa(X))

• Repeat to get more samples

Page 21: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Multinomial Sampling •  Given an assignment to its parents,

Xi is a multinomial random variable.

x[m, G|D = d, I = i] ∼ (v1 : 0.9, v2 : 0.08, v3 : 0.02)

0.90 0.08 0.02

v1 v2 v3

U ~ Unif[0,1]

Page 22: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Sample-based probability estimates

•  Have a set of M samples from P(X) •  Can estimate any probability by counting records:

P̂ (D = Easy, S = Bad) =1M

M�

m=1

1(x[m, D] = Easy, x[m, S] = Bad)

P̂ (D = Easy|S = Bad) =�M

m=1 1(x[m, D] = Easy,x[m, S] = Bad)�M

m=1 1(x[m, S] = Bad)

Marginals:

Conditionals:

Rejection sampling: once the sample and evidence disagree, throw away the sample.

Rare events: If the evidence is unlikely, i.e., P(E = e) small, then the sample size for P(X|E=e) is low

Page 23: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

(C) Dhruv Batra 23

Page 24: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

(C) Dhruv Batra 24 Alpha-Expansion

Simulated Annealing

Image Credit: [BVZ, PAMI01]

Page 25: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

(C) Dhruv Batra 25 Alpha-Expansion

Simulated Annealing

Image Credit: [BVZ, PAMI01]

Page 26: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Effect of Exact MAP •  a

(C) Dhruv Batra 26 Image Credit: [BVZ, PAMI01]

Page 27: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Sontag NIPS10

(C) Dhruv Batra 27

Page 28: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Soft-Margin Structured SVM •  Minimize

subject to

Too many constraints!

(C) Dhruv Batra 28

12w2 +

CN

! jj!

wT!(x j, y j ) ! wT!(x j, y)+"(y j, y)#! j

Slide Credit: Thorsten Joachims

Page 29: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Cutting-Plane Method

•  Key insight of NIPS10 paper –  What if we replace exponentially many constraints with a

smaller set (without using Cutting-Plane)?

•  Key contribution –  There exist a rich set of distributions where this

approximation results in optimal parameter in the infinite data setting

(C) Dhruv Batra 29

12w2 +

CN

! jj!

wT!(x j, y j ) ! wT!(x j, y)+"(y j, y)#! j

Page 30: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Meshi ICML10

(C) Dhruv Batra 30

Page 31: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Tarlow UAI10

(C) Dhruv Batra 31

Page 32: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Ladicky IJCV12

(C) Dhruv Batra 32

Page 33: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Lempitsky ICCV09

(C) Dhruv Batra 33

Page 34: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Kohli & Rother

(C) Dhruv Batra 34

Page 35: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Perturb and MAP

•  Approach –  Perturb:

–  MAP:

(C) Dhruv Batra 35

S(y) =�

i∈Vθi(yi) +

(i,j)∈E

θij(yi, yj)

argmaxy

Sθ̃(y)

θ̃ = θ + �, � ∼ p(�)

Page 36: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Perturb and MAP •  Perturb:

•  Theorem: If IID Gumbel, then EXACT samples. •  [Papandreou & Yuille, ICCV11] •  [Hazan & Jaakkola, ICML12]

(C) Dhruv Batra 36

θ̃ = θ + �, � ∼ p(�)

Page 37: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Perturb and MAP •  Full Order Gumbel is hard!

(C) Dhruv Batra 37

Page 38: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Perturb and MAP •  Reduced Order Gumbel

•  Approach –  Perturb:

–  MAP:

(C) Dhruv Batra 38

S(y) =�

i∈Vθi(yi) +

(i,j)∈E

θij(yi, yj)

argmaxy

Sθ̃(y)

θ̃i = θi + �, � ∼ p(�)θ̃ = θ + �, � ∼ p(�)

Page 39: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

My Research: Multiple Predictions

(C) Dhruv Batra 39

Porway & Zhu, 2011"TU & Zhu, 2002"Rich History"

Sampling

x x x x x x x x x x x x x

yMAP

P (y)

y

Page 40: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

(C) Dhruv Batra 40

Flerova et al., 2011"Fromer et al., 2009"Yanover et al., 2003"

M-Best MAP Ideally:

M-Best Modes ✓"Porway & Zhu, 2011"

TU & Zhu, 2002"Rich History"

Sampling

yMAP

P (y)

y

My Research: Multiple Predictions

Page 41: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

(C) Dhruv Batra 41

Flerova et al., 2011"Fromer et al., 2009"Yanover et al., 2003"

M-Best MAP Ideally:

M-Best Modes ✓"Porway & Zhu, 2011"

TU & Zhu, 2002"Rich History"

Sampling Our work: Diverse M-Best in MRFs [ECCV ‘12]

-  Don’t hope for diversity. Explicitly encode it.

-  Not guaranteed to be modes.

yMAP

P (y)

y

My Research: Multiple Predictions

Page 42: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

What next? •  Seminars:

–  CV-ML Reading Group •  https://filebox.ece.vt.edu/~cvmlreadinggroup/

•  Conferences: –  Neural Information Processing Systems (NIPS) –  International Conference in Machine Learning (ICML) –  Uncertainty in Artificial Intelligence (UAI) –  Artificial Intelligence & Statistics (AISTATS)

•  Classes (at some point in the near future) –  ECE6504: Fundamental Ideas in Machine Learning

•  Paper reading class showing lineage of ideas •  Story from ’89 first backprop papers to CNNs today

–  ECE6504: Machine Learning for Big Data •  Large-Scale Distributed Machine Learning •  Use frameworks such as Graphlab •  Implement things in CloudCV

(C) Dhruv Batra 42

Page 43: L21 advanced topics2014/05/09  · ECE 6504: Advanced Topics in Machine Learning Probabilistic Graphical Models and Large-Scale Learning Dhruv Batra Virginia Tech Topics – Summary

Feedback •  Student Perception of Teaching (SPOT)

–  https://eval.scholar.vt.edu/portal –  Tell us how we’re doing –  What would you like to see more –  What would you like to see less –  ENDS MAY 8

(C) Dhruv Batra 43