Scientists are working on a computer program which could study the pain of an individual. – AP Photo

Can a computer tell when it hurts? It can if you train it, US researchers said on Tuesday.

A team at Stanford University in California used computer learning software to sort through data generated by brain scans and detect when people were in pain.

“The question we were trying to answer was can we use neuro-imaging to objectively detect whether a person is in a state of pain or not. The answer was yes,” Dr. Sean Mackey of the Stanford University School of Medicine in California, whose study appears in the journal PLoS One.

Currently, doctors rely on patients to tell them whether or not they are in pain. And that is still the gold standard for assessing pain, Mackey said.

But some patients -- the very young, the very old, dementia patients or those who are not conscious -- cannot say if they are hurting, and that has led to a long search for some way to objectively measure pain.

“People have been looking for a pain detector for a very long time,” Mackey said. “We’re hopeful we can eventually use this technology for better detection and better treatment of chronic pain.”

For the study, Mackey’s team used a linear support vector machine -- a computer algorithm invented in 1995 -- to classify patterns of brain activity and determine whether or not someone is experiencing pain.

To train the computer, eight volunteers underwent brain scans while they were touched first by an object that was hot, and then by one that was so hot it was painful.

The computer used data from these scans to recognize different brain activity patterns that occur when a person is detecting heat, and which ones detect pain.

In tests the computer was more than 80 percent accurate in detecting which brain scans were of people in pain, and it was just as accurate at ruling out those who were not in pain.

Mackey cautioned that the study was done in a very controlled lab environment, and it did not look at the differences between chronic and acute pain.

More than 100 million Americans suffer chronic pain, and treating them costs around $600 billion each year in medical expenses and lost productivity, the Institute of Medicine, one of the National Academy of Sciences, reported in June.

Opinion

Editorial

Sustainable path?
Updated 13 Jun, 2026

Sustainable path?

The FY27 budget is the first clear signal that the government is ready to transition from stabilisation to growth.
Prioritising education
13 Jun, 2026

Prioritising education

THOUGH the improvement in the country’s literacy rate may be slight, as highlighted by the Economic Survey, it ...
Poverty’s rise
13 Jun, 2026

Poverty’s rise

AS attention turns to the government’s plans for the coming fiscal year, one set of figures deserves particular...
A difficult story
Updated 12 Jun, 2026

A difficult story

Unless productivity becomes the dominant target of economic policy, Pakistan will continue to oscillate between crises and fragile recovery.
Rough waters
12 Jun, 2026

Rough waters

AMONGST the key potential triggers for fresh conflict in South Asia is water. The Indian state is behaving in an...
Politicised football
12 Jun, 2026

Politicised football

ALMOST three-and-half years since Lionel Messi led Argentina to FIFA World Cup glory, the latest edition of...