Scientists in China are conducting a world-first clinical trial of deep brain stimulation (DBS) on drug addicts, in the hope that the technology will extinguish addiction, quite literally, with the flip of a switch.

Scientists in Europe have struggled to recruit patients for their DBS addiction studies, and complex ethical, social and scientific questions have made it hard to push forward with this kind of work in the United States, where the devices can cost US$100,000 ($140,000) to implant.

China — which has a long and troubled history of brain surgery on drug addicts — is emerging as a hub for this kind of research.

Punitive anti-drug laws can force addicts into years of compulsory treatment, including "rehabilitation" through labour.

The country now has a large patient population, government funding and ambitious medical device companies ready to pay for DBS research.

Risks included dying of a brain haemorrhage or emerging with seizures, an infection or changes to his personality. And in the end, he may go right back on drugs.

The surgeon, Dr Li Dianyou, drilled through Mr Yan's skull and threaded two electrodes down to his nucleus accumbens, a small structure near the base of the forebrain that has been implicated in addiction.

Later that day, he went under general anaesthesia for a second surgery to implant a battery pack in his chest to power the electrodes in his skull.

As the electrodes activated in Mr Yan's brain, he felt a surge of excitement.

Dr Li used a tablet computer to remotely adjust the machine thrumming inside Mr Yan's head, making the patient feel agitated or cheerful with a tweak of the settings.

"This machine is pretty magical. He adjusts it to make you happy and you're happy, to make you nervous and you're nervous," Mr Yan said.

"They are human beings. You cannot say, 'Oh, we do not have any help, any treatment for you guys'."

Dr Sun has tried to turn Ruijin into a centre of DBS research, not just for addiction, but also Tourette syndrome, depression and anorexia.

Some critics believe this surgery should not be allowed, arguing that such human experiments are premature and will not address the complex biological, social and psychological factors that drive addiction.

Scientists don't fully understand how DBS works and there is still debate about where electrodes should be placed.

There is also scepticism in the global scientific community about the general quality and ethical rigour — particularly around issues like informed consent — of clinical trials done in China.

"It would be fantastic if there were something where we could flip a switch, but it's probably fanciful at this stage," said Adrian Carter, who heads the neuroscience and society group at Monash University in Melbourne.

There are eight registered DBS clinical trials for drug addiction being conducted in the world, according to a US National Institutes of Health database. Six are in China.

But the suffering wrought by the opioid epidemic may be changing the risk-reward calculus for doctors and regulators in the United States: In February, the US Food and Drug Administration greenlighted a clinical trial in West Virginia of DBS for opioid addicts.