# Transformer-Based Classification of Bacterial Raman Spectra with LOOCV

arXiv: https://arxiv.org/abs/2606.27096 · HTML: https://mlsanity.com/paper/2606.27096/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 0 of its 9 references that are in the map.
- First posted on arXiv 25 Jun 2026.

## Abstract (arXiv)

Transformer-based models have recently attracted increasing attention for Raman spectral classification. In this study, a transformer-based approach was systematically evaluated using a nested leave-one-replicate-out cross-validation framework and compared with conventional machine-learning pipelines combining PCA or ICA with LDA, SVM, and Random Forest classifiers. A bacterial Raman dataset comprising 5,417 single-cell spectra from six bacterial species and nine independent measurement replicates was used. The transformer consistently achieved the highest classification performance across independent test replicates and significantly outperformed all conventional approaches. Analysis of the learned latent feature space revealed improved class separation compared with PCA- and ICA-based representations. Furthermore, the transformer maintained superior performance when applied directly to raw Raman spectra without preprocessing, demonstrating robust behavior across measurement replicates. These findings highlight the potential of transformer-based models for robust Raman spectral classification and emphasize the importance of replicate-aware validation for realistic model evaluation.
