When he was asked, as a joke, to explain how the mind works in five words, cognitive scientist Steven Pinker didn't hesitate. "Brain cells fire in patterns", he replied. It's a good effort, but all it really does is replace one enigma with another mystery.  It’s long been known that brain cells communicate by firing electrical signals to each other, and we now have myriad technologies for recording their patterns of activity – from electrodes in the brain or on the scalp, to functional magnetic resonance scanners that can detect changes in blood oxygenation. But, having gathered these data, the meaning of these patterns is still an enduring mystery. They seem to dance to a tune we can't hear, led by rules we don't know.  Neuroscientists speak of the neural code, and have made some progress in cracking that code. They are figuring out some basic rules, such as when cells in specific parts of the brain are likely to light up depending on the task at hand. Progress has been slow, but in the last decade various research teams around the world have been pursuing a far more ambitious project. We may never be able to see the complete code book, they realised, but by trying to write our own entries, we can begin to pick apart the ways that different patterns correspond to different actions.  Albert Lee and Matthew Wilson, at the Massachusetts Institute of Technology (MIT) first helped to set out the principles in 2002. It progresses like this. First, we record from the brain of a rat – one of our closer relatives, in the grand tree of life – as it runs a maze. Studying the whole brain would be too ambitious, so we can focus our recording on an area known as the hippocampus, known to be important for navigation and memory. If you've heard of this area before it is probably because of a famous result which showed that London taxi drivers developed larger hippocampi the longer they had spent navigating the streets of England's sprawling capital.  While the rat runs the maze we record where it is, and simultaneously how the cells in the hippocampus are firing. The cell firing patterns are thrown into a mathematical algorithm which finds the pattern that best matches each bit of the maze. The language of the cells is no less complex, but now we have a Rosetta Stone against which we can decode it. We then test the algorithm by feeding it freshly recorded patterns, to see if it correctly predicts where the rat was at the point that pattern was recorded.  It doesn’t allow us to completely crack the code, because we still don't know all the rules, and it can’t help us read the patterns which aren't from this bit of the brain or which aren't about maze running, but it is still a powerful tool. For instance, using this technique, the team was able to show that the specific sequence of cell firing repeated in the brain of the rat when it slept after running the maze (and, as a crucial comparison, not in the sleep it had enjoyed before it had run the maze).  Fascinatingly, the sequence repeated faster during sleep – around 20 times faster. This meant that the rat could run the maze in their sleeping minds in a fraction of the time it took them in real life. This could be related to the mnemonic function of sleep; by replaying the memory, it might have helped the rat to consolidate its learning. And the fact that the replay was accelerated might give us a glimpse of the activity that lies behind sudden insights, or experiences where our life “flashes before our eyes”; when not restrained, our thoughts really can retrace familiar paths in “fast forward”. Subsequent work has shown that these maze patterns can run backwards as well as forwards - suggesting that the rats can imagine a goal, like the end of the maze, and work their way back from that to the point where they are.  One application of techniques like these, which are equal parts highly specialised measurement systems and fiercely complicated algorithms, has been to decode the brain activity in patients who are locked in or in a vegetative state. These patients can’t move any of their muscles, and yet they may still be mentally aware and able to hear people talking to them in the same room. First, the doctors ask the patients to imagine activities which are known to active specific brain regions – such as the hippocampus. The data is then decoded so that you know which brain activity corresponds to certain ideas. During future brain scans, the patients can then re-imagine the same activities to answer basic questions. For instance, they might be told to imagine playing tennis to answer yes and walking around their house to answer no – the first form of communication since their injury.  There are other applications, both theoretical science, to probe the inner workings of our minds, and practical domains such as brain-computer interfaces. If, in the future, a paraplegic wants to control a robot arm, or even another person, via a brain interface, then it will rely on the same techniques to decode information and translate it into action. Now the principles have been shown to work, the potential is staggering.  If you have an everyday psychological phenomenon you'd like to see written about in these columns please get in touch @tomstafford or ideas@idiolect.org.uk  If you would like to comment on this, or anything else you have seen on Future, head over to our Facebook or Google+ page, or message us on Twitter.
We are now beginning to crack the brain’s code, which allows us to answer such bizarre questions as “what is the speed of thought?”