U.S. flag

An official website of the United States government, Department of Justice.

How Good Are the Data? Novel Metric Assesses Probability That an Unknown Drug Sample Matches a Known Sample

NIJ-funded researchers developed a novel metric to assess probability that an unknown sample of a drug matches a library sample, with profound implications for standardization of mass spectrometry results.
Date Published
March 17, 2022

There is a silent race happening right now, between those who create novel, potentially harmful substances and those who make the laws regarding the legality of these substances. Legal guidelines are dependent on even the most minor changes in the molecular structure of these types of compounds, including synthetic cannabinoids and drugs designed to mimic the effects of fentanyl (called “analogs”). We are witnessing a staggering rise in the appearance of novel psychoactive substances, with as many as 892 novel psychoactive substances emerging between 2009 and 2018, according to one estimate.[1]

The identification of seized drugs often relies on gas chromatography and mass spectrometry. Working together, these highly sensitive analytical techniques identify illicit substances by separating molecules and measuring their unique chemical mass. Seized samples are complex, often containing adulterants, or substances that interfere with the unique chemical signature of the substance. Generally, gas chromatography-mass spectrometry can distinguish between the signals of the adulterant and the drug, and successfully identify both substances.

Although the detection of compounds of specific forensic interest relies heavily on the principles of analytical chemistry, the interpretation of mass spectral data is very similar to data interpretation in the pattern sciences (fingerprint, shoe print, and blood patterns in particular). Generally, for seized drug identification purposes, an analyst compares samples to an established library, relying on subjective pattern recognition methodologies. Mass spectral library searches generate a “hit list” of potential matches, but do not provide any information about the quality of the search, in terms of probability or likelihood of being a match.[2]

In light of the proliferation of novel psychoactive substances, as well as opioids and opiates, researchers sought to create an objective quantitative metric for the identification of seized drugs. This metric could estimate the amount of variation found within the mass spectra and the likelihood of being a match to a reference library sample’s spectrum. The focus of the research was to establish a minimum threshold, to determine if a library match can be successfully applied in light of this variability.

Purpose: Create an Objective Quality Metric

There is a growing need for specific threshold guidelines to determine the minimum mass spectral data quality necessary for confident and consistent comparison to existing libraries, especially in the area of novel substances such as synthetic opioids.

To address the rising need, NIJ-funded researchers from the Houston Forensic Science Center analyzed samples and information regarding adulterants, background noise, sample variation, and sample concentration to create a quantitative threshold. The threshold allows an analyst to determine if the sample being examined is of sufficient quality, or if the library samples are adequate for comparison and identification purposes.

This study had three main objectives:

  • Create a library of controlled substances, including 16 opioids and four adulterants of varying dilutions, as a tool for analysis.
  • Characterize the amount of variation found in samples of the same substance by using mathematical models and statistics based on the library.
  • Develop a model that represents the amount of variation found in a sample (due to dilutions, adulterants, and interference), create confidence intervals, and validate the model.

Study Findings: Highly Accurate Quality Metric

After establishing the appropriate correction for background noise, the researchers calculated the most effective Quantitative Reliability Metric, referred to here as “the metric.” The metric would be 100% if the library provided a matching spectrum, and would generate a low score if the search were unreliable. Researchers then tested the performance of their metric using a robust training dataset, and validated the metric using a separate dataset from known forensic case files and lab generated mixtures of standards and adulterants.

They found that:

  • Out of 165 gas chromatography/mass spectrometry spectra analyzed in the validation dataset, the correct drug was ranked in the hit list as the top hit, except for one.
  • After multiple stages of refinement, the metric was improved to include both similarity and dissimilarity metrics on a uniform scale and applied to the custom mass spectral library search for opioids.
  • The development of the baseline correction and data processing techniques proved invaluable for detection, background removal, and library search optimization.


Although the research was promising, there were a handful of cases where results were not optimal. Specifically, the metric was weak when there was:

  • Similar mass spectral patterning. For example, methadone was misidentified as promethazine, due to close similarity in mass spectral fragmentation patterns between the substances.
  • Mixing. The researchers processed a mix containing 16 reference standards at varying concentrations, rendering it difficult to select the identifying ions arising from each opioid. (It should be noted, encountering 16 opioids mixed into one sample would be exceedingly rare.)
  • Distortion. The metric may give incorrect estimates when the mass spectrum is distorted (due to peak skewing) to the point that it resembles another spectrum in the library, possibly resulting in false positives.
  • Low sample concentration. At low concentrations, the metric may have a low value but may also simultaneously be the highest match for all the possible spectra in the hit list, and thus lead to incorrect identification.

Practice Implications and Recommendations for Further Research

The forensic community has moved toward a standardization of disciplines, with the goal of strengthening forensic science through the development of nationalized standards and guidelines.

To that end, the researchers were successful in their goal to develop a model to determine the probability that a substance was correctly identified for a given mass spectrum search against a library. They subsequently refined their metric to provide an independent sufficiency standard for each library search result.

Results from this study suggest that the metric is a valuable empirical tool that can provide an independent measure of the quality of each library search result, or seized drug analysis, which can be adapted by other laboratories and applied across multiple disciplines. The metric could help establish minimum sample criteria, and serve as a model for the nationalization of quality standards in library searches. This would undoubtedly increase the reliability of substance identification, as well as consistency across time, analysts, and even other labs.

Future work could improve upon the peak detection for overlapping peaks caused by compounds with the same molecular formula but different arrangement of atoms (isomeric compounds). The researchers also recommend the use of advanced deep learning methods (i.e., artificial intelligence using computer simulations to model the data) to recognize novel synthetic drugs that are not contained in the reference library by recognition of portions of the drug molecule. The development of a reverse search algorithm that is resistant to spurious peaks in the mass spectrum of the query sample could prove useful as well. The novel metric used in this study creates an objective measure of the goodness of the match between a seized drug and the comparative library, will assist in novel drug identification, and will likely make it easier for judges and juries to understand and assess analyses presented in courts of law.

About This Article

The work described in this article was supported by NIJ award number 2018-DU-BX-0184, awarded to the Houston Forensic Science Center, Inc.

This article is based on the grantee report “Establishing Sufficiency Thresholds for Assessing the Quality of Mass Spectral Data” (pdf, 36 pages), by Preshious Rearden, Ph.D., Houston Forensic Science Center, Inc.

Date Published: March 17, 2022