Brain makes decisions with same method used to break WW2 Enigma code

February 24, 2015

An Enigma machine at the Walker Library of the History of Human Imagination (credit: Michael Shadlen)

When making simple decisions, neurons in the brain apply the same statistical trick used by Alan Turing to help break Germany’s Enigma code during World War II, according to a new study in animals by researchers at Columbia University’s Mortimer B. Zuckerman Mind Brain Behavior Institute and Department of Neuroscience.

Results of the study were published Feb. 5 in Neuron.

As depicted in the film “The Imitation Game,” Alan Turing and his team of codebreakers devised the statistical technique to help them decipher German military messages encrypted with the Enigma machine.

(The technique today is called Wald’s sequential probability ratio test, after Columbia professor Abraham Wald, who independently developed the test to determine if batches of munitions should be shipped to the front or if they contained too many duds.)

Finding pairs of messages encrypted with the same Enigma settings was critical to unlocking the code. Turing’s statistical test, in essence, decided as efficiently as possible if any two messages were a pair.

The test evaluated corresponding pairs of letters from the two messages, aligned one above the other (in the film, codebreakers are often pictured doing this in the background, sliding messages around on grids). Although the letters themselves were gibberish, Turing realized that Enigma would preserve the matching probabilities of the original messages, as some letters are more common than others.

The codebreakers assigned values to aligned pairs of letters in the two messages. Unmatched pairs were given a negative value, matched pairs a positive value.

Starting at different points in the messages, the codebreakers began adding and subtracting (see video above). When the sum reached a positive or negative threshold, the two messages were deemed a pair from machines with the same setting, or not.

Neurons decode symbols for decisions

Neurons in the brains of rhesus monkeys do the same thing when faced with decisions, says Michael Shadlen, MD, PhD, professor of neuroscience at Columbia and an HHMI investigator.

In his study, Dr. Shadlen and co-first authors Shinichiro Kira, a former member of Dr. Shadlen’s lab and currently at Harvard Medical School, and Tianming Yang, of Shanghai Institutes for Biological Sciences, recorded the activity of neurons in the brains of two monkeys as they made a simple decision: look at a sequence of symbols on a computer screen, one after another, and whenever ready, choose between two spots for a reward.

To make the correct decision — the one that brought a reward — the monkeys had to weigh different clues encoded in the symbols that flashed onto the screen. Some of the eight symbols were unreliable clues about the reward’s location; others were more dependable.

And the monkeys had to think fast. Each symbol appeared for only 250 milliseconds.

As the monkeys watched the symbols, recordings of their neurons revealed how they came to a decision. Each symbol contributed a positive value (reward is in the left spot) or negative value (reward is in the right spot) to the accumulated evidence, which was represented in the neuron’s firing rate. More reliable symbols had a larger impact on the firing rate than less reliable symbols.

Just as in the Turing’s code breaking, once a positive or negative threshold was reached, the decision was deemed complete and the monkey indicated its choice.

Assuming that humans have the same capabilities—and that’s a good bet, says Dr. Shadlen—it means our brains are weighing probabilities and making rational decisions in very short periods of time. “It’s the basis of a very basic kind of rationality,” he says.

These types of decisions are mostly unconscious on our part. “They’re decisions like, ‘I’m going to pick up a book,’ or ‘I’m going to walk toward the left of the coffee table, not the right,’” Dr. Shadlen adds.

“We make lots of these decisions every day, and it turns out, we’re making them by using the laws of probability in a way that statisticians think is optimal.”

The work was supported by the National Institutes of Health and the Howard Hughes Medical Institute. S.K. was supported by a predoctoral fellowship from the Nakajima Foundation.


Abstract for A neural implementation of Wald’s Sequential Probability Ratio Test

Difficult decisions often require evaluation of samples of evidence acquired sequentially. A sensible strategy is to accumulate evidence, weighted by its reliability, until sufficient support is attained. An optimal statistical approach would accumulate evidence in units of logarithms of likelihood ratios (logLR) to a desired level. Studies of perceptual decisions suggest that the brain approximates an analogous procedure, but a direct test of accumulation, in units of logLR, to a threshold in units of cumulative logLR is lacking. We trained rhesus monkeys to make decisions based on a sequence of evanescent, visual cues assigned different logLR, hence different reliability. Firing rates of neurons in the lateral intraparietal area (LIP) reflected the accumulation of logLR and reached a stereotyped level before the monkeys committed to a decision. The monkeys’ choices and reaction times, including their variability, were explained by LIP activity in the context of accumulation of logLR to a threshold.