Deep learning with multiplicative interactions

Slides:



Advertisements
Similar presentations
The Helmholtz Machine P Dayan, GE Hinton, RM Neal, RS Zemel
Advertisements

CSC321 Introduction to Neural Networks and Machine Learning Lecture 21 Using Boltzmann machines to initialize backpropagation Geoffrey Hinton.
Geoffrey Hinton University of Toronto
Deep Learning Bing-Chen Tsai 1/21.
CIAR Second Summer School Tutorial Lecture 2a Learning a Deep Belief Net Geoffrey Hinton.
CS590M 2008 Fall: Paper Presentation
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 7: Learning in recurrent networks Geoffrey Hinton.
Advanced topics.
CIAR Summer School Tutorial Lecture 2b Learning a Deep Belief Net
CSC321: Neural Networks Lecture 3: Perceptrons
How to do backpropagation in a brain
Restricted Boltzmann Machines and Deep Belief Networks
CSC321: Introduction to Neural Networks and Machine Learning Lecture 20 Learning features one layer at a time Geoffrey Hinton.
Learning Energy-Based Models of High-Dimensional Data Geoffrey Hinton Max Welling Yee-Whye Teh Simon Osindero
CSC2535: 2013 Advanced Machine Learning Lecture 3a: The Origin of Variational Bayes Geoffrey Hinton.
Can computer simulations of the brain allow us to see into the mind? Geoffrey Hinton Canadian Institute for Advanced Research & University of Toronto.
CSC 2535: 2013 Lecture 3b Approximate inference in Energy-Based Models
CIAR Second Summer School Tutorial Lecture 2b Autoencoders & Modeling time series with Boltzmann machines Geoffrey Hinton.
How to do backpropagation in a brain
Learning Multiplicative Interactions many slides from Hinton.
CSC2535: Computation in Neural Networks Lecture 11: Conditional Random Fields Geoffrey Hinton.
CSC 2535: Computation in Neural Networks Lecture 10 Learning Deterministic Energy-Based Models Geoffrey Hinton.
CIAR Second Summer School Tutorial Lecture 1b Contrastive Divergence and Deterministic Energy-Based Models Geoffrey Hinton.
Csc Lecture 7 Recognizing speech. Geoffrey Hinton.
Learning Lateral Connections between Hidden Units Geoffrey Hinton University of Toronto in collaboration with Kejie Bao University of Toronto.
CSC321: Neural Networks Lecture 13: Learning without a teacher: Autoencoders and Principal Components Analysis Geoffrey Hinton.
CSC Lecture 8a Learning Multiplicative Interactions Geoffrey Hinton.
Geoffrey Hinton CSC2535: 2013 Lecture 5 Deep Boltzmann Machines.
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 9: Ways of speeding up the learning and preventing overfitting Geoffrey Hinton.
Learning to perceive how hand-written digits were drawn Geoffrey Hinton Canadian Institute for Advanced Research and University of Toronto.
CIAR Second Summer School Tutorial Lecture 1a Sigmoid Belief Nets and Boltzmann Machines Geoffrey Hinton.
CSC321: Neural Networks Lecture 24 Products of Experts Geoffrey Hinton.
CSC 2535 Lecture 8 Products of Experts Geoffrey Hinton.
CSC2535 Lecture 4 Boltzmann Machines, Sigmoid Belief Nets and Gibbs sampling Geoffrey Hinton.
CSC321: Introduction to Neural Networks and Machine Learning Lecture 18 Learning Boltzmann Machines Geoffrey Hinton.
Csc Lecture 8 Modeling image covariance structure Geoffrey Hinton.
CSC321 Introduction to Neural Networks and Machine Learning Lecture 3: Learning in multi-layer networks Geoffrey Hinton.
CSC Lecture 6a Learning Multiplicative Interactions Geoffrey Hinton.
CSC2515: Lecture 7 (post) Independent Components Analysis, and Autoencoders Geoffrey Hinton.
CIAR Summer School Tutorial Lecture 1b Sigmoid Belief Nets Geoffrey Hinton.
How to learn a generative model of images Geoffrey Hinton Canadian Institute for Advanced Research & University of Toronto.
CSC321: Introduction to Neural Networks and Machine Learning Lecture 19: Learning Restricted Boltzmann Machines Geoffrey Hinton.
CSC2515 Lecture 10 Part 2 Making time-series models with RBM’s.
CSC321 Lecture 5 Applying backpropagation to shape recognition Geoffrey Hinton.
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 6: Applying backpropagation to shape recognition Geoffrey Hinton.
Convolutional Restricted Boltzmann Machines for Feature Learning Mohammad Norouzi Advisor: Dr. Greg Mori Simon Fraser University 27 Nov
Neural Networks Lecture 11: Learning in recurrent networks Geoffrey Hinton.
CSC321: Introduction to Neural Networks and Machine Learning Lecture 17: Boltzmann Machines as Probabilistic Models Geoffrey Hinton.
CSC2535 Lecture 5 Sigmoid Belief Nets
CSC2515 Fall 2008 Introduction to Machine Learning Lecture 8 Deep Belief Nets All lecture slides will be available as.ppt,.ps, &.htm at
CSC321 Lecture 24 Using Boltzmann machines to initialize backpropagation Geoffrey Hinton.
Deep Belief Network Training Same greedy layer-wise approach First train lowest RBM (h 0 – h 1 ) using RBM update algorithm (note h 0 is x) Freeze weights.
CSC 2535: Computation in Neural Networks Lecture 10 Learning Deterministic Energy-Based Models Geoffrey Hinton.
CSC Lecture 23: Sigmoid Belief Nets and the wake-sleep algorithm Geoffrey Hinton.
CSC321 Lecture 27 Using Boltzmann machines to initialize backpropagation Geoffrey Hinton.
Neural networks (2) Reminder Avoiding overfitting Deep neural network Brief summary of supervised learning methods.
Deep Learning Overview Sources: workshop-tutorial-final.pdf
CSC2535: Computation in Neural Networks Lecture 7: Independent Components Analysis Geoffrey Hinton.
Some Slides from 2007 NIPS tutorial by Prof. Geoffrey Hinton
Learning Deep Generative Models by Ruslan Salakhutdinov
CSC2535: Computation in Neural Networks Lecture 11 Extracting coherent properties by maximizing mutual information across space or time Geoffrey Hinton.
Deep Learning Amin Sobhani.
CSC321: Neural Networks Lecture 22 Learning features one layer at a time Geoffrey Hinton.
CSC321: Neural Networks Lecture 19: Boltzmann Machines as Probabilistic Models Geoffrey Hinton.
Multimodal Learning with Deep Boltzmann Machines
Structure learning with deep autoencoders
CSC321 Winter 2007 Lecture 21: Some Demonstrations of Restricted Boltzmann Machines Geoffrey Hinton.
CSC 2535: Computation in Neural Networks Lecture 9 Learning Multiple Layers of Features Greedily Geoffrey Hinton.
Neural networks (3) Regularization Autoencoder
CSC321: Neural Networks Lecture 11: Learning in recurrent networks
Presentation transcript:

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 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.

Restricted Boltzmann Machines 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. hidden j i visible bias terms left out to simplify the math

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 units i and j

Using energies to define probabilities 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. partition function

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.

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 data reconstruction 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).

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.

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

Why unsupervised pre-training makes sense stuff stuff high bandwidth low bandwidth image label image label 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?

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)

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

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

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.

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

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

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.

Higher order Boltzmann machines (Sejnowski, ~1986) The usual energy function is quadratic in the states: But we could use higher order interactions: 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.

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)

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

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.

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 =

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

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

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

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

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

The network is trained on rotated random dot patterns.

The network is trained on rotated random dot patterns.

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.

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.

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-2 t-1 t

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. Even when we change the model, generation will be similar

Higher level models skip? 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. Motions that I show you next will use 2 layers t-2 t-1 t

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

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 6 earlier visible frames current visible frame

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

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

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.

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

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

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.

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.

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.

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.

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.

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

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

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.

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.

Test examples from the CIFAR-10 dataset plane car bird cat deer dog frog horse ship truck

Application to the CIFAR-10 labeled subset of the TINY images dataset (Marc’Aurelio Ranzato) There are 5000 32x32 training images and 1000 32x32 testing images for each of 10 different classes. In addition, there are 80 million unlabeled images. Train the mcRBM model on a very large number of 8x8 color patches 81 hiddens for the mean 144 hiddens and 900 factors for the precision Replicate the patches across the 32x32 color images 49 patches with a stride of 4 This gives 49 x 225 = 11025 hidden units.

How well does it discriminate? Compare with Gaussian-Binary RBM model that has the same number of hidden units, but only models the means of the pixel intensities. Use multinomial logistic regression directly on the hidden units representing the means and the hidden units representing the precisions. We can probably do better, but the aim is to evaluate the mcRBM idea. Also try unsupervised learning of extra hidden layers with a standard RBM to see if this gives even better features for discrimination.

Percent correct on CIFAR-10 test data Gaussian RBM (only models the means) 49x225 = 11025 hiddens 59.7% 3-way RBM (only models the covariances) 49x225 = 11025 hiddens, 225 filters per patch 62.3% 3-way RBM (only models the covariances) 49x225 = 11025 hiddens, 900 filters per patch (extra factors allow pooling of similar filters) 67.8% mcRBM (models means & covariances) 49x(81+144) = 11025 hids, 900 filters per patch 69.1% mcRBM then extra hidden layer of 8096 units 72.1%

Summary It is easy to learn deep generative models of unlabeled data by stacking RBM’s. RBM’s can be modified to allow factored multiplicative interactions. Inference is still easy. Learning is still easy if we condition on one set of inputs (the pre-image for learning image transformations; the style for learning mocap) Multiplicative interactions allow an RBM to model pixel covariances in an image-specific way. This gives good hidden representations for object recognition.

THE END A reading list on Deep Belief nets www.cs.toronto.edu/~hinton/deeprefs.html

Learning a deep directed network etc. h2 First learn with all the weights tied This is exactly equivalent to learning an RBM Contrastive divergence learning is equivalent to ignoring the small derivatives contributed by the tied weights between deeper layers. v2 h1 v1 h0 h0 v0 v0

Then freeze the first layer of weights in both directions and learn the remaining weights (still tied together). This is equivalent to learning another RBM, using the aggregated posterior distribution of h0 as the data. etc. h2 v2 h1 v1 v1 h0 h0 v0

The hybrid generative model after learning 3 layers To generate data: Get an equilibrium sample from the top-level RBM by performing alternating Gibbs sampling for a long time. Perform a top-down pass to get states for all the other layers. So the lower level bottom-up connections are not part of the generative model. They are just used for inference. h3 h2 h1 data

Learning with unreliable labels We can infer the true hidden label by combining evidence. This allows us to get surprisingly low error rates with very bad labels: Perfect labels: 1% Labels 50% wrong: 2% Labels 80% wrong: 5% It’s the mutual information that matters. 2000 top-level neurons 10 hidden labels 500 neurons confusion matrix 500 neurons 10 noisy labels 28 x 28 pixel image