London: Making it difficult to reserve your thoughts, Scientists claim to have invented a new computer programme that can disclose what a person is thinking.

According to the Stanford University scientists, their invention raises the prospect of infallible lie detector tests while the interpretation of intentions could allow security agencies to nab criminals before they break the law.

Peering in the brain, they said, could also make it easier to diagnose Alzheimer’s disease, schizophrenia and other conditions, reports said.

The scientists began by scanning the brains of 14 volunteers as they did one of four tasks: sung songs silently to themselves; recalled the day's events; counted backwards; or simply relaxed.

The patterns of brain activity associated with each task were then teased out by computer programmes that compared scans from several different people doing the same thing.

Once the computer had learnt the key patterns for each task, it was given the scans of ten new volunteers and was 85 per cent accurate in working out what they were thinking about, the researchers found.

Training the computer recognising lots of patterns would allow it to eavesdrop on people's inner-thoughts, they said.

"In some dystopian future, you might imagine reference patterns for 10,000 mental states, but that would be a woeful application of this technology," said Michael Greicius who led the study.

And how much detail the brain scans would show remains to be seen, he added. Speaking about the invention, John Duncan of the Medical Research Council in Cambridge said, "There would be a pretty coarse limit on what you could distinguish."

Kay Brodersen of the Swiss Federal Research Institute in Zurich said, "You might be able to tell if someone is singing to themselves."But try to distinguish a Lady Gaga song from another and you would probably fail.

"The most important potential use for this is in the clinic, where classifying, diagnosing and treating psychiatric disease could be really important. At the moment, psychiatry is often just trial and error."