This AI could hold the key to decoding human intelligence

The subject of intelligence remains contentious. But can artificial intelligence help us understand the brain in entirely new ways?

In January 2015, Romy Lorenz met up with her two supervisors for coffee to discuss her research. She was almost halfway through her PhD programme, but wasn't having any success with her experiments. She needed to figure out how to get her research back on track.

When Lorenz, a softly spoken 29-year-old with blue eyes and straight blonde hair, joined Imperial College London's Computational, Cognitive and Clinical Neuroimaging Laboratory in June 2013, she and her supervisor, neuroscientist Rob Leech, agreed on a PhD topic. "It involved creating real-time neurofeedback," Lorenz recalls. "We could have patients inside brain scanners and tell them how to change the activity in different parts of their brain based on what we saw in scans."

Read more: How scientists are manipulating the mind with VR

To accomplish this, Leech and Lorenz settled on reprogramming Minecraft to adapt to the player's brain activity. "It was my daughter's favourite game at the time," Leech says. In October 2014, Lorenz asked volunteers to roam around the game's pixelated worlds while confined inside an MRI scanner on the Hammersmith campus in west London. The game was shown on a screen hanging before them and they controlled their avatars by pushing buttons on two circular handsets.

The neurofeedback experiment involved a basic program that was intended to decode the brain scans and brighten or dim the lighting in the game, depending on the player's brain state. If the player wasn't paying attention, the software was supposed to dim the light, forcing them to concentrate. Conversely, when the player was focused, the software would revert to a bright setting.

Lorenz's experiment attempted to dial up and down the activity of a particular region in the brain called the default mode network, which links part of the cerebral cortex to deeper areas, such as the hippocampus, and is most active when we are not concentrating.

The experiment, however, failed. "I was not expecting my first experiment to work," Lorenz says." But now I was halfway into my PhD and my original topic didn't seem promising. I realised that I needed to be creative."

When Lorenz and Leech met her second supervisor, neuroscientist Aldo Faisal, in January, they needed to discuss how best to proceed. "Aldo is not from the field of fMRI [functional magnetic resonance imaging]," Lorenz recalls. "So while trying to explain to him something about how the experiments are conducted in fMRI scanners and what techniques were available to control the real-time fMRI, we had an epiphany." What if they turned the experiment on its head? What if, instead of trying to create a feedback loop with one parameter - light - they automatically explored combinations of many different parameters to drive the brain to any state they wanted? Such an experiment, however, would be far too complex for humans to control in real time. The corollary was inevitable: they had to use artificial intelligence to run the experiment. AI, of course, has found many uses in robotics, online recommender systems and honing web pages for political campaigns. The question now was: could artificial intelligence tackle neuroscience?

"With the Minecraft experiment we tried to tackle too many different new things," Lorenz says. "We tried a highly complex gaming environment and we tried to decode how different networks in the brain interact in real time. Basically, we took too many steps at once."

The lesson for her next experiment was clear: start simple. What Lorenz needed now was a well-understood problem to test her new idea. She decided to tackle the most studied regions in the brain: the visual and the auditory cortices. These are tuned to natural sights and sounds, from the proud gait of a swagger to the meaningful cadences of the human voice.

It's trivial for humans to figure out the combinations of sight and sounds needed to activate the auditory cortex and not the visual cortex, and vice versa - the latter can be done by pairing a blank screen with the vocal acrobatics of an opera singer, the latter by pairing video of the hurly burly of Tokyo's Shibuya crossing with the drone of a test tone. The AI machine however had to work this out for itself. "This experiment sounds boring," Lorenz says. "But the implications if it worked were huge."

An AI algorithm had to be able to play with these two levers to turn those two parts of the brain on and off: altering the complexity of visual stimuli, for instance, by varying the speed of a video clip of a teeming street scene; and altering auditory stimuli by making a man's voice more robotic with a vocoder.

Read more: Stunning 'AI brain scans' reveal what machines see as they learn new skills

Lorenz and Leech experimented with different AI algorithms - deep learning, neural networks - but none worked. In March 2015, with the help of a statistician from King's College London, Giovanni Montana, and aided by his PhD student Ricardo Pio Monti, Lorenz and Leech created an AI algorithm based on Bayesian Optimisation, a method named after the 18th-century Presbyterian minister Thomas Bayes. Bayes devised a systematic way of calculating, from an assumption about the way the world works, how the likelihood of something happening changes as new facts come to light. It is a way of calculating the validity of hypotheses based on prior knowledge. Bayes' approach was ideal to build artificial intelligences, which can actively search for the best answer or experiment.

In May, Lorenz asked a dozen of her colleagues to take a short stroll to her fMRI scanner once again. "The nice thing about real-time fMRI is that while the subject lies in the scanner you see immediately if the experiment works or not," Lorenz explains. "Rob and I just sat there and watched, holding our breath. We were super nervous."

When the first subject lay down inside the scanner, the machine, after a few somewhat scattershot attempts, suddenly picked up just the right combination of video and sound.

"We thought that maybe we were lucky," Lorenz says. "But for each new subject, it worked again and again." On average, the AI was finding the optimal stimuli after six minutes. Leech was ecstatic. "We realised how powerful the technique was," he says. They had created the first artificially intelligent scientist. They decided to call it the Automatic Neuroscientist.

Although science strives for objectivity, it's not immune to human bias. Our ability to spot patterns might be extraordinary but we also often see correlations that are illusory. In 2005, Stanford University professor John Ioannidis stunned his peers with a study bluntly entitled, "Why Most Published Research Findings Are False." It concluded that most of the results of most publications in science could not be reproduced independently. A decade later, it was reported that more than half of psychology studies could not be reproduced. This year, Ioannidis published a study which concluded that cognitive neuroscience was in an even worse state.

Of course, the brain's intertwined workings are not a straightforward subject to untangle. Neuroscientists have spent the past few decades scanning brains to find which circuits are turned on by specific human tasks. But progress has been uncertain. For instance, the pain circuit, the part of the brain that activates when we're hurt, is incredibly similar to the salience circuit, the area in the brain that reacts to objects or persons that stand out in a given context. Another region, the superior temporal sulcus, does all kinds of disparate jobs, from handling motion, processing speech and recognising faces.

That is, of course, if you believe these studies. Many such discoveries are made on small populations, weak statistics and flawed analysis. Some have not been reproduced, even with the same methods. Even if they have, many correlations wash away when scrutinised by bigger studies. A notorious example came to light in 2009 when the scan of a lifeless salmon showed enough brain activity to suggest that it was thinking. This was named the "dead salmon effect".

And even scientists, alas, are all too human. "Ultimately, we as humans are not unbiased enough," Lorenz remarks. After all, our brains were optimised for survival, not to do experiments.

When Lorenz first suggested using artificial intelligence to study the human brain, Leech was immediately struck by its implications for dealing with this looming crisis. Unlike human scientists, AI is relatively unbiased - and it can replicate findings.

"I had never thought about anything to do with that," Leech recalls. "But if Romy had only done whatever I said, we wouldn't have done it." Leech had studied philosophy as an undergraduate at the University of Cambridge and is an admirer of Paul Feyerabend, an Austrian philosopher who argued that if science is to make progress, "anything goes". And this - using artificial intelligence as a tool to understand human intelligence - was the ultimate example of "anything goes".

"We could turn the whole way we normally do science on its head," Leech says. After the success of the Automatic Neuroscientist, Leech mulled the possibilities for neuroscience and was bullish: "Let's Bayesian optimise everything!" In the months following their first successful experiment, Lorenz and Leech quickly realised that machines could potentially do more than dissect the brain's workings. They could be put to work in other ways, for example, designing clinical tests or figuring out how to stimulate the brain to tweak behaviour.

They knew that their Automatic Neuroscientist worked. Now they needed to challenge it, realise its potential. "After the first study, we wanted to do something that would excite the field and answer new questions," Lorenz says.

That challenge emerged from a conversation in autumn 2015, between Lorenz, Leech and their colleague, Adam Hampshire.

Hampshire had completed a doctorate with Adrian Owen, a pioneering neuroscientist who had caused a sensation in the late 90s when he used brain scanners to help unresponsive vegetative patients communicate, and with John Duncan, an IQ expert. During his PhD, Hampshire and Owen developed online cognitive tests to monitor rehabilitation after brain injury and to evaluate the effects of smart drugs. At the time, I was the science editor of The Daily Telegraph and gave them the idea to do an online test for readers to explore the effects on intelligence of age, gender, lifestyle and other factors.

Owen and Hampshire picked 12 cognitive tests that evaluated everything from memory to reasoning. Owen grandiosely dubbed them pillars of wisdom. The test that evaluates deductive reasoning, for instance, is called Odd One Out: to complete it, the testee needs to identify a shape that is logically different from a larger set.

As a whole, the pillars of wisdom were designed to test whether human intelligence can be measured by one parameter or several. "This idea dates to 1904, when psychologist Charles Spearman suggested that there was a general mental faculty, one underpinning all cognitive performance, now known as Spearman's hypothesis or 'g'," Hampshire says. If "g" is all we need to evaluate human intelligence, then tests such as Odd One Out are really just different ways to measure the same parameter: if you do well on one, you will do well on the other.

By the time the test went online in 2010, Owen and Hampshire had moved to Canada's University of Western Ontario. "The site broke, as thousands went on it immediately," Hampshire recalls.

Over four months, 110,000 people from around the world took the test. Once they sifted through more than a million data points, they came to a definite conclusion: intelligence could not be boiled down to a single factor. "When a wide range of cognitive tasks are measured, the variations in performance can only be explained with at least three distinct components: short-term memory; reasoning; and a verbal component," Hampshire says.

Hampshire and Owen wondered if these three factors corresponded to three completely different circuits in the brain, so they did a follow-up study, getting 16 people to take the pillar of wisdom tests on an fMRI scanner. They were right. "Tasks that tend to correlate weakly with each other in terms of performance also tend to activate different networks in the brain," Hampshire says. Deductive reasoning seemed to be related to lateral parts of the brain, in the frontal and parietal lobes. On the other hand, spatial working memory activated different areas, buried deep under the most posterior fold of the frontal lobe. "Based on this, we suggested that each brain network supported a different ability," Hampshire says. "This seemed like a obvious conclusion, given the results."

When Owen and Hampshire published their results in the journal Neuron in 2012, they began by declaring: "Few topics in psychology are as old or as controversial as the study of human intelligence." That was an understatement. Though some cognitive neuroscientists were convinced, many psychometric researchers were furious. A broadside published in the journal Intelligence grumbled that their results "depend on a number of assumptions and subjective decisions that, at best, allow for different interpretations". A researcher tweeted that it was "one of the worst papers of the past decade".

Their mass experiment's design was flawed, critics said: tens of thousands of people took part but were they truly representative? Why didn't they look for effects in the brain already shown to correlate with "g"? Why did they use circular logic, selecting tasks most likely to trigger different brain areas?

A few months after the backlash, Hampshire felt the urge to return to the UK. He was feeling stifled working under Owen, a neuroscientist who now boasted funding and a big reputation.

Hampshire set up his own lab in the same building as Rob Leech in June 2013, around the time that Romy Lorenz began her PhD. However, they only met that day in autumn 2015. Hampshire was still obsessed with understanding how the brain supports different aspects of intelligence. Although he hadn't agreed with the criticisms of the study, he wanted to run an improved version. "That study was limited in scope with respect to the number and variability of cognitive tasks that were used," Hampshire says.

When Hampshire heard Lorenz and Leech describe the Automatic Neuroscientist, he realised it could be a game changer. Leech said they could test one subject at the time, while the AI ran the experiment. Hampshire, however, misheard Leech and thought he was suggesting something more ambitious, involving thousands of subjects, experiments in parallel and multiple parameters. "He turned it into a higher conceptual thing, optimised to lots of people and with robust statistics," Lorenz says.

"There is an elegance to this crazy idea," says Hampshire. Human cognition "is an inhumanly hard problem to solve so we let a machine tackle it instead?"

In June 2016, Lorenz applied the Automatic Neuroscientist to a pilot version of Hampshire's 2012 brain imaging study. She dragooned 21 volunteers to explore 16 cognitive tests. The machine was then asked to find which brain circuits were activated by each task, including some from the 2012 Neuron paper. Within a few minutes, the AI picked tasks based on the difference in activation of the two brain networks identified by Hampshire's previous experiment, namely, deductive reasoning and spatial working memory. "It just zoomed in on the solution," says Leech.

Hampshire was not only "reassured" with these results, but he was surprised too. Many of the tasks they picked should have activated different circuits, according to reviews of earlier studies. Confirmation of two of the three circuits identified by the 2012 paper was "sheer, blind, luck".

One morning in May, the team repeated the experiment. Their Portuguese colleague Ines Violante gamely lay inside the maw of the scanner's great doughnut-shaped magnet. Minutes later, Lorenz shows me a graph of Violante's activity across different brain networks for each of the tests. It looks like one of Mark Rothko's colourful paintings. Red signifies when activity in one circuit is out of kilter with activity in another, and blue when they're linked.

There's a red lozenge at the bottom right. The lozenge means that two tests harnessed two independent circuits, deductive reasoning and spatial working memory. This replicates the results of the pilot "really nicely", smiles Leech.

Hampshire, Leech and Lorenz are now preparing to replicate the 2012 intelligence online study. "We want to develop an AI machine that can work out the major components of human intelligence, that is unbiased, with large amounts of data and by harnessing the ability to learn in an iterative manner," Hampshire says. Instead of the 12 tests used in the previous study, he is readying a battery of 60 tests. The test will be online and anyone can participate (see sidebar below).

Their machine-learning algorithm will harvest information on around 100 people at a time as, hopefully, thousands take part to chart performance across all 60 tasks. Then it will tinker with the tasks to hone a set where a good performance on one is no guide to performance on another. The Automatic Neuroscientist will be able to modify tests, in a way, designing its own experiments.

To convey the gist of what AI means for the quest to understand the brain, Leech likens it to playing Hangman, in which one person selects a secret word, and the other tries to identify the word by guessing it letter by letter.

Traditional brain scanning is akin to guessing the whole word at once: researchers decide on what to measure with a scanner in advance, record those data during a cognitive task, then "torture" the results with statistical packages until they confess with a correlation that fits their pet theory.

The AI approach is more like the real game, similar to testing a letter, seeing how it fits, then tweaking the hypothesis to home in on the answer.

The ramifications are broader. Leech believes AI can erase subjectivity from research, ranging from exploration, where hypotheses are poorly defined, to exploitation, where well-established hypotheses are refined. Of course, you still need people to devise prior hypotheses, write code, make assumptions, define the freedom to experiment, write up research papers and so on. But machines are faster than people, and more reliable. "Replication is built into the DNA of the method," says Leech. "It has very broad potential and could revolutionise the field. The Automatic Neuroscientist could blaze a trail for the automatic radiologist, the automatic psychologist and more."

On June 13 2017, Lorenz finished her doctorate, notching up 12 papers in journals. Lorenz remembers when, working on brain-computer interfaces to help paraplegics as a researcher at the Technical University of Berlin, she realised at a conference that her area of research hadn't made much progress. "All these labs were getting funding to help patient's lives, but the focus was on making small improvements in the algorithms," she says. "I felt frustrated. I can only be passionate if I see that something can bring real improvement." Four years later, she might have finally found something that will make a difference.

Take part in an AI human-intelligence test

The Imperial College London team has created Cognitron, the first artificial intelligence designed to survey human mental skills. Visit Cognitron and, after you have supplied a few personal details, it will design a series of brain-twisting tests lasting about 30 minutes an hour and tell you how well you did. For more details, click here.

Roger Highfield is the director of external affairs at the Science Museum Group. He wrote about the prospect of raising human IQ in WIRED 02.13

This article was originally published by WIRED UK