**1. Introduction**

Amphetamines are a class of psychotropic compounds that became popular in recent decades for their stimulant, euphoric, and hallucinogenic effects. In recent decades, many such new psychotropic substances have emerged in the black market [1]. Among these, three important groups of hallucinogenic amphetamines have been noticed in recent years, i.e., 2C-x, DOx, and NBOMe amphetamines.

The 2C-x class of drugs owes its name to Alexander Shulgin and refers to the two carbon atoms that bind the amino group to the benzene ring [2]. The compounds included in the DOx class of hallucinogenic amphetamines are characterized by the presence of methoxy groups in the phenyl ring at the 2 and 5 positions, and a substituent at the 4-position of the phenyl ring [3]. The NBOMe amphetamines, which are analogs of the 2C-x drugs, emerged in the early 2000s when they were first synthesized [4,5].

Cannabinoids are a class of drugs similar in structure to the chemical compounds found in the natural products of *Cannabis sativa*. With the accessibility of cannabinoids expanding, especially of synthetic ones, public concern about these compounds is rising [6].

**Citation:** Darie, I.-F.; Anton, S.R.; Praisler, M. Machine Learning Systems Detecting Illicit Drugs Based on Their ATR-FTIR Spectra. *Inventions* **2023**, *8*, 56. https:// doi.org/10.3390/inventions8020056

Academic Editor: Cristian Manzoni

Received: 7 December 2022 Revised: 6 February 2023 Accepted: 6 March 2023 Published: 13 March 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

19

Opioids represent a class of drugs of abuse with important effects for the treatment of pain, used in a medical but also in an illicit scope [7,8].

Such illicit drugs constantly emerging in the black market represent a current problem of our days. From this point of view, it is important to develop models which can be able to automatically detect the class membership of these new compounds.

#### **2. Related Work**

Machine learning and statistical methods have been successfully applied to detect various types of drugs. Pereira et al. [9] applied PCA followed by PLS-DA (Partial Least Squares Discriminant Analysis) and ATR-FTIR spectra to identify the presence of different illegal drugs in seized ecstasy tablets. In a recent study [10], Koshute et al. developed a machine-learning model based on various techniques, such as random forests, neural networks, or logistic regression, in order to identify fentanyl analogs based on mass spectra. Lee et al. [11] developed machine learning models applied to LC-MS-MS (High-Resolution Liquid Chromatography Mass Spectrometry) in order to identify unknown controlled substances and new psychoactive substances (NPS). For this purpose, Artificial Neural Networks (ANN), Support Vector Machine (SVM), and K-Nearest Neighbors (KNN) models were developed for the classification of 13 subgroups, including the 2C series, opiates, and classical cannabinoids. Wong et al. [12] analyzed the detection of some novel psychoactive substances based on Gas Chromatography–Mass Spectrometry (GC-MS). In this scope, three machine learning models were applied, namely ANN, Convolutional Neural Networks (CNN) and Balanced Random Forest (BRF).

The aim of our study is to develop a machine learning system that can be used for the detection of various drugs of abuse, namely 2C-x, DOx, and NBOMe amphetamines, opioids, and cannabinoids, based on their ATR-FTIR (Attenuated Total Reflectance–Fourier-Transform Infrared Spectroscopy) spectra.
