RESUMEN
Raman spectroscopy has become an important single-cell analysis tool for monitoring biochemical changes at the cellular level. However, Raman spectral data, typically presented as continuous data with high-dimensional characteristics, is distinct from discrete sequences, which limits the application of deep learning-based algorithms in data analysis due to the lack of discretization. Herein, a model called fragment-fusion transformer is proposed, which integrates the discrete fragmentation of continuous spectra based on their intrinsic characteristics with the extraction of intrafragment features and the fusion of interfragment features. The model integrates the intrinsic feature-based fragmentation of spectra with transformer, constructing the fragment transformer block for feature extraction within fragments. Interfragment information is combined through the pyramid design structure to improve the model's receptive field and fully exploit the spectral properties. During the pyramidal fusion process, the information gain of the final extracted features in the spectrum has been enhanced by a factor of 9.24 compared to the feature extraction stage within the fragment, and the information entropy has been enhanced by a factor of 13. The fragment-fusion transformer achieved a spectral recognition accuracy of 94.5%, which is 4% higher compared to the method without fragmentation and fusion processes on the test set of cell Raman spectroscopy identification experiments. In comparison to common spectral classification models such as KNN, SVM, logistic regression, and CNN, fragment-fusion transformer has achieved 4.4% higher accuracy than the best-performing CNN model. Fragment-fusion transformer method has the potential to serve as a general framework for discretization in the field of continuous spectral data analysis and as a research tool for analyzing the intrinsic information within spectra.