Open main menu

Wikipedia β

An image of jellyfish on a blue background
An image of jellyfish processed with DeepDream
The same image before (left) and after (right) applying ten iterations of DeepDream

DeepDream is a computer vision program created by Google which uses a convolutional neural network to find and enhance patterns in images via algorithmic pareidolia, thus creating a dream-like hallucinogenic appearance in the deliberately over-processed images.[1][2][3]

Google's program popularized the term (deep) "dreaming" to refer to the generation of images that produce desired activations in a trained deep network, and the term now refers to a collection of related approaches.



A late-stage DeepDream processed photograph of three men in a pool

The DeepDream software originates in a deep convolutional network codenamed "Inception" after the film of the same name,[1][2][3] was developed for the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) in 2014[3] and released in July 2015. The software is designed to detect faces and other patterns in images, with the aim of automatically classifying images.[4]

However, once trained, the network can also be run in reverse, being asked to adjust the original image slightly so that a given output neuron (e.g. the one for faces or certain animals) yields a higher confidence score. This can be used for visualizations to understand the emergent structure of the neural network better, and is the basis for the DeepDream concept. However, after enough reiterations, even imagery initially devoid of the sought features will be adjusted enough that a form of pareidolia results, by which psychedelic and surreal images are generated algorithmically. The optimization resembles Backpropagation, however instead of adjusting the network weights, the weights are held fixed and the input is adjusted.

Alternately, an existing image can be altered so that it is "more cat-like", and the resulting enhanced image can be again input to the procedure.[2] This usage resembles the childhood activity of looking for animals or other patterns in clouds.

Applying gradient descent independently to each pixel of the input produces images in which adjacent pixels have little relation and thus the image has too much high frequency information. The generated images can be greatly improved by including a prior or regularizer that prefers inputs that have natural image statistics (without a preference for any particular image), or are simply smooth [5] [6] .[7] For example,[6] used the total variation regularizer that prefers images that are piecewise constant. Various regularizers are discussed further in.[7]


The dreaming idea and name became popular on the internet in 2015 thanks to Google's DeepDream program. The idea dates from early in the history of neural networks,[8] and was explored more recently (but prior to Google's work) by several research groups.[9][5]

After Google published their techniques and made their code open source,[10] a number of tools in the form of web services, mobile applications, and desktop software appeared on the market to enable users to transform their own photos.[11]


A human face, drawn while under the influence of LSD

The dreaming idea can be applied to hidden (internal) neurons other than those in the output, which allows exploration of the roles and representations of various parts of the network.[7] It is also possible to optimize the input to satisfy either a single neuron (this usage is sometimes called Activity Maximization)[12] or an entire layer of neurons.

While dreaming is most often used for visualizing networks or producing computer art, it has recently been proposed that adding "dreamed" inputs to the training set can improve training times.[13]

The oft-cited resemblance of the imagery to LSD- and psilocybin-induced hallucinations is suggestive of a functional resemblance between artificial neural networks and particular layers of the visual cortex.[14]

See alsoEdit


  1. ^ a b Mordvintsev, Alexander; Olah, Christopher; Tyka, Mike (2015). "DeepDream - a code example for visualizing Neural Networks". Google Research. Archived from the original on 2015-07-08. 
  2. ^ a b c Mordvintsev, Alexander; Olah, Christopher; Tyka, Mike (2015). "Inceptionism: Going Deeper into Neural Networks". Google Research. Archived from the original on 2015-07-03. 
  3. ^ a b c Szegedy, Christian; Liu, Wei; Jia, Yangqing; Sermanet, Pierre; Reed, Scott; Anguelov, Dragomir; Erhan, Dumitru; Vanhoucke, Vincent; Rabinovich, Andrew (2014). "Going Deeper with Convolutions". Computing Research Repository. arXiv:1409.4842 . 
  4. ^ Rich McCormick (7 July 2015). "Fear and Loathing in Las Vegas is terrifying through the eyes of a computer". The Verge. Retrieved 2015-07-25. 
  5. ^ a b Simonyan, Karen; Vedaldi, Andrea; Zisserman, Andrew (2014). Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. International Conference on Learning Representations Workshop. 
  6. ^ a b Mahendran, Aravindh; Vedaldi, Andrea (2015). Understanding Deep Image Representations by Inverting Them. IEEE Conference on Computer Vision and Pattern Recognition. doi:10.1109/CVPR.2015.7299155. 
  7. ^ a b c Yosinski, Jason; Clune, Jeff; Nguyen, Anh; Fuchs, Thomas (2015). Understanding Neural Networks Through Deep Visualization. Deep Learning Workshop, International Conference on Machine Learning (ICML) Deep Learning Workshop. 
  8. ^ Lewis, J.P. (1988). Creation by refinement: a creativity paradigm for gradient descent learning networks. IEEE International Conference on Neural Networks. doi:10.1109/ICNN.1988.23933. 
  9. ^ Erhan, Dumitru. (2009). Visualizing Higher-Layer Features of a Deep Network. International Conference on Machine Learning Workshop on Learning Feature Hierarchies. 
  10. ^ deepdream on GitHub
  11. ^ Daniel Culpan (2015-07-03). "These Google "Deep Dream" Images Are Weirdly Mesmerising". Wired. Retrieved 2015-07-25. 
  12. ^ Nguyen, Anh; Dosovitskiy, Alexey; Yosinski, Jason; Brox, Thomas (2016). Synthesizing the preferred inputs for neurons in neural networks via deep generator networks. arxiv. arXiv:1605.09304 . 
  13. ^ Arora, Sanjeev; Liang, Yingyu; Tengyu, Ma (2016). Why are deep nets reversible: A simple theory, with implications for training. arxiv. arXiv:1511.05653 . 
  14. ^ LaFrance, Adrienne. "When Robots Hallucinate". The Atlantic. Retrieved 24 September 2015. 

External linksEdit