Spiria logo.

The learning machine

May 18, 2017.
Google unveiled a new tool able to recognize and complete a drawing. This command performance is made possible thanks to neural networks and machine learning.

In the beginning, there was Chess

For the longest time, artificial intelligence was predicated on pouring terabytes of data into a computer, and equipping it with every possible scenario. This process is what led to the creation of Deep Blue, IBM’s chess-playing supercomputer of the mid-1990s.

To enable it to beat chess masters, Deep Blue was pre-fed every possible move and strategy under the sun. Thanks to its powerful processors and instant access to exhaustive information, Deep Blue was able to “figure out” all of its opponents’ strategies and beat them at their own game, or at worst, force a draw. 

The neural network

But Deep Blue’s limitations quickly became obvious. It took engineers years to individually program every possible chess strategy to create a database that Deep Blue could refer to faster than any human being. Though the result was impressive, it nevertheless remained a machine following defined, pre-programmed rules. This was a far cry from the adaptability and imagination that characterize human intelligence.

Artificial intelligence researchers are now working on updating an old concept, that of the neural network, allowing machines to learn by creating connections between things, just like the human brain. Now, machines can learn by recognizing images identified by humans: this is what a cat looks like, as opposed to a dog. Neural networks are created to identify basic characteristics like colours, shapes and textures. 

Crazy cat neural networks

As it “sees” ever more images of cats and dogs, the machine keeps creating new neural networks, allowing it to recognize basic shapes at first, then finer details like noses, whiskers and hairs. The machine constantly analyzes learned information, using it to differentiate and categorize things on its own, without human intervention. Cats are recognized and differentiated from dogs, and unknown species are recognized as such.

Google has invested heavily in artificial intelligence research, and especially in the neural network concept. Thanks to its Sketch-RNN (Recurrent Neural Network) platform, Google has demonstrated that a machine can learn to draw cats, among other things, after interpreting some 5 million cat drawings made by users of Google’s Quick, Draw! tool, available on-line since 2016. A masterstroke by Google, who used users’ contributions to… teach its own tool to draw and improve!

The artistic machine


Image 1.

Is Sketch-RNN a great master of the art of drawing? Not by any stretch. In fact, some would say that it draws about as well as a two-year-old. But even so, the tool is revolutionary, because the machine learned to produce an idea rather than dumbly reproduce lines drawn by humans. Image 1 clearly illustrates the gulf between the two concepts: when a smarty pants tried to fool the machine by drawing a cat with three eyes, Sketch-RNN didn’t fall for it, drawing on its “experience” to determine that such a thing is impossible.


Image 2.

Eventually, Sketch-RNN was able to produce its own drawings with no human intervention whatsoever (see image 2). And finally, Sketch-RNN was able to make predictions – valid and surprising ones! — about how to complete a drawing started by a human but left unfinished (see red lines in image 3). What is remarkable is that the machine was able to make decisions on its own: for example, human faces are roughly oval, owls have larger eyes, mosquitoes have two wings, etc.


Image 3. “The model can start with incomplete sketches (the red partial sketches to the left of the vertical line) and automatically generate different completions.”

Call a cat a cat

Experience has shown not only that the machine could recognize cats from rather rough sketches, but also that it could learn a cat’s characteristic traits, like whiskers, or two eyes. And the machine’s initiative in suggesting elements to complete the drawing could be termed… creativity!

Neural network learning is a promising field in that it mimics human intelligence. In other words, machines are starting to learn like humans do, i.e. in a non-linear manner, through “intuition” and unconscious assimilation. After all, our knowledge of cats doesn’t come just from children’s books, but from our experience with thousands of cats throughout our lives.


Artificial intelligence, can you draw me a sheep?