In an article recently published in the journal Inventions, researchers investigated the feasibility of using deep convolutional neural network (DCNN)-based approaches for the effective detection and discrimination of synthetic cannabinoids based on attenuated total reflectance Fourier-transform infrared (ATR-FTIR) spectra.
Background
The growing proliferation of synthetic cannabinoids and other designer drugs has become a major risk to global security and health, increasing the importance of developing robust methodologies and tools to achieve reliable and fast screening and detection of these compounds.
Infrared (IR) spectroscopy, specifically the ATR-FTIR technique, can be used effectively to identify substances of abuse. Compatibility with spectral databases, high selectivity and sensitivity, adaptability to field testing, non-destructive testing, rapid analysis, and minimal sample preparation make this technique suitable for the reliable and swift identification of illicit substances.
However, using only conventional analysis methods is insufficient as the evolving structures and extensive variety of synthetic cannabinoids lead to complex spectral signatures. Artificial intelligence (AI), specifically deep learning (DL), can increase drug identification efficiency and accuracy using ATR-FTIR spectra to address this issue.
DCNN models are tailored for computer vision and image processing tasks owing to their intrinsic ability to process spatial hierarchies within data. Convolutional autoencoders (CAEs) are primarily a standard autoencoder variant and incorporate convolutional layers in place of fully connected layers, making them suitable for representation learning and dimensionality reduction in different tasks.
The convolutional layers enable these autoencoders to exploit the spatial structures and hierarchies in image data, enabling them to encode image-specific patterns more efficiently. Transformers utilize self-attention mechanisms to assign weights to input features to yield state-of-the-art results across different natural language processing (NLP) tasks.
The proposed approach
In this study, researchers developed two DCNN frameworks and assessed their performance for the detection and discrimination between different categories of designer drugs, including synthetic cannabinoids, of forensic importance. Although the multinomial classification architectures based on ATR-FTIR spectra were primarily tailored to identify synthetic cannabinoids accurately, they can also effectively detect other misused prescription medications and forensically significant drugs.
The AI models developed in this study used two platforms, including a structure derived from the vision transformer trained on ImageNet competition data (ViT-B/32) model (matDETECT Vision Transformer DCNN model) and a custom-designed, pre-trained CAE (matDETECT_FTIR DCNN model).
Several loss functions, including focal loss and cross-entropy, and optimization algorithms, including root mean square propagation, sign stochastic gradient descent, stochastic gradient descent, and adaptive moment estimation, were evaluated and tested at differing learning rates to compare and refine the models.
Researchers displayed the effectiveness of innovative transfer learning methods, which integrate both supervised and unsupervised techniques with spectroscopic data pre-processing such as ATR correction, smoothing, and normalization, in training AI systems on imbalanced, limited datasets.
Additionally, the strategic CAE deployment, coupled with synthetic sample generation using the synthetic minority oversampling technique (SMOTE) and class weights and data augmentation, effectively overcame the challenges posed by such datasets. The custom-designed DCNN combined with a pre-trained specially designed CAE/matDETECT_FTIR DCNN and the matDETECT Vision Transformer DCNN architectures were refined using the Python v. 3.11.5 and the Wolfram Mathematica v. 13.2 programming platforms.
Each model offered unique features, which made them suitable for different image processing tasks. Standalone, non-clustered Dell G15 5520 platforms equipped with a 12th Gen Intel® Core™ i7-12700H processor consisting of 20 threads, 14 cores, and operating at up to 4.540 GHz with Turbo Boost technology were used for the computational experiments.
The ATR-FTIR spectra utilized in this study were sourced from pyDETECT-FTIR DATABASE, which included information retrieved from public, open-access spectral libraries and experimentally acquired data. Every sample in the database has undergone independent and external validation through proper analytical methods.
Experimental evaluation and findings
Researchers used advanced analytical tools embedded within the Wolfram Mathematica v. 13.2 software suite to perform a quantitative evaluation of the constructed AI architectures matDETECT_FTIR DCNN and matDETECT Vision Transformer DCNN. These tools generated a comprehensive suite of metrics or measurements, representing a robust platform to evaluate and contrast different features of the models.
The measurements encompassed several elements, including sensitivity and 1-recall, kappa coefficient, error rate, macro-F1 score, specificity, loss, precision and 1-precision, and accuracy, providing a greater insight into the effectiveness of the two DCNN models in classifying and distinguishing synthetic cannabinoids and other predominant designer drugs.
The matDETECT Vision Transformer model demonstrated a marginally superior accuracy, enhanced specificity, superior sensitivity, marginally reduced error rate, higher kappa coefficient, and lesser loss compared to the matDETECT_FTIR model. The matDETECT_FTIR model displayed a greater precision compared to the matDETECT Vision Transformer model. Both models had similar macro-F1 scores, indicating a harmonized equilibrium between recall and precision. Overall, both DCNN frameworks developed and deployed in this study showed a better performance compared to several contemporary DCNNs used in the literature across most of the assessed metrics.
Thus, both models can be effectively used as reliable alternatives for the classification and discernment of synthetic cannabinoids and other analogous synthetic narcotics, with the matDETECT Vision Transformer model being more suitable due to its higher sensitivity and specificity and reduced error rate. Additionally, these models can also be utilized for other computer vision tasks, including image classification and object detection.
Journal reference:
- Burlacu, C. M., Burlacu, A. C., Praisler, M., Paraschiv, C. (2023). Harnessing Deep Convolutional Neural Networks Detecting Synthetic Cannabinoids: A Hybrid Learning Strategy for Handling Class Imbalances in Limited Datasets. Inventions, 8(5), 129. https://doi.org/10.3390/inventions8050129, https://www.mdpi.com/2411-5134/8/5/129