Thursday, February 16, 2012

A machine that can dream

Note: This takes 20-30s to load, supported browsers are Chrome,  Safari 4.0+, 
Firefox 4+, Opera 10.0+. It requires heavy computations.

This is a live demo of a type of Boltzmann machine in Javascript. The evolving image at the bottom is what the machine is thinking and the flickering lights are the state of its neurons. This particular machine has been shown thousands of faces, and now it imagines faces when it dreams.

The Boltzmann machines have a remarkable ability similar to dreaming. They were first introduced by Geoff Hinton and Terry Sejnowski as a model of the brain in 1983. They can discover patterns when they are learning from data. And when run in a closed loop they can generate or dream new examples based on what is has learned.

How do they work? The full answer is beyond the scope of this post, but for motivated readers here's a quick explanation focusing on the restricted Boltzmann machine (RBM). It is defined by its so-called energy function
$$E({\bf v}, {\bf h}) = - \sum\limits_{i,j} v_i h_j w_{ij}$$
This function measures the energy between a sensory input vector \({\bf v}\) and the state of each neuron \({\bf h}\). The parameters \(w_{ij}\) weight correlations in the data. This is used to define the probability
$$p({\bf v}, {\bf h}) = \frac{e^{-E({\bf v}, {\bf h})}}{\sum\limits_{{\bf v}',{\bf h}'} e^{-E({\bf v}', {\bf h'})}}$$
where the denominator is the summation of the energy of all possible configurations of inputs and brain states.

Learning consists of adjusting \(w_{ij}\) to maximize the probability the RBM assigns to what you show it. This will make the neurons detect patterns in the sensory input. Dreaming consists of traveling in probable sensory inputs and brain states using Markov Chain Monte Carlo (MCMC).

If you want to know more about Boltzmann machines and Deep Learning, you should checkout this excellent talk by Geoff Hinton, or you can read this introductory paper by Yoshua Bengio and Yann LeCun.

You can also find here a pythonic implementation of the binary restricted Boltzmann machine (RBM) that I wrote.


Mentifex said...
This comment has been removed by a blog administrator.
Benedito Ventura said...

Muito bem yann, novo e já com um futuro excepcional só posso parabenisa-lo e desejar-lhe um futuro promissor, pois o mais difícil você já fez. Ventura!!!.

Benedito Ventura said...

Pleasy. Ventura!!!.

Unknown said...

The material of the essay is also extremely crucial. For essays, content that is informative is a need to. Filling the webpages with fluff words merely to meet up with the web page prerequisite will land you a poor evaluation and some severe criticism. Consequently, when you really feel like you have operate out of items to say, attempt carrying out a little bit much more custom research papers study. There is often something else that you forgot to mention, or possibly go back and elaborate on one thing you spent little time on. Filler terms are never an excellent selection.

Simone Bertolucci said...

Amazing and inspiring work, at least to my uninitiated eye. My area of studies is far from machine learning, but I am fascinated by this field and I'm trying to wrap my head around the main concepts in my spare time. Projects like this are my main source of motivation!

kongponleu88 said...

i really thanks for sharing this blog..

Sean Parker said...

Would be a great step towards artificial intelligence.
airport parking gatwick

ganga besant said...

Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
Block Chain Training in Bangalore

Block Chain Training in tambaram

Block Chain Training in chennai

Block Chain Training in annanagar

Block Chain Training in pune

Block Chain Training in velachery

sweety ganga said...
This comment has been removed by the author.