Raman Activity Investigation and Utilization of Psilocybin
Mingyu Sun, Xiaoyu Zhao, Fandi Kong, Jinsong Wang, Yunchang Lu, Liang Tong
Journal of Raman Spectroscopy March 19, 2026 Peer reviewed DOI: 10.1002/jrs.70133 via OpenAlex
Summary
A Raman spectroscopy-based method for the rapid and nondestructive identification of psilocybin in mushrooms has been developed, achieving high performance with an accuracy of 0.984 and an F1-score of 0.984. This approach addresses challenges posed by conventional methods that are often destructive or impractical for real-time applications. The study successfully combines spectral features with machine learning techniques to enhance detection capabilities, making it applicable for food safety monitoring and toxic mushroom screening.
Study at a glance
| Population | fresh and heat-treated Psilocybe cubensis mushroom samples |
|---|---|
| Key finding | The final Bagging-based model achieved high performance with an accuracy of 0.984 and strong stability under storage conditions. |
Abstract
ABSTRACT Accidental ingestion of psilocybin‐containing mushrooms can cause poisoning and hallucinations, making their rapid detection a public health priority. Conventional methods such as HPLC, GC–MS, LC–MS, TLC, CE, and ELISA provide sensitivity but are often destructive, time‐consuming, or impractical for real‐time applications. This study introduces a Raman spectroscopy–based approach for rapid, nondestructive identification of psilocybin. The molecular geometry of psilocybin was optimized using density functional theory (B3LYP/6‐31G(d,p)), and theoretical Raman spectra were generated to assign characteristic vibrational peaks, confirming its Raman activity. Experimental spectra of fresh and heat‐treated Psilocybe cubensis mushroom samples were collected, with peak alignment demonstrating good agreement with theoretical predictions, thus establishing psilocybin fingerprint features. For classification, raw and preprocessed spectra (MSC, SNV, 1st‐D, detrending) were evaluated. Among feature extraction methods (PCA, SPA, UVE, CARS), CARS yielded the most discriminative variables. An XGBoost model was developed and optimized via Bayesian tuning, while SMOTE addressed class imbalance. Furthermore, psilocybin fingerprint features were fused with CARS features to enhance interpretability and model robustness. Finally, a Bagging framework integrating XGBoost, KNN, SVM, and Decision Tree was implemented to improve generalization and noise resistance. The final Bagging‐based model achieved high performance (accuracy 0.984, F1‐score 0.984, ROC AUC 0.976), with strong stability under storage conditions. Overall, this study elucidates psilocybin's Raman spectral characteristics and establishes a machine learning–assisted detection model. The approach enables rapid, accurate, cost‐effective, and contamination‐free identification of psilocybin, with potential applications in food safety monitoring and on‐site toxic mushroom screening.