SERS spectral analysis method and system based on CNN-SE-LASSO fusion model
By combining 1D CNN and SE attention module with LASSO regression model to form CNN-SE-LASSO fusion model, the problems of sample scarcity and noise interference in accurate quantitative analysis of SERS spectroscopy are solved, realizing high-precision trace substance detection, which is suitable for food safety and environmental monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI NORMAL UNIVERSITY
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-17
AI Technical Summary
Existing SERS spectroscopy technology faces challenges in accurate quantitative analysis, including limited sample size, poor generalization ability, severe noise interference, and insufficient nonlinear modeling capabilities. In particular, high-quality labeled samples are scarce in the low-concentration range, resulting in insufficient model robustness and generalization ability.
A CNN-SE-LASSO fusion model is constructed by combining a one-dimensional convolutional neural network (1D CNN) with an SE attention module and a LASSO regression model. Through feature extraction and feature selection, the robustness and accuracy of the model are improved.
It achieves high-precision quantitative detection of concentrations under limited sample conditions, improves the model's generalization ability and interpretability, and is applicable to trace substance analysis in fields such as food safety, environmental monitoring, and biomedical diagnostics.
Smart Images

Figure CN121877845A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of spectral analysis, specifically to a SERS spectral analysis method and system based on a CNN-SE-LASSO fusion model. Background Technology
[0002] Surface-enhanced Raman scattering (SERS) technology has been widely used in trace substance analysis in fields such as food safety, environmental monitoring, and biomedical diagnostics due to its high sensitivity, molecular fingerprint specificity, and rapid detection capabilities. However, it still faces a series of unresolved technical challenges in precise quantitative analysis, which constitute the main obstacles for SERS technology to move from qualitative discrimination to high-precision quantitative analysis.
[0003] To improve the performance of SERS spectral quantitative analysis, existing technologies mainly employ two strategies: one is based on traditional chemometrics methods, which involves modeling the preprocessed spectral data; the other is deep learning methods, represented by convolutional neural networks (CNNs), which automatically extract local spectral features to build an end-to-end regression model. However, traditional methods rely on manual feature engineering, resulting in limited generalization ability; while ordinary deep learning models can automatically learn features, they are susceptible to interference from redundant channels when processing high-dimensional spectral data and lack sensitivity to key frequency bands, leading to poor model robustness.
[0004] Furthermore, SERS spectral data typically have limited sample sizes, especially in the low-concentration range, where high-quality labeled samples are scarce, making it prone to overfitting when directly training deep neural networks. Although some studies have attempted to alleviate this problem by introducing data augmentation or regularization techniques, they lack modeling at the level of feature importance selection and fail to fully explore Raman shift regions strongly correlated with concentration in limited samples, thus limiting the practical effectiveness of models in scenarios with scarce samples.
[0005] A literature search of existing technologies revealed that Chinese patent CN121117398A proposes a SERS statistical quantitative analysis method and system based on signal-to-noise ratio regulation. By using multiple signal-to-noise ratio standards to identify characteristic peaks in the original spectral dataset, the effective detection range is expanded. However, this method binarizes the intensity of characteristic peak signals and requires spatial scanning, which takes a long time and has poor generalization ability.
[0006] To address the aforementioned issues, there is an urgent need for a quantitative analysis method that can effectively extract nonlinear discriminant information from SERS spectra while also achieving feature simplification and physical interpretability. This method would solve the problem of how to construct a predictive model with both generalization ability and stability under limited sample conditions. Summary of the Invention
[0007] In view of the deficiencies in the prior art, the purpose of this application is to provide a SERS spectral analysis method and system based on the CNN-SE-LASSO fusion model.
[0008] According to one aspect of this application, a SERS spectral analysis method based on a CNN-SE-LASSO fusion model is provided, comprising: Collect SERS spectral datasets of standard samples with known concentrations; The SERS spectral dataset is preprocessed and augmented to obtain an augmented SERS spectral dataset; A 1D CNN-SE feature extraction network was constructed based on a one-dimensional convolutional neural network and an SE attention module, and the 1D CNN-SE feature extraction network was trained using the enhanced SERS spectral dataset. The trained 1D CNN-SE feature extraction network is used to extract features from the enhanced SERS spectral dataset to obtain the corresponding spectral feature set. Construct a LASSO regression model and train the LASSO regression model using the aforementioned spectral feature set; The trained LASSO regression model is connected to the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. The concentration quantitative detection results of the sample to be tested are obtained using the CNN-SE-LASSO fusion model.
[0009] Optionally, the SERS spectral dataset of standard samples with known concentrations includes: Select standard samples of known types and concentrations, and collect the SERS spectral signals of each standard sample. Construct a SERS spectral dataset from the SERS spectral signals of all standard samples. The SERS spectral dataset includes the SERS spectral signals and their corresponding concentration labels.
[0010] Optionally, the preprocessing and data augmentation of the SERS spectral dataset to obtain an enhanced SERS spectral dataset includes: Each SERS spectral signal in the SERS spectral dataset is preprocessed, including baseline correction, smoothing, and normalization, to obtain a standard SERS spectral dataset. The standard SERS spectral dataset is copied to obtain several copies of the SERS spectral dataset, and Gaussian noise is superimposed on each copy of the SERS spectral dataset. An enhanced SERS spectral dataset is constructed using a standard SERS spectral dataset without Gaussian noise and a copy of the SERS spectral dataset with Gaussian noise.
[0011] Optionally, the 1D CNN-SE feature extraction network includes several cascaded feature extraction units, each of which includes a one-dimensional convolutional layer, an SE attention module, and a one-dimensional max pooling layer connected in series. The one-dimensional convolutional layer is used to extract the initial feature map of the SERS spectral signal; The SE attention module is used to execute the channel attention mechanism, including: The compression operation involves performing global average pooling on each feature channel of the initial feature map output by the one-dimensional convolutional layer in the Raman shift dimension to generate a channel description vector representing each feature channel. The activation operation learns the nonlinear dependencies between channels and outputs a channel weight vector in the range [0,1]. The recalibration operation multiplies the channel weight vector with the initial feature map channel by channel to output the SE channel weighted feature map. The one-dimensional max pooling layer is used to reduce the dimensionality of the SE channel weighted feature map, and the dimensionality-reduced output is a set of spectral features.
[0012] Optionally, training the 1D CNN-SE feature extraction network using the enhanced SERS spectral dataset includes: A temporary regression prediction layer is constructed and connected in series with the output of the 1D CNN-SE feature extraction network to form a temporary regression model; The temporary regression model is iteratively trained using the enhanced SERS spectral dataset, with mean squared error as the loss function. The iteration stops when the change in the loss of the temporary regression model is less than a preset value or when a preset number of iterations is reached. The temporary regression prediction layer is discarded, and the trained 1D CNN-SE feature extraction network is retained.
[0013] Optionally, training the LASSO regression model using the spectral feature set includes: The spectral feature set and corresponding concentration labels output by the trained 1D CNN-SE feature extraction network are input into the LASSO regression model with L1 regularization. The optimal regularization parameter is selected using K-fold cross-validation. The LASSO regression model is trained under the optimal regularization parameter, retaining features with non-zero coefficients and removing the remaining features with zero coefficients to complete the training of the LASSO regression model.
[0014] Optionally, the equation of the LASSO regression model is: in, The objective function of the LASSO regression model; For coefficients Find the minimum value; n is the number of samples; y is the true concentration value; X is the input set of spectral features; The regression coefficients to be learned. Represents the L1 norm; Represents the L2 norm; This is the regularization parameter.
[0015] According to a second aspect of this application, a SERS spectral analysis system based on a CNN-SE-LASSO fusion model is provided, comprising: The acquisition module is used to acquire SERS spectral datasets of standard samples with known concentrations. The preprocessing module is used to preprocess the SERS spectral dataset to obtain an enhanced SERS spectral dataset; A network construction module provides a 1D CNN-SE feature extraction network, which is constructed based on a one-dimensional convolutional neural network and an SE attention module, and is used to train the 1D CNN-SE feature extraction network using the enhanced SERS spectral dataset; The spectral feature module is used to extract features from the enhanced SERS spectral dataset using the trained 1D CNN-SE feature extraction network to obtain the corresponding spectral feature set. The regression module provides a LASSO regression model, which is trained using the spectral feature set. The concentration detection module is used to input the trained LASSO regression model into the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. The concentration detection result of the sample to be tested is obtained using the CNN-SE-LASSO fusion model.
[0016] According to a third aspect of this application, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model described above.
[0017] According to a fourth aspect of this application, an electronic device is provided, comprising: At least one memory for storing program instructions; At least one processor is configured to call program instructions stored in the memory and execute the steps of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to the obtained program instructions.
[0018] This application presents a SERS spectral analysis method based on a CNN-SE-LASSO fusion model. It employs a one-dimensional convolutional neural network (1D CNN), an SE attention module, and a LASSO regression model. This method deeply integrates the local feature extraction capability of 1D CNN, the adaptive weighting capability of the SE channel attention mechanism, and the feature selection constraint advantages of the LASSO regression model, constructing a novel fusion model framework for quantitative SERS spectral analysis. The proposed novel fusion model framework is highly versatile, accurate, and interpretable, suitable for the rapid detection of various trace substances such as food additives, pesticide residues, illegal additives, environmental pollutants, and biotoxins, providing strong technical support for food safety and public health risk prevention and control.
[0019] Other technical effects resulting from the additional features will be further illustrated in the corresponding embodiments. Attached Figure Description
[0020] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic flowchart of a SERS spectral analysis method in one embodiment of this application; Figure 2 The following are the prediction results of the application examples and comparative examples of this application on the validation set and the test set; wherein, (a) is the error result of the 1D CNN model; (b) is the predicted concentration result of the 1D CNN model based on the validation set; (c) is the predicted concentration result of the 1D CNN model based on the test set; (d) is the error result of the 1D CNN-SE model; (e) is the predicted concentration result of the 1D CNN-SE model based on the validation set; (f) is the predicted concentration result of the 1D CNN-SE model based on the test set; (g) is the error result of the 1D CNN-SE-LASSO model; (h) is the predicted concentration result of the 1D CNN-SE-LASSO model based on the validation set; and (i) is the predicted concentration result of the 1D CNN-SE-LASSO model based on the test set. Figure 3 This is a schematic diagram of the structure of a SERS spectral analysis system in one embodiment of this application. Detailed Implementation
[0021] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all fall within the protection scope of the present application. Parts not described in detail in the following embodiments can be implemented using existing technology.
[0022] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations.
[0023] SERS technology has been widely used in trace substance analysis in fields such as food safety, environmental monitoring, and biomedical diagnostics. However, it still faces a series of unresolved technical challenges in accurate quantitative analysis. SERS spectral data usually have limited sample sizes, especially in the low concentration range, and high-quality labeled samples are scarce. It lacks modeling based on the importance of features and fails to fully explore the Raman shift regions that are strongly correlated with concentration in limited samples.
[0024] A literature search of existing technologies revealed Chinese patent CN121117398A, which proposes a SERS statistical quantitative analysis method and system based on signal-to-noise ratio (SNR) control. This method expands the effective detection range by employing multiple SNR standards to identify characteristic peaks in the original spectral dataset. However, this method still suffers from a scarcity of high-quality labeled samples and poor generalization ability. To overcome the shortcomings of existing SERS spectral quantitative analysis methods in terms of feature redundancy, noise interference, insufficient nonlinear modeling capabilities, and inadequate utilization of channel information, this application provides a SERS spectral analysis method based on a CNN-SE-LASSO fusion model to address the aforementioned problems.
[0025] Reference Figure 1 As shown, this application provides a SERS spectral analysis method based on a CNN-SE-LASSO fusion model, the method including: S1. Collect SERS spectral datasets of standard samples with known concentrations; S2. Preprocess and augment the SERS spectral dataset to obtain an augmented SERS spectral dataset; S3. Construct a 1D CNN-SE feature extraction network based on a one-dimensional convolutional neural network and an SE attention module, and train the 1D CNN-SE feature extraction network using an enhanced SERS spectral dataset; S4. Using the trained 1D CNN-SE feature extraction network, perform feature extraction on the enhanced SERS spectral dataset to obtain the corresponding spectral feature set; S5. Construct a LASSO regression model and train the LASSO regression model using a set of spectral features. S6. Connect the trained LASSO regression model to the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. Use the CNN-SE-LASSO fusion model to obtain the concentration quantitative detection results of the sample to be tested.
[0026] The embodiments described above employ a one-dimensional convolutional neural network (1D CNN), an SE attention module, and a LASSO regression model. This deeply integrates the local feature extraction capability of 1D CNN, the adaptive weighting capability of the SE channel attention mechanism, and the feature selection constraint advantages of the LASSO regression model, constructing a novel fusion model framework for SERS spectral quantitative analysis. The novel fusion model framework proposed in this application is highly versatile, accurate, and interpretable, suitable for the rapid detection of various trace substances such as food additives, pesticide residues, illegal additives, environmental pollutants, and biotoxins, providing strong technical support for food safety and public health risk prevention and control. The method proposed in this application extracts features through a 1D convolutional neural network and the SE channel attention mechanism, and combines this with LASSO cross-validation regression to achieve key feature selection, significantly improving model interpretability and noise resistance while ensuring prediction accuracy.
[0027] In some specific embodiments of this application, collecting SERS spectral datasets of standard samples with known concentrations may further include: Standard samples of known types and concentrations were selected, and SERS spectral signals of each standard sample were collected. The SERS spectral signals of all standard samples were used to construct a SERS spectral dataset, which includes SERS spectral signals and their corresponding concentration labels.
[0028] In the above embodiments of this application, firstly, standard samples with known exact types and concentrations are selected, and SERS spectral signals are acquired for each standard sample under the same experimental conditions. The same experimental conditions specifically ensure that test parameters such as laser wavelength, laser power, integration time, and substrate type are kept consistent, and the concentration information corresponding to each SERS spectral signal is used as the truth label (i.e., concentration label) in the SERS spectral dataset.
[0029] In some specific embodiments of this application, preprocessing and data augmentation of the SERS spectral dataset to obtain an enhanced SERS spectral dataset may further include: S21. Preprocess each SERS spectral signal in the SERS spectral dataset. The preprocessing includes baseline correction, smoothing and normalization to obtain a standard SERS spectral dataset. S22. Copy the standard SERS spectral dataset to obtain several copies of the SERS spectral dataset, and superimpose Gaussian noise on each copy of the SERS spectral dataset. S23. An enhanced SERS spectral dataset is constructed using a standard SERS spectral dataset without superimposed Gaussian noise and a copy of the SERS spectral dataset with superimposed Gaussian noise.
[0030] In the embodiments described above, the measured raw SERS spectral signals are preprocessed to reduce noise and fluorescence background interference. Specifically, this includes baseline correction, Savitzky-Golay smoothing, and normalization. For each normalized SERS spectral signal, in addition to retaining the original sample, four copies are generated, and independent and identically distributed Gaussian noise (mean 0, standard deviation 0.01) is superimposed on each copy. Then, standardization is performed, limiting the standardization result to the range [0, 1]. The number of enhanced data is five times the number of original data. The preprocessed SERS spectral signals constitute an enhanced SERS spectral dataset to address the small sample size problem.
[0031] In some specific embodiments of this application, the 1D CNN-SE feature extraction network includes several serially connected feature extraction units, each of which includes a one-dimensional convolutional layer, an SE attention module, and a one-dimensional max pooling layer serially connected in sequence. One-dimensional convolutional layers are used to extract the initial feature map of the SERS spectral signal; The SE attention module is used to execute the channel attention mechanism and may further include: The compression operation generates a channel description vector representing each feature channel by performing global average pooling on each feature channel of the initial feature map output by the one-dimensional convolutional layer in the Raman shift dimension. The activation operation learns the nonlinear dependencies between channels and outputs a channel weight vector in the range [0,1]. The recalibration operation multiplies the channel weight vectors with the initial feature map channel by channel, outputting an SE channel weighted feature map; A one-dimensional max pooling layer is used to reduce the dimensionality of the SE channel weighted feature map, and the output is a set of spectral features after dimensionality reduction.
[0032] For example, a 1D CNN-SE feature extraction network is used to extract preprocessed SERS spectral features and optimize the features, including the following steps: 1. Input the preprocessed SERS spectrum into a one-dimensional convolutional layer in a 1D CNN to obtain the initial feature map; 2. An SE attention module is embedded after each one-dimensional convolutional layer to adaptively recalibrate the weights of each feature channel, which enhances the focus on key information and suppresses irrelevant channels, making the 1D CNN-SE feature extraction network exhibit strong robustness under different datasets and experimental conditions.
[0033] Assume the input feature map is ,in: It is the spectral length. This refers to the number of channels. The output of the SE attention module is: The execution process of the SE attention module mainly includes the following three steps: 1. Compression operation Global averaging is performed on the Raman shift for each channel of the feature map to compress spatial information into channel description vectors. : in, This is the descriptor for the c-th channel; It is the value of feature map X at position i, channel c; this channel description vector reflects the overall activation intensity of each channel across the entire Raman spectrum.
[0034] 2. Incentive Operation The channel weight vector S is obtained by learning the nonlinear dependencies between channels through a small neural network: in, It is the dimension reduction weight matrix; r is the compression ratio; It is an upgraded weight matrix; It is the Sigmoid activation function, with an output range of [0,1]. It uses the ReLU activation function. Output vector. Each element This represents the relative importance weight of the c-th feature channel to the current concentration prediction task.
[0035] 3. Recalibration operation The channel weight vector S is multiplied channel by channel with the initial feature map to achieve adaptive feature reweighting. in, It is a feature map The value at position i, channel c; the resulting output. As input to the next one-dimensional max pooling layer, its channel response is dynamically adjusted according to task relevance.
[0036] The embodiments described above effectively overcome the shortcomings of traditional methods in terms of nonlinear modeling, feature redundancy, and insufficient channel utilization. The SE attention module dynamically adjusts the importance of each spectral channel, significantly enhancing the response to weak but critical quantitative signals, and is particularly suitable for detecting real-world samples with severe spectral overlap and complex backgrounds.
[0037] In some specific embodiments of this application, training the 1D CNN-SE feature extraction network using an enhanced SERS spectral dataset may further include: S31. Construct a temporary regression prediction layer and connect it in series with the output of the 1D CNN-SE feature extraction network to form a temporary regression model; S32. The temporary regression model is iteratively trained using the enhanced SERS spectral dataset, with mean squared error as the loss function. When the change in the loss of the temporary regression model is less than the preset value or the preset number of iterations is reached, the iteration is stopped, the temporary regression prediction layer is discarded, and the trained 1D CNN-SE feature extraction network is retained.
[0038] In some specific embodiments of this application, training the LASSO regression model using a spectral feature set may further include: The spectral feature set and corresponding concentration labels output by the trained 1D CNN-SE feature extraction network are input into the LASSO regression model with L1 regularization. The optimal regularization parameter is selected using K-fold cross-validation. The LASSO regression model is trained under the optimal regularization parameter, retaining features with non-zero coefficients and removing the remaining features with zero coefficients to complete the training of the LASSO regression model.
[0039] For example, deep features extracted by a 1D CNN-SE feature extraction network are used as input, and key feature optimization is performed using a L1 regularized LASSO regression model. The optimal regularization parameter is determined through cross-validation. The LASSO regression model compresses a large number of feature coefficients that contribute little to target recognition to zero, ultimately selecting a significantly reduced subset of key features with strong discriminative power, thus completing the secondary optimization and dimensionality reduction of the features.
[0040] The embodiments described above combine LASSO feature selection constraints with a 1D CNN-SE architecture, enabling the fusion model to predict concentrations using only a few key features, balancing accuracy and interpretability. This not only reduces model complexity but also enhances its generalization ability and robustness under small sample conditions. The L1 regularization strength and regression model network structure are optimized using a K-fold cross-validation strategy to avoid performance bias caused by random data partitioning, ensuring high accuracy and robustness even with limited experimental data.
[0041] In some specific embodiments of this application, the equation of the LASSO regression model is as follows: in, The objective function of the LASSO regression model; For coefficients Find the minimum value; n is the number of samples; y is the true concentration value; X is the input set of spectral features; The regression coefficients to be learned. Represents the L1 norm; Represents the L2 norm; This is the regularization parameter.
[0042] In the above embodiments of this application, it is assumed that the sample feature matrix output by the 1D CNN-SE feature extraction network is... Where n is the number of samples and p is the number of features; the corresponding target concentration after logarithmic transformation is The LASSO optimization problem is then defined as: in, These are the regression coefficients to be learned. Describing the L1 norm, i.e. ; Represents the j-th regression coefficient; This refers to the regularization parameter. This application uses K-fold cross-validation to automatically select the optimal regularization parameter. This enables the automatic removal of redundant or noisy features, retaining only a subset of key features that significantly contribute to SERS spectral concentration prediction.
[0043] This application effectively overcomes the limitations of traditional methods in SERS spectral quantitative analysis, significantly improves prediction accuracy in trace substance detection, and provides a new and efficient analytical method suitable for portable and rapid quantitative scenarios such as food safety and environmental monitoring.
[0044] The following examples and comparative examples will be used to further illustrate this application in order to better understand the above-mentioned technical solutions of this application. It should be understood that the following are only some examples and are not intended to limit this application.
[0045] Application Example 1: SERS spectral analysis method based on CNN-SE-LASSO fusion model (1) SERS spectral acquisition of pigment samples with known concentrations This application example uses malachite green food additive standard samples, and aqueous solutions with different concentration gradients are prepared. SERS spectra are repeatedly collected for each concentration, resulting in a total of 200 sets of SERS spectral data.
[0046] (2) Data preprocessing To eliminate instrument noise and fluorescence background interference, the original SERS spectra were preprocessed with baseline correction, curve smoothing, and normalization.
[0047] (3) Data augmentation To alleviate the small sample size problem, Gaussian noise was used for data augmentation, resulting in data that was five times larger than the original data.
[0048] (4) Construct a 1D CNN feature extraction network based on the SE attention module. The specific structure is as follows: Conv1D→SE→MaxPooling1D→Conv1D→SE→MaxPooling1D→Conv1D→SE→MaxPooling1D; The output of a 1D CNN feature extraction network can be connected to Dense to obtain a temporary regression model; Wherein, Conv1D is a one-dimensional convolutional layer; SE is an SE attention module; MaxPooling1D is a one-dimensional max pooling layer; and Dense is a temporary regression prediction layer, which is a fully connected layer. Specifically, the SE attention module compresses channel information through global average pooling, generates channel weights through a two-layer fully connected network, and multiplies them with the original features channel by channel to achieve adaptive enhancement of discriminative spectral features.
[0049] (5) Train the model and extract SERS spectral features The enhanced SERS spectral data were divided into a training set (60%), a validation set (20%), and a test set (20%). The concentration labels were taken as base-10 logarithms to mitigate the problem of excessive dynamic range. An ad hoc regression model was trained using the Adam optimizer with mean squared error (MSE) as the loss function, and an early stopping mechanism and learning rate decay strategy were employed to prevent overfitting.
[0050] (6) LASSO regression training The output features of the training and validation sets are merged, standardized, and then input into the LASSO regression model. Optimal regularization coefficients are automatically selected through 5-fold cross-validation, allowing the model to maintain predictive performance while compressing the regression coefficients of many irrelevant features to zero, retaining only a few features significantly related to concentration.
[0051] (7) Concentration prediction using a SERS spectral quantitative model based on a 1D CNN-SE-LASSO fusion model. In this application example, the method achieved a mean absolute error (MAE) of 0.31, a root mean square error (RMSE) of 0.59, and a coefficient of determination (R²) of [missing value] on the validation set. 2 =0.9989, MAE=0.41, RMSE=0.68, R on the test set 2 =0.9983, indicating that this method can achieve high-precision SERS spectral quantification.
[0052] Comparative Example 1: Unlike the method in the above application example that extracts deep features using 1D CNN-SE and combines LASSO cross-validation for regression modeling, Comparative Example 1 uses 1D CNN to model the SERS spectrum. Comparative Example 2: Comparative Example 2 uses 1D CNN-SE to model the SERS spectrum; The 1D CNN-SE-LASSO model, the 1D CNN model in Comparative Example 1, and the 1D CNN-SE model in Comparative Example 2 were all trained and evaluated on the same dataset to ensure fair comparison. Quantitative results are shown in Table 1. With optimization of the model structure, the R of the model in this application... 2 The RMSE and MAE values have been continuously improved compared to the previous two proportional models, demonstrating that the method proposed in the application examples of this application has higher accuracy and stability for quantitative prediction of SERS spectra.
[0053] Table 1 Comparison of prediction results between application examples and comparative examples like Figure 2 As shown, the MAE and RMSE of each model change with the training cycle. The 1DCNN-SE-LASSO model has lower MAE and RMSE values, and R... 2The higher accuracy indicates stronger generalization ability and better stability. In contrast, the basic 1D CNN model exhibits larger fluctuations in validation error and a slight risk of overfitting; while the 1D CNN-SE model outperforms the basic model, it still falls short of the architecture with LASSO regularization. This demonstrates that by introducing the SE module to enhance the weight distribution among feature channels and combining it with LASSO regularization to select key features, not only is the model's prediction accuracy effectively improved, but the convergence speed is also accelerated, and training stability is enhanced.
[0054] Based on the same inventive concept, another embodiment of this application provides a SERS spectral analysis system based on a CNN-SE-LASSO fusion model, referring to... Figure 3 As shown, the SERS spectral analysis system 100 includes: Acquisition module 110 is used to acquire SERS spectral datasets of standard samples with known concentrations; Preprocessing module 120 is used to preprocess the SERS spectral dataset to obtain an enhanced SERS spectral dataset; Network building module 130 provides a 1D CNN-SE feature extraction network, which is built based on a one-dimensional convolutional neural network and an SE attention module, and is used to train the 1D CNN-SE feature extraction network using the enhanced SERS spectral dataset; The spectral feature module 140 is used to extract features from the enhanced SERS spectral dataset using the trained 1D CNN-SE feature extraction network to obtain the corresponding spectral feature set. Regression Module 150 provides a LASSO regression model, which is trained using a set of spectral features. The concentration detection module 160 is used to input the trained LASSO regression model into the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. The concentration detection result of the sample to be tested is obtained using the CNN-SE-LASSO fusion model.
[0055] It should be noted that the modules in the SERS spectral analysis system based on the CNN-SE-LASSO fusion model provided in the above embodiments of this application correspond to the steps of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model in any of the above embodiments. Those skilled in the art can refer to the step features of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model to implement the corresponding modules in the SERS spectral analysis system based on the CNN-SE-LASSO fusion model, which will not be elaborated here.
[0056] The core of this application lies in constructing a quantitative analysis fusion model that integrates L1 regularization constraints, channel attention mechanisms, and deep convolution feature extraction. The analysis method presented in this application is highly versatile, accurate, and robust.
[0057] In another embodiment of this application, a non-transitory computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model described above.
[0058] In another embodiment of this application, an electronic device is also provided, including a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions stored in the memory and execute the steps of the SERS spectral analysis method based on the CNN-SE-LASSO fusion model as described above according to the obtained program instructions.
[0059] Optionally, the memory is used to store programs; the memory may include volatile memory, such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.; the memory may also include non-volatile memory, such as flash memory. The memory is used to store computer programs (such as application programs and functional modules that implement the above methods), computer instructions, etc., and the aforementioned computer programs and computer instructions can be partitioned and stored in one or more memories. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by the processor.
[0060] The aforementioned computer programs, computer instructions, etc., can be stored in partitions within one or more memory locations. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by a processor.
[0061] A processor is used to execute a computer program stored in memory to implement the various steps of the methods involved in the above embodiments. For details, please refer to the relevant descriptions in the preceding method embodiments.
[0062] The processor and memory can be separate structures or integrated structures. When the processor and memory are separate structures, they can be coupled together via a bus.
[0063] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] The preferred features in the above embodiments can be used individually in any embodiment, or in any combination thereof, provided they do not conflict with each other. Furthermore, parts not described in detail in the embodiments can be implemented using existing technologies.
[0068] The foregoing has described some specific embodiments of this application. It should be understood that this application is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the substantive content of this application. The above-described preferred features can be used in any combination without conflict.
Claims
1. A SERS spectral analysis method based on a CNN-SE-LASSO fusion model, characterized in that, include: Collect SERS spectral datasets of standard samples with known concentrations; The SERS spectral dataset is preprocessed and augmented to obtain an augmented SERS spectral dataset; A 1D CNN-SE feature extraction network was constructed based on a one-dimensional convolutional neural network and an SE attention module, and the 1D CNN-SE feature extraction network was trained using the enhanced SERS spectral dataset. The trained 1D CNN-SE feature extraction network is used to extract features from the enhanced SERS spectral dataset to obtain the corresponding spectral feature set. Construct a LASSO regression model and train the LASSO regression model using the aforementioned spectral feature set; The trained LASSO regression model is connected to the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. The concentration quantitative detection results of the sample to be tested are obtained using the CNN-SE-LASSO fusion model.
2. The SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to claim 1, characterized in that, The SERS spectral dataset of standard samples with known concentrations includes: Select standard samples of known types and concentrations, and collect the SERS spectral signals of each standard sample. Construct a SERS spectral dataset from the SERS spectral signals of all standard samples. The SERS spectral dataset includes the SERS spectral signals and their corresponding concentration labels.
3. The SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to claim 1, characterized in that, The preprocessing and data augmentation of the SERS spectral dataset to obtain an enhanced SERS spectral dataset includes: Each SERS spectral signal in the SERS spectral dataset is preprocessed, including baseline correction, smoothing, and normalization, to obtain a standard SERS spectral dataset. The standard SERS spectral dataset is copied to obtain several copies of the SERS spectral dataset, and Gaussian noise is superimposed on each copy of the SERS spectral dataset. An enhanced SERS spectral dataset is constructed using a standard SERS spectral dataset without Gaussian noise and a copy of the SERS spectral dataset with Gaussian noise.
4. The SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to claim 1, characterized in that, The 1D CNN-SE feature extraction network includes several cascaded feature extraction units, each of which includes a one-dimensional convolutional layer, an SE attention module, and a one-dimensional max pooling layer connected in series. The one-dimensional convolutional layer is used to extract the initial feature map of the SERS spectral signal; The SE attention module is used to execute the channel attention mechanism, including: The compression operation involves performing global average pooling on each feature channel of the initial feature map output by the one-dimensional convolutional layer in the Raman shift dimension to generate a channel description vector representing each feature channel. The activation operation learns the nonlinear dependencies between channels and outputs a channel weight vector in the range [0,1]. The recalibration operation multiplies the channel weight vector with the initial feature map channel by channel to output the SE channel weighted feature map. The one-dimensional max pooling layer is used to reduce the dimensionality of the SE channel weighted feature map, and the dimensionality-reduced output is a set of spectral features.
5. A SERS spectral analysis method based on a CNN-SE-LASSO fusion model according to claim 1, characterized in that, The step of training the 1D CNN-SE feature extraction network using the enhanced SERS spectral dataset includes: A temporary regression prediction layer is constructed and connected in series with the output of the 1D CNN-SE feature extraction network to form a temporary regression model; The temporary regression model is iteratively trained using the enhanced SERS spectral dataset, with mean squared error as the loss function. The iteration stops when the change in the loss of the temporary regression model is less than a preset value or when a preset number of iterations is reached. The temporary regression prediction layer is discarded, and the trained 1D CNN-SE feature extraction network is retained.
6. The SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to claim 1, characterized in that, Training the LASSO regression model using the aforementioned spectral feature set includes: The spectral feature set and corresponding concentration labels output by the trained 1D CNN-SE feature extraction network are input into the LASSO regression model with L1 regularization. The optimal regularization parameter is selected using K-fold cross-validation. The LASSO regression model is trained under the optimal regularization parameter, retaining features with non-zero coefficients and removing the remaining features with zero coefficients to complete the training of the LASSO regression model.
7. The SERS spectral analysis method based on the CNN-SE-LASSO fusion model according to claim 1, characterized in that, The equation for the LASSO regression model is: in, The objective function of the LASSO regression model; For coefficients Find the minimum value; n is the number of samples; y is the true concentration value; X is the input set of spectral features; The regression coefficients to be learned. Represents the L1 norm; Represents the L2 norm; This is the regularization parameter.
8. A SERS spectral analysis system based on a CNN-SE-LASSO fusion model, characterized in that, include: The acquisition module is used to acquire SERS spectral datasets of standard samples with known concentrations. The preprocessing module is used to preprocess the SERS spectral dataset to obtain an enhanced SERS spectral dataset; A network construction module provides a 1D CNN-SE feature extraction network, which is constructed based on a one-dimensional convolutional neural network and an SE attention module, and is used to train the 1D CNN-SE feature extraction network using the enhanced SERS spectral dataset; The spectral feature module is used to extract features from the enhanced SERS spectral dataset using the trained 1D CNN-SE feature extraction network to obtain the corresponding spectral feature set. The regression module provides a LASSO regression model, which is trained using the spectral feature set. The concentration detection module is used to input the trained LASSO regression model into the output of the trained 1D CNN-SE feature extraction network to obtain the CNN-SE-LASSO fusion model. The concentration detection result of the sample to be tested is obtained using the CNN-SE-LASSO fusion model.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.
10. An electronic device, characterized in that, include: At least one memory for storing program instructions; At least one processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of claims 1-7 according to the obtained program instructions.
Citation Information
Patent Citations
SERS (Surface Enhanced Raman Scattering) statistical quantitative analysis method and system based on signal-to-noise ratio regulation
CN121117398A