Expert Algorithm Devised for Mass Spectrometry Identification of Cocaine


Researchers at West Virginia University introduce an algorithm which, in combination with binary classifiers, enables accurate and specific identification of cocaine in mass spectra from various laboratories, outperforming traditional approaches.

In a study published in the Journal of the American Society for Mass Spectrometry, the creation of an algorithm named EASI (Expert Algorithm for Substance Identification) was described as a means of identifying suspected cocaine (1). Scientists from West Virginia University wrote that the method surpasses traditional techniques by combining general linear modeling (GLM) and binary classifiers.

Substance abuse using cocaine | Image Credit: © robtek -

Substance abuse using cocaine | Image Credit: © robtek -

For their experiment, the researchers used a training set of 128 replicate cocaine spectra from one crime laboratory as the foundation for GLM, proceeding to apply those models to the 20 most abundant fragments of cocaine (1). This method was subsequently tested on 175 additional cocaine spectra from various crime laboratories and 716 known negative spectra, including 10 spectra of three diastereomers of cocaine.

To evaluate the accuracy and reliability of EASI, the team used conventional measures—among them the mean absolute residual and the National Institute of Standards and Technology (NIST)’s spectral similarity score—to assess similarity or dissimilarity of the spectra between measured and predicted abundances (1). GLM predictions were then made and compared to the traditional exemplar approach, which relies on the average of the cocaine training set as the consensus spectrum for comparisons.

The unsupervised models using EASI achieved a true positive rate of over 95% for cocaine identification, with a false positive rate of 0% (1). Moreover, a supervised binary logistic regression model utilizing EASI-predicted abundances, of just four peaks at m/z 152, 198, 272, and 303, achieved 100% accuracy and reported no errors.

Regardless of the measure of spectral similarity used, the researchers found that the error rates, or lack thereof, for identifications using EASI consistently outperformed the traditional exemplar/consensus approach, indicating that EASI’s potential to analyze mass spectra could be more reliable than conventional methods such as Mahalanobis distances (1).

The researchers went on to discuss further implications for this algorithm within the field of forensic science, because the approach not only showed promise to enhance identification of cocaine in crime laboratories, but also to perhaps streamline the overall process, allowing investigators to analyze complex samples confidently and efficiently (1). By providing highly accurate results with minimal error rates, EASI could have the potential to significantly impact forensic investigations that require substance identification.

EASI’s demonstrated precision and reliability, at least in this experiment, point to its applications in conjunction with mass spectrometry in other scientific and industrial fields such as quality control, pharmaceutical research, and environmental monitoring, according to the authors (1). Moreover, the success of EASI in this case showcased the power of combining GLM and binary classifiers, leveraging the combination of the two to surpass the accuracy of traditional methods and opening doors for deployment in other areas of research and data analysis.

As technology continues to advance and the scientific community embraces and refines advanced algorithms like EASI, collaborations between researchers from different domains, for instance chemistry, computer science, or data analysis, will determine how far such algorithms will go in terms of how broadly they may be applied and how impactful they might be.


(1) Mehnert, S.A.; Davidson, J.T.; Adeoye, A.; et al. Expert Algorithm for Substance Identification Using Mass Spectrometry: Application to the Identification of Cocaine on Different Instruments Using Binary Classification Models. J. Am. Soc. Mass Spectrom. 2023, 34 (7), 1235–1247. DOI: 10.1021/jasms.3c00090

Related Videos
Toby Astill | Image Credit: © Thermo Fisher Scientific
John McLean | Image Credit: © Aaron Acevedo
Related Content