Scientists have built neural networks from DNA molecules that can recognise handwritten numbers, a common task in deep learning, according to a paper published in Nature on Wednesday.

It’s pretty easy for traditional convolutional neural networks. Now, scientists are testing wackier models on the MNIST database of training images, like one network modeled on moth brains or made out of DNA. Researchers at the California Institute of Technology have strung together nucleotides to create molecular logic gates.

“Humans each have over 80 billion neurons in the brain, with which they make highly sophisticated decisions. Smaller animals such as roundworms can make simpler decisions using just a few hundred neurons," said Lulu Qian, co-author of the paper and an assistant professor in bioengineering at Caltech.

“In this work, we have designed and created biochemical circuits that function like a small network of neurons to classify molecular information substantially more complex than previously possible."

The images of handwritten digits are encoded as patterns. Each pattern is made up of 20 distinct DNA molecules that trace out a number from one to nine chosen from a set of 100 that represent the 100 bits in each 10 x 10 grid. The special 20 DNA molecules represent ‘1’, and the other 80 making up the background are ‘0’.

The neural network has been trained on recognize what pattern of zeroes and ones correlate to a specific digit. It inspects the input pattern pixel by pixel and compares it to a set of stored patterns it learns during training.

In more traditional neural networks, an input and output of the system is a string of numbers. But in DNA-based ones, the input and output are a strand of molecules. Here, the number crunching process carried out by computations is replaced with chemical reactions in a test tube.

Bits to neurons

"A single-stranded DNA molecule with just the right sequence of nucleotides can bind to another double-stranded DNA molecule that has a single-stranded tail. Once grabbed onto the tail, it can force the nucleotides in the double strands to open up, one nucleotide at a time, until the previously bound strand is released," Qian explained to The Register.

"The invading strand can be seen as an input signal while the released strand an output signal, resulting in a simple input-output function. Once released, the output strand can then take on a different role as an input to interact with yet another double-stranded DNA molecule, leading to a network of molecular interactions that compute more complex input-output functions."

It's all a little mind-boggling, but these chemical reactions continue until you reach the final output. The reactions are equivalent to a neuron firing, if the neural network recognizes a number, it'll flash a fluorescent signal. The color of the light is associated with a particular digit. For example, a green and yellow light corresponds to the recognizing a number five, a green and red light represents the number nine.

Get a grip, literally: Clumsy robots can't nab humans' jobs just yet READ MORE

Different DNA-based neural networks with various nucleotide sequences are trained to recognize a specific number. The chemical reactions take hours to complete so they're much slower than traditional computational neural networks.

"As one example, the network that classifies ‘6’s and ‘7’s has a theoretical classification accuracy of 98 per cent on the digits in the MNIST database. Realistically, based on simulations and our understanding of the DNA molecules’ performance, we believe the network is capable of classifying 90% of all ‘6’ and ‘7’ digits in the MNIST database," Kevin Cherry, first author of the paper and graduate student at Caltech, told El Reg.

"We experimentally tested and correctly classified 36 ‘6’s and ‘7’s. As the number of memories increases or the memories become more similar to each other, the task becomes more challenging and the network's classification performance decreases."

He said the work was a proof of concept, and opens up the possibility for exploring AI using "molecular machines". These types of networks will be highly specialized for biological environments.

"For example, one day a DNA-based neural network may be used to detect a patient’s blood glucose level, or a number of other molecules, and immediately respond by releasing an appropriate amount of insulin – all without human intervention," Cherry said. ®