# NP Contemplation

Neural Networks, Machine Learning and Artificial Intelligence.

## 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 not a video. This is a live Boltzmann machine. On top, the flickering lights are the firing neurons of the machine, and at the bottom you see what it is thinking. This particular machine has been shown thousands of faces, and now it imagines faces when it dreams.

The Boltzmann machine has the remarkable ability of dreaming. It can imagine things that it's never seen before. They were first introduced by Geoff Hinton and Terry Sejnowski as a model of the brain in 1983. However, it was a recent breakthrough in 2006 that finally showed their true potential for real world problems. Nowadays, they are becoming a key component in some state of the art systems for speech recognition and computer vision.

How do they work? Here's a quick explanation focusing on the Restricted Boltzmann Machine (RBM) for simplicity. 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.

Posted by Yann N. Dauphin

Subscribe to: Posts (Atom)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9001321196556091, "perplexity_flag": "middle"}