1 / 60

Deep learning with multiplicative interactions

Deep learning with multiplicative interactions. Geoffrey Hinton Canadian Institute for Advanced Research & Department of Computer Science University of Toronto. Overview. Background: How to learn a multilayer generative model of unlabeled data using a Restricted Boltzmann Machine

toril
Download Presentation

Deep learning with multiplicative interactions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Deep learning with multiplicative interactions Geoffrey Hinton Canadian Institute for Advanced Research & Department of Computer Science University of Toronto

  2. Overview • Background: How to learn a multilayer generative model of unlabeled data using a Restricted Boltzmann Machine • How to fine-tune for better discrimination • A speech recognition example (Dahl & Mohamed) • The new idea: RBM’s with factored, 3-way interactions • Why generative models need 3-way interactions • Factorizing 3-way interactions to save on parameters • Inference and learning in the factored 3-way model • Memisevic: Learning how images transform over time • Taylor: Transforming a model of human motion • Ranzato: Creating a pixel covariance matrix on the fly • Applied to object recognition in tiny color images.

  3. Restricted Boltzmann Machines hidden • We restrict the connectivity to make learning easier. • Only one layer of stochastic binary hidden units. • No connections between hidden units. • In an RBM, the hidden units are conditionally independent given the visible states. • So we can quickly get an unbiased sample from the posterior distribution when given a data-vector. j i visible bias terms left out to simplify the math

  4. The Energy of a joint configuration(ignoring terms to do with biases) binary state of visible unit i binary state of hidden unit j Energy with binary vectors v on the visible units and h on the hidden units weight between unitsi and j

  5. The probability of a joint configuration over both visible and hidden units depends on the energy of that joint configuration compared with the energy of all other joint configurations. The probability of a configuration of the visible units is the sum of the probabilities of all the joint configurations that contain it. Using energies to define probabilities partition function

  6. A picture of the maximum likelihood learning algorithm for an RBM j j j j a fantasy i i i i t = 0 t = 1 t = 2 t = infinity Start with a training vector on the visible units. Then alternate between updating all the hidden units in parallel and updating all the visible units in parallel.

  7. A quick way to learn an RBM Start with a training vector on the visible units. Update all the hidden units in parallel Update the all the visible units in parallel to get a “reconstruction”. Update the hidden units again. j j i i t = 0 t = 1 reconstruction data This is not following the gradient of the log likelihood. But it works well. It is approximately following the gradient of another objective function called contrastive divergence (Hinton, 2002).

  8. Training a deep network(the main reason RBM’s are interesting) • First train a layer of features that receive input directly from the pixels. • Then treat the activations of the trained features as if they were pixels and learn features of features in a second hidden layer. • This creates a multi-layer generative model. • It can be proved that each time we add another layer of features we improve a variational lower bound on the log probability of the training data. • The proof is complicated.

  9. Fine-tuning for discrimination • First learn one layer of features at a time without using label information. • Then add a final layer of label units. • Then use backpropagation from the label units to fine-tune the features that were learned in the unsupervised “pre-training” phase. • This overcomes many of the limitations of standard backpropagation. • The label information is used to adjust decision boundaries, not to discover features • It finds much deeper minima that generalize much better (Bengio lab).

  10. Why unsupervised pre-training makes sense stuff stuff high bandwidth low bandwidth label label image image If image-label pairs are generated this way, it makes sense to first learn to recover the stuff that caused the image by inverting the high bandwidth pathway. If image-label pairs were generated this way, it would make sense to try to go straight from images to labels. For example, do the pixels have even parity?

  11. A neat application of deep learning • A very deep belief net is beats the record at phone recognition on the very well-studied TIMIT database. • The task: • Predict the probabilities of 183 context-dependent phone labels for the central frame of a short window of speech • The training procedure: • Train lots of big layers, one at a time, without using the labels. • Add a 183-way softmax of context-specific phone labels • Fine-tune with backprop on a big GPU board for several days • The performance: • After the standard post-processing using a bi-phone model this gets 23.0% phone error rate. • Our speech experts believe that this beats all previous recognition methods that use the standard decoder. • For TIMIT, the classification task is a bit easier than the recognition task. Deep networks are the best at classification too (Honglak Lee)

  12. One very deep belief net for phone recognition 183 labels not pre-trained Mohamed, Dahl & Hinton poster in the NIPS speech workshop on Saturday 128 units 2000 binary hidden units 2000 binary hidden units 2000 binary hidden units 2000 binary hidden units 11 frames of 39 MFCC’s The Mel Cepstrum Coefficients are a standard representation for speech

  13. A simple real-valued visible unit • We model MFCC coefficients as Gaussian variables that are independent given the hidden states. Alternating Gibbs sampling is still easy, but learning needs to be much slower. E  energy-gradient due to top-down input to unit i. parabolic containment

  14. The new idea • The basic RBM module is flawed. • It is no good at dealing with multiplicative interactions. • Multiplicative interactions are ubiquitous • Style and content (Freeman and Tenebaum) • Image transformations (Tensor faces) • Heavy-tailed distributions caused by multiplying together two Gaussian distributed variables.

  15. Generating the parts of an object: why multiplicative interactions are useful • One way to maintain the constraints between the parts is for the level above to specify the location of each part very accurately • But this would require a lot of communication bandwidth. • Sloppy top-down specification of the parts is less demanding • but it messes up relationships between parts • so use redundant features and specify lateral interactions to sharpen up the mess. • Each part helps to locate the others • This allows a noisy top-down channel

  16. Generating the parts of an object “square” + pose parameters sloppy top-down activation of parts clean-up using lateral interactions specified by the layer above. parts with top-down support Its like soldiers on a parade ground

  17. Towards a more powerful, multi-linear stackable learning module • We want the states of the units in one layer to modulate the pair-wise interactions in the layer below (not just the biases) • Can we do this without losing the nice property that the hidden units are conditionally independent given the visible states? • To modulate pair-wise interactions we need higher-order Boltzmann machines. • These have far too many parameters, but we have a trick for fixing that.

  18. The usual energy function is quadratic in the states: But we could use higher order interactions: Higher order Boltzmann machines (Sejnowski, ~1986) • Unit k acts as a switch. When unit k is on, it switches in the pairwise interaction between unit i and unit j. • Units i and j can also be viewed as switches that control the pairwise interactions between the other two units.

  19. Using higher-order Boltzmann machines to model image transformations (the unfactored version, Memisevic &Hinton CVPR 2007) • A global transformation specifies which pixel goes to which other pixel. • Conversely, each pair of similar intensity pixels, one in each image, votes for a particular global transformation. image transformation image(t) image(t+1)

  20. Factoring three-way multiplicative interactions unfactored with cubically many parameters factored with linearly many parameters per factor.

  21. A picture of the rank 1 tensor contributed by factor f Its a 3-way outer product. Each layer is a scaled version of the same rank 1 matrix.

  22. Inference with factored three-way multiplicative interactions Energy contributed by factor f How changing the binary state of unit h changes the energy contributed by factor f What unit h needs to know in order to do Gibbs sampling =

  23. Belief propagation The outgoing message at each vertex of the factor is the product of the weighted sums at the other two vertices.

  24. Learning with factored three-way multiplicative interactions message from factor f to unit h 2.30?

  25. Showing what a factor learns by alternating between its pre- and post- fields receptive field in pre-image receptive field in post-image pre-image post-image

  26. The factor receptive fields The network is trained on translated random dot patterns.

  27. The factor receptive fields The network is trained on translated random dot patterns.

  28. The network is trained on rotated random dot patterns.

  29. The network is trained on rotated random dot patterns.

  30. How does it perceive two overlaid sparse dot patterns moving in different directions? • First we train a second hidden layer. Each of these units prefers motion in a different direction. • Then we compute the perceived motion by adding up the preferences of the active units in the second hidden layer. • If the two motions are within about 30 degrees it sees a single average motion. • If they are further apart it sees two separate motions. • The separate motions are slightly further apart than the real ones. • This is just like human perception and it was not trained on transparent motion. • The training is entirely unsupervised.

  31. Time series models • Inference is difficult in directed models of time series if we use non-linear, distributed representations in the hidden units. • It is hard to fit directed graphical models to high-dimensional sequences (e.g motion capture data). • So people tend to use methods with much less representational power • HMM’s give up on distributed representations • Linear Dynamical Systems give up on non-linearity.

  32. The conditional RBM model (a partially observed bipartite CRF) • Start with a generic RBM. • Add two types of conditioning connections. • Given the data, the hidden units at time t are conditionally independent. • The autoregressive weights can model most short-term temporal structure very well, leaving the hidden units to model nonlinear irregularities. h v t-2t-1t

  33. Causal generation from a learned model • Keep the previous visible states fixed. • They provide a time-dependent bias for the hidden units. • Perform alternating Gibbs sampling for a few iterations between the hidden units and the most recent visible units. • This picks new hidden and visible states that are compatible with each other and with the recent history.

  34. skip? Higher level models • Once we have trained the model, we can add more layers. • Treat the hidden activities of the first CRBM as data for training the next CRBM. • Add “autoregressive” connections to a layer when it becomes the visible layer. • Adding a second layer makes it generate more realistic sequences. t-2t-1t

  35. An application to modeling motion capture data • Human motion can be captured by placing reflective markers on the joints • Use lots of infrared cameras to track the 3-D positions of the markers • Given a skeletal model, the 3-D positions of the markers can be converted into • The joint angles • The 3-D translation of the pelvis • The roll, pitch and delta yaw of the pelvis

  36. Using a style variable to modulate the interactions (there is additional weight sharing: Taylor&Hinton, ICML 2009) style: 1-of-N 600 hidden units 100 style features 200 factors current visible frame 6 earlier visible frames

  37. Show demo’s of multiple styles of walking These can be found at www.cs.toronto.edu/~gwtaylor/

  38. Modeling the covariance structure of a static image by using two copies of the image Each factor sends the squared output of a linear filter to the hidden units. It is exactly the standard model of simple and complex cells. It allows complex cells to extract oriented energy. The standard model drops out of doing belief propagation for a factored third-order energy function. Copy 1 Copy 2

  39. An advantage of modeling covariances between pixels rather than pixels • During generation, a hidden “vertical edge” unit can turn off the horizontal interpolation in a region without worrying about exactly where the intensity discontinuity will be. • This gives some translational invariance • It also gives a lot of invariance to brightness and contrast. • The “vertical edge” unit acts like a complex cell. • By modulating the correlations between pixels rather than the pixel intensities, the generative model can still allow interpolation parallel to the edge.

  40. Using linear filters to model the inverse covariance matrix of two pixel intensities big weight small weight Each factor creates a parabolic energy trough. The joint distribution of 2 pixels

  41. Modulating the precision matrix by using additive contributions that can be switched off • Use the squared outputs of a set of linear filters to create an energy function. • The energy function represents the negative log probability of the data under a full covariance Gaussian. • Adapt the precison matrix to each datapoint by switching off the energy contributions from some of the linear filters. • This is good for modeling smoothness constraints that almost always apply, but sometimes fail catastrophically (e.g. at edges).

  42. Using binary hidden units to remove violated smoothness constraints Free energy  filter output, y  When the negative input from the squared filter exceeds the positive bias, the hidden unit turns off.

  43. Inference with hidden units that represent active smoothness constraints • The hidden units are all independent given the pixel intensities • The factors do not create dependencies between hidden units. • Given the states of the hidden units, the pixel intensity distribution is a full covariance Gaussian that is adapted for that particular image. • The hidden states do create dependencies between the pixels.

  44. Learning with an adaptive precision matrix • Since the pixel intensities are no longer independent given the hidden states, it is much harder to produce reconstructions. • We could invert the precision matrix for each training example, but this is slow. • Instead, we produce reconstructions using Hybrid Monte Carlo, starting at the data. • The rest of the learning algorithm is the same as before.

  45. Hybrid Monte Carlo Skip? • Given the pixel intensities, we can integrate out the hidden states to get a free energy that is a deterministic function of the image. • Backpropagation can then be used to get the derivatives of the free energy with respect to the pixel intensities. • Hybrid Monte Carlo simulates a particle that starts at the datapoint with a random initial momentum and then moves over the free energy surface. • 20 leapfrog steps work well for our networks.

  46. mcRBM(mean and covariance RBM) • Use one set of binary hidden units to model the means of the real-valued pixels. • These hidden units learn blurry patterns for coloring in regions • Use a separate set of binary hidden units to model the image-specific precision matrix. • These hidden units get their input from factors. • The factors learn sharp edge filters for representing breakdowns in smoothness.

  47. Receptive fields of the hidden units that represent the means Trained on 16x16 patches of natural images.

  48. Receptive fields of the factors that are used to represent precisions Notice the color blob with low frequency red-green and yellow-blue filters

  49. Why is the map topographic? • We laid out the factors in a 2-D grid and then connected each hidden unit to a small set of nearby factors. • If two factors get activated at the same time, it pays to connect them to the same hidden unit. • You only lose once by turning off that hidden unit.

  50. Multiple reconstructions from the same hidden state of a mcRBM The mcRBM hidden states are the same for each row. The hidden states should reflect human similarity judgements much better than squared difference of pixel intensities.

More Related