Novel psychoactive substances (NPS) – designer drugs like ‘bath salts’ and synthetic opioids – are a scourge of our times. Law enforcement agencies that try to control them and medics who treat their consequences are locked in a cat-and-mouse game with clandestine chemists who quickly devise new compounds, typically by modifying known molecules, to skirt the law and create new ‘legal highs’. Authorities see more than a dozen new designer drugs every month, and identifying their structures can take many weeks using techniques like nuclear magnetic resonance, by which time they may have already been used by thousands of people.

Now a new artificial intelligence system could change the game. Dubbed DarkNPS, it’s based on a recurrent neural network that can accurately predict NPS structures from their mass spectra alone. The process is relatively quick, taking just a few days, and that could give medics an edge in their battle against new designer drugs, and give law enforcement agencies a faster way to deal with them.

‘The goal is to automate, at least partially, full structure elucidation,’ says computational biochemist Michael Skinnider of the University of British Columbia in Canada, the lead author of a new study describing DarkNPS.1 ‘You’d have a pill or powder that contains some unknown compound, and you’d acquire mass spectrometer data for it – and then you’d use this system to basically tell you what the structure is.’

Skinnider and his colleagues trained DarkNPS on a dataset of 1753 NPS structures in the HighResNPS database, which is updated by forensic laboratories around the world as new substances are identified in biological samples and from law enforcement seizures.

The researchers then used DarkNPS to generate the structures of roughly 8.9 million potential designer drugs from the training dataset, and validated it on 194 drugs added to the database in the last few months since the training dataset was finalised. They found that more than 90% of the structures of the new drugs were in the set generated by DarkNPS. They also found that DarkNPS ranked the correct structure of the new drugs among its top 10 candidates 72% of the time based on mass spectrometry data alone, and that its success rate could be boosted to 86% by adding data from tandem mass spectrometry.

Forewarned is forearmed

‘The fact that we can predict what designer drugs are likely to emerge on the market before they actually appear is a bit like the 2002 sci-fi movie Minority Report, where foreknowledge about criminal activities about to take place helped significantly reduce crime in a future world,’ says David Wishart of the University of Alberta in Edmonton, the study’s senior author, in a statement.

Being able to quickly identify the structures of new designer drugs could help make them illegal faster, but Skinnider sees the greatest use for the DarkNPS system in public health responses and emergency medical treatments for their unpredictable effects. Knowing the structure of a NPS goes a long way in treating it effects. ‘If you were to say this molecule is similar to a benzodiazepine, for example, then you’d know that in an emergency department you should manage an intoxication with this pill or powder in the same way that we manage intoxication with other benzodiazepines,’ he says.

The method could also be used for other types of substances – the researchers are working on a system to detect new performance-enhancing drugs used in sports, for example. ‘We’re basically trying to make a parallel system for designer doping – for detecting new synthetic chemicals that might be used by elite athletes and that can’t be detected by current methods,’ Skinnider says.

Pharmacist Amira Guirguis of Swansea University, UK, who studies the detection of novel psychoactive substances2 but was not involved in the research, says the authors are ‘on the right path’ towards an unresolved and complex issue. ‘Detection and structural elucidation of emerging and novel NPS are inherently challenging due to the continuous emergence of these molecules, wide chemical diversity [and] closely related structural analogues, which are difficult to discriminate using conventional analytical techniques,’ she says.

Psychiatrist Derek Tracy, a member of the Home Office’s Advisory Council on the Misuse of Drugs who spoke to Chemistry World in a personal capacity, says DarkNPS could help medics treat the harms of designer drugs. ‘Anything that could speed this process up and help better identify the chemical structure and potential impact of [a] drug on human physiology offers up the possibility of more rapid care that could be life-saving,’ he says. ‘A key question will be if and how this could be translated to clinical settings,’ he says.