Developing an Integrated Toolbox for Raman Spectral Analysis with Both Artificial Neural Networks and Machine Learning Algorithms

Xiangtao Kong, Jie Xu, Guodi Fan, Zixuan Zhang, Qidong Liu, Haorui An, Shuang WangMolecules 2026 · DOI

TL;DR

This paper introduces "AI-Raman," an integrated MATLAB toolbox that streamlines Raman spectral analysis by combining traditional machine learning algorithms with advanced artificial neural networks. The toolbox aims to simplify the process of extracting quantitative information from complex biological samples, demonstrated here by predicting blood glucose levels non-invasively.

What Problem Does This Paper Address?

Raman spectroscopy holds immense promise for in vivo biomedical investigations due to its label-free and non-destructive nature. However, extracting precise quantitative data from Raman spectra is challenging. Two major hurdles are:

  1. Fluorescence Interference: Endogenous fluorophores in biological samples can emit strong signals that overlap with and mask the weaker Raman signals, making it difficult to identify target analytes.
  2. Matrix Effects: The complex composition of biological tissues (e.g., water, lipids, proteins) can distort Raman peaks, further reducing the accuracy of quantitative measurements.

While various strategies exist to mitigate these issues (like SERS, advanced baseline correction, and multivariate data analysis), the analysis of Raman spectral data, especially from complex biomedical samples, remains fragmented. There's a lack of a unified platform that integrates spectral preprocessing, model training, and evaluation. This gap hinders the practical clinical translation of Raman spectroscopy.

Methods

The core contribution of this paper is the development of the AI-Assisted Raman Spectra Analysis Toolbox (AI-Raman), built in MATLAB R2022a. This toolbox offers a user-friendly graphical interface to handle the entire Raman spectral analysis workflow, from data preprocessing to model deployment.

Key features and methodologies include:

  • Integrated Workflow: The toolbox seamlessly integrates data loading, spectral preprocessing, data augmentation, machine learning model training, model evaluation, and prediction.
  • Diverse Algorithms: It supports a range of algorithms:
  • Artificial Neural Networks (ANNs): * Convolutional Neural Network (CNN): Leverages convolutional and pooling layers for automatic feature extraction, particularly beneficial for high-dimensional data.
  • Multi-Layer Perceptron (MLP) with Backpropagation: A more traditional ANN structure that requires manual feature extraction.
  • Classical Machine Learning: * Partial Least Squares Regression (PLSR): Integrates multiple regression techniques to handle multicollinearity in spectral data.
  • Support Vector Regression (SVR): Utilizes kernel functions to establish relationships between input features and output targets, offering robustness.
  • Preprocessing Capabilities: Includes wavelength interpolation, data segmentation, background subtraction (e.g., polynomial fitting), peak smoothing (Savitzky-Golay), and optional area normalization.
  • Data Augmentation: Implements standard deviation shift to increase dataset size, crucial for deep learning models like CNNs.
  • Model Interpretability: While not fully implemented in this version, future work aims to integrate modules for visualizing critical spectral regions and quantifying contributions, enhancing trust in the models.

Datasets

The dataset used for evaluation in this study consists of in vivo Raman spectral measurements from human nailfold.

  • Core Dataset: A subset of 75 high-quality spectra was selected, covering a glucose concentration range of 82.8–180 mg/dL. This subset was chosen to demonstrate the toolbox's ability to handle small-sample scenarios.
  • Volunteer Information: The data was collected from 15 healthy volunteers (aged 20-25), screened to exclude metabolic diseases.
  • Reference Values: Blood glucose concentrations were measured using a Roche ACCU-CHEK Instant fingerstick meter.

The paper notes that while this dataset was used for functional validation, existing high-performance studies often use larger datasets (≥500 samples) and more specialized preprocessing.

Key Insights and Ideas

  • Unified Platform is Crucial: The fragmented nature of current Raman spectral analysis tools is a significant bottleneck. A single, integrated toolbox like AI-Raman can dramatically accelerate research and development by simplifying the workflow.
  • Algorithm Choice Matters: The paper highlights that for raw spectral data without manual feature extraction, CNNs tend to outperform MLPs, PLSR, and SVR due to their inherent feature extraction capabilities. However, when data is preprocessed and features are extracted manually, the performance gap narrows, and simpler algorithms like PLSR and SVR become more competitive and easier to tune.
  • Overfitting is a Real Challenge: The study observed overfitting issues, particularly with SVR and PLSR, leading to poor performance on test and prediction sets. This underscores the need for careful parameter tuning and potentially more advanced regularization techniques.
  • Accessibility is Key: Developing the toolbox in MATLAB and aiming for broad accessibility by running on standard desktop computers (without requiring specialized hardware like GPUs) is a significant advantage for researchers.

Key Results

The AI-Raman toolbox was tested using the nailfold Raman spectral dataset to predict blood glucose concentrations.

  • CNN Performance: On the prediction set, the trained CNN model achieved an RMSE of 1.3962 mmol/L and an R² of 0.2186. The authors note this indicates a large error and limited generalization ability, potentially due to the low signal-to-noise ratio of the data.
  • MLP (Backpropagation) Performance: The MLP model on the prediction set resulted in an RMSE of 2.6967 mmol/L and an R² of -1.9155.
  • PLSR Performance: The PLSR model showed an RMSE of 2.0051 mmol/L and an R² of -0.9399 on the test set.
  • SVR Performance: SVR models (linear and Gaussian kernels) showed varying results, with the Gaussian kernel achieving an R² of 0.8924 on the training set but exhibiting overfitting with an R² of -1.0319 on the test set.

While the predictive performance on this specific dataset was not state-of-the-art, the primary goal was to demonstrate the toolbox's functional feasibility and end-to-end workflow capabilities.

Limitations and Future Work

  • Data Quality and Size: The study acknowledges that the negative R² values and large RMSEs observed are likely due to data constraints, specifically the small sample size and high in vivo spectral noise. The toolbox's integrated models are expected to perform significantly better with larger, higher-quality datasets.
  • Overfitting: The paper explicitly mentions overfitting as a challenge that requires further processing and structural improvements, particularly for neural networks.
  • Model Interpretability: While the current version focuses on core functionality, future versions are planned to integrate advanced interpretability modules (e.g., relevance maps, coefficient plots) to enhance understanding and trust in the models, especially for regulated biomedical scenarios.
  • Algorithm Enhancement: The authors suggest that improving the signal-to-noise ratio of spectral data, selecting more appropriate preprocessing methods, and optimizing learning parameters through cross-validation are crucial for achieving better predictive models.

Summary updated

Abstract

Based on its rich information of chemical specificity, Raman spectroscopy has been widely applied for in vivo biomedical investigations. For extracting quantitative information of target constitution, it is imperative to establish a robust model for unveiling the relationship between spectral features with/without priori references. By integrating a variety of traditional machine learning and artificial neural network algorithms, an integrated Raman spectra analysis toolbox (AI-Assisted Raman Spectra Analysis Toolbox [AI-Raman] V 1.0) was developed for spectral processing, model training, and regression analysis by using MATLAB R2024a. Besides the utilization of back propagation artificial neural network and convolutional neural network algorithms, classical machine learning algorithms, such as partial least squares regression and support vector regression, were also compacted as the supporting functions of presented toolbox. A spectral dataset obtained from nailfold from different subjects was utilized to evaluated the feasibility and performance of the developed software, which demonstrated that the analysis software can predict glucose concentrations by in vivo Raman spectral measurement. With a friendly graphics interface, the analytical model can be customized and optimized for accomplishing the desired objectives, which will benefit many Raman-based inventions, especially for biomedical transformations.
BibTeX
@inproceedings{kong2026developing,
  author = {Xiangtao Kong and Jie XU and Guodi Fan and Zixuan Zhang and Qidong Liu and Haorui An and Shuang Wang},
  title = {{Developing an Integrated Toolbox for Raman Spectral Analysis with Both Artificial Neural Networks and Machine Learning Algorithms}},
  booktitle = {Molecules},
  year = {2026},
  doi = {10.3390/molecules31040666},
}
Figure