UBC researchers train computers to predict the next designer drugs

November 15, 2021

UBC researchers train computers to predict the next designer drugs. Unsplash.

Global law enforcement agencies are already using the new method

UBC researchers have trained computers to predict the next designer drugs before they are even on the market, technology that could save lives.

Law enforcement agencies are in a race to identify and regulate new versions of dangerous psychoactive drugs such as bath salts and synthetic opioids, even as clandestine chemists work to synthesize and distribute new molecules with the same psychoactive effects as classical drugs of abuse.

Identifying these so-called “legal highs” within seized pills or powders can take months, during which time thousands of people may have already used a new designer drug.

But new research is already helping law enforcement agencies around the world to cut identification time down from months to days, crucial in the race to identify and regulate new versions of dangerous psychoactive drugs.

“The vast majority of these designer drugs have never been tested in humans and are completely unregulated. They are a major public health concern to emergency departments across the world,” says UBC medical student Dr. Michael Skinnider, who completed the research as a doctoral student at UBC’s Michael Smith Laboratories.

A Minority Report for new designer drugs

Dr. Skinnider and his colleagues used a database of known psychoactive substances contributed by forensic laboratories around the world to train an artificial intelligence algorithm on the structures of these drugs. The algorithm they used, known as a deep neural network, is inspired by the structure and function of the human brain.

Based on this training, the model then generated about 8.9 million potential designer drugs.

These molecules were then tested against 196 new designer drugs that emerged on the illicit market after the model was trained. The researchers found more than 90 per cent were present in the generated set.

In other words, the model was able to predict nearly all of the new drugs discovered since it was trained.

“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,” explains senior author Dr. David Wishart (he/him), a professor of computing science at the University of Alberta.

“Essentially, our software gives law enforcement agencies and public health programs a head start on the clandestine chemists, and lets them know what to be on the lookout for.”

Identification in days instead of months

This still left the problem of how to easily identify completely unknown substances.

The researchers found the model had also learned which molecules were more likely to appear on the market, and which were less likely.

“We wondered whether we could use this probability to determine what an unknown drug is—based solely on its mass—which is easy for a chemist to measure for any pill or powder using mass spectrometry,” says Dr. Leonard Foster (he/him), a professor in the department of biochemistry at UBC and an internationally recognized expert on mass spectrometry.

The researchers tested this hypothesis using each of the 196 new designer drugs. Using only the mass, the researchers found their model ranked the correct chemical structure of an unidentified designer drug among the top 10 candidates 72 per cent of the time. Integrating tandem mass spectrometry data, another easily obtained measurement, improved this to 86 per cent. When it came to just one guess, the model could predict the correct structure 51 per cent of the time.

“It was shocking to us that the model performed this well, because elucidating entire chemical structures from just an accurate mass measurement is generally thought to be an unsolvable problem. And narrowing down a list of billions of structures to a set of 10 candidates could massively accelerate the pace at which new designer drugs can be identified by chemists,” notes Dr. Skinnider.

The same kind of model could be used to discover all kinds of new molecules, adds Dr. Skinnider, from identifying new performance-enhancing drugs for athletic doping, to identifying previously unknown molecules in human blood and urine.

“There is an entire world of chemical ‘dark matter’ just beyond our fingertips right now. I think there is a huge opportunity for the right AI tools to shine a light on this unknown chemical world,” says Dr. Skinnider.

Distributed securely by the Novel Psychoactive Substance Data Hub, the UBC model is being used by the US Drug Enforcement Agency, the United Nations Office of Drugs and Crime, the European Monitoring Centre of Drugs and Drug Addiction, and Federal Criminal Police Office of Germany.

The study ‘A deep generative model enables automated structure elucidation of novel psychoactive substances’ was published today in Nature Machine Intelligence.


  • Biology
  • Chemistry

Musqueam First Nation land acknowledegement

We honour xwməθkwəy̓ əm (Musqueam) on whose ancestral, unceded territory UBC Vancouver is situated. UBC Science is committed to building meaningful relationships with Indigenous peoples so we can advance Reconciliation and ensure traditional ways of knowing enrich our teaching and research.

Learn more: Musqueam First Nation

Faculty of Science

Office of the Dean, Earth Sciences Building
2178–2207 Main Mall
Vancouver, BC Canada
V6T 1Z4
UBC Crest The official logo of the University of British Columbia. Urgent Message An exclamation mark in a speech bubble. Arrow An arrow indicating direction. Arrow in Circle An arrow indicating direction. A bookmark An ribbon to indicate a special marker. Calendar A calendar. Caret An arrowhead indicating direction. Time A clock. Chats Two speech clouds. External link An arrow pointing up and to the right. Facebook The logo for the Facebook social media service. A Facemask The medical facemask. Information The letter 'i' in a circle. Instagram The logo for the Instagram social media service. Linkedin The logo for the LinkedIn social media service. Lock, closed A closed padlock. Lock, open An open padlock. Location Pin A map location pin. Mail An envelope. Mask A protective face mask. Menu Three horizontal lines indicating a menu. Minus A minus sign. Money A money bill. Telephone An antique telephone. Plus A plus symbol indicating more or the ability to add. RSS Curved lines indicating information transfer. Search A magnifying glass. Arrow indicating share action A directional arrow. Spotify The logo for the Spotify music streaming service. Twitter The logo for the Twitter social media service. Youtube The logo for the YouTube video sharing service.