Table of Contents
Fetching ...

A Self-supervised Learning Method for Raman Spectroscopy based on Masked Autoencoders

Pengju Ren, Ri-gui Zhou, Yaochong Li

TL;DR

The paper tackles the scarcity of labeled Raman spectra by introducing SMAE, a self-supervised masked autoencoder that learns spectral representations from unlabeled data. SMAE pretrains a Transformer-based encoder–decoder via random spectral patch masking and reconstructs the original spectrum, yielding denoised features that enhance downstream classification with limited labels. The approach achieves strong results, including denoising that doubles SNR on a breast cancer spectral dataset and unsupervised clustering accuracy above 80% for 30 pathogenic bacteria, while the fine-tuned model reaches 83.90% test accuracy on pathogens, competitive with a supervised ResNet at 83.40%. These findings demonstrate effective feature extraction from unlabeled spectra, reduce reliance on labeled data, and suggest broad applicability to other one-dimensional spectral data, with potential impact on rapid, label-free spectral analysis in biology and medicine.

Abstract

Raman spectroscopy serves as a powerful and reliable tool for analyzing the chemical information of substances. The integration of Raman spectroscopy with deep learning methods enables rapid qualitative and quantitative analysis of materials. Most existing approaches adopt supervised learning methods. Although supervised learning has achieved satisfactory accuracy in spectral analysis, it is still constrained by costly and limited well-annotated spectral datasets for training. When spectral annotation is challenging or the amount of annotated data is insufficient, the performance of supervised learning in spectral material identification declines. In order to address the challenge of feature extraction from unannotated spectra, we propose a self-supervised learning paradigm for Raman Spectroscopy based on a Masked AutoEncoder, termed SMAE. SMAE does not require any spectral annotations during pre-training. By randomly masking and then reconstructing the spectral information, the model learns essential spectral features. The reconstructed spectra exhibit certain denoising properties, improving the signal-to-noise ratio (SNR) by more than twofold. Utilizing the network weights obtained from masked pre-training, SMAE achieves clustering accuracy of over 80% for 30 classes of isolated bacteria in a pathogenic bacterial dataset, demonstrating significant improvements compared to classical unsupervised methods and other state-of-the-art deep clustering methods. After fine-tuning the network with a limited amount of annotated data, SMAE achieves an identification accuracy of 83.90% on the test set, presenting competitive performance against the supervised ResNet (83.40%).

A Self-supervised Learning Method for Raman Spectroscopy based on Masked Autoencoders

TL;DR

The paper tackles the scarcity of labeled Raman spectra by introducing SMAE, a self-supervised masked autoencoder that learns spectral representations from unlabeled data. SMAE pretrains a Transformer-based encoder–decoder via random spectral patch masking and reconstructs the original spectrum, yielding denoised features that enhance downstream classification with limited labels. The approach achieves strong results, including denoising that doubles SNR on a breast cancer spectral dataset and unsupervised clustering accuracy above 80% for 30 pathogenic bacteria, while the fine-tuned model reaches 83.90% test accuracy on pathogens, competitive with a supervised ResNet at 83.40%. These findings demonstrate effective feature extraction from unlabeled spectra, reduce reliance on labeled data, and suggest broad applicability to other one-dimensional spectral data, with potential impact on rapid, label-free spectral analysis in biology and medicine.

Abstract

Raman spectroscopy serves as a powerful and reliable tool for analyzing the chemical information of substances. The integration of Raman spectroscopy with deep learning methods enables rapid qualitative and quantitative analysis of materials. Most existing approaches adopt supervised learning methods. Although supervised learning has achieved satisfactory accuracy in spectral analysis, it is still constrained by costly and limited well-annotated spectral datasets for training. When spectral annotation is challenging or the amount of annotated data is insufficient, the performance of supervised learning in spectral material identification declines. In order to address the challenge of feature extraction from unannotated spectra, we propose a self-supervised learning paradigm for Raman Spectroscopy based on a Masked AutoEncoder, termed SMAE. SMAE does not require any spectral annotations during pre-training. By randomly masking and then reconstructing the spectral information, the model learns essential spectral features. The reconstructed spectra exhibit certain denoising properties, improving the signal-to-noise ratio (SNR) by more than twofold. Utilizing the network weights obtained from masked pre-training, SMAE achieves clustering accuracy of over 80% for 30 classes of isolated bacteria in a pathogenic bacterial dataset, demonstrating significant improvements compared to classical unsupervised methods and other state-of-the-art deep clustering methods. After fine-tuning the network with a limited amount of annotated data, SMAE achieves an identification accuracy of 83.90% on the test set, presenting competitive performance against the supervised ResNet (83.40%).

Paper Structure

This paper contains 19 sections, 10 figures, 5 tables.

Figures (10)

  • Figure 1: Workflow of the SMAE. (a): Flowchart of the Raman spectrum masked self-supervised learning pre-training phase; (b): Training of the pathogen bacterial classifier using a limited amount of labeled data with shared autoencoder weights; (c): Basic structural block of the multi-head self-attention mechanism in the encoder and decoder.
  • Figure 2: (a) Comparison of spectral differences among 30 species of pathogenic bacteria; (b) Comparison of high and low SNR of spectra in the MDA-MB-231 dataset.
  • Figure 3: The Bacteria-ID test spectral data, the left, middle, and right columns represent the original spectral plots, masked spectral plots, and reconstructed spectral plots, respectively.
  • Figure 4: Comparison of denoising performance of SMAE for three randomly selected test spectra.
  • Figure 5: Clustering comparison diagram for unsupervised learning, where (a), (b), (c), (d) and (e) represent PCA, t-SNE, UMAP, SOM, and SMAE, respectively.
  • ...and 5 more figures