concept human in category deep learning

appears as: hums, human, The hum
Deep Learning with JavaScript: Neural networks in TensorFlow.js

This is an excerpt from Manning's book Deep Learning with JavaScript: Neural networks in TensorFlow.js.

We humans can perform this task in a split second: our brains’ genetic hardwiring and life experience give us the ability to do so. However, it is hard for any programmer, no matter how smart and experienced, to write an explicit set of rules in a programming language (the only practical way for humans to communicate with a computer) on how to accurately decide whether an image contains a human face. You can spend days poring over code that does arithmetic on the RGB (red-green-blue) values of pixels to detect elliptic contours that look like faces, eyes, and mouths, as well as devising heuristic rules on the geometric relations between the contours. But you will soon realize that such effort is laden with arbitrary choices of logic and parameters that are hard to justify. More importantly, it is hard to make it work well![2] Any heuristic you come up with is likely to fall short when facing the myriad variations that faces can present in real-life images, such as differences in the size, shape, and details of the face; facial expression; hairstyle; skin color; orientation; the presence or absence of partial obscuring; glasses; lighting conditions; objects in the background; and so on.

In the span of only a few years, deep learning has achieved tremendous breakthroughs in multiple tasks that have been historically thought of as extremely difficult for computers, especially in the area of machine perception—namely, extracting useful information from images, audio, video, and similar modalities of perceptual data with a sufficiently high accuracy. Given sufficient training data (in particular, labeled training data), it is now possible to extract from perceptual data almost anything that humans can extract, sometimes with an accuracy that exceeds that of humans. Hence, it is sometimes said that deep learning has largely “solved perception,” although this is true only for a fairly narrow definition of perception (see section 13.2.5 for the limitations of deep learning).

Neural networks do not see the world in the same way humans do

A risk we face when trying to understand deep learning is anthropomorphization—that is, the tendency to misinterpret deep neural networks as mimicking perception and cognition in humans. Anthropomorphizing deep neural networks is demonstrably wrong in a few regards. First, when humans perceive a sensory stimulus (such as an image with a girl’s face in it or an image with a toothbrush), they not only perceive the brightness and color patterns of the input but also extract the deeper and more important concepts represented by those superficial patterns (for example, the face of a young, female individual or a dental hygiene product, and the relation between the two). Deep neural networks, on the other hand, don’t work this way. When you’ve trained an image-captioning model to map images to text output, it is wrong to believe that the model understands the image in a human sense. In some cases, even the slightest departure from the sort of images present in the training data can cause the model to generate absurd captions (as in figure 13.2).

Figure 13.2. Failure of an image-captioning model trained with deep learning

In particular, the peculiar, nonhuman way in which deep neural networks process their inputs is highlighted by adversarial examples, which are samples purposefully designed to trick a machine-learning model into making classification mistakes. As we demonstrated by finding the maximally activating images for convnet filters in section 7.2, it’s possible to do gradient ascent in the input space to maximize the activation of a convnet filter. The idea can be extended to output probabilities, so we can perform gradient ascent in the input space to maximize the model’s predicted probability for any given output class. By taking a picture of a panda and adding a “gibbon gradient” to it, we can cause a model to misclassify the image as a gibbon (figure 13.3). This is despite the fact that the gibbon gradient is noise-like and small in magnitude, so that the resulting adversarial image looks indistinguishable from the original panda image to humans.

Figure 13.3. Adversarial example: changes imperceptible to human eyes can throw off a deep convnet’s classification result. See more discussion on adversarial attacks of deep neural networks at http://mng.bz/pyGz.

So, deep neural networks for computer vision don’t possess a real understanding of images—at least not in a human sense. Another area in which human learning stands in sharp contrast with deep learning is how the two types of learning generalize from a limited number of training examples. Deep neural networks can do what can be called local generalization. Figure 13.4 illustrates a scenario in which a deep neural network and a human are tasked to learn the boundary of a single class in a 2D parametric space by using only a small number of (say, eight) training examples. The human realizes that the shape of the class boundary should be smooth and the region should be connected, and quickly draws a single closed curve as the “guesstimated” boundary. A neural network, on the other hand, suffers from a lack of abstraction and prior knowledge. Therefore, it may end up with an ad hoc irregular boundary severely overfit to the few training samples. The trained model will generalize very poorly beyond the training samples. Adding more samples can help the neural network but is not always practically possible. The main problem is that the neural network is created from scratch, just for this particular problem. Unlike a human individual, it doesn’t have any prior knowledge to rely on and hence doesn’t know what to “expect.”[5] This is the fundamental reason behind a major limitation of current deep-learning algorithms: namely, a large number of human-labeled training data is usually required to train a deep neural network to decent generalization accuracy.