Extensions to message-passing inference S. M. Ali Eslami September 2014.

Post on 25-Dec-2015

213 views 0 download

Transcript of Extensions to message-passing inference S. M. Ali Eslami September 2014.

Extensions to message-passing inference

S. M. Ali Eslami

September 2014

2

Outline

Just-in-time learning for message-passingwith Daniel Tarlow, Pushmeet Kohli, John Winn

Deep RL for ATARI gameswith Arthur Guez, Thore Graepel

Contextual initialisation for message-passingwith Varun Jampani, Daniel Tarlow, Pushmeet Kohli, John Winn

Hierarchical RL for automated drivingwith Diana Borsa, Yoram Bachrach, Pushmeet Kohli and Thore Graepel

Team modelling for learning of traitswith Matej Balog, James Lucas, Daniel Tarlow, Pushmeet Kohli and Thore Graepel

3

Probabilistic programming

• Programmer specifies a generative model

• Compiler automatically creates code for inference in the model

4

Probabilistic graphics programming?

5

Challenges

• Specifying a generative model that is accurate and useful

• Compiling an inference algorithm for it that is efficient

6

Generative probabilistic models for visionManually designed inference

FSABMVC 2011

SBMCVPR 2012

MSBMNIPS 2013

7

Why is inference hard?

Sampling

Inference can mix slowlyActive area of research

Message-passing

Computation of messages can be slow (e.g. if using quadrature or sampling)Just-in-time learning (part 1)

Inference can require many iterations and may converge to bad fixed pointsContextual initialisation (part 2)

8

Just-In-Time Learning for Inferencewith Daniel Tarlow, Pushmeet Kohli, John Winn

NIPS 2014

9

Motivating example

Ecologists have strong empirical beliefs about the form of the relationship between temperature and yield.

It is important for them that the relationship is modelled faithfully.

We do not have a fast implementation of the Yield factor in Infer.NET.

10

Problem overview

Implementing a fast and robust factor is not always trivial.

Approach

1. Use general algorithms (e.g. Monte Carlo sampling or quadrature) to compute message integrals.

2. Gradually learn to increase the speed of computations by regressing from incoming to outgoing messages at run-time.

11

Message-passing

a b

c d

e

a b c

c

a b c

b

a b c

a

Incomingmessage

group

Outgoingmessage

12

Belief and expectation propagation

i k1 k2

i

Ψ

13

How to compute messages for any

14

Learning to pass messages

Oracle allows us to compute all messages for any factor of interest:

However, sampling can be very slow. Instead, learn a direct mapping, parameterized by , from incoming to outgoing messages:

Heess, Tarlow and Winn (2013)

15

Learning to pass messages

Before inference• Create a dataset of plausible incoming message groups.• Compute outgoing messages for each group using oracle.• Employ regressor to learn the mapping.

During inferenceGiven a group of incoming messages:• Use regressor to predict parameters of outgoing message.

Heess, Tarlow and Winn (2013)

16

Logistic regression

17

Logistic regression4 random UCI datasets

18

Learning to pass messages – an alternative approach

Before inference• Do nothing.

During inferenceGiven a group of incoming messages:• If unsure:

• Consult oracle for answer and update regressor.

• Otherwise:• Use regressor to predict parameters of outgoing message.

Just-in-time learning

19

Learning to pass messages

Need an uncertainty aware regressor:

Then:

Just-in-time learning

20

Random decision forests for JIT learning

Tree 1 Tree 2 Tree T

22

Random decision forests for JIT learningPrediction model

Tree 1 Tree 2 Tree T

23

Random decision forests for JIT learning

Could take the element-wise average of the parameters and reverse to obtain outgoing message .

Sensitive to chosen parameterisation.

Instead, compute the moment average of the distributions .

Ensemble model

24

Random decision forests for JIT learning

Use degree of agreement in predictions as a proxy for uncertainty.

If all trees predict the same output, it means that their knowledge about the mapping is similar despite the randomness in their structure.

Conversely, if there is large disagreement between the predictions, then the forest has high uncertainty.

Uncertainty model

25

Random decision forests for JIT learning2 feature samples per node – maximum depth 4 – regressor degree 2 – 1,000 trees

26

Random decision forests for JIT learning

Compute the moment average of the distributions .

Use degree of agreement in predictions as a proxy for uncertainty:

Ensemble model

27

Random decision forests for JIT learningTraining objective function

• How good is a prediction? Consider effect on induced belief on target random variable:

• Focus on the quantity of interest: accuracy of posterior marginals.• Train trees to partition training data in a way that the relationship

between incoming and outgoing messages is well captured by regression, as measured by symmetrised marginal KL.

Results

29

Logistic regression

30

Uncertainty aware regression of a logistic factorAre the forests accurate?

31

Uncertainty aware regression of a logistic factorAre the forests uncertain when they should be?

32

Just-in-time learning of a logistic factorOracle consultation rate

33

Just-in-time learning of a logistic factorInference time

34

Just-in-time learning of a logistic factorInference error

35

Just-in-time learning of a compound gamma factor

36

A model of corn yield

38

Just-in-time learning of a yield factor

39

Summary

• Speed up message passing inference using JIT learning:• Savings in human time (no need to implement factor operators).• Savings in computer time (reduce the amount of computation).

• JIT can even accelerate hand-coded message operators.

Open questions• Better measure of uncertainty?• Better methods for choosing umax?

40

Contextual Initialisation MachinesWith Varun Jampani, Daniel Tarlow, Pushmeet Kohli, John Winn

41

Gauss and CeresA deceptively simple problem

42

A point model of circles

43

45

46

47

A point model of circlesInitialisation makes a big difference

48

What’s going on?A common motif in vision models

Global variablesin each layer

Multiple layers

Many variables per layer

49

Possible solutionsStructured inference

Messages easy to computeFully-factorised representationLots of loops

No loops (within layers)Lots of loops (across layers)Messages difficult to compute

No loopsMessages difficult to computeComplex messages between layers

50

Contextual initialisationStructured accuracy without structured cost

Observations

• Beliefs about global variables are approximately predictable from layer below.

• Stronger beliefs about global variables leads to increased quality of messages to layer above.

Strategy

• Learn to send global messages in first iteration.

• Keep using fully factorised model for layer messages.

51

A point model of circles

52

A point model of circlesAccelerated inference using contextual initialisation

Centre Radius

53

A pixel model of squares

54

A pixel model of squaresRobustified inference using contextual initialisation

55

A pixel model of squaresRobustified inference using contextual initialisation

56

A pixel model of squaresRobustified inference using contextual initialisation

Side length Center

57

A pixel model of squaresRobustified inference using contextual initialisation

FG Color BG Color

58

A generative model of shadingWith Varun Jampani

Image X Reflectance R Shading S Normal N Light L

59

A generative model of shadingInference progress with and without context

60

A generative model of shadingFast and accurate inference using contextual initialisation

61

Summary

• Bridging the gap between Infer.NET and generative computer vision.• Initialisation makes a big difference.• The inference algorithm can learn to initialise itself.

Open questions• What is the best formulation of this approach?• What are the trade-offs between inference and prediction?

Questions