May 9, 2012 - by computing log likelihoods in directed and undirected probabilistic image models. ... pling (AIS) Neal (2001) is a sequential Monte Ca...

0 downloads 8 Views 578KB Size

No documents

Hamiltonian Annealed Importance Sampling for partition function estimation Jascha Sohl-Dickstein and Benjamin J. Culpepper Redwood Center for Theoretical Neuroscience University of California, Berkeley Berkeley, CA Redwood Technical Report May 10, 2012

Abstract

likelihood. For example, image models are often compared in terms of their synthesis, denoising, inpainting, and classification performance. This inability to directly measure the log likelihood has made it difficult to consistently evaluate and compare models.

We introduce an extension to annealed importance sampling that uses Hamiltonian dynamics to rapidly estimate normalization constants. We demonstrate this method by computing log likelihoods in directed and undirected probabilistic image models. We compare the performance of linear generative models with both Gaussian and Laplace priors, product of experts models with Laplace and Student’s t experts, the mc-RBM, and a bilinear generative model. We provide code to compare additional models.

1

Recently, a growing number of researchers have given their attention to measures of likelihood in image models. Salakhutdinov & Murray (2008) use annealed importance sampling, and Murray & Salakhutdinov (2009) use a hybrid of annealed importance sampling and a Chibstyle estimator to estimate the log likelihood of a variety of MNIST digits and natural image patches modeled using restricted Boltzmann machines and deep belief networks. Bethge (2006) measures the reduction in multi-information, or statistical redundancy, as images undergo various complete linear transformations. Chandler & Field (2007) and Stephens et al. (2008) produce estimates of the entropy inherent in natural scenes, but do not address model evaluation. Karklin (2007) uses kernel density estimates – essentially, vector quantization – to compare different image models, though that technique suffers from severe scaling problems except in specific contexts. Zoran & Weiss (2009) compare the true log likelihoods of a number of image models, but restricts their analysis to the rare cases where the partition function can be solved analytically.

Introduction

We would like to use probabilistic models to assign probabilities to data. Unfortunately, this innocuous statement belies an important, difficult problem: many interesting distributions used widely across sciences cannot be analytically normalized. Historically, the training of probabilistic models has been motivated in terms of maximizing the log probability of the data under the model or minimizing the KL divergence between the data and the model. However, for most models it is impossible to directly compute the log likelihood, due to the intractability of the normalization constant, or partition function. For this reason, performance is typically measured using a variety of diagnostic heuristics, not directly indicative of log

In this work, we merge two existing ideas – annealed importance sampling and Hamiltonian dynamics – into a 1

single algorithm. To review, Annealed Importance Sampling (AIS) Neal (2001) is a sequential Monte Carlo method Moral et al. (2006) which allows the partition function of a non-analytically-normalizable distribution to be estimated in an unbiased fashion. This is accomplished by starting at a distribution with a known normalization, and gradually transforming it into the distribution of interest through a chain of Markov transitions. Its practicality depends heavily on the chosen Markov transitions. Hamiltonian Monte Carlo (HMC) Neal (2010) is a family of techniques for fast sampling in continuous state spaces, which work by extending the state space to include auxiliary momentum variables, and then simulating Hamiltonian dynamics from physics in order to traverse long iso-probability trajectories which rapidly explore the state space. The key insight that makes our algorithm more efficient than previous methods is our adaptation of AIS to work with Hamiltonian dynamics. As in HMC, we extend the state space to include auxiliary momentum variables; however, we do this in such a way that the momenta change consistently through the intermediate AIS distributions, rather than resetting them at the beginning of each Markov transition. To make the practical applications of this work clear, we use our method, Hamiltonian Annealed Importance Sampling (HAIS), to measure the log likelihood of holdout data under a variety of directed (generative) and undirected (analysis/feed-forward) probabilistic models of natural image patches. The source code to reproduce our experiments is available.

2 2.1

to be calculated. This is accomplished by averaging over samples Sq from a proposal distribution q (x), e−Eq (x) Zq Z e−Ep (x) Zp = dx q (x) q (x) −Ep (x) X 1 e Zˆp = , |Sq | q (x)

q (x) =

(3) (4) (5)

x∈Sq

where |Sq | is the number of samples. q (x) is chosen to be easy both to sample from and to evaluate exactly, and must have support everywhere that p (x) does. Unfortunately, unless q (x) has significant mass everywhere p (x) does, it takes an impractically large number of samples from q (x) for Zˆp to accurately approximate Zp 1 .

2.2

Annealed Importance Sampling

Annealed importance sampling Neal (2001) extends the state space x to a series of vectors, X = {x1 , x2 . . . xN }, xn ∈ RM . It then transforms the proposal distribution q (x) to a forward chain Q (X) over X, by setting q (x) as the distribution over x1 and then multiplying by a series of Markov transition distributions, Q (X) = q (x1 )

N −1 Y

Tn (xn+1 |xn ) ,

(6)

n=1

where Tn (xn+1 |xn ) represents a forward transition distribution from xn to xn+1 . The target distribution p (x) is similarly transformed to become a reverse chain P (X), starting at xN , over X,

Estimating Log Likelihood Importance Sampling

P (X) =

N −1 e−Ep (xN ) Y e Tn (xn |xn+1 ) , Zp n=1

(7)

Importance sampling Kahn & Marshall (1953) allows an unbiased estimate Zˆp of the partition function (or normal- where Te (x |x n n n+1 ) is a reverse transition distribution ization constant) Zp of a non-analytically-normalizable from x to xn . The transition distributions are, by defn+1 R target distribution p (x) over x ∈ RM , inition, normalized (eg, dx n+1 Tn (xn+1 |xn ) = 1). In a similar fashion to Equations 4 and 5, samples SQ e−Ep (x) from the forward proposal chain Q (X) can be used to (1) p (x) = Zp Z 1 The expected variance of the estimate Z ˆp is given by an α−Ep (x) divergence between p (x) and q (x), times a constant and plus an offset Zp = dx e , (2) - see Minka (2005).

2

estimate the partition function Zp (note that all integrals but the first in Equation 8 go to 1), Z Z −Ep (xN ) dxN −1 TeN −1 (xN −1 |xN ) Zp = dxN e Z · · · dx1 Te1 (x1 |x2 ) (8) Z e−Ep (xN ) e TN −1 (xN −1 |xN ) = dX Q (X) Q (X) · · · Te1 (x1 |x2 ) (9) Zˆp =

If the number of intermediate distributions N is large, and the transition distributions Tn (xn+1 |xn ) and Ten (xn |xn+1 ) mix effectively, then the distributions over intermediate states xn will be nearly identical to πn (xn ) in both the forward and backward chains. P (X) and Q (X) will then be extremely similar to one another, and the variance in the estimate Zˆp will be extremely low2 . If the transitions Tn (xn+1 |xn ) do a poor job mixing, then the marginal distributions over xn under P (X) and Q (X) will look different from πn (xn ). The estimate Zˆp will still be unbiased, but with a potentially larger variance. Thus, to make AIS practical, it is important to choose Markov transitions Tn (xn+1 |xn ) for the intermediate distributions πn (x) that mix quickly.

1 X e−Ep (xN ) Te1 (x1 |x2 ) |SQ | q (x1 ) T1 (x2 |x1 ) X∈SQ

···

TeN −1 (xN −1 |xN ) . TN −1 (xN |xN −1 )

(10)

In order to further define the transition distributions, Neal introduces intermediate distributions πn (x) between q (x) and p (x),

2.3

Hamiltonian Sampling

Annealed

Importance

e−Eπn (x) Zπn Eπn (x) = (1 − βn ) Eq (x) + βn Ep (x) ,

Hamiltonian Monte Carlo Neal (2010) uses an analogy (11) to the physical dynamics of particles moving with momentum under the influence of an energy function to pro(12) pose Markov chain transitions which rapidly explore the n for all results reported state space. It does this by expanding the state space to where the mixing fraction βn = N here. Tn (xn+1 |xn ) is then chosen to be any Markov include auxiliary momentum variables, and then simulatchain transition for πn (x), meaning that it leaves πn (x) ing Hamiltonian dynamics to move long distances along invariant iso-probability contours in the expanded state space. A Tn ◦ πn = πn . (13) similar technique is powerful in the context of annealed importance sampling. Additionally, by retaining the moThe reverse direction transition distribution Ten (xn |xn+1 ) menta variables across the intermediate distributions, sigis set to the reversal of Tn (xn+1 |xn ), nificant momentum can build up as the proposal distribution is transformed into the target. This provides a mixing πn (xn ) Ten (xn |xn+1 ) = Tn (xn+1 |xn ) . (14) benefit that is unique to our formulation. πn (xn+1 ) The state space X is first extended to Y = Equation 10 thus reduces to {y1 , y2 . . . yN }, yn = {xn , vn }, where vn ∈ RM con1 X e−Ep (xN ) π1 (x1 ) sists of a momentum associated with each position xn . Zˆp = The momenta associated with both the proposal and target |SQ | q (x1 ) π1 (x2 ) X∈SQ distributions is taken to be unit norm isotropic gaussian. πN −1 (xN −1 ) ··· (15) The proposal and target distributions q (x) and p (x) are πN −1 (xN ) extended to corresponding distributions q∪ (y) and p∪ (y) X 1 e−Ep (xN ) e−Eπ1 (x1 ) = 2 There is a direct mapping between annealed importance sampling |SQ | q (x1 ) e−Eπ1 (x2 ) X∈S πn (x) =

Q

···

e

and the Jarzynski equality in non-equilibrium thermodynamics - see Jarzynski (1997). It follows from this mapping, and the reversibility ˆp can be made to go to 0 of quasistatic processes, that the variance in Z if the transition from q (x1 ) to p (xN ) is sufficiently gradual.

−EπN −1 (xN −1 )

e−EπN −1 (xN )

.

(16)

3

over position and momentum y = {x, v},

q∪ (y1 ) and target p∪ (yN ), Zˆp =

p∪ (y) = p (x) Φ (v) =

e−Ep∪ (y) Z p∪

Y ∈SQ∪

(17) ···

−Eq∪ (y)

q∪ (y) = q (x) Φ (v) = Φ (v) =

e

e

Zq∪

(18) =

− 12 vT v M

(19)

(2π) 2

1 Ep∪ (y) = Ep (x) + vT v 2 1 T Eq∪ (y) = Eq (x) + v v. 2

X e−Ep (xN ) Φ (vN ) e−Eπ1 (x1 )+ 21 v1T v1 |SQ∪ | q (x1 ) Φ (v1 ) e−Eπ1 (x2 )+ 12 v2T v2 1

e

1 |SQ∪ |

T −EπN −1 (xN −1 )+ 12 vN −1 vN −1 1

(24)

T

e−EπN −1 (xN )+ 2 vN vN X e−Ep (xN ) e−Eπ1 (x1 ) Y ∈SQ∪

···

q (x1 ) e−Eπ1 (x2 )

e−EπN −1 (xN −1 ) e−EπN −1 (xN )

(20)

.

(25)

Thus, the momentum only matters when generating the (21) samples S , by drawing from the initial proposal distriQ∪ bution p∪ (y1 ), and then applying the series of Markov transitions T∪n (yn+1 |yn ). For the transition distributions, T∪n (yn+1 |yn ), we The remaining distributions are extended to cover both propose a new location by integrating Hamiltonian dyposition and momentum in a nearly identical fashion: the namics for a short time using a single leapfrog step, accept forward and reverse chains Q (X) → Q∪ (Y), P (X) → or reject the new location via Metropolis rules, and then P∪ (Y), the intermediate distributions and energy func- partially corrupt the momentum. That is, we generate a tions πn (x) → π∪ n (y), Eπn (x) → Eπ∪ n (y), sample from T∪n (yn+1 |yn ) by following the procedure: 0 = {xn , vn } 1. x0H , vH Eπ∪ n (y) = (1 − βn ) Eq∪ (y) + βn Ep∪ (y)

1

0 2 2. leapfrog: xH = x0H + 2 vH

(22)

1 = (1 − βn ) Eq (x) + βn Ep (x) + vT v, 2 (23)

0 1 − = vH vH 1 2

∂Eπn (x) ∂x

1 2 x=xH

1 x1H = xH + 2 vH

where the step size = 0.2 for all experiments in this paper. and the forward and reverse Markov transition distributions Tn (xn+1 |xn ) → T∪n (yn+1 |yn ) and Ten (xn |xn+1 ) → Te∪n (yn |yn+1 ). Similarly, the samples SQ∪ now each have both position X and momentum V, and are drawn from the forward chain described by Q∪ (Y).

1 3. accept/reject: {x0 , v0 } = x1H , −vH with proba 1 1 T 1 −Eπn (x1 H )− 2 vH vH e bility Paccept = min 1, −E x0 − 1 v0 T v0 , othπ e n( H) 2 H H 0 erwise {x0 , v0 } = x0H , vH √ ˜ 0 = − 1 − γv0 + γr, 4. partial momentum refresh: v where r ∼ N (0, I), and γ ∈ (0, 1] is chosen so as to randomize half the momentum power per unit simulation time Culpepper et al. (2011).

The annealed importance sampling estimate Zˆp given in Equation 16 remains unchanged, except for a replacement of SQ with SQ∪ – all the terms involving the momentum V conveniently cancel out, since the same momentum distribution Φ (v) is used for the proposal

˜0} 5. yn+1 = {xn+1 , vn+1 } = {x0 , v 4

This combines the advantages of many intermediate distributions, which can lower the variance in the estimated Zˆp , with the improved mixing which occurs when momentum is maintained over many update steps. For details on Hamiltonian Monte Carlo sampling techniques, and a discussion of why the specific steps above leave πn (x) invariant, we recommend Culpepper et al. (2011); Neal (2010). Some of the models discussed below have linear constraints on their state spaces. These are dealt with by negating the momentum v and reflecting the position x across the constraint boundary every time a leapfrog halfstep violates the constraint.

(a) (b) (c) (d) (e) (f) (g) (h) (i)

Figure 1: A subset of the basis functions and filters learned by each model. (a) Bases Φ for the linear gen2.4 Log likelihood of analysis models erative model with Gaussian prior and (b) Laplace prior; Analysis models are defined for the purposes of this paper (c) filters Φ for the product of experts model with Laplace as those which have an easy to evaluate expression for experts, and (d) Student’s t experts; (e) Bases Φ for the Ep (x) when they are written in the form of Equation 1. bilinear generative model and (f) the basis elements makThe average log likelihood L of an analysis model p (x) ing up a single grouping from Ψ, ordered by and contrast modulated according to the strength of the corresponding over a set of testing data D is Ψ weight (decreasing from left to right); mcRBM (g) C X X filters, (h) W means, and (i) a single P grouping, showing 1 1 log p (x) = − Ep (x) − log Zp L= the pooled filters from C, ordered by and contrast mod|D| |D| x∈D x∈D ulated according to the strength of the corresponding P (26) weight (decreasing from left to right). where |D| is the number of samples in D, and the Zp in set D is the second term can be directly estimated by Hamiltonian annealed importance sampling. 1 X L= log Za|x (28) |D| x∈D Z 2.5 Log likelihood of generative models Za|x = da e−Ex|a (x,a)−log Zx|a −Ea (a)−log Za , (29) Generative models are defined here to be those which have a joint distribution,

where each of the Za|x can be estimated using HAIS. Generative models take significantly longer to evaluate than analysis models, as a separate HAIS chain must be e−Ex|a (x,a) e−Ea (a) p (x, a) = p (x|a) p (a) = , (27) run for each test sample. Zx|a Za

3

over visible variables x and auxiliary variables a ∈ RL which is easy to exactly evaluate and sample from, but for which the R marginal distribution over the visible variables p (x) = da p (x, a) is intractable to compute. The average log likelihood L of a model of this form over a testing

Models

The probabilistic forms for all models whose log likelihood we evaluate are given below. In all cases, x ∈ RM refers to the data vector. 5

1. linear generative: h i T exp − 2σ12 (x − Φa) (x − Φa) n p (x|a) = (30) M (2π) 2 σnM

(a) Laplace expert: EP OE (u; λl ) = λl |u|

(changing λl is equivalent to changing the length of the row Φl , so it is fixed to λl = 1)

parameters: Φ ∈ RM ×L auxiliary variables: a ∈ RL constant: σn = 0.1 Linear generative models were tested with a two priors, as listed:

(b) Student’s t expert: EP OE (u; λl ) = λl log 1 + u2

p (a) =

L

(31)

(2π) 2

(38)

exp [−EmcR (x)] (39) ZmcR " # PL K (Cl x)2 c 1 X l=1 Plk ||x||2 + 1 +bk ‘ 2 2 2 log 1 + e EmcR (x) = − p (x) =

(b) Laplace prior Olshausen & Field (1997): h i 1 exp − ||a||1 p (a) = (32) 2

k=1

2. bilinear generative Culpepper et al. (2011): The form is the same as for the linear generative model, but with the coefficients a decomposed into 2 multiplicative factors, a = (Θc) (Ψd) i h 1 exp − ||c||1 p (c) = h 2 i 1 p (d) = exp − ||d||1 ,

4. Mean and covariance restricted Boltzmann machine (mcRBM) Ranzato & Hinton (2010): This is an analysis model analogue of the bilinear generative model. The exact marginal energy function EmcR is taken from the released code rather than the paper.

(a) Gaussian prior: exp − 12 aT a

(37)

−

J X

h i m log 1 + eWj x+bj

j=1

+

(33)

1 T x x − xT bv 2σ 2

(40)

parameters: P ∈ RL×K , C ∈ RL×M , W ∈ RJ×M , bm ∈ RJ , bc ∈ RK , bv ∈ RK , σ ∈ R

(34)

4

(35)

Training

All models were trained on 10,000 16x16 pixel image patches taken at random from 4,112 linearized images of natural scenes from the van Hateren dataset van Hateren & van der Schaaf (1998). The extracted image patches 3. product of experts Hinton (2002): This is the anal- were first logged, and then mean subtracted. They were ysis model analogue of the linear generative model, then projected onto the top M PCA components, and whitened by rescaling each dimension to unit norm. All generative models were trained using Expectation L 1 Y Maximization over the full training set, with a Hamiltop (x) = exp (−EP OE (Φl x; λl )) . (36) ZP OE nian Monte Carlo algorithm used during the expectation l=1 step to maintain samples from the posterior distribution. parameters: Φ ∈ RL×M , λ ∈ RL See Culpepper et al. (2011) for details. All analysis mod+, Product of experts models were tested with two ex- els were trained using LBFGS on the minimum probability flow learning objective function for the full training perts, as listed: where indicates element-wise multiplication. parameters: Φ ∈ RM ×L , Θ ∈ RL×Kc , Ψ ∈ RL×Kd d auxiliary variables: c ∈ RKc , d ∈ RK +

6

−38

Average log likelihood vs. number of intermediate distributions

−40

True MH−AIS HAIS, γ = 1 HAIS

−39

−40.5

−41

Log likelihood

Log likelihood

−40

−41

−42

−41.5

−42

−43

−42.5

−44

−43

−45 1 10

Average log likelihood vs. number of intermediate distributions

2

10

3

10

4

10

5

10

−43.5 1 10

6

10

Number of intermediate distributions

True MH−AIS HAIS, γ = 1 HAIS

2

10

3

10

4

10

5

10

6

10

Number of intermediate distributions

Figure 2: Comparison of HAIS with alternate AIS algorithms in a complete (M = L = 36) POE Student’s t model. The scatter plot shows estimated log likelihoods under the test data for the POE model for different numbers of intermediate distributions N . The blue crosses indicate HAIS. The green stars indicate AIS with a single Hamiltonian dynamics leapfrog step per distribution, but no continuity of momentum. The red dots indicate AIS with a Gaussian proposal distribution. The dashed blue line indicates the true log likelihood of the minimum probability flow trained model. This product of Student’s t distribution is extremely difficult to normalize numerically, as many of its moments are infinite.

Figure 3: Comparison of HAIS with alternate AIS algorithms in a complete (M = L = 36) POE Laplace model. Format as in Figure 2, but for a Laplace expert.

distributions, and 200 particles. This procedure takes about 170 seconds for the 36 PCA component analysis models tested below. The generative models take approximately 4 hours, because models with unmarginalized auxiliary variables require one full HAIS run for each test datapoint.

5.1

Validating Hamiltonian annealed importance sampling

set, with a transition function Γ based on Hamiltonian dynamics. See Sohl-Dickstein et al. (2011) for details. No regularization or decay terms were required on any of the The log likelihood of the test data can be analytically computed for three of the models outlined above: linear genermodel parameters. ative with Gaussian prior (Section 3, model 1a), and product of experts with a complete representation (M = L) for both Laplace and Student’s t experts (Section 3, model 5 Results 3). Figures 2, 3 and 4 show the convergence of Hamil100 images from the van Hateren dataset were chosen at tonian annealed importance sampling, with 200 particles, random and reserved as a test set for evaluation of log for each of these three models as a function of the numlikelihood. The test data was preprocessed in an identi- ber N of intermediate distributions. Note that the Stucal fashion to the training data. Unless otherwise noted, dent’s t expert is a pathological case for sampling based log likelihood is estimated on the same set of 100 patches techniques, as for several of the learned λl even the first drawn from the test images, using Hamiltonian annealed moment of the Student’s t-distribution was infinite. importance sampling with N = 100, 000 intermediate Additionally, for all of the generative models, if Φ = 0 7

Average log likelihood vs. number of intermediate distributions

Average log likelihood vs. number of auxiliary variables −30

−20

−32 −40

−34

Average log likelihood

Log likelihood

−60

−80

−100

Estimated True

−120

−140

−160

−38

−40

−42 POE Laplace POE Student−t mcRBM linear Laplace bilinear

−44

−180

−200 2 10

−36

−46

3

10

4

10

5

−48

10

Number of intermediate distributions

50

100

150

200

250

300

350

400

450

Number of auxiliary variables

Figure 4: Convergence of HAIS for the linear generative model with a Gaussian prior. The dashed blue line indicates the true log likelihood of the test data under the model. The solid blue line indicates the HAIS estimated log likelihood of the test data for different numbers of intermediate distributions N .

then the statistical model reduces to, h i exp − 2σ12 xT x n p (x|a) = , M 2 (2π) σnM

0

Figure 5: Increasing the number of auxiliary variables in a model increases the likelihood it assigns to the test data until it saturates, or overfits.

the momenta before each update step, rather than allowing them to remain consistent across intermediate transitions. As can be seen in Figures 2 and 3, HAIS requires fewer intermediate distributions by an order of magnitude or more.

(41)

5.3

and the log likelihood L has a simple form that can be used to directly verify the estimate computed via HAIS. We performed this sanity check on all generative models, and found the HAIS estimated log likelihood converged to the true log likelihood in all cases.

Model size

By training models of different sizes and then using HAIS to compute their likelihood, we are able to explore how each model behaves in this regard, and find that three have somewhat different characteristics, shown in Figure 5. The POE model with a Laplace expert has relatively poor performance and we have no evidence that it is able 5.2 Speed of convergence to overfit the training data; in fact, due to the relatively In order to demonstrate the improved performance of weak sparsity of the Laplace prior, we tend to think the HAIS, we compare against two alternate AIS learn- only thing it can learn is oriented, band-pass functions that ing methods. First, we compare to AIS with transi- more finely tile the space of orientation and frequency. tion distributions Tn (xn+1 |xn ) consisting of a Gaussian In contrast, the Student-t expert model rises quickly to (σdif f usion = 0.1) proposal distribution and Metropolis- a high level of performance, then overfits dramatically. Hastings rejection rules. Second, we compare to AIS with Surprisingly, the mcRBM performs poorly with a number a single Hamiltonian leapfrog step per intermediate distri- of auxiliary variables that is comparable to the best perbution πn (xn ), and unit norm isotropic Gaussian momen- forming POE model. One explanation for this is that we tum. Unlike in HAIS however, in this case we randomize are testing it in a regime where the major structures de8

the POE or generative model with Laplace prior or expert. Although previous work Ranzato & Hinton (2010); Culpepper et al. (2011) has suggested bilinear models outperform their linear counterparts, our experiments show the Student’s t POE performing within the noise of the more complex models. One explanation is the relatively small dimensionality (36 PCA components) of the data – the advantage of bilinear models over linear is expected to increase with dimensionality. Another is that Student’s t POE models are in fact better than previously believed. Further investigation is underway. The surprising performance of the Student’s t POE, however, highlights the power and usefulness of being able to directly compare the log likelihoods of probabilistic models.

Table 1: Average log likelihood for the test data under each of the models. The model ‘size’ column denotes the number of experts in the POE models, the sum of the mean and covariance units for the mcRBM, and the total number of latent variables in the generative models. M ODEL L IN . GENERATIVE , G AUSSIAN L IN . GENERATIVE , L APLACE POE, L APLACE EXPERTS MC RBM POE, S TUDENT ’ S T EXPERTS B ILINEAR GENERATIVE

S IZE 36 36 144 432 144 98

L OG L IKELIHOOD -49.15± 2.31 -42.85± 2.41 -41.54± 2.46 -36.01± 2.57 -34.01± 2.68 -32.69± 2.56

6

signed into the model are not of great benefit. That is, the mcRBM is primarily good at capturing long range image structures, which are not sufficiently present in our data because we use only 36 PCA components. Although for computational reasons we do not yet have evidence that the mcRBM can overfit our dataset, it likely does have that power. We expect that it will fare better against other models as we scale up to more sizeable images. Finally, we are excited by the superior performance of the bilinear generative model, which outperforms all other models with only a small number of auxiliary variables. We suspect this is mainly due to the high degree of flexibility of the sparse prior, whose parameters (through Θ and Ψ) are learned from the data. The fact that for a comparable number of “hidden units” it outperforms the mcRBM, which can be thought of as the bilinear generative model’s ‘analysis counterpart’, highlights the power of this model.

5.4

Conclusion

By improving upon the available methods for partition function estimation, we have made it possible to directly compare large probabilistic models in terms of the likelihoods they assign to data. This is a fundamental measure of the quality of a model – especially a model trained in terms of log likelihood – and one which is frequently neglected due to practical and computational limitations. It is our hope that the Hamiltonian annealed importance sampling technique presented here will lead to better and more relevant empirical comparisons between models.

References Bethge, M. Factorial coding of natural images: how effective are linear models in removing higher-order dependencies? JOSA A, Jan 2006.

Comparing model classes

Chandler, Damon M and Field, David J. Estimates of As illustrated in Table 1, we used HAIS to compute the the information content and dimensionality of natural log likelihood of the test data under each of the image scenes from proximity distributions. JOSA A, Jan 2007. models in Section 3. The model sizes are indicated in the table – for both POE models and the mcRBM they Culpepper, Benjamin J., Sohl-Dickstein, Jascha, and Olwere chosen from the best performing datapoints in Figshausen, Bruno. Learning higher-order features of nature 5. In linear models, the use of sparse priors or exural images via factorization. Redwood Technical Reperts leads to a large (> 6 nat) increase in the log likeliport, 2011. hood over a Gaussian model. The choice of sparse prior was similarly important, with the POE model with Stu- Hinton, Geoffrey E. Training products of experts by dent’s t experts performing more than 7 nats better than minimizing contrastive divergence. Neural Compu9

tation, 14(8):1771–1800, Aug 2002. doi: 10.1162/ 089976602760128018.

Stephens, Greg J, Mora, Thierry, Tkacik, Gasper, and Bialek, William. Thermodynamics of natural images. Arxiv preprint arXiv:0806.2694, Jan 2008.

Jarzynski, C. Equilibrium free-energy differences from nonequilibrium measurements: A master-equation approach. Physical Review E, Jan 1997.

van Hateren, J H and van der Schaaf, A. Independent component filters of natural images compared with simple cells in primary visual cortex. Proceedings of the Royal Society of London. Series B, Biological Sciences, 265(1394):359–366, Jan 1998.

Kahn, H and Marshall, A. Methods of reducing sample size in monte carlo computations. Journal of the Operations Research Society of America, 1:263–278, Jan 1953. Zoran, Daniel and Weiss, Yair. The” tree-dependent components” of natural images are edge filters. Neural and Karklin, Y. Hierarchical statistical models of computaInformation Processing Systems, Jan 2009. tion in the visual cortex. School of Computer Science, Carnegie Melon University, Thesis, Jan 2007. Minka, T. Divergence measures and message passing. Microsoft Research, TR-2005-173, Jan 2005. Moral, Pierre Del, Doucet, Arnaud, and Jasra, Ajay. Sequential monte carlo samplers. Journal Of The Royal Statistical Society, 68(3):1–26, Jan 2006. Murray, Iain and Salakhutdinov, Ruslan. Evaluating probabilities under high-dimensional latent variable models. Advances in Neural Information Processing Systems, 21, Jan 2009. Neal, Radford M. Annealed importance sampling. Statistics and Computing, 11(2):125–139, Jan 2001. Neal, Radford M. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, Jan 2010. sections 5.2 and 5.3 for langevin dynamics. Olshausen, Bruno A and Field, David J. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision research, Jan 1997. Ranzato, Marc’Aurelio and Hinton, Geoffrey E. Modeling pixel means and covariances using factorized thirdorder boltzmann machines. IEEE Conference on Computer Vision and Pattern Recognition, Jan 2010. Salakhutdinov, Ruslan and Murray, Iain. On the quantitative analysis of deep belief networks. International Conference on Machine Learning, 25, Jan 2008. Sohl-Dickstein, Jascha, Battaglino, Peter, and DeWeese, Michael R. Minimum probability flow learning. International Conference on Machine Learning, 2011. 10