text
stringlengths 35
1.54k
| source
stringclasses 1
value | page
int64 1
800
| book
stringclasses 1
value | chunk_index
int64 0
0
|
|---|---|---|---|---|
chapter 18. confronting the partition function we can thus determine whether ma is a better model than mb without knowing the partition function of either model but only their ratio. as we will see shortly, we can estimate this ratio using importance sampling, provided that the two models are similar. if, however, we wanted to compute the actual probability of the test data under either ma or mb, we would need to compute the actual value of the partition functions. that said, if we knew the ratio of two partition functions, r = z ( θb ) z ( θa ), and we knew the actual value of just one of the two, say z ( θa ), we could compute the value of the other : z ( θb ) = ( rz θa ) = z ( θb ) z ( θa ) z ( θa ). ( 18. 40 ) a simple way to estimate the partition function is to use a monte carlo method such as simple importance sampling. we present the approach in terms of continuous variables using integrals, but it can be readily applied to discrete variables by replacing the integrals with summation. we use a proposal distribution p0 ( x ) = 1 z 0 [UNK] ( x ) which supports tractable sampling and tractable
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 639
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
continuous variables using integrals, but it can be readily applied to discrete variables by replacing the integrals with summation. we use a proposal distribution p0 ( x ) = 1 z 0 [UNK] ( x ) which supports tractable sampling and tractable evaluation of both the partition function z0 and the unnormalized distribution [UNK] ( ) x. z1 = [UNK] ( ) x dx ( 18. 41 ) = p0 ( ) x p0 ( ) x [UNK] ( ) x dx ( 18. 42 ) = z0 p0 ( ) x [UNK] ( ) x [UNK] ( ) x dx ( 18. 43 ) [UNK] = z0 k k k = 1 [UNK] ( x ( ) k ) [UNK] ( x ( ) k ) s t :.. x ( ) k [UNK] ( 18. 44 ) in the last line, we make a monte carlo estimator, [UNK], of the integral using samples drawn from p0 ( x ) and then weight each sample with the ratio of the unnormalized [UNK] and the proposal p0. we see also that this approach allows us to estimate the ratio between the partition functions as 1 k k k = 1 [UNK] ( x ( ) k ) [UNK] ( x ( ) k ) s t :
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 639
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
##normalized [UNK] and the proposal p0. we see also that this approach allows us to estimate the ratio between the partition functions as 1 k k k = 1 [UNK] ( x ( ) k ) [UNK] ( x ( ) k ) s t :.. x ( ) k [UNK]. ( 18. 45 ) this value can then be used directly to compare two models as described in equation. 18. 39 624
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 639
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function if the distribution p0 is close to p1, equation can be an [UNK] way of 18. 44 estimating the partition function ( minka 2005, ). unfortunately, most of the time p1 is both complicated ( usually multimodal ) and defined over a high dimensional space. it is [UNK] to find a tractable p0 that is simple enough to evaluate while still being close enough to p1 to result in a high quality approximation. if p0 and p1 are not close, most samples from p0 will have low probability under p 1 and therefore make ( relatively ) negligible contribution to the sum in equation. 18. 44 having few samples with significant weights in this sum will result in an estimator that is of poor quality due to high variance. this can be understood quantitatively through an estimate of the variance of our estimate [UNK] : [UNK] var [UNK] = z0 k 2 k k = 1 [UNK] ( x ( ) k ) [UNK] ( x ( ) k ) [UNK] 2. ( 18. 46 ) this quantity is largest when there is significant deviation in the values of the importance weights [UNK] ( x ( ) k ) [UNK] ( x ( ) k )
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 640
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
) [UNK] ( x ( ) k ) [UNK] 2. ( 18. 46 ) this quantity is largest when there is significant deviation in the values of the importance weights [UNK] ( x ( ) k ) [UNK] ( x ( ) k ). we now turn to two related strategies developed to cope with the challeng - ing task of estimating partition functions for complex distributions over high - dimensional spaces : annealed importance sampling and bridge sampling. both start with the simple importance sampling strategy introduced above and both attempt to overcome the problem of the proposal p0 being too far from p1 by introducing intermediate distributions that attempt to between bridge the gap p0 and p1. 18. 7. 1 annealed importance sampling in situations where dkl ( p0p1 ) is large ( i. e., where there is little overlap between p0 and p1 ), a strategy called annealed importance sampling ( ais ) attempts to bridge the gap by introducing intermediate distributions (, ;, jarzynski 1997 neal 2001 ). consider a sequence of distributions pη0,..., pηn, with 0 = η0 < η1 < < · · · ηn−1 < ηn = 1 so that the first
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 640
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
##zynski 1997 neal 2001 ). consider a sequence of distributions pη0,..., pηn, with 0 = η0 < η1 < < · · · ηn−1 < ηn = 1 so that the first and last distributions in the sequence are p0 and p1 respectively. this approach allows us to estimate the partition function of a multimodal distribution defined over a high - dimensional space ( such as the distribution defined by a trained rbm ). we begin with a simpler model with a known partition function ( such as an rbm with zeroes for weights ) and estimate the ratio between the two model ’ s partition functions. the estimate of this ratio is based on the estimate of the ratios of a sequence of many similar distributions, such as the sequence of rbms with weights interpolating between zero and the learned weights. 625
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 640
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function we can now write the ratio z1 z0 as z1 z0 = z1 z0 zη 1 zη 1 · · · zηn−1 zηn−1 ( 18. 47 ) = zη 1 z0 zη 2 zη 1 · · · zηn−1 zηn−2 z1 zηn−1 ( 18. 48 ) = n−1 j = 0 zηj + 1 zηj ( 18. 49 ) provided the distributions pηj and pηj + 1, for all 0 ≤ ≤ − j n 1, are [UNK] close, we can reliably estimate each of the factors zηj + 1 zηj using simple importance sampling and then use these to obtain an estimate of z1 z0. where do these intermediate distributions come from? just as the original proposal distribution p0 is a design choice, so is the sequence of distributions pη1... pηn−1. that is, it can be specifically constructed to suit the problem domain. one general - purpose and popular choice for the intermediate distributions is to use the weighted geometric average of the target distribution p1 and the starting proposal distribution ( for which the partition
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 641
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
, it can be specifically constructed to suit the problem domain. one general - purpose and popular choice for the intermediate distributions is to use the weighted geometric average of the target distribution p1 and the starting proposal distribution ( for which the partition function is known ) p0 : pη j [UNK] 1 p1−ηj 0 ( 18. 50 ) in order to sample from these intermediate distributions, we define a series of markov chain transition functionstη j ( x | x ) that define the conditional probability distribution of transitioning to xgiven we are currently at x. the transition operator tηj ( x | x ) is defined to leave pηj ( ) x invariant : pηj ( ) = x pηj ( x ) tηj ( x x | ) dx ( 18. 51 ) these transitions may be constructed as any markov chain monte carlo method ( e. g., metropolis - hastings, gibbs ), including methods involving multiple passes through all of the random variables or other kinds of iterations. the ais sampling strategy is then to generate samples from p0 and then use the transition operators to sequentially generate samples from the intermediate distributions until we arrive at samples from the target
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 641
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
passes through all of the random variables or other kinds of iterations. the ais sampling strategy is then to generate samples from p0 and then use the transition operators to sequentially generate samples from the intermediate distributions until we arrive at samples from the target distribution p1 : • for k... k = 1 – sample x ( ) k η1 [UNK] ( ) x 626
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 641
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function – sample x ( ) k η2 [UNK] ( x ( ) k η2 | x ( ) k η1 ) –... – sample x ( ) k ηn−1 [UNK] ( x ( ) k ηn−1 | x ( ) k ηn−2 ) – sample x ( ) k ηn [UNK] ( x ( ) k ηn | x ( ) k ηn−1 ) • end for sample k, we can derive the importance weight by chaining together the importance weights for the jumps between the intermediate distributions given in equation : 18. 49 w ( ) k = [UNK] ( x ( ) k η1 ) [UNK] ( x ( ) k η1 ) [UNK] ( x ( ) k η2 ) [UNK] ( x ( ) k η2 )... [UNK] ( x ( ) k 1 ) [UNK] ηn−1 ( x ( ) k ηn ). ( 18. 52 ) to avoid numerical issues such as overflow, it is probably best to compute log w ( ) k by adding and subtracting log probabilities, rather than computing w ( ) k by multiplying and dividing probabilities. with the sampling procedure thus defined and the importance weights given in equation,
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 642
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
compute log w ( ) k by adding and subtracting log probabilities, rather than computing w ( ) k by multiplying and dividing probabilities. with the sampling procedure thus defined and the importance weights given in equation, the estimate of the ratio of partition functions is given by : 18. 52 z1 z0 ≈1 k k k = 1 w ( ) k ( 18. 53 ) in order to verify that this procedure defines a valid importance sampling scheme, we can show (, ) that the ais procedure corresponds to simple neal 2001 importance sampling on an extended state space with points sampled over the product space [ xη1,..., xηn−1, x1 ]. to do this, we define the distribution over the extended space as : [UNK] ( xη1,..., xηn−1, x1 ) ( 18. 54 ) = [UNK] ( x1 ) [UNK] ( x ηn−1 | x1 ) [UNK] ( xηn−2 | xηn−1 )... [UNK] 1 ( xη1 | xη2 ), ( 18. 55 ) where [UNK] is the reverse of the transition operator defined by ta ( via an application of
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 642
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
xηn−2 | xηn−1 )... [UNK] 1 ( xη1 | xη2 ), ( 18. 55 ) where [UNK] is the reverse of the transition operator defined by ta ( via an application of bayes ’ rule ) : [UNK] ( x | x ) = pa ( x ) pa ( ) x ta ( x x | ) = [UNK] ( x ) [UNK] ( ) x ta ( x x | ). ( 18. 56 ) plugging the above into the expression for the joint distribution on the extended state space given in equation, we get : 18. 55 [UNK] ( xη1,..., xηn−1, x1 ) ( 18. 57 ) 627
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 642
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function = [UNK] ( x1 ) [UNK] n−1 ( xηn−1 ) [UNK] n−1 ( x1 ) tηn−1 ( x 1 | xηn−1 ) n−2 i = 1 [UNK] ( xηi ) [UNK] ( xηi + 1 ) tη i ( xηi + 1 | xηi ) ( 18. 58 ) = [UNK] ( x1 ) [UNK] ( x1 ) tηn−1 ( x1 | xηn−1 ) [UNK] ( xη 1 ) n−2 i = 1 [UNK] + 1 ( xηi + 1 ) [UNK] ( xηi + 1 ) tη i ( xη i + 1 | xηi ). ( 18. 59 ) we now have means of generating samples from the joint proposal distribution q over the extended sample via a sampling scheme given above, with the joint distribution given by : q ( xη 1,..., xηn−1, x1 ) = p0 ( xη1 ) tη1 ( xη2 | xη1 )... tηn−1 ( x1 | x ηn−1 ). ( 18. 60 ) we have a joint distribution on the extended space given
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 643
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
##0 ( xη1 ) tη1 ( xη2 | xη1 )... tηn−1 ( x1 | x ηn−1 ). ( 18. 60 ) we have a joint distribution on the extended space given by equation. taking 18. 59 q ( xη1,..., xη n−1, x1 ) as the proposal distribution on the extended state space from which we will draw samples, it remains to determine the importance weights : w ( ) k = [UNK] ( xη1,..., xηn−1, x 1 ) q ( xη1,..., xη n−1, x1 ) = [UNK] ( x ( ) k 1 ) [UNK] ( x ( ) k ηn−1 )... [UNK] ( x ( ) k η2 ) [UNK] ( x ( ) k η1 ) [UNK] ( x ( ) k η1 ) [UNK] 0 ( x ( ) k 0 ). ( 18. 61 ) these weights are the same as proposed for ais. thus we can interpret ais as simple importance sampling applied to an extended state and its validity follows immediately from the validity of importance sampling. annealed importance sampling ( ais ) was first discovered by
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 643
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
are the same as proposed for ais. thus we can interpret ais as simple importance sampling applied to an extended state and its validity follows immediately from the validity of importance sampling. annealed importance sampling ( ais ) was first discovered by ( ) jarzynski 1997 and then again, independently, by ( ). it is currently the most common neal 2001 way of estimating the partition function for undirected probabilistic models. the reasons for this may have more to do with the publication of an influential paper ( salakhutdinov and murray 2008, ) describing its application to estimating the partition function of restricted boltzmann machines and deep belief networks than with any inherent advantage the method has over the other method described below. a discussion of the properties of the ais estimator ( e. g.. its variance and [UNK] ) can be found in ( ). neal 2001 18. 7. 2 bridge sampling bridge sampling ( ) is another method that, like ais, addresses the bennett 1976 shortcomings of importance sampling. rather than chaining together a series of 628
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 643
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function intermediate distributions, bridge sampling relies on a single distribution p∗, known as the bridge, to interpolate between a distribution with known partition function, p0, and a distribution p1 for which we are trying to estimate the partition function z1. bridge sampling estimates the ratio z1 / z0 as the ratio of the expected impor - tance weights between [UNK] and [UNK] between [UNK] and [UNK] : z1 z0 ≈ k k = 1 [UNK] ( x ( ) k 0 ) [UNK] ( x ( ) k 0 ) k k = 1 [UNK] ( x ( ) k 1 ) [UNK] ( x ( ) k 1 ) ( 18. 62 ) if the bridge distribution p∗is chosen carefully to have a large overlap of support with both p0 and p1, then bridge sampling can allow the distance between two distributions ( or more formally, dkl ( p0p1 ) ) to be much larger than with standard importance sampling. it can be shown that the optimal bridging distribution is given by p ( ) opt ∗ ( x ) [UNK] [UNK] ( ) [UNK] x p1 ( ) x [UNK] ( ) + [UNK] x p1 ( ) x where r = z1 / z0. at first, this
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 644
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
##idging distribution is given by p ( ) opt ∗ ( x ) [UNK] [UNK] ( ) [UNK] x p1 ( ) x [UNK] ( ) + [UNK] x p1 ( ) x where r = z1 / z0. at first, this appears to be an unworkable solution as it would seem to require the very quantity we are trying to estimate, z1 / z0. however, it is possible to start with a coarse estimate of r and use the resulting bridge distribution to refine our estimate iteratively (, ). that is, we neal 2005 iteratively re - estimate the ratio and use each iteration to update the value of. r linked importance sampling both ais and bridge sampling have their ad - vantages. if dkl ( p 0p1 ) is not too large ( because p0 and p1 are [UNK] close ) bridge sampling can be a more [UNK] means of estimating the ratio of partition functions than ais. if, however, the two distributions are too far apart for a single distribution p∗to bridge the gap then one can at least use ais with potentially many intermediate distributions to span the distance between p0 and p1. neal ( ) showed how his linked importance sampling method leveraged the power
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 644
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
far apart for a single distribution p∗to bridge the gap then one can at least use ais with potentially many intermediate distributions to span the distance between p0 and p1. neal ( ) showed how his linked importance sampling method leveraged the power of 2005 the bridge sampling strategy to bridge the intermediate distributions used in ais to significantly improve the overall partition function estimates. estimating the partition function while training while ais has become accepted as the standard method for estimating the partition function for many undirected models, it is [UNK] computationally intensive that it remains infeasible to use during training. however, alternative strategies that have been explored to maintain an estimate of the partition function throughout training using a combination of bridge sampling, short - chain ais and parallel tempering, desjardins 2011 et al. ( ) devised a scheme to track the partition function of an 629
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 644
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 18. confronting the partition function rbm throughout the training process. the strategy is based on the maintenance of independent estimates of the partition functions of the rbm at every temperature operating in the parallel tempering scheme. the authors combined bridge sampling estimates of the ratios of partition functions of neighboring chains ( i. e. from parallel tempering ) with ais estimates across time to come up with a low variance estimate of the partition functions at every iteration of learning. the tools described in this chapter provide many [UNK] ways of overcoming the problem of intractable partition functions, but there can be several other [UNK] involved in training and using generative models. foremost among these is the problem of intractable inference, which we confront next. 630
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 645
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19 approximate inference many probabilistic models are [UNK] to train because it is [UNK] to perform inference in them. in the context of deep learning, we usually have a set of visible variables v and a set of latent variables h. the challenge of inference usually refers to the [UNK] problem of computing p ( h v | ) or taking expectations with respect to it. such operations are often necessary for tasks like maximum likelihood learning. many simple graphical models with only one hidden layer, such as restricted boltzmann machines and probabilistic pca, are defined in a way that makes inference operations like computing p ( h v | ), or taking expectations with respect to it, simple. unfortunately, most graphical models with multiple layers of hidden variables have intractable posterior distributions. exact inference requires an exponential amount of time in these models. even some models with only a single layer, such as sparse coding, have this problem. in this chapter, we introduce several of the techniques for confronting these intractable inference problems. later, in chapter, we will describe how to use 20 these techniques to train probabilistic models that would otherwise be intractable, such as deep belief networks and deep boltzmann machines. intractable inference problems in deep learning usually arise
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 646
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
. later, in chapter, we will describe how to use 20 these techniques to train probabilistic models that would otherwise be intractable, such as deep belief networks and deep boltzmann machines. intractable inference problems in deep learning usually arise from interactions between latent variables in a structured graphical model. see figure for some 19. 1 examples. these interactions may be due to direct interactions in undirected models or “ explaining away ” interactions between mutual ancestors of the same visible unit in directed models. 631
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 646
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference figure 19. 1 : intractable inference problems in deep learning are usually the result of interactions between latent variables in a structured graphical model. these can be due to edges directly connecting one latent variable to another, or due to longer paths that are activated when the child of a v - structure is observed. ( left ) asemi - restricted boltzmann machine (, ) with connections between hidden osindero and hinton 2008 units. these direct connections between latent variables make the posterior distribution intractable due to large cliques of latent variables. a deep boltzmann machine, ( center ) organized into layers of variables without intra - layer connections, still has an intractable posterior distribution due to the connections between layers. this directed model ( right ) has interactions between latent variables when the visible variables are observed, because every two latent variables are co - parents. some probabilistic models are able to provide tractable inference over the latent variables despite having one of the graph structures depicted above. this is possible if the conditional probability distributions are chosen to introduce additional independences beyond those described by the graph. for example, probabilistic pca has the graph structure shown in the right, yet still has simple inference due
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 647
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
structures depicted above. this is possible if the conditional probability distributions are chosen to introduce additional independences beyond those described by the graph. for example, probabilistic pca has the graph structure shown in the right, yet still has simple inference due to special properties of the specific conditional distributions it uses ( linear - gaussian conditionals with mutually orthogonal basis vectors ). 632
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 647
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference 19. 1 inference as optimization many approaches to confronting the problem of [UNK] inference make use of the observation that exact inference can be described as an optimization problem. approximate inference algorithms may then be derived by approximating the underlying optimization problem. to construct the optimization problem, assume we have a probabilistic model consisting of observed variables v and latent variables h. we would like to compute the log probability of the observed data, log p ( v ; θ ). sometimes it is too [UNK] to compute log p ( v ; θ ) if it is costly to marginalize out h. instead, we can compute a lower bound l ( v θ,, q ) on log p ( v ; θ ). this bound is called the evidence lower bound ( elbo ). another commonly used name for this lower bound is the negative variational free energy. specifically, the evidence lower bound is defined to be l − ( ) = log ( ; ) v θ,, q p v θ dkl ( ( ) ( ; ) ) q h v | p h v | θ ( 19. 1 ) where is an arbitrary probability distribution over. q h because the [UNK] between log p ( v ) and l ( v
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 648
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
p v θ dkl ( ( ) ( ; ) ) q h v | p h v | θ ( 19. 1 ) where is an arbitrary probability distribution over. q h because the [UNK] between log p ( v ) and l ( v θ,, q ) is given by the kl divergence and because the kl divergence is always non - negative, we can see that l always has at most the same value as the desired log probability. the two are equal if and only if is the same distribution as. q p ( ) h v | surprisingly, l can be considerably easier to compute for some distributions q. simple algebra shows that we can rearrange l into a much more convenient form : l − ( ) = log ( ; ) v θ,, q p v θ dkl ( ( ) ( ; ) ) q h v | p h v | θ ( 19. 2 ) = log ( ; ) p v θ [UNK] log q ( ) h v | p ( ) h v | ( 19. 3 ) = log ( ; ) p v θ [UNK] log q ( ) h v | p, ( h v θ ; ) p ( ; ) v θ ( 19. 4 ) = log ( ; ) p v
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 648
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
h v | ( 19. 3 ) = log ( ; ) p v θ [UNK] log q ( ) h v | p, ( h v θ ; ) p ( ; ) v θ ( 19. 4 ) = log ( ; ) p v θ [UNK] [ log ( ) log ( ; ) + log ( ; ) ] q h v | − p h v, θ p v θ ( 19. 5 ) = [UNK] [ log ( ) log ( ; ) ] q h v | − p h v, θ. ( 19. 6 ) this yields the more canonical definition of the evidence lower bound, l ( ) = v θ,, q [UNK] [ log ( ) ] + ( ) p h v, h q. ( 19. 7 ) for an appropriate choice of q, l is tractable to compute. for any choice of q, l provides a lower bound on the likelihood. for q ( h v | ) that are better 633
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 648
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference approximations of p ( h v | ), the lower bound l will be tighter, in other words, closer to log p ( v ). when q ( h v | ) = p ( h v | ), the approximation is perfect, and l ( ) = log ( ; ) v θ,, q p v θ. we can thus think of inference as the procedure for finding the q that maximizes l. exact inference maximizes l perfectly by searching over a family of functions q that includes p ( h v | ). throughout this chapter, we will show how to derive [UNK] forms of approximate inference by using approximate optimization to find q. we can make the optimization procedure less expensive but approximate by restricting the family of distributions q the optimization is allowed to search over or by using an imperfect optimization procedure that may not completely maximize but merely increase it by a significant amount. l no matter what choice of q we use, l is a lower bound. we can get tighter or looser bounds that are cheaper or more expensive to compute depending on how we choose to approach this optimization problem. we can obtain a poorly matched q but reduce the computational cost by using an imperfect optimization procedure, or by using a perfect optimization
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 649
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
get tighter or looser bounds that are cheaper or more expensive to compute depending on how we choose to approach this optimization problem. we can obtain a poorly matched q but reduce the computational cost by using an imperfect optimization procedure, or by using a perfect optimization procedure over a restricted family of q distributions. 19. 2 expectation maximization the first algorithm we introduce based on maximizing a lower bound l is the expectation maximization ( em ) algorithm, a popular training algorithm for models with latent variables. we describe here a view on the em algorithm developed by ( ). unlike most of the other algorithms we neal and hinton 1999 describe in this chapter, em is not an approach to approximate inference, but rather an approach to learning with an approximate posterior. the em algorithm consists of alternating between two steps until convergence : • the e - step ( expectation step ) : let θ ( 0 ) denote the value of the parameters at the beginning of the step. set q ( h ( ) i | v ) = p ( h ( ) i | v ( ) i ; θ ( 0 ) ) for all indices i of the training examples v ( ) i we want to train on ( both batch and minibatch variants are valid ). by this we mean q is defi
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 649
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
) i | v ( ) i ; θ ( 0 ) ) for all indices i of the training examples v ( ) i we want to train on ( both batch and minibatch variants are valid ). by this we mean q is defined in terms of the current parameter value of θ ( 0 ) ; if we vary θ then p ( h v | ; θ ) will change but q p ( ) h v | will remain equal to ( ; h v | θ ( 0 ) ). • the ( maximization step ) : completely or partially maximize m - step i l ( v ( ) i,, q θ ) ( 19. 8 ) 634
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 649
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference with respect to using your optimization algorithm of choice. θ this can be viewed as a coordinate ascent algorithm to maximize l. on one step, we maximize l with respect to q, and on the other, we maximize l with respect to. θ stochastic gradient ascent on latent variable models can be seen as a special case of the em algorithm where the m step consists of taking a single gradient step. other variants of the em algorithm can make much larger steps. for some model families, the m step can even be performed analytically, jumping all the way to the optimal solution for given the current. θ q even though the e - step involves exact inference, we can think of the em algorithm as using approximate inference in some sense. specifically, the m - step assumes that the same value of q can be used for all values of θ. this will introduce a gap between l and the true log p ( v ) as the m - step moves further and further away from the value θ ( 0 ) used in the e - step. fortunately, the e - step reduces the gap to zero again as we enter the loop for the next time. the em algorithm contains a few [UNK] insights. first, there is the basic
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 650
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
the value θ ( 0 ) used in the e - step. fortunately, the e - step reduces the gap to zero again as we enter the loop for the next time. the em algorithm contains a few [UNK] insights. first, there is the basic structure of the learning process, in which we update the model parameters to improve the likelihood of a completed dataset, where all missing variables have their values provided by an estimate of the posterior distribution. this particular insight is not unique to the em algorithm. for example, using gradient descent to maximize the log - likelihood also has this same property ; the log - likelihood gradient computations require taking expectations with respect to the posterior distribution over the hidden units. another key insight in the em algorithm is that we can continue to use one value of q even after we have moved to a [UNK] value of θ. this particular insight is used throughout classical machine learning to derive large m - step updates. in the context of deep learning, most models are too complex to admit a tractable solution for an optimal large m - step update, so this second insight which is more unique to the em algorithm is rarely used. 19. 3 map inference and sparse coding we usually use the term inference to refer to computing the probability distribution over one set of variables given
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 650
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
optimal large m - step update, so this second insight which is more unique to the em algorithm is rarely used. 19. 3 map inference and sparse coding we usually use the term inference to refer to computing the probability distribution over one set of variables given another. when training probabilistic models with latent variables, we are usually interested in computing p ( h v | ). an alternative form of inference is to compute the single most likely value of the missing variables, rather than to infer the entire distribution over their possible values. in the context 635
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 650
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference of latent variable models, this means computing h∗ = arg max h p. ( ) h v | ( 19. 9 ) this is known as maximum a posteriori inference, abbreviated map inference. map inference is usually not thought of as approximate inference — it does compute the exact most likely value of h∗. however, if we wish to develop a learning process based on maximizing l ( v h,, q ), then it is helpful to think of map inference as a procedure that provides a value of q. in this sense, we can think of map inference as approximate inference, because it does not provide the optimal q. recall from section that exact inference consists of maximizing 19. 1 l ( ) = v θ,, q [UNK] [ log ( ) ] + ( ) p h v, h q ( 19. 10 ) with respect to q over an unrestricted family of probability distributions, using an exact optimization algorithm. we can derive map inference as a form of approximate inference by restricting the family of distributions q may be drawn from. specifically, we require to take on a dirac distribution : q q δ. ( ) = h v | ( ) h µ − ( 19. 11 ) this
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 651
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
inference by restricting the family of distributions q may be drawn from. specifically, we require to take on a dirac distribution : q q δ. ( ) = h v | ( ) h µ − ( 19. 11 ) this means that we can now control q entirely via µ. dropping terms of l that do not vary with, we are left with the optimization problem µ µ∗ = arg max µ log ( = ) p h µ v,, ( 19. 12 ) which is equivalent to the map inference problem h∗ = arg max h p. ( ) h v | ( 19. 13 ) we can thus justify a learning procedure similar to em, in which we alternate between performing map inference to infer h∗and then update θ to increase log p ( h∗, v ). as with em, this is a form of coordinate ascent on l, where we alternate between using inference to optimize l with respect to q and using parameter updates to optimize l with respect to θ. the procedure as a whole can be justified by the fact that l is a lower bound on log p ( v ). in the case of map inference, this justification is rather vacuous, because
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 651
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
respect to θ. the procedure as a whole can be justified by the fact that l is a lower bound on log p ( v ). in the case of map inference, this justification is rather vacuous, because the bound is infinitely loose, due to the dirac distribution ’ s [UNK] entropy of negative infinity. however, adding noise to would make the bound meaningful again. µ 636
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 651
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference map inference is commonly used in deep learning as both a feature extractor and a learning mechanism. it is primarily used for sparse coding models. recall from section that sparse coding is a linear factor model that imposes 13. 4 a sparsity - inducing prior on its hidden units. a common choice is a factorial laplace prior, with p h ( i ) = λ 2 e− | λ hi |. ( 19. 14 ) the visible units are then generated by performing a linear transformation and adding noise : p, β ( ) = ( ; + x h | n v wh b −1i ). ( 19. 15 ) computing or even representing p ( h v | ) is [UNK]. every pair of variables hi and hj are both parents of v. this means that when v is observed, the graphical model contains an active path connecting hi and hj. all of the hidden units thus participate in one massive clique in p ( h v | ). if the model were gaussian then these interactions could be modeled [UNK] via the covariance matrix, but the sparse prior makes these interactions non - gaussian. because p ( h v | ) is intractable, so is the computation of the log
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 652
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
model were gaussian then these interactions could be modeled [UNK] via the covariance matrix, but the sparse prior makes these interactions non - gaussian. because p ( h v | ) is intractable, so is the computation of the log - likelihood and its gradient. we thus cannot use exact maximum likelihood learning. instead, we use map inference and learn the parameters by maximizing the elbo defined by the dirac distribution around the map estimate of. h if we concatenate all of the h vectors in the training set into a matrix h, and concatenate all of the vectors into a matrix, then the sparse coding learning v v process consists of minimizing j, ( h w ) = i, j | hi, j | + i, j v hw − 2 i, j. ( 19. 16 ) most applications of sparse coding also involve weight decay or a constraint on the norms of the columns of w, in order to prevent the pathological solution with extremely small and large. h w we can minimize j by alternating between minimization with respect to h and minimization with respect to w. both sub - problems are convex. in fact, the minimization with respect to w is just a linear regression
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 652
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
large. h w we can minimize j by alternating between minimization with respect to h and minimization with respect to w. both sub - problems are convex. in fact, the minimization with respect to w is just a linear regression problem. however, minimization of j with respect to both arguments is usually not a convex problem. minimization with respect to h requires specialized algorithms such as the feature - sign search algorithm (, ). lee et al. 2007 637
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 652
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference 19. 4 variational inference and learning we have seen how the evidence lower bound l ( v θ,, q ) is a lower bound on log p ( v ; θ ), how inference can be viewed as maximizing l with respect to q, and how learning can be viewed as maximizing l with respect to θ. we have seen that the em algorithm allows us to make large learning steps with a fixed q and that learning algorithms based on map inference allow us to learn using a point estimate of p ( h v | ) rather than inferring the entire distribution. now we develop the more general approach to variational learning. the core idea behind variational learning is that we can maximize l over a restricted family of distributions q. this family should be chosen so that it is easy to compute eq log p ( h v, ). a typical way to do this is to introduce assumptions about how factorizes. q a common approach to variational learning is to impose the restriction that q is a factorial distribution : q ( ) = h v | i q h ( i | v ). ( 19. 17 ) this is called the mean field approach. more generally, we can impose any graphi - cal model structure
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 653
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
q is a factorial distribution : q ( ) = h v | i q h ( i | v ). ( 19. 17 ) this is called the mean field approach. more generally, we can impose any graphi - cal model structure we choose on q, to flexibly determine how many interactions we want our approximation to capture. this fully general graphical model approach is called structured variational inference (, ). saul and jordan 1996 the beauty of the variational approach is that we do not need to specify a specific parametric form for q. we specify how it should factorize, but then the optimization problem determines the optimal probability distribution within those factorization constraints. for discrete latent variables, this just means that we use traditional optimization techniques to optimize a finite number of variables describing the q distribution. for continuous latent variables, this means that we use a branch of mathematics called calculus of variations to perform optimization over a space of functions, and actually determine which function should be used to represent q. calculus of variations is the origin of the names “ variational learning ” and “ variational inference, ” though these names apply even when the latent variables are discrete and calculus of variations is not needed. in the case of
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 653
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
used to represent q. calculus of variations is the origin of the names “ variational learning ” and “ variational inference, ” though these names apply even when the latent variables are discrete and calculus of variations is not needed. in the case of continuous latent variables, calculus of variations is a powerful technique that removes much of the responsibility from the human designer of the model, who now must specify only how q factorizes, rather than needing to guess how to design a specific that can accurately approximate the posterior. q because l ( v θ,, q ) is defined to be log p ( v ; θ ) −dkl ( q ( h v | ) p ( h v | ; θ ) ), we can think of maximizing l with respect to q as minimizing dkl ( q ( h v | ) p ( h v | ) ). 638
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 653
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference in this sense, we are fitting q to p. however, we are doing so with the opposite direction of the kl divergence than we are used to using for fitting an approximation. when we use maximum likelihood learning to fit a model to data, we minimize dkl ( pdatapmodel ). as illustrated in figure, this means that maximum likelihood 3. 6 encourages the model to have high probability everywhere that the data has high probability, while our optimization - based inference procedure encourages q to have low probability everywhere the true posterior has low probability. both directions of the kl divergence can have desirable and undesirable properties. the choice of which to use depends on which properties are the highest priority for each application. in the case of the inference optimization problem, we choose to use dkl ( q ( h v | ) p ( h v | ) ) for computational reasons. specifically, computing dkl ( q ( h v | ) p ( h v | ) ) involves evaluating expectations with respect to q, so by designing q to be simple, we can simplify the required expectations. the opposite direction of the kl divergence would require computing expectations with respect
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 654
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
h v | ) p ( h v | ) ) involves evaluating expectations with respect to q, so by designing q to be simple, we can simplify the required expectations. the opposite direction of the kl divergence would require computing expectations with respect to the true posterior. because the form of the true posterior is determined by the choice of model, we cannot design a reduced - cost approach to computing dkl ( ( ) ( ) ) p h v | q h v | exactly. 19. 4. 1 discrete latent variables variational inference with discrete latent variables is relatively straightforward. we define a distribution q, typically one where each factor of q is just defined by a lookup table over discrete states. in the simplest case, h is binary and we make the mean field assumption that factorizes over each individual q hi. in this case we can parametrize q with a vector [UNK] whose entries are probabilities. then q h ( i = 1 ) = | v [UNK]. after determining how to represent q, we simply optimize its parameters. in the case of discrete latent variables, this is just a standard optimization problem. in principle the selection of q could be done with any optimization algorithm, such as gradient
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 654
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
. after determining how to represent q, we simply optimize its parameters. in the case of discrete latent variables, this is just a standard optimization problem. in principle the selection of q could be done with any optimization algorithm, such as gradient descent. because this optimization must occur in the inner loop of a learning algorithm, it must be very fast. to achieve this speed, we typically use special optimization algorithms that are designed to solve comparatively small and simple problems in very few iterations. a popular choice is to iterate fixed point equations, in other words, to solve ∂ [UNK] l = 0 ( 19. 18 ) for [UNK]. we repeatedly update [UNK] elements of [UNK] until we satisfy a convergence 639
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 654
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference criterion. to make this more concrete, we show how to apply variational inference to the binary sparse coding model ( we present here the model developed by henniges et al. ( ) but demonstrate traditional, generic mean field applied to the model, 2010 while they introduce a specialized algorithm ). this derivation goes into considerable mathematical detail and is intended for the reader who wishes to fully resolve any ambiguity in the high - level conceptual description of variational inference and learning we have presented so far. readers who do not plan to derive or implement variational learning algorithms may safely skip to the next section without missing any new high - level concepts. readers who proceed with the binary sparse coding example are encouraged to review the list of useful properties of functions that commonly arise in probabilistic models in section. we use these properties 3. 10 liberally throughout the following derivations without highlighting exactly where we use each one. in the binary sparse coding model, the input v ∈rn is generated from the model by adding gaussian noise to the sum of m [UNK] components which can each be present or absent. each component is switched on or [UNK] the corresponding hidden unit in h ∈ { } 0 1, m : p h ( i = 1 ) = (
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 655
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
adding gaussian noise to the sum of m [UNK] components which can each be present or absent. each component is switched on or [UNK] the corresponding hidden unit in h ∈ { } 0 1, m : p h ( i = 1 ) = ( σ bi ) ( 19. 19 ) p, ( ) = ( ; v h | n v w h β−1 ) ( 19. 20 ) where b is a learnable set of biases, w is a learnable weight matrix, and β is a learnable, diagonal precision matrix. training this model with maximum likelihood requires taking the derivative with respect to the parameters. consider the derivative with respect to one of the biases : ∂ ∂bi log ( ) p v ( 19. 21 ) = ∂ ∂b ip ( ) v p ( ) v ( 19. 22 ) = ∂ ∂b i h p, ( h v ) p ( ) v ( 19. 23 ) = ∂ ∂b i h p p ( ) h ( ) v h | p ( ) v ( 19. 24 ) 640
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 655
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference h1 h1 h2 h2 h3 h3 v1 v1 v2 v2 v3 v3 h4 h4 h1 h1 h2 h2 h3 h3 h4 h4 figure 19. 2 : the graph structure of a binary sparse coding model with four hidden units. ( left ) the graph structure of p ( h v, ). note that the edges are directed, and that every two hidden units are co - parents of every visible unit. the graph structure of ( right ) p ( h v | ). in order to account for the active paths between co - parents, the posterior distribution needs an edge between all of the hidden units. = h p ( ) v h | ∂ ∂b ip ( ) h p ( ) v ( 19. 25 ) = h p ( ) h v | ∂ ∂bi p ( ) h p ( ) h ( 19. 26 ) = [UNK] | p ( h v ) ∂ ∂bi log ( ) p h. ( 19. 27 ) this requires computing expectations with respect to p ( h v | ). unfortunately, p ( h v | ) is a complicated distribution. see figure for the graph structure of 19. 2 p ( h
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 656
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
p h. ( 19. 27 ) this requires computing expectations with respect to p ( h v | ). unfortunately, p ( h v | ) is a complicated distribution. see figure for the graph structure of 19. 2 p ( h v, ) and p ( h v | ). the posterior distribution corresponds to the complete graph over the hidden units, so variable elimination algorithms do not help us to compute the required expectations any faster than brute force. we can resolve this [UNK] by using variational inference and variational learning instead. we can make a mean field approximation : q ( ) = h v | i q h ( i | v ). ( 19. 28 ) the latent variables of the binary sparse coding model are binary, so to represent a factorial q we simply need to model m bernoulli distributionsq ( hi | v ). a natural way to represent the means of the bernoulli distributions is with a vector [UNK] of probabilities, with q ( hi = 1 | v ) = [UNK]. we impose a restriction that [UNK] is never equal to 0 or to 1, in order to avoid errors when computing, for example, log [UNK]. we will see that the variational inference equations never assign or to 0 1 [UNK]
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 656
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
v ) = [UNK]. we impose a restriction that [UNK] is never equal to 0 or to 1, in order to avoid errors when computing, for example, log [UNK]. we will see that the variational inference equations never assign or to 0 1 [UNK] 641
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 656
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference analytically. however, in a software implementation, machine rounding error could result in or values. in software, we may wish to implement binary sparse 0 1 coding using an unrestricted vector of variational parameters z and obtain [UNK] via the relation [UNK] = σ ( z ). we can thus safely compute log [UNK] on a computer by using the identity log ( σ zi ) = ( −ζ −zi ) relating the sigmoid and the softplus. to begin our derivation of variational learning in the binary sparse coding model, we show that the use of this mean field approximation makes learning tractable. the evidence lower bound is given by l ( ) v θ,, q ( 19. 29 ) = [UNK] [ log ( ) ] + ( ) p h v, h q ( 19. 30 ) = [UNK] [ log ( ) + log ( ) log ( ) ] p h p v h | − q h v | ( 19. 31 ) = [UNK] m i = 1 log ( p hi ) + n i = 1 log ( p vi | − h ) m i = 1 log ( q hi | v ) ( 19. 32 ) = m i = 1 [UNK] ( log ( σ bi ) log − [UNK] )
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 657
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
log ( p hi ) + n i = 1 log ( p vi | − h ) m i = 1 log ( q hi | v ) ( 19. 32 ) = m i = 1 [UNK] ( log ( σ bi ) log − [UNK] ) + ( 1 [UNK] ) ( log ( σ −bi ) log ( 1 − [UNK] ) ) ( 19. 33 ) + [UNK] n i = 1 log βi 2π exp −βi 2 ( vi −wi, : h ) 2 ( 19. 34 ) = m i = 1 [UNK] ( log ( σ bi ) log − [UNK] ) + ( 1 [UNK] ) ( log ( σ −bi ) log ( 1 − [UNK] ) ) ( 19. 35 ) + 1 2 n i = 1 log βi 2π −βi v2 i −2viwi, : [UNK] + j w 2 i, j [UNK] + k j = wi, jwi, [UNK]. ( 19. 36 ) while these equations are somewhat unappealing aesthetically, they show that l can be expressed in a small number of simple arithmetic operations. the evidence lower bound l is therefore tractable. we can use l as a replacement for the intractable log - likelihood. in principle, we could simply run gradient ascent on
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 657
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
show that l can be expressed in a small number of simple arithmetic operations. the evidence lower bound l is therefore tractable. we can use l as a replacement for the intractable log - likelihood. in principle, we could simply run gradient ascent on both v and h and this would make a perfectly acceptable combined inference and training algorithm. usually, however, we do not do this, for two reasons. first, this would require storing [UNK] for each v. we typically prefer algorithms that do not require per - example memory. it is [UNK] to scale learning algorithms to billions of examples if we must remember a dynamically updated vector associated with each example. 642
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 657
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference second, we would like to be able to extract the features [UNK] very quickly, in order to recognize the content of v. in a realistic deployed setting, we would need to be able to compute [UNK] in real time. for both these reasons, we typically do not use gradient descent to compute the mean field parameters [UNK]. instead, we rapidly estimate them with fixed point equations. the idea behind fixed point equations is that we are seeking a local maximum with respect to [UNK], where ∇hl ( v θ,, [UNK] ) = 0. we cannot [UNK] solve this equation with respect to all of [UNK] simultaneously. however, we can solve for a single variable : ∂ [UNK] l ( v θ,, [UNK] ) = 0. ( 19. 37 ) we can then iteratively apply the solution to the equation for i = 1,..., m, and repeat the cycle until we satisfy a converge criterion. common convergence criteria include stopping when a full cycle of updates does not improve l by more than some tolerance amount, or when the cycle does not change [UNK] by more than some amount. iterating mean field fixed point equations is a general technique that can provide fast variational inference in a broad variety of models. to
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 658
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
by more than some tolerance amount, or when the cycle does not change [UNK] by more than some amount. iterating mean field fixed point equations is a general technique that can provide fast variational inference in a broad variety of models. to make this more concrete, we show how to derive the updates for the binary sparse coding model in particular. first, we must write an expression for the derivatives with respect to [UNK]. to do so, we substitute equation into the left side of equation : 19. 36 19. 37 ∂ [UNK] l ( v θ,, [UNK] ) ( 19. 38 ) = ∂ [UNK] m j = 1 [UNK] ( log ( σ bj ) log − [UNK] j ) + ( 1 [UNK] ) ( log ( σ −bj ) log ( 1 − [UNK] ) ) ( 19. 39 ) + 1 2 n j = 1 log βj 2π −βj v2 j −2vjwj, : [UNK] + k w2 j, [UNK] + l k = wj, kwj, [UNK] ( 19. 40 ) = log ( σ bi ) log − [UNK] − − 1 + log ( 1 [UNK] i ) + 1 log ( − σ −bi ) ( 19. 41 ) + n j = 1 βj
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 658
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
, kwj, [UNK] ( 19. 40 ) = log ( σ bi ) log − [UNK] − − 1 + log ( 1 [UNK] i ) + 1 log ( − σ −bi ) ( 19. 41 ) + n j = 1 βj vjwj, i −1 2w 2 j, i − k i = wj, kwj, i [UNK] ( 19. 42 ) 643
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 658
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference = bi −log [UNK] + log ( 1 [UNK] ) + v βw :, i −1 2w :, iβw :, i − j i = w :, j βw :, [UNK]. ( 19. 43 ) to apply the fixed point update inference rule, we solve for the [UNK] that sets equation to 0 : 19. 43 [UNK] = σ bi + vβw :, i −1 2w :, iβw :, i − j i = w :, jβw :, [UNK]. ( 19. 44 ) at this point, we can see that there is a close connection between recurrent neural networks and inference in graphical models. specifically, the mean field fixed point equations defined a recurrent neural network. the task of this network is to perform inference. we have described how to derive this network from a model description, but it is also possible to train the inference network directly. several ideas based on this theme are described in chapter. 20 in the case of binary sparse coding, we can see that the recurrent network connection specified by equation consists of repeatedly updating the hidden 19. 44 units based on the changing values of the neighboring
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 659
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
this theme are described in chapter. 20 in the case of binary sparse coding, we can see that the recurrent network connection specified by equation consists of repeatedly updating the hidden 19. 44 units based on the changing values of the neighboring hidden units. the input always sends a fixed message of vβw to the hidden units, but the hidden units constantly update the message they send to each other. specifically, two units [UNK] and [UNK] inhibit each other when their weight vectors are aligned. this is a form of competition — between two hidden units that both explain the input, only the one that explains the input best will be allowed to remain active. this competition is the mean field approximation ’ s attempt to capture the explaining away interactions in the binary sparse coding posterior. the explaining away [UNK] actually should cause a multi - modal posterior, so that if we draw samples from the posterior, some samples will have one unit active, other samples will have the other unit active, but very few samples have both active. unfortunately, explaining away interactions cannot be modeled by the factorial q used for mean field, so the mean field approximation is forced to choose one mode to model. this is an instance of the behavior illustrated in figure
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 659
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
have both active. unfortunately, explaining away interactions cannot be modeled by the factorial q used for mean field, so the mean field approximation is forced to choose one mode to model. this is an instance of the behavior illustrated in figure. 3. 6 we can rewrite equation into an equivalent form that reveals some further 19. 44 insights : [UNK] = σ bi + v − j i = w :, [UNK] βw :, i−1 2 w :, iβw :, i. ( 19. 45 ) in this reformulation, we see the input at each step as consisting of v− j i = w :, [UNK] rather than v. we can thus think of unit i as attempting to encode the residual 644
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 659
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference error in v given the code of the other units. we can thus think of sparse coding as an iterative autoencoder, that repeatedly encodes and decodes its input, attempting to fix mistakes in the reconstruction after each iteration. in this example, we have derived an update rule that updates a single unit at a time. it would be advantageous to be able to update more units simultaneously. some graphical models, such as deep boltzmann machines, are structured in such a way that we can solve for many entries of [UNK] simultaneously. unfortunately, binary sparse coding does not admit such block updates. instead, we can use a heuristic technique called damping to perform block updates. in the damping approach, we solve for the individually optimal values of every element of [UNK], then move all of the values in a small step in that direction. this approach is no longer guaranteed to increase l at each step, but works well in practice for many models. see koller and friedman 2009 ( ) for more information about choosing the degree of synchrony and damping strategies in message passing algorithms. 19. 4. 2 calculus of variations before continuing with our presentation of variational learning, we must briefly introduce an important
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 660
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
2009 ( ) for more information about choosing the degree of synchrony and damping strategies in message passing algorithms. 19. 4. 2 calculus of variations before continuing with our presentation of variational learning, we must briefly introduce an important set of mathematical tools used in variational learning : calculus of variations. many machine learning techniques are based on minimizing a function j ( θ ) by finding the input vector θ ∈rn for which it takes on its minimal value. this can be accomplished with multivariate calculus and linear algebra, by solving for the critical points where ∇θj ( θ ) = 0. in some cases, we actually want to solve for a function f ( x ), such as when we want to find the probability density function over some random variable. this is what calculus of variations enables us to do. a function of a function f is known as a functional j [ f ]. much as we can take partial derivatives of a function with respect to elements of its vector - valued argument, we can take functional derivatives, also known as variational derivatives, of a functional j [ f ] with respect to individual values of the function f ( x ) at any specific value of x. the functional derivative of the
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 660
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
valued argument, we can take functional derivatives, also known as variational derivatives, of a functional j [ f ] with respect to individual values of the function f ( x ) at any specific value of x. the functional derivative of the functional j with respect to the value of the function at point is denoted f x δ δf x ( ) j. a complete formal development of functional derivatives is beyond the scope of this book. for our purposes, it is [UNK] to state that for [UNK] functions f g y, ( ) x and [UNK] functions ( x ) with continuous derivatives, that δ δf ( ) x g f, d ( ( ) x x ) x = ∂ ∂y g f,. ( ( ) x x ) ( 19. 46 ) 645
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 660
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference to gain some intuition for this identity, one can think of f ( x ) as being a vector with uncountably many elements, indexed by a real vector x. in this ( somewhat incomplete view ), the identity providing the functional derivatives is the same as we would obtain for a vector θ ∈rn indexed by positive integers : ∂ ∂θ i j g θ ( j, j ) = ∂ ∂θi g θ ( i, i. ) ( 19. 47 ) many results in other machine learning publications are presented using the more general euler - lagrange equation which allows g to depend on the derivatives of f as well as the value of f, but we do not need this fully general form for the results presented in this book. to optimize a function with respect to a vector, we take the gradient of the function with respect to the vector and solve for the point where every element of the gradient is equal to zero. likewise, we can optimize a functional by solving for the function where the functional derivative at every point is equal to zero. as an example of how this process works, consider the problem of finding the probability distribution function over x ∈r that has maximal [UNK] entropy. recall that the entropy
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 661
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
by solving for the function where the functional derivative at every point is equal to zero. as an example of how this process works, consider the problem of finding the probability distribution function over x ∈r that has maximal [UNK] entropy. recall that the entropy of a probability distribution is defined as p x ( ) h p [ ] = −ex log ( ) p x. ( 19. 48 ) for continuous values, the expectation is an integral : h p [ ] = − p x p x dx. ( ) log ( ) ( 19. 49 ) we cannot simply maximize h [ p ] with respect to the function p ( x ), because the result might not be a probability distribution. instead, we need to use lagrange multipliers to add a constraint that p ( x ) integrates to 1. also, the entropy increases without bound as the variance increases. this makes the question of which distribution has the greatest entropy uninteresting. instead, we ask which distribution has maximal entropy for fixed variance σ2. finally, the problem is underdetermined because the distribution can be shifted arbitrarily without changing the entropy. to impose a unique solution, we add a constraint that the mean of the distribution be µ. the
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 661
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
fixed variance σ2. finally, the problem is underdetermined because the distribution can be shifted arbitrarily without changing the entropy. to impose a unique solution, we add a constraint that the mean of the distribution be µ. the lagrangian functional for this optimization problem is l [ ] = p λ1 p x dx ( ) −1 + λ2 ( [ ] ) + e x −µ λ3 e [ ( ) x µ − 2 ] −σ2 + [ ] h p ( 19. 50 ) 646
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 661
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference = λ1p x λ ( ) + 2p x x λ ( ) + 3p x x µ ( ) ( − ) 2 −p x p x ( ) log ( ) dx λ − 1 −µλ2 −σ2λ3. ( 19. 51 ) to minimize the lagrangian with respect to p, we set the functional derivatives equal to 0 : [UNK], δ δp x ( ) l = λ1 + λ2x λ + 3 ( ) x µ − 2 − − 1 log ( ) = 0 p x. ( 19. 52 ) this condition now tells us the functional form of p ( x ). by algebraically re - arranging the equation, we obtain p x ( ) = exp λ1 + λ2x λ + 3 ( ) x µ − 2 −1. ( 19. 53 ) we never assumed directly that p ( x ) would take this functional form ; we obtained the expression itself by analytically minimizing a functional. to finish the minimization problem, we must choose the λ values to ensure that all of our constraints are satisfied. we are free to choose any λ values, because the gradient of the lagrangian with
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 662
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
a functional. to finish the minimization problem, we must choose the λ values to ensure that all of our constraints are satisfied. we are free to choose any λ values, because the gradient of the lagrangian with respect to the λ variables is zero so long as the constraints are satisfied. to satisfy all of the constraints, we may set λ1 = 1 −log σ √ 2π, λ2 = 0, and λ3 = − 1 2σ2 to obtain p x x µ, σ ( ) = ( n ; 2 ). ( 19. 54 ) this is one reason for using the normal distribution when we do not know the true distribution. because the normal distribution has the maximum entropy, we impose the least possible amount of structure by making this assumption. while examining the critical points of the lagrangian functional for the entropy, we found only one critical point, corresponding to maximizing the entropy for fixed variance. what about the probability distribution function that minimizes the entropy? why did we not find a second critical point corresponding to the minimum? the reason is that there is no specific function that achieves minimal entropy. as functions place more probability density on the two points x =
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 662
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
minimizes the entropy? why did we not find a second critical point corresponding to the minimum? the reason is that there is no specific function that achieves minimal entropy. as functions place more probability density on the two points x = µ + σ and x = µ σ −, and place less probability density on all other values of x, they lose entropy while maintaining the desired variance. however, any function placing exactly zero mass on all but two points does not integrate to one, and is not a valid probability distribution. there thus is no single minimal entropy probability distribution function, much as there is no single minimal positive real number. instead, we can say that there is a sequence of probability distributions converging toward putting mass only on these two points. this degenerate scenario may be 647
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 662
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference described as a mixture of dirac distributions. because dirac distributions are not described by a single probability distribution function, no dirac or mixture of dirac distribution corresponds to a single specific point in function space. these distributions are thus invisible to our method of solving for a specific point where the functional derivatives are zero. this is a limitation of the method. distributions such as the dirac must be found by other methods, such as guessing the solution and then proving that it is correct. 19. 4. 3 continuous latent variables when our graphical model contains continuous latent variables, we may still perform variational inference and learning by maximizing l. however, we must now use calculus of variations when maximizing with respect to. l q ( ) h v | in most cases, practitioners need not solve any calculus of variations problems themselves. instead, there is a general equation for the mean field fixed point updates. if we make the mean field approximation q ( ) = h v | i q h ( i | v ), ( 19. 55 ) and fix q ( hj | v ) for all j = i, then the optimal q ( h i | v ) may be obtained by normal
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 663
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
) = h v | i q h ( i | v ), ( 19. 55 ) and fix q ( hj | v ) for all j = i, then the optimal q ( h i | v ) may be obtained by normalizing the unnormalized distribution [UNK] h ( i | v ) = exp [UNK] ( h−i | v ) log [UNK], ( v h ) ( 19. 56 ) so long as p does not assign probability to any joint configuration of variables. 0 carrying out the expectation inside the equation will yield the correct functional form of q ( hi | v ). it is only necessary to derive functional forms of q directly using calculus of variations if one wishes to develop a new form of variational learning ; equation yields the mean field approximation for any probabilistic model. 19. 56 equation is a fixed point equation, designed to be iteratively applied for 19. 56 each value of i repeatedly until convergence. however, it also tells us more than that. it tells us the functional form that the optimal solution will take, whether we arrive there by fixed point equations or not. this means we can take the functional form from that equation but regard some of the values that appear in it
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 663
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
more than that. it tells us the functional form that the optimal solution will take, whether we arrive there by fixed point equations or not. this means we can take the functional form from that equation but regard some of the values that appear in it as parameters, that we can optimize with any optimization algorithm we like. as an example, consider a very simple probabilistic model, with latent variables h ∈r2 and just one visible variable, v. suppose that p ( h ) = n ( h ; 0, i ) and p ( v | h ) = n ( v ; wh ; 1 ). we could actually simplify this model by integrating out h ; the result is just a gaussian distribution over v. the model itself is not 648
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 663
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference interesting ; we have constructed it only to provide a simple demonstration of how calculus of variations may be applied to probabilistic modeling. the true posterior is given, up to a normalizing constant, by p ( ) h v | ( 19. 57 ) [UNK], ( h v ) ( 19. 58 ) = ( p h1 ) ( p h2 ) ( ) p v h | ( 19. 59 ) [UNK] −1 2 h2 1 + h2 2 + ( v h − 1w1 −h2w2 ) 2 ( 19. 60 ) = exp −1 2 h2 1 + h2 2 + v2 + h2 1w2 1 + h2 2 w2 2 −2vh1w1 −2vh2w2 + 2h1w1h2w2. ( 19. 61 ) due to the presence of the terms multiplying h1 and h2 together, we can see that the true posterior does not factorize over h1 and h2. applying equation, we find that 19. 56 [UNK] h ( 1 | v ) ( 19. 62 ) = exp [UNK] ( h2 | v ) log [UNK], ( v h ) (
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 664
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
not factorize over h1 and h2. applying equation, we find that 19. 56 [UNK] h ( 1 | v ) ( 19. 62 ) = exp [UNK] ( h2 | v ) log [UNK], ( v h ) ( 19. 63 ) = exp −1 [UNK] ( h2 | v ) h2 1 + h2 2 + v2 + h2 1w2 1 + h2 2w2 2 ( 19. 64 ) −2vh1w1 −2vh2w2 + 2h 1w1h2w2 ]. ( 19. 65 ) from this, we can see that there are [UNK] only two values we need to obtain from q ( h2 | v ) : eh [UNK] | q ( h v ) [ h2 ] and [UNK] | q ( h v ) [ h2 2 ]. writing these as h2and h2 2, we obtain [UNK] h ( 1 | v ) = exp −1 2 h2 1 + h2 2 + v2 + h2 1w2 1 + h2 2w2 2 ( 19. 66 ) −2vh1w1 − 2v h2w2 + 2h 1w1h2w2
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 664
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
+ h2 2 + v2 + h2 1w2 1 + h2 2w2 2 ( 19. 66 ) −2vh1w1 − 2v h2w2 + 2h 1w1h2w2 ]. ( 19. 67 ) from this, we can see that [UNK] has the functional form of a gaussian. we can thus conclude q ( h v | ) = n ( h ; µ β, −1 ) where µ and diagonal β are variational parameters that we can optimize using any technique we choose. it is important to recall that we did not ever assume that q would be gaussian ; its gaussian form was derived automatically by using calculus of variations to maximize q with 649
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 664
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference respect to l. using the same approach on a [UNK] model could yield a [UNK] functional form of. q this was of course, just a small case constructed for demonstration purposes. for examples of real applications of variational learning with continuous variables in the context of deep learning, see ( ). goodfellow et al. 2013d 19. 4. 4 interactions between learning and inference using approximate inference as part of a learning algorithm [UNK] the learning process, and this in turn [UNK] the accuracy of the inference algorithm. specifically, the training algorithm tends to adapt the model in a way that makes the approximating assumptions underlying the approximate inference algorithm become more true. when training the parameters, variational learning increases [UNK] log ( ) p v h,. ( 19. 68 ) for a specific v, this increases p ( h v | ) for values of h that have high probability under q ( h v | ) and decreases p ( h v | ) for values of h that have low probability under. q ( ) h v | this behavior causes our approximating assumptions to become self - fulfilling prophecies. if we train the model with a unimodal approximate posterior, we will obtain a model with a
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 665
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
have low probability under. q ( ) h v | this behavior causes our approximating assumptions to become self - fulfilling prophecies. if we train the model with a unimodal approximate posterior, we will obtain a model with a true posterior that is far closer to unimodal than we would have obtained by training the model with exact inference. computing the true amount of harm imposed on a model by a variational approximation is thus very [UNK]. there exist several methods for estimating log p ( v ). we often estimate log p ( v ; θ ) after training the model, and find that the gap with l ( v θ,, q ) is small. from this, we can conclude that our variational approximation is accurate for the specific value of θ that we obtained from the learning process. we should not conclude that our variational approximation is accurate in general or that the variational approximation did little harm to the learning process. to measure the true amount of harm induced by the variational approximation, we would need to know θ∗ = maxθ log p ( v ; θ ). it is possible for l ( v θ,, q ) ≈log p ( v ; θ ) and log p ( v ; θ )
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 665
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
variational approximation, we would need to know θ∗ = maxθ log p ( v ; θ ). it is possible for l ( v θ,, q ) ≈log p ( v ; θ ) and log p ( v ; θ ) log p ( v ; θ∗ ) to hold simultaneously. if maxql ( v θ, ∗, q ) log p ( v ; θ∗ ), because θ∗induces too complicated of a posterior distribution for our q family to capture, then the learning process will never approach θ∗. such a problem is very [UNK] to detect, because we can only know for sure that it happened if we have a superior learning algorithm that can find θ∗ for comparison. 650
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 665
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference 19. 5 learned approximate inference we have seen that inference can be thought of as an optimization procedure that increases the value of a function l. explicitly performing optimization via iterative procedures such as fixed point equations or gradient - based optimization is often very expensive and time - consuming. many approaches to inference avoid this expense by learning to perform approximate inference. specifically, we can think of the optimization process as a function f that maps an input v to an approximate distribution q∗ = arg maxq l ( v, q ). once we think of the multi - step iterative optimization process as just being a function, we can approximate it with a neural network that implements an approximation [UNK] f ( ; ) v θ. 19. 5. 1 wake - sleep one of the main [UNK] with training a model to infer h from v is that we do not have a supervised training set with which to train the model. given a v, we do not know the appropriate h. the mapping from v to h depends on the choice of model family, and evolves throughout the learning process as θ changes. the wake - sleep algorithm ( hinton 1995b frey 1996 et al., ; et al., ) resolves this problem by
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 666
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
from v to h depends on the choice of model family, and evolves throughout the learning process as θ changes. the wake - sleep algorithm ( hinton 1995b frey 1996 et al., ; et al., ) resolves this problem by drawing samples of both h and v from the model distribution. for example, in a directed model, this can be done cheaply by performing ancestral sampling beginning at h and ending at v. the inference network can then be trained to perform the reverse mapping : predicting which h caused the present v. the main drawback to this approach is that we will only be able to train the inference network on values of v that have high probability under the model. early in learning, the model distribution will not resemble the data distribution, so the inference network will not have an opportunity to learn on samples that resemble data. in section we saw that one possible explanation for the role of dream sleep 18. 2 in human beings and animals is that dreams could provide the negative phase samples that monte carlo training algorithms use to approximate the negative gradient of the log partition function of undirected models. another possible explanation for biological dreaming is that it is providing samples from p ( h v, ) which can be used to train an inference network to predict h given
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 666
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
algorithms use to approximate the negative gradient of the log partition function of undirected models. another possible explanation for biological dreaming is that it is providing samples from p ( h v, ) which can be used to train an inference network to predict h given v. in some senses, this explanation is more satisfying than the partition function explanation. monte carlo algorithms generally do not perform well if they are run using only the positive phase of the gradient for several steps then with only the negative phase of the gradient for several steps. human beings and animals are usually awake for several consecutive hours then asleep for several consecutive hours. it is 651
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 666
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference not readily apparent how this schedule could support monte carlo training of an undirected model. learning algorithms based on maximizing l can be run with prolonged periods of improving q and prolonged periods of improving θ, however. if the role of biological dreaming is to train networks for predicting q, then this explains how animals are able to remain awake for several hours ( the longer they are awake, the greater the gap between l and log p ( v ), but l will remain a lower bound ) and to remain asleep for several hours ( the generative model itself is not modified during sleep ) without damaging their internal models. of course, these ideas are purely speculative, and there is no hard evidence to suggest that dreaming accomplishes either of these goals. dreaming may also serve reinforcement learning rather than probabilistic modeling, by sampling synthetic experiences from the animal ’ s transition model, on which to train the animal ’ s policy. or sleep may serve some other purpose not yet anticipated by the machine learning community. 19. 5. 2 other forms of learned inference this strategy of learned approximate inference has also been applied to other models. salakhutdinov and larochelle 2010 ( ) showed that a single pass in a learned inference network
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 667
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
learning community. 19. 5. 2 other forms of learned inference this strategy of learned approximate inference has also been applied to other models. salakhutdinov and larochelle 2010 ( ) showed that a single pass in a learned inference network could yield faster inference than iterating the mean field fixed point equations in a dbm. the training procedure is based on running the inference network, then applying one step of mean field to improve its estimates, and training the inference network to output this refined estimate instead of its original estimate. we have already seen in section that the predictive sparse decomposition 14. 8 model trains a shallow encoder network to predict a sparse code for the input. this can be seen as a hybrid between an autoencoder and sparse coding. it is possible to devise probabilistic semantics for the model, under which the encoder may be viewed as performing learned approximate map inference. due to its shallow encoder, psd is not able to implement the kind of competition between units that we have seen in mean field inference. however, that problem can be remedied by training a deep encoder to perform learned approximate inference, as in the ista technique (, ).
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 667
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
to implement the kind of competition between units that we have seen in mean field inference. however, that problem can be remedied by training a deep encoder to perform learned approximate inference, as in the ista technique (, ). gregor and lecun 2010b learned approximate inference has recently become one of the dominant approaches to generative modeling, in the form of the variational autoencoder (, ;, ). in this elegant approach, there is no need to kingma 2013 rezende et al. 2014 construct explicit targets for the inference network. instead, the inference network is simply used to define l, and then the parameters of the inference network are adapted to increase. this model is described in depth later, in section. l 20. 10. 3 652
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 667
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 19. approximate inference using approximate inference, it is possible to train and use a wide variety of models. many of these models are described in the next chapter. 653
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 668
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20 deep generative models in this chapter, we present several of the specific kinds of generative models that can be built and trained using the techniques presented in chapters –. all of 16 19 these models represent probability distributions over multiple variables in some way. some allow the probability distribution function to be evaluated explicitly. others do not allow the evaluation of the probability distribution function, but support operations that implicitly require knowledge of it, such as drawing samples from the distribution. some of these models are structured probabilistic models described in terms of graphs and factors, using the language of graphical models presented in chapter. others can not easily be described in terms of factors, 16 but represent probability distributions nonetheless. 20. 1 boltzmann machines boltzmann machines were originally introduced as a general “ connectionist ” ap - proach to learning arbitrary probability distributions over binary vectors ( fahlman et al., ; 1983 ackley 1985 hinton 1984 hinton and sejnowski 1986 et al., ; et al., ;, ). variants of the boltzmann machine that include other kinds of variables have long ago surpassed the popularity of the original. in this section we briefly introduce the binary boltzmann machine and discuss the issues that come
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 669
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
., ;, ). variants of the boltzmann machine that include other kinds of variables have long ago surpassed the popularity of the original. in this section we briefly introduce the binary boltzmann machine and discuss the issues that come up when trying to train and perform inference in the model. we define the boltzmann machine over a d - dimensional binary random vector x ∈ { 0, 1 } d. the boltzmann machine is an energy - based model ( section ), 16. 2. 4 654
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 669
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models meaning we define the joint probability distribution using an energy function : p ( ) = x exp ( ( ) ) −e x z, ( 20. 1 ) where e ( x ) is the energy function and z is the partition function that ensures that x p ( ) = 1 x. the energy function of the boltzmann machine is given by e ( ) = x −xux b − x, ( 20. 2 ) where u is the “ weight ” matrix of model parameters and b is the vector of bias parameters. in the general setting of the boltzmann machine, we are given a set of training examples, each of which are n - dimensional. equation describes the joint 20. 1 probability distribution over the observed variables. while this scenario is certainly viable, it does limit the kinds of interactions between the observed variables to those described by the weight matrix. specifically, it means that the probability of one unit being on is given by a linear model ( logistic regression ) from the values of the other units. the boltzmann machine becomes more powerful when not all the variables are observed. in this case, the latent variables, can act similarly to hidden units in a multi - layer
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 670
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
model ( logistic regression ) from the values of the other units. the boltzmann machine becomes more powerful when not all the variables are observed. in this case, the latent variables, can act similarly to hidden units in a multi - layer perceptron and model higher - order interactions among the visible units. just as the addition of hidden units to convert logistic regression into an mlp results in the mlp being a universal approximator of functions, a boltzmann machine with hidden units is no longer limited to modeling linear relationships between variables. instead, the boltzmann machine becomes a universal approximator of probability mass functions over discrete variables (, ). le roux and bengio 2008 formally, we decompose the units x into two subsets : the visible units v and the latent ( or hidden ) units. the energy function becomes h e, ( v h v ) = −rv v − wh h − sh b − v c − h. ( 20. 3 ) boltzmann machine learning learning algorithms for boltzmann machines are usually based on maximum likelihood. all boltzmann machines have an intractable partition function, so the maximum likelihood gradient must be ap - proximated using the techniques described
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 670
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
3 ) boltzmann machine learning learning algorithms for boltzmann machines are usually based on maximum likelihood. all boltzmann machines have an intractable partition function, so the maximum likelihood gradient must be ap - proximated using the techniques described in chapter. 18 one interesting property of boltzmann machines when trained with learning rules based on maximum likelihood is that the update for a particular weight connecting two units depends only the statistics of those two units, collected under [UNK] distributions : pmodel ( v ) and [UNK] ( v ) pmodel ( h v | ). the rest of the 655
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 670
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models network participates in shaping those statistics, but the weight can be updated without knowing anything about the rest of the network or how those statistics were produced. this means that the learning rule is “ local, ” which makes boltzmann machine learning somewhat biologically plausible. it is conceivable that if each neuron were a random variable in a boltzmann machine, then the axons and dendrites connecting two random variables could learn only by observing the firing pattern of the cells that they actually physically touch. in particular, in the positive phase, two units that frequently activate together have their connection strengthened. this is an example of a hebbian learning rule (, ) often hebb 1949 summarized with the mnemonic “ fire together, wire together. ” hebbian learning rules are among the oldest hypothesized explanations for learning in biological systems and remain relevant today (, ). giudice et al. 2009 other learning algorithms that use more information than local statistics seem to require us to hypothesize the existence of more machinery than this. for example, for the brain to implement back - propagation in a multilayer perceptron, it seems necessary for the brain to maintain a secondary
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 671
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
local statistics seem to require us to hypothesize the existence of more machinery than this. for example, for the brain to implement back - propagation in a multilayer perceptron, it seems necessary for the brain to maintain a secondary communication network for transmitting gradient information backwards through the network. proposals for biologically plausible implementations ( and approximations ) of back - propagation have been made (, ;, ) but remain to be validated, and hinton 2007a bengio 2015 bengio 2015 ( ) links back - propagation of gradients to inference in energy - based models similar to the boltzmann machine ( but with continuous latent variables ). the negative phase of boltzmann machine learning is somewhat harder to explain from a biological point of view. as argued in section, dream sleep 18. 2 may be a form of negative phase sampling. this idea is more speculative though. 20. 2 restricted boltzmann machines invented under the name harmonium (, ), restricted boltzmann smolensky 1986 machines are some of the most common building blocks of deep probabilistic models. we have briefly described rbms previously, in section. here we review the 16. 7. 1 previous information and go into more detail. rb
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 671
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
1986 machines are some of the most common building blocks of deep probabilistic models. we have briefly described rbms previously, in section. here we review the 16. 7. 1 previous information and go into more detail. rbms are undirected probabilistic graphical models containing a layer of observable variables and a single layer of latent variables. rbms may be stacked ( one on top of the other ) to form deeper models. see figure for some examples. in particular, figure a shows the 20. 1 20. 1 graph structure of the rbm itself. it is a bipartite graph, with no connections permitted between any variables in the observed layer or between any units in the latent layer. 656
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 671
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models h1 h1 h2 h2 h3 h3 v1 v1 v2 v2 v3 v3 h4 h4 h ( 1 ) 1 h ( 1 ) 1 h ( 1 ) 2 h ( 1 ) 2 h ( 1 ) 3 h ( 1 ) 3 v1 v1 v2 v2 v3 v3 h ( 2 ) 1 h ( 2 ) 1 h ( 2 ) 2 h ( 2 ) 2 h ( 2 ) 3 h ( 2 ) 3 h ( 1 ) 4 h ( 1 ) 4 ( a ) ( b ) h ( 1 ) 1 h ( 1 ) 1 h ( 1 ) 2 h ( 1 ) 2 h ( 1 ) 3 h ( 1 ) 3 v1 v1 v2 v2 v3 v3 h ( 2 ) 1 h ( 2 ) 1 h ( 2 ) 2 h ( 2 ) 2 h ( 2 ) 3 h ( 2 ) 3 h ( 1 ) 4 h ( 1 ) 4 ( c ) figure 20. 1 : examples of models that may be built with restricted boltzmann machines. ( a ) the restricted boltzmann machine itself is an undirected graphical model based on a bipartite graph, with visible units in
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 672
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
c ) figure 20. 1 : examples of models that may be built with restricted boltzmann machines. ( a ) the restricted boltzmann machine itself is an undirected graphical model based on a bipartite graph, with visible units in one part of the graph and hidden units in the other part. there are no connections among the visible units, nor any connections among the hidden units. typically every visible unit is connected to every hidden unit but it is possible to construct sparsely connected rbms such as convolutional rbms. a ( b ) deep belief network is a hybrid graphical model involving both directed and undirected connections. like an rbm, it has no intralayer connections. however, a dbn has multiple hidden layers, and thus there are connections between hidden units that are in separate layers. all of the local conditional probability distributions needed by the deep belief network are copied directly from the local conditional probability distributions of its constituent rbms. alternatively, we could also represent the deep belief network with a completely undirected graph, but it would need intralayer connections to capture the dependencies between parents. a deep boltzmann machine is an undirected graphical ( c ) model with several layers of latent variables. like rbms and
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 672
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
a completely undirected graph, but it would need intralayer connections to capture the dependencies between parents. a deep boltzmann machine is an undirected graphical ( c ) model with several layers of latent variables. like rbms and dbns, dbms lack intralayer connections. dbms are less closely tied to rbms than dbns are. when initializing a dbm from a stack of rbms, it is necessary to modify the rbm parameters slightly. some kinds of dbms may be trained without first training a set of rbms. 657
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 672
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models we begin with the binary version of the restricted boltzmann machine, but as we see later there are extensions to other types of visible and hidden units. more formally, let the observed layer consist of a set of n v binary random variables which we refer to collectively with the vector v. we refer to the latent or hidden layer of nh binary random variables as. h like the general boltzmann machine, the restricted boltzmann machine is an energy - based model with the joint probability distribution specified by its energy function : p, ( = v v h = ) = h 1 z exp ( ( ) ) −e v h,. ( 20. 4 ) the energy function for an rbm is given by e, ( v h b ) = −v c − h v − wh, ( 20. 5 ) and is the normalizing constant known as the partition function : z z = v h exp ( ) { −e v h, }. ( 20. 6 ) it is apparent from the definition of the partition function z that the naive method of computing z ( exhaustively summing over all states ) could be computationally intractable, unless a cleverly designed algorithm
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 673
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
}. ( 20. 6 ) it is apparent from the definition of the partition function z that the naive method of computing z ( exhaustively summing over all states ) could be computationally intractable, unless a cleverly designed algorithm could exploit regularities in the probability distribution to compute z faster. in the case of restricted boltzmann machines, ( ) formally proved that the partition function long and servedio 2010 z is intractable. the intractable partition function z implies that the normalized joint probability distribution is also intractable to evaluate. p ( ) v 20. 2. 1 conditional distributions though p ( v ) is intractable, the bipartite graph structure of the rbm has the very special property that its conditional distributions p ( h v | ) and p ( v h | ) are factorial and relatively simple to compute and to sample from. deriving the conditional distributions from the joint distribution is straightfor - ward : p ( ) = h v | p, ( h v ) p ( ) v ( 20. 7 ) = 1 p ( ) v 1 z exp bv c + h v + wh ( 20. 8 ) = 1 z exp ch v + wh ( 20. 9 ) 658
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 673
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models = 1 z exp nh j = 1 cjhj + nh j = 1 vw :, jhj ( 20. 10 ) = 1 z nh j = 1 exp cjhj + vw :, jhj ( 20. 11 ) since we are conditioning on the visible units v, we can treat these as constant with respect to the distribution p ( h v | ). the factorial nature of the conditional p ( h v | ) follows immediately from our ability to write the joint probability over the vector h as the product of ( unnormalized ) distributions over the individual elements, h j. it is now a simple matter of normalizing the distributions over the individual binary hj. p h ( j = 1 ) = | v [UNK] h ( j = 1 ) | v [UNK] p h ( j = 0 ) + | v [UNK] h ( j = 1 ) | v ( 20. 12 ) = exp cj + vw :, j exp 0 + exp { } { cj + vw :, j } ( 20. 13 ) = σ cj + vw :, j. ( 20. 14 ) we can now express the full conditional
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 674
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
##w :, j exp 0 + exp { } { cj + vw :, j } ( 20. 13 ) = σ cj + vw :, j. ( 20. 14 ) we can now express the full conditional over the hidden layer as the factorial distribution : p ( ) = h v | nh j = 1 σ ( 2 1 ) ( + h − c wv ) j. ( 20. 15 ) a similar derivation will show that the other condition of interest to us, p ( v h | ), is also a factorial distribution : p ( ) = v h | nv i = 1 σ ( ( 2 1 ) ( + ) ) v − b w h i. ( 20. 16 ) 20. 2. 2 training restricted boltzmann machines because the rbm admits [UNK] evaluation and [UNK] of [UNK] ( v ) and [UNK] mcmc sampling in the form of block gibbs sampling, it can readily be trained with any of the techniques described in chapter for training models 18 that have intractable partition functions. this includes cd, sml ( pcd ), ratio matching and so on. compared to other undirected models used in deep learning, the rbm is relatively straightforward to train because we can compute
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 674
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
models 18 that have intractable partition functions. this includes cd, sml ( pcd ), ratio matching and so on. compared to other undirected models used in deep learning, the rbm is relatively straightforward to train because we can compute p ( h | v ) 659
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 674
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
chapter 20. deep generative models exactly in closed form. some other deep models, such as the deep boltzmann machine, combine both the [UNK] of an intractable partition function and the [UNK] of intractable inference. 20. 3 deep belief networks deep belief networks ( dbns ) were one of the first non - convolutional models to successfully admit training of deep architectures ( hinton 2006 hinton et al., ;, 2007b ). the introduction of deep belief networks in 2006 began the current deep learning renaissance. prior to the introduction of deep belief networks, deep models were considered too [UNK] to optimize. kernel machines with convex objective functions dominated the research landscape. deep belief networks demonstrated that deep architectures can be successful, by outperforming kernelized support vector machines on the mnist dataset (, ). today, deep belief hinton et al. 2006 networks have mostly fallen out of favor and are rarely used, even compared to other unsupervised or generative learning algorithms, but they are still deservedly recognized for their important role in deep learning history. deep belief networks are generative models with several layers of latent variables. the latent variables are typically binary, while the visible units may be binary
|
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org).pdf
| 675
|
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville (z-lib.org)
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.