Skip to main content

Raman spectroscopy-based prediction of ofloxacin concentration in solution using a novel loss function and an improved GA-CNN model



A Raman spectroscopy method can quickly and accurately measure the concentration of ofloxacin in solution. This method has the advantages of accuracy and rapidity over traditional detection methods. However, the manual analysis methods for the collected Raman spectral data often ignore the nonlinear characteristics of the data and cannot accurately predict the concentration of the target sample.


To address this drawback, this paper proposes a novel kernel-Huber loss function that combines the Huber loss function with the Gaussian kernel function. This function is used with an improved genetic algorithm-convolutional neural network (GA-CNN) to model and predict the Raman spectral data of different concentrations of ofloxacin in solution. In addition, the paper introduces recurrent neural networks (RNN), long short-term memory (LSTM), bidirectional long short-term memory (BiLSTM) and gated recurrent units (GRU) models to conduct multiple experiments and use root mean square error (RMSE) and residual predictive deviation (RPD) as evaluation metrics.


The proposed method achieved an \(R^2\) of 0.9989 on the test set data and improved by 3% over the traditional CNN. Multiple experiments were also conducted using RNN, LSTM, BiLSTM, and GRU models and evaluated their performance using RMSE, RPD, and other metrics. The results showed that the proposed method consistently outperformed these models.


This paper demonstrates the effectiveness of the proposed method for predicting the concentration of ofloxacin in solution based on Raman spectral data, in addition to discussing the advantages and limitations of the proposed method, and the study proposes a solution to the problem of deep learning methods for Raman spectral concentration prediction.

Peer Review reports


Ofloxacin is a synthetic quinolone [1] with excellent antibacterial properties. However, its excessive use has resulted in increased resistance of bacteria and other microorganisms [2], reducing its efficacy against bacterial infections. The abuse of ofloxacin in farming has become frequent in recent years. Humans who consume food with excessive antimicrobial drugs may develop symptoms such as diarrhea and headache, which pose a threat to human health [3]. Several countries have introduced regulations and standards to control the use and residues of ofloxacin. For example, China banned the use of antibacterial drugs such as ofloxacin in farming [4] and restricted the use of key antibacterial drugs for zoonotic diseases. Therefore, accurate and rapid detection methods for monitoring ofloxacin levels in food are important. Regression analysis model is a common prediction method [5], and this paper aims to use an improved CNN regression analysis model to predict the ofloxacin level and evaluate its performance.

Raman spectroscopy has many applications in fields such as biomedicine and food safety because of its easy operation [6], fast detection, and high accuracy [7]. Traditional methods for processing Raman spectra, such as partial least squares regression (PLSR) and principal component regression (PCR), assume linearity and ignore the nonlinear characteristics of spectral data [8]. These methods are also susceptible to noise and background interference, which can lead to poor prediction accuracy. Moreover, factors such as human errors and instrument errors during Raman spectral data acquisition can affect the analysis of nonlinear relationships between spectral concentrations [9]. Recently, with the rapid development of artificial intelligence technology, machine learning (ML) methods have been used to process Raman spectroscopy data due to their excellent predictive performance [10]. Liu et al. [11] predicted the concentration of benzo(a) pyrene in peanut oil using support vector machine (SVM) algorithm, and the results outperformed traditional methods such as PLSR. Lin et al. [12] developed a slurry concentration prediction model using an artificial neural network (ANN) approach, and the results showed that ANN had better nonlinear predictive ability than PLSR. ML methods can solve some nonlinear problems, but they have limitations when dealing with more complex nonlinear relationships in real data [13]. Deep learning [14], especially the wide application of CNN and graph convolutional networks (GCN) [15, 16], aims to overcome the limitations of traditional ML methods. In comparison to traditional ML methods, deep learning has stronger generalization ability and better performance in handling nonlinear problems [17]. CNN, a classical algorithm of deep learning, is widely used in many fields because of their superior feature extraction [18]. While Wu et al. [19] employed CNN to predict honey concentration for authentication, it exhibited reduced robustness with limited data. Pian et al. [20] enhanced accuracy and robustness by applying the residual connectivity technique to CNN for quantitative blood glucose analysis and prediction. Chen et al. [21] proposed a regression analysis method with loss function combined with kernel function. The method used Gaussian kernel function to compensate for the weak nonlinear characteristics of the mean square error (MSE) loss function.

Raman spectra acquisition generates noise and outliers, which the Huber loss function can address by combining squared and absolute errors [22]. To further improve the regression model’s robustness, we propose a new Gaussian kernel Huber loss function that more accurately measures the deep learning error’s nonlinearity and handles noise or outliers better [23]. Combining intelligent algorithms with neural network algorithms has become a main research direction in recent years to address the difficulty of parameter control in neural network building [24]. Therefore, we propose a concentration prediction model of CNN with an improved adaptive step size genetic algorithm and Gaussian kernel Huber loss function, aiming to achieve fast and accurate prediction of the ofloxacin solution concentration.

Algorithm model

Kernel-Huber loss function

Traditional linear regression methods can predict common regression problems effectively. However, they have limitations when faced with nonlinear problems. For example, the instrumental and manual biases in the Raman spectroscopy acquisition process may cause noise [25], which makes the nonlinear features of the actual data unfitted and affects the final results. CNN can automatically extract and learn features from the data and extract more advanced features through layer-by-layer learning, thus enabling nonlinear modeling. This study uses an improved CNN algorithm and proposes a new loss function (Kernel-Huber Loss) based on the Huber loss function and Gaussian kernel function. The new loss function has better robustness in the regression task and can balance the fitting and generalization ability of the model, thus improving the model prediction accuracy.

Traditional Huber loss function

The Huber loss function is a regression loss function that reduces the outlier sensitivity and avoids their excessive influence on the model [26]. The basic principle of the traditional Huber loss function as shown in Eq. (1).

$$\begin{aligned} {L_\delta }(y,f(x)) = \left\{ {\begin{array}{*{20}{l}} {\frac{1}{2}{{(y - f(x))}^2}}&{}\quad {{\text {if }}|y - f(x)| \le \delta }\\ {\delta |y - f(x)| - \frac{1}{2}{\delta ^2}}&{}\quad {{\text {otherwise}}} \end{array}} \right. \end{aligned}$$

where y is the real data, f(x) is the predicted data, and \(\delta\) is the truncation tolerance that measures the difference between y and f(x). The squared error measures the error when \(|y - f(x)| \le \delta\), and the linear error similar to mean absolute error(MAE) measures the error otherwise. However, the traditional Huber loss function may not handle outliers or noisy data well when the data distribution is complex or noisy.

Kernel-Huber loss function

The human error of the collected Raman spectral data and the molecular interaction can disrupt the linear relationship between Raman peak intensity and concentration, particularly when concentrations are too high [27]. An effective method for considering the nonlinear characteristics of spectral concentration prediction is to map the input data to a high-dimensional space and perform vector inner product operations using a kernel function to mitigate the curse of dimensionality. Specifically, the original data is mapped to the Hilbert Space [28] for calculation, with \(\phi\) as the feature mapping function, and the inner product calculation formula in Eq. (2):

$$\begin{aligned} K(y,f(x)) = \langle \phi (y),\phi (f(x))\rangle \end{aligned}$$

Gaussian kernel function and polynomial kernel function are widely used in ML. Gaussian kernel function is more flexible than polynomial kernel function. It can handle nonlinear separable data and does not change the relative position between data points [29], which makes it excellent in many ML tasks such as classification, regression, etc. The Gaussian kernel function is shown in Eq. (3).

$$\begin{aligned} K(y,f(x)) = \exp \left( { - \frac{{\left( y - f(x)\right) {^2}}}{{2{\sigma ^2}}}} \right) \end{aligned}$$

The Huber loss function combined with the Gaussian kernel function can be written as Eq. (4).

$$\begin{aligned} {L_{}}({y_{}},f(x)) = \frac{{\sum \nolimits _{i,j} K ({y_{(i)}},f{{(x)}_{(j)}}){L_\delta }({y_{(i)}},f{{(x)}_{(i)}})}}{{\sum \nolimits _{i,j} K ({y_{(i)}},f{{(x)}_{(j)}})}} \end{aligned}$$

where \({y_{(i)}}\) represents the data value in the original input space, \(f(x)_{(i)}\) stands for the predicted value for the ith input data point, and \(f(x)_{(j)}\) denotes the predicted value after mapping to the new feature space.

Residual connected CNN

1D depthwise separable convolution

To solve the problem of gradient vanishing and exploding in deep neural networks, the residual network is used to optimize the neural network based on the improved CNN. The one-dimensional depthwise separable convolution decomposes the ordinary convolution process into two independent convolution processes, which can reduce the parameter number and the overfitting phenomenon by decomposition [30]. In short, 1D depthwise separable convolution decomposes the ordinary convolution process into two steps: depthwise convolution and pointwise convolution. First, depthwise convolution is applied to each input channel of Raman spectral input data, and then pointwise convolution is applied to the results of different channels. This is illustrated in Fig. 1.

The ratio of the computational effort of 1D Depthwise Separable Convolution to ordinary convolution is shown in Eq. (5).

$$\begin{aligned} \frac{{{D_{k}} \times M \times {D_{F}} + M \times N \times {D_{F}}}}{{{D_{k}} \times M \times N \times {D_{F}}}} = \frac{1}{N} + \frac{1}{{{D_{k}}}} \end{aligned}$$

where \({D_{k}}\) represents the convolution kernel size, \({D_F}\) represents the input data length, when the number of convolution kernels is taken as K and the number of input feature data channels is M, the number of parameters can be reduced by about \(\frac{1}{{{D_{k}}}}\).

Fig. 1
figure 1

a Standard 1D convolution schematic and b 1D Depthwise schematic

Design of residual structures

The residual connection in neural networks allows the deeper extraction of Raman spectral feature information in the network [31], and the residuals can superimpose the nonlinear variation of the input data, which reduces the gradient vanishing in deep neural networks. The residual connection’s basic structure is illustrated in Fig. 2.

Fig. 2
figure 2

The schematic diagram of residual connection

Adaptive GA-CNN

The GA-CNN combined model applies a genetic algorithm to optimize an improved CNN. Since Raman spectral data exhibit nonlinear characteristics, this model leverages the selection and crossover operations of the genetic algorithm to find the global optimal solution for the weights of the CNN [32], thus achieving better nonlinear modeling. The model aims to build a Raman spectral concentration prediction model by using an optimized CNN. The genetic algorithm creates initial populations based on the initial weight matrix of the CNN to be optimized, and each population contains information on all values in the CNN. The GA-CNN model uses the error between the actual value and the predicted value as a fitness function. It iterates through the processes of population selection, crossover and mutation, and eventually obtains the optimal weights of the individual with the minimum error as the initial weights for GA-CNN. Moreover, it introduces an adaptive improvement for the crossover and mutation probabilities of the conventional GA to achieve faster convergence [33], as shown in Eq. (6), and the detailed procedure of the GA-CNN model is shown in Fig. 3.

Fig. 3
figure 3

The structure of the prediction model for the concentration of of ofloxacin

$$\begin{aligned} {P_c} = \left\{ {\begin{array}{*{20}{l}} {{P_{c\min }} + \frac{{\left( {{P_{c\max }} - {P_{c\min }}} \right) \left( {1 - \frac{i}{G}} \right) }}{{1 + {e^{A\frac{{2\left( {f - {f_{avg}}} \right) }}{{{f_{\max }} - {f_{avg}}}}}}}}}&{}{\mathrm{{if }}\,\,f \ge {f_{avg}}}\\ {{P_{c\max }}}&{}{\mathrm{{ }}f \le {f_{avg}}} \end{array}} \right. \nonumber \\ {P_m} = \left\{ {\begin{array}{*{20}{l}} {{P_{m\min }} + \frac{{\left( {{P_{m\max }} - {P_{m\min }}} \right) \left( {1 - \frac{i}{G}} \right) }}{{1 + {e^{A\frac{{2\left( {f - {f_{avg}}} \right) }}{{{f_{\max }} - {f_{avg}}}}}}}}}&{}{\mathrm{{if }}\,\,f \ge {f_{avg}}}\\ {{P_{m\max }}}&{}{\mathrm{{ }}f \le {f_{avg}}} \end{array}} \right. \end{aligned}$$

The equation shows the values of \({P_c}\) and \({P_m}\), which are the crossover and mutation probabilities. The upper and lower limits of \({P_c}\) are \({P_{c\max }}\) and \({P_{c\min }}\), and the upper and lower limits of \({P_m}\) are \({P_{m\max }}\) and \({P_{m\min }}\). The equation also includes the individual fitness f, the average fitness \({f_{avg}}\) and the maximum fitness \({f_{max}}\). Finally i represents the current iteration number and G represents the maximum number of iterations for the genetic algorithm.

Data acquisition and processing

Experimental reagents

Sodium citrate (C\(_{6}\)H\(_5\)Na\(_{3}\)O\(_{7}\), Belgium ACROS company), ofloxacin (content \(\ge\) 99%). The hexane, chloroform and ethyl acetate used in the experiment were all analytically pure, carboxymethyl cellulose (CMC, Shanghai Tixi Chemical Trading Co, Ltd.) and diatomite. Ultra-pure water was used in all the experiments.

Preparation of SERS-enhanced substrates

The glassware for preparing silver nanoparticles (AgNPs) was first immersed in aqua regia (HNO\(_{3}\)/HCl, 1:3, v/v) for 20 min and then rinsed with ultrapure water. AgNPs were prepared by the sodium citrate reduction method [34]. 1 mL of 0.1 m/L AgNO\(_{3}\) aqueous solution was heated under reflux with stirring. Then, 4.0 mL of 1% sodium citrate was quickly added to the refluxing solution and the reflux continued for 30 min before cooling to room temperature. The prepared spherical AgNPs had a diameter range of 50–60 nm.

Experimental method

A gradient solution of ofloxacin (loxacin dissolved in hydrochloric acid) ranging from 100 to 1 ppm was prepared and spotted on a diatomaceous earth plate 1.5 cm from the bottom of the thin layer chromatography plate. The sample was separated by placing the plate vertically in the mobile phase at room temperature and then the retention factor was calculated by tracking the position of the analyte using a UV lamp (254 nm) with iodine colorimetry. Then, 3 \(\upmu\)L of 30-fold concentrated silver nanoparticles were deposited on the analyte spots. Plots were made using Origin 2017. For rapid detection in the field, a portable Raman spectrometer (BWS465-iRman; B &W-Tek, USA) with a 785 nm excitation laser was used with a laser power of 30 mW and an integration time of 2 s. The Raman spectral data were saved as a csv file.

Results and discussion

Experimental setup

To effectively extract the spectral feature peak information and remove the fluorescence interference, baseline correction is required for the Raman spectral data. The adaptive iteratively reweighted penalized least squares (airPLS) [35] method is chosen for the baseline correction. Figure 4 shows the spectra of 100 ppm after airPLS baseline correction, ranging from 239 to 2400 cm\(^{-1}\). In this range, the distribution of spectral features and characteristic peaks is relatively dense, whereas characteristic peaks at other wavelength positions are not apparent at low concentrations. The intensity of the characteristic peaks at (519–617 cm\(^{-1}\)) and (1292–1713 cm\(^{-1}\)) is significantly higher than the rest of the positions, which provides an important theoretical basis for accurate Raman spectral concentration classification. Therefore, the characteristic peaks in these ranges are selected for analysis and used as characteristic variables.

Fig. 4
figure 4

Comparison chart of preprocessing algorithm results

Evaluation indicators for quantitative analysis models

The MSE, RMSE, mean absolute percentage error (MAPE) of the training and test sets can measure the accuracy, performance and robustness of the proposed Raman spectral concentration analysis model. The higher the RPD indicator value, the more accurate the model is [36], and the higher the median absolute error (MedAE) indicator value, the less robust the model is. Eqs. (7), (8), (9), (10), (11), (12) show the specific calculation formulas.

$$\begin{aligned}{} & {} R^2 = 1 - \frac{\sum _{i=1}^n (y_i - {\hat{y}}_i)^2}{\sum _{i=1}^n (y_i - {\bar{y}})^2} \end{aligned}$$
$$\begin{aligned}{} & {} {\text{MedAE}}(y,{\hat{y}}) = {\text{median}}(|y_1 - {\hat{y}}_1|, \ldots ,|y_n - {\hat{y}}_n|) \end{aligned}$$
$$\begin{aligned}{} & {} {\text{MAPE}} = \frac{100\%}{n} \sum _{i=1}^n \left| \frac{y_i - {{\hat{y}}_i}}{y_i} \right| \end{aligned}$$
$$\begin{aligned}{} & {} {\text{RMSE}} = \sqrt{\frac{1}{n} \sum _{i=1}^n (y_i - {\hat{y}}_i)^2} \end{aligned}$$
$$\begin{aligned}{} & {} {\text{RMSEC}} = \sqrt{\frac{1}{m} \sum _{j=1}^m (y_j - {{\hat{y}}_j})^2} \end{aligned}$$
$$\begin{aligned}{} & {} RPD = \frac{1}{\sqrt{1 - R^2}} \end{aligned}$$

where m and n represent the number of samples in the training and test sets, respectively. \({y_i}\) and \({{{\hat{y}}}_i}\) represent the actual and predicted concentrations of the ith sample in the test set, respectively; \({y_j}\) and \({{{\hat{y}}}_j}\) represent the actual and predicted concentrations of the jth sample in the training set, respectively.

Table 1 Model comparison

In this paper, five neural network architectures were compared: CNN, GRU, LSTM, RNN and BiLSTM for predicting the concentration of ofloxacin from its Raman spectrum. 51 Raman spectral data samples of ofloxacin were collected, of which 40 were used for training and 11 for testing. Models were developed for each of these datasets under the same preprocessing conditions (least squares for baseline correction), and Table 1 summarizes the results. As Table 1 shows, the model proposed in this paper outperforms other concentration prediction methods in all aspects. It has the highest \({R^2}\) and the lowest MedAE, MAPE and RMSE values for the test sets. In addition, its RPD values are significantly higher than those of other algorithms. The comprehensive analysis indicates that the Kernel-Huber-based CNN has high accuracy and robustness. This means that the model can effectively fit the training sets data and generalize well to the test sets data, avoiding overfitting or underfitting problems.

Performance of Kernel-Huber-based CNN compared to other algorithms

To more intuitively represent the performance of the Kernel-Huber-based CNN in concentration prediction, Fig. 5 shows the prediction results of various models. At the same time, to verify the actual performance effects and differences of the six models, scatter plots of the predicted values versus the actual values of each model on the training and test datasets are plotted separately for comparison, and linear regression equations are fitted as Fig. 6 shows.

Fig. 5
figure 5

Comparison between real value and measured value

Fig. 6
figure 6

Relationship between predicted ofloxacin concentration and actual ofloxacin concentration

Figure 5 shows that under the same amount of data as the training data condition of the model, the accuracy of the Kernel-Huber-based CNN proposed in this paper is significantly higher than the other five models. The kernel function allows patterns that would otherwise be linearly indistinguishable in lower dimensions to be linearly differentiable in higher dimensions by mapping the data into a higher dimensional space. It helps to solve complex prediction problems. In Fig. 5, the Kernel-Huber-based CNN shows a slight deviation in predicting 20ppm concentration, while the other five algorithms deviate at multiple concentrations, as shown in Fig. 5b–f. Figure 6 also shows that the Kernel-Huber-based CNN has the best prediction performance. It achieves the highest \({R^2}\) value in all datasets, and the predicted and actual values are closely distributed on both sides of the linear regression line. This fully demonstrates that the Kernel-Huber-based CNN has a better performance in extracting Raman spectral features and is more reliable in dealing with the Raman spectral concentration prediction problem.

Adaptive GA algorithm

To verify the effectiveness of the concentration prediction method based on the improved adaptive genetic algorithm proposed in this paper and to compare its performance with the traditional genetic algorithm. As shown in Fig. 7, we chose the difference between the actual and predicted concentrations of the test set as the fitness function. The convergence curves of the two algorithms show that their fitness function values are similar because they both use Kernel-Huber-based CNN, but the improved adaptive genetic algorithm converges faster. This is because it adapts the crossover and mutation probabilities according to the fitness values and iteration numbers, which enhances the exploration ability of the model. Too high or too low probabilities will reduce the performance of the algorithm.

Fig. 7
figure 7

Comparison between traditional-GA and adaptive-GA


This paper introduces an adaptive genetic algorithm with improved loss function model for predicting the concentration of ofloxacin. By employing a Gaussian kernel function, the model improves the robustness of prediction and extracts the non-linear patterns in Raman spectral data more effectively. The model also improves the crossover and mutation probability adjustment strategies, and adds the catastrophe and mutation operations, which enhance the convergence speed and global optimization finding ability. Although this study has potential applications, the computational complexity of the algorithm may increase with the increase of data size. Future research could focus on further enhancing the model’s parameter adaptive tuning strategy to alleviate parameter tuning challenges and enhance the model’s practical applicability. This study provides directions and insights for future research in the field of drug concentration prediction.

Availibility of data and materials

All the code used to prepare the data and fit the models is available at


  1. Nguyen AQ, Vu HP, Nguyen LN, Wang Q, Djordjevic SP, Donner E, Yin H, Nghiem LD. Monitoring antibiotic resistance genes in wastewater treatment: current strategies and future challenges. Sci Total Environ. 2021;783: 146964.

    Article  CAS  PubMed  Google Scholar 

  2. Huang Y, Gao Q, Li X, Gao Y, Han H, Jin Q, Yao K, Ji J. Ofloxacin loaded MoS2 nanoflakes for synergistic mild-temperature photothermal/antibiotic therapy with reduced drug resistance of bacteria. Nano Res. 2020;13:2340–50.

    Article  CAS  Google Scholar 

  3. Tarannum N, Khatoon S, Dzantiev BB. Perspective and application of molecular imprinting approach for antibiotic detection in food and environmental samples: a critical review. Food Control. 2020;118: 107381.

    Article  CAS  Google Scholar 

  4. Chen J, Sun R, Pan C, Sun Y, Mai B, Li QX. Antibiotics and food safety in aquaculture. J Agric Food Chem. 2020;68(43):11908–19.

    Article  CAS  PubMed  Google Scholar 

  5. Rafi SH, Deeba SR, Hossain E, et al. A short-term load forecasting method using integrated CNN and LSTM network. IEEE Access. 2021;9:32436–48.

    Article  Google Scholar 

  6. Hu W, Xia L, Hu Y, Li G. Recent progress on three-dimensional substrates for surface-enhanced Raman spectroscopic analysis. Microchem J. 2022;172:106908.

    Article  CAS  Google Scholar 

  7. Zhao X, Li M, Xu Z. Detection of foodborne pathogens by surface enhanced Raman spectroscopy. Front Microbiol. 2018;9:1236.

    Article  PubMed  PubMed Central  Google Scholar 

  8. Amsaraj R, Ambade ND, Mutturi S. Variable selection coupled to PLS2, ANN and SVM for simultaneous detection of multiple adulterants in milk using spectral data. Int Dairy J. 2021;123: 105172.

    Article  CAS  Google Scholar 

  9. Cheng J, Ji Z, Li M, Dai J. Study of a noninvasive blood glucose detection model using the near-infrared light based on SA-NARX. Biomed Signal Proces. 2020;56: 101694.

    Article  Google Scholar 

  10. Wang X, Yang W, Yang Y, He Y, Zhang J, Wang L, Hu L. Ppisb: a novel network-based algorithm of predicting protein-protein interactions with mixed membership stochastic blockmodel. IEEE ACM Trans Comput Bioinform. 2022;20(2):1606–12.

    Article  Google Scholar 

  11. Liu W, Sun S, Liu Y, Deng H, Hong F, Liu C, Zheng L. Determination of benzo (a) pyrene in peanut oil based on Raman spectroscopy and machine learning methods. Spectrochim Acta A. 2023;299: 122806.

    Article  CAS  Google Scholar 

  12. Lin M, Wu Y, Rohani S. Simultaneous measurement of solution concentration and slurry density by Raman spectroscopy with artificial neural network. Cryst Growth Des. 2020;20(3):1752–9.

    Article  CAS  Google Scholar 

  13. Liu X, Lu D, Zhang A, Liu Q, Jiang G. Data-driven machine learning in environmental pollution: gains and problems. Environ Sci Technol. 2022;56(4):2124–33.

    Article  CAS  PubMed  Google Scholar 

  14. Zhao BW, Wang L, Hu PW, Wong L, Su XR, Wang BQ, You ZH, Hu L. Fusing higher and lower-order biological information for drug repositioning via graph representation learning. IEEE Trans Emerg Top Comput. 2023.

  15. Wang T, Sun J, Zhao Q. Investigating cardiotoxicity related with hERG channel blockers using molecular fingerprints and graph attention mechanism. Comput Biol Med. 2023;153: 106464.

    Article  CAS  PubMed  Google Scholar 

  16. Wang W, Zhang L, Sun J, Zhao Q, Shuai J. Predicting the potential human lncRNA–miRNA interactions based on graph convolution network with conditional random field. Brief Bioinform. 2022;23(6):bbac463.

    Article  PubMed  Google Scholar 

  17. Zhang Y, Shi X, Zhang H, Cao Y, Terzija V. Review on deep learning applications in frequency analysis and control of modern power system. Int J Electr Power Energy Syst. 2022;136:107744.

    Article  Google Scholar 

  18. Lussier F, Thibault V, Charron B, Wallace GQ, Masson JF. Deep learning and artificial intelligence methods for Raman and surface-enhanced Raman scattering. TrAC Trends Anal Chem. 2020;124:115796.

    Article  CAS  Google Scholar 

  19. Wu X, Xu B, Ma R, Gao S, Niu Y, Zhang X, Du Z, Liu H, Zhang Y. Botanical origin identification and adulteration quantification of honey based on Raman spectroscopy combined with convolutional neural network. Vib Spectrosc. 2022;123:103439.

    Article  CAS  Google Scholar 

  20. Pian F, Wang Q, Wang M, Shan P, Li Z, Ma Z. A shallow convolutional neural network with elastic nets for blood glucose quantitative analysis using Raman spectroscopy. Spectrochim Acta A Mol Biomol Spectrosc. 2022;264:120229.

    Article  CAS  PubMed  Google Scholar 

  21. Chen X, Yu R, Ullah S, Wu D, Li Z, Li Q, Qi H, Liu J, Liu M, Zhang Y. A novel loss function of deep learning in wind speed forecasting. Energy. 2022;238:121808.

    Article  Google Scholar 

  22. Huang S, Wu Q. Robust pairwise learning with Huber loss. J Complex. 2021;66:101570.

    Article  Google Scholar 

  23. Cappozzo A, Duponchel L, Greselin F, Murphy TB. Robust variable selection in the framework of classification with label noise and outliers: applications to spectroscopic data in agri-food. Anal Chim Acta. 2021;1153:338245.

    Article  CAS  PubMed  Google Scholar 

  24. Tang J, Liu G, Pan Q. A review on representative swarm intelligence algorithms for solving optimization problems: applications and trends. IEEE/CAA J Autom Sin. 2021;8(10):1627–43.

    Article  Google Scholar 

  25. Afara IO, Shaikh R, Nippolainen E, Querido W, Torniainen J, Sarin JK, Kandel S, Pleshko N, Töyräs JJ. Characterization of connective tissues using near-infrared spectroscopy and imaging. Nat Protoc. 2021;16(2):1297–329.

    Article  CAS  PubMed  Google Scholar 

  26. Gupta D, Hazarika BB, Berlin M. Robust regularized extreme learning machine with asymmetric Huber loss function. Neural Comput Appl. 2020;32(16):12971–98.

    Article  Google Scholar 

  27. Pérez-Jiménez AI, Lyu D, Lu Z, Liu G, Ren B. Surface-enhanced Raman spectroscopy: benefits, trade-offs and future developments. Chem Sci. 2020;11(18):4563–77.

    Article  PubMed  PubMed Central  Google Scholar 

  28. Zhang Z, Wang M, Nehorai A. Optimal transport in reproducing kernel Hilbert spaces: theory and applications. IEEE Trans Pattern Anal Mach Intell. 2019;42(7):1741–54.

    Article  PubMed  Google Scholar 

  29. Dong E, Zhou K, Tong J, Du S. A novel hybrid kernel function relevance vector machine for multi-task motor imagery EEG classification. Biomed Signal Process Control. 2020;60:101991.

    Article  Google Scholar 

  30. Yu S, Wang M, Pang S, Song L, Qiao S. Intelligent fault diagnosis and visual interpretability of rotating machinery based on residual neural network. Measurement. 2022;196:111228.

    Article  Google Scholar 

  31. Bao W, Yang X, Liang D, Hu G, Yang X. Lightweight convolutional neural network model for field wheat ear disease identification. Comput Electron Agric. 2021;189:106367.

    Article  Google Scholar 

  32. Alzahab NA, Apollonio L, Di Iorio A, Alshalak M, Iarlori S, Ferracuti F, Monteriú A, Porcaro C. Hybrid deep learning (hDL)-based brain-computer interface (BCI) systems: a systematic review. Brain Sci. 2021;11(1):75.

    Article  PubMed  PubMed Central  Google Scholar 

  33. Hu L, Yang Y, Tang Z, He Y, Luo X. FCAN-MOPSO: an improved fuzzy-based graph clustering algorithm for complex networks with multi-objective particle swarm optimization. IEEE Trans Fuzzy Syst. 2023;31:3470–84.

    Article  Google Scholar 

  34. Quintero-Quiroz C, Acevedo N, Zapata-Giraldo J, Botero LE, Quintero J, Zárate-Triviñ D, Saldarriaga J, Pré ez VZ,. Optimization of silver nanoparticle synthesis by chemical reduction and evaluation of its antimicrobial and toxic activity. Biomater Res. 2019;23:1–15.

  35. Zhang F, Tang X, Tong A, Wang B, Wang J. An automatic baseline correction method based on the penalized least squares method. Sensors. 2020;20(7):2015.

    Article  PubMed  PubMed Central  Google Scholar 

  36. Munnaf MA, Guerrero A, Nawar S, Haesaert G, Van Meirvenne M, Mouazen AM. A combined data mining approach for on-line prediction of key soil quality indicators by Vis-NIR spectroscopy. Soil Tillage Res. 2021;205:104808.

    Article  Google Scholar 

Download references


The authors would like to thank all the editors and anonymous reviewers for their constructive advices.


This work was supported by the Science and Technology Research Project of Liaoning Provincial Department of Education (Grant No. LJKMZ20220737).

Author information

Authors and Affiliations



CYM performed the model design and data analysis. YBS presented the theoretical basis of the model. YYH participated in the construction of the dataset. GWD wrote and revised the manuscript.

Corresponding author

Correspondence to Yuanbo Shi.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ma, C., Shi, Y., Huang, Y. et al. Raman spectroscopy-based prediction of ofloxacin concentration in solution using a novel loss function and an improved GA-CNN model. BMC Bioinformatics 24, 409 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: