Summary
Deep learning method is applied to spectral detection due to the advantage of not needing feature engineering. In this work, the deep neural network (DNN) model is designed to perform data mining on the laser-induced breakdown spectroscopy (LIBS) spectra of the ore. The potential of heat diffusion for an affinity-based transition embedding model is first used to perform nonlinear mapping of fully connected layer data in the DNN model. Compared with traditional methods, the DNN model has the highest recognition accuracy rate (75.92%). A training set update method based on DNN output is proposed, and the final model has a recognition accuracy of 85.54%. The method of training set update proposed in this work can not only obtain the sample labels quickly but also improve the accuracy of deep learning models. The results demonstrate that LIBS combined with the DNN model is a valuable tool for ore classification at a high accuracy rate.
Subject areas: Soil science, Laser, Machine learning
Graphical abstract

Highlights
-
•
The DNN model has the best classification accuracy than traditional classifiers
-
•
The DNN model is better than the traditional PCA for LIBS feature extraction
-
•
The PHATE model was applied to visualize the LIBS spectra and the DNN model
-
•
The accuracy increased from 75.92% to 85.54% based on the training set update method
Soil science; Laser; Machine learning
Introduction
Laser-induced breakdown spectroscopy (LIBS) is an emerging atomic emission spectroscopy technology based on the interaction between laser and matter.1,2,3 The high-energy pulsed laser instantly ablates the material to produce plasma, and its spectrum contains information on the chemical components of the sample.4,5,6 LIBS is known as the “future superstar” in analytical chemistry, and its advantages include simple sample preparation, easy operation, microdamage, speed, and in situ application.7,8,9 With these advantages, LIBS is used as the detection device for Martian soil in both China and the United States.10,11,12,13 LIBS is also applied in many fields, such as the quantification of elements in the coalfield,14 tumor identification in the biomedical field,15,16 and the identification of different types of ore and the quantitative analysis of trace elements in the geological field.17,18,19
Applying machine learning methods to LIBS spectral processing can greatly improve the analysis and detection capabilities of LIBS technology.20,21 In general, feature engineering is necessary before using traditional machine learning methods for the classification of LIBS spectra or elemental quantification, and it mainly includes two kinds of methods: feature mapping and feature selection.22,23,24 Feature mapping uses linear or nonlinear methods to map the high-dimensional feature vector space to the low-dimensional feature vector space. Nabil Killiny et al. applied LIBS to reveal key biochemical differences between CLas-infected and non-infected psyllids. In their research, the principal component analysis (PCA) method was used to process the spectra of the CLas-infected and healthy psyllids sample.25 Feature selection is to achieve dimensionality reduction by selecting a subset of the original features. Chen et al. applied random forest (RF) to perform the feature fusion of two different types of spectra (LIBS and mid-infrared spectroscopy). A soil pH measurement method based on a LIBS-MIR spectral data fusion strategy combined with RF was further established.26 The selection of feature engineering methods directly affects the recognition accuracy and efficiency of the classifier. In recent years, as a more complex machine learning algorithm, deep learning has been widely used in various fields and achieved excellent results. Compared with the traditional machine learning models, the advantage is that no feature engineering is required.27,28,29 Therefore, the deep learning model is more conducive to the automation of LIBS feature engineering and classification recognition.
In recent years, deep learning has been developed and quickly applied to the recognition of LIBS spectra.30 Juan Castorena et al. used the convolutional neural networks (CNN) model based on a residual learning framework that learns both to pre-process and calibrate LIBS for real ChemCam data.31 But the CNN model usually performs spectral feature extraction for all bands, which have huge computational overhead. In addition, there were few research studies conducted to date on spectral feature extraction processes and deep neural networks (DNN) model improvement.
In this paper, to interpret the data stream of LIBS spectral features in the deep learning network, the DNN model is applied for opening data from the benchmark classification dataset for LIBS. The potential of heat-diffusion for affinity-based transition embedding (PHATE) model was used to visualize the output data of each layer to intuitively explain the feature extraction process of the DNN model.32 To further improve the recognition accuracy of the DNN model, the training set is updated according to the output of the DNN model, and the updated training set data is used to train a new model at a higher accuracy. The confusion matrix and accuracy rate are used for model evaluation.
Method and data
LIBS experimental setup and datasets
The schematic diagram of the most conventional LIBS detection system used in this work is shown in Figure 1A. The laser beam is generated by using a pulse laser (Nd:YAG, 10 ns pulse length, CFR400, Quantel, France). Then it is reflected and focused on the sample surfaces through a quartz lens to produce a plasma. The samples were mapped with a 100 μm step size (distance between shots). The ablation crater diameter measured under an optical microscope was 60 μm. The optical emission of the laser-induced plasma was collected using a single lens and guided to a spectrometer (EMU 65, Catalina Scientific, US; resolving power R = 6000) coupled with an electron-multiplying charge-coupled device (Falcon Blue, Raptor Photonic, IR). The camera recorded the incoming light with a delay of 0.3 μs after the ablation laser pulse and for a duration of 50 μs. More information can be referred to in ref. 33
Figure 1.
Spectral acquisition system and preprocessing of LIBS
(A) Schematic diagram of the LIBS system including a laser, a spectrometer, and an optics platform.
(B) The average spectra of 12 different labeled samples.
(C) Average spectrum of all samples (blue line) and peak detection results (red circles).
The dataset used in this work is from the benchmark classification dataset for LIBS. The dataset includes 46 basic samples in 12 categories. To adjust the classification difficulty of the dataset in a controlled manner, the soil powders were mixed to obtain a certain degree of intraclass similarity. Each of the 46 soil samples was mixed with two soil powders from a different ore class. Consequently, 138 samples were obtained in total. The dataset consists of LIBS spectra of 138 soil samples belonging to 12 different classes. Multiple spectra are acquired from one sample. Each sample acquires 500 spectra (in the training dataset), and a total of 50,000 spectra were used for training. The test set includes 11 types of samples with a total of 20,000 spectra. The number of spectra in each type is different. There are 40,002 characteristic wavelength bands of the spectrum, ranging from 200 nm to 1000 nm. A detailed introduction of the sample data can be referred to in the literature.33 The basic sample information is shown in Table 1.
Table 1.
The basic sample category and the elements
| Label | Sample | Element | Number of train sample | Number of test sample |
|---|---|---|---|---|
| 1 | U ore | Fe, K, Mg, Ti | 4500 | 3146 |
| 2 | Zn-Pb-Ag sulfide ore | Al, Ca, Fe, Mg, Pb, Si | 7500 | 3129 |
| 3 | Ni-Cu-PGE | Al, Ca, Cr, Cu, Fe, K, Mg, Na, Si, Ti | 2500 | 543 |
| 4 | Sn ore | Cr, Cu | 3000 | 1603 |
| 5 | Au-Cu ore | Al, Ca, Cu, Fe, K, Mg, Na, Ti | 3500 | 1048 |
| 6 | Mn ore | Al, Ca, Fe, Mg, Si | 4500 | 1589 |
| 7 | Gold oxide ore | Al, Ca, Fe, K, Mg, Na, Ti | 2500 | 560 |
| 8 | Zinc sulfide ore | Fe, Pb | 3000 | 1546 |
| 9 | Hematite ore | Al, Ca, Fe, Mg, Si | 7500 | 3127 |
| 10 | Anomalous ferruginous soil | Al, Ca, Cr, Cu, Fe, K, Mg, Na, Ti | 2500 | 514 |
| 11 | Silver copper gold ore | Al, Ca, Cu, Fe, K, Mg, Na, Ti | 6000 | 3195 |
| 12 | Skarn tungsten magnetite | Al, Ca, Cu, Fe, K, Mg, Na, Ti | 3000 | 0 |
Algorithm description
Support vector machine (SVM), k-nearest neighbor (KNN), decision tree (TREE), and ensemble learning are supervised statistical learning algorithm that has been proven to perform well in the classification of LIBS data.34,35,36,37 In this work, the parameter optimization of these four machine learning methods is performed through the hyperparameter optimization method built-in MATLAB. For the selected models, the optimal four model main parameters are shown in Table 2. The Bayesian optimization method is used for parameter optimization. After the model training is completed, the data of the validation set is used for model validation.
Table 2.
The optimal four model main parameters
| Model | Main parameter |
|---|---|
| KNN | Distance: Euclidean/Neighbors = 10; |
| TREE | Split criterion: GDI/Maximal decision splits = 100 |
| SVM | Kernel function: Polynomial/Polynomial order = 2; |
| RSM-EL | Learner: Discriminant/Number of learners = 30; |
The PHATE model provides a visualization that preserves the local and global structure of the data, removes the noise from the data, and presents as much information as possible in the lower dimensions. The main steps are as follows.
Input and output: Data matrix , neighborhood size , locality scale , desired embedding dimension ( in this work). Output matrix after PHATE dimensionality reduction .
Step1: Compute pairwise distance matrix from .
Step2: Compute the k-nearest neighbor distance for each column of .
Step3: Compute local affinity matrix from and .
Step4: Normalize to form a Markov transition matrix.
Step5: Compute time scale via von Neumann entropy.
Step6: Diffuse for time steps to obtain .
Step7: Compute potential representations: .
Step8: Compute potential distance matrix from .
Step9: Apply classical multidimensional scaling (MDS) to .
Step10: Apply metric MDS to with as an initialization.
The DNN model is a deep learning method being widely applied in image processing, voice detection, and information recognition.38,39,40 In this work, the DNN models are used for LIBS spectra identification and feature extraction. A nine-layer DNN model is used for LIBS spectra recognition (as shown in Figure 4). The fully connected layer and the activation function perform the nonlinear mapping of the input spectral peak characteristics, and finally, the softmax layer carries out the classification probability output. In feature extraction, the output data of the third fully connected layer is used as the input of the traditional classifier for spectral classification. All the process is programmed using MATLAB R2017b (Mathworks Inc., Natick, MA, USA).
Figure 4.
PHATE diagram of data in different layer and different training epochs
For example [M, N] represents the low-dimensional visualization of data in the net which is trained M epochs and the Nth layer.
(A) Input layer.
(B) [273, 4].
(C) [273, 6].
(D) [273, 8].
(E) [1092, 4].
(F) [1092, 6].
(G) [1092, 8].
(H) [2730, 4].
(I) [2730, 6].
(J) [2730, 8].
(K) [5460, 4].
(L) [5460, 6].
(M) [5460, 8].
Results and discussion
Spectral pre-process
The average spectra of the 12 types of samples in the dataset are shown in Figure 1B. The elements observed include metallic elements (magnesium [Mg], sodium [Na], potassium [K], and calcium [Ca]) and nonmetallic elements (carbon [C], hydrogen [H], oxygen [O], and nitrogen [N]). For the LIBS spectral analysis, the peak wavelength characterizes the element type information, and the peak intensity represents element concentration, which is also the basis for the sample classification. With different kinds of samples, there are differences in element concentration and element type among the average spectra of the samples. For example, the element Cr (Cr I 425.4 nm) exists in the category 10 sample but does not exist in the category 6 sample. The spectral line intensity of the element Na (Na I 589.6 nm) in the category 10 sample is 2.04 times that of the category 6 sample.
Classification with commonly used machine learning models
Peak extraction was used to obtain sample features for input into the machine learning model. To extract as many spectral features as possible for each sample and to eliminate redundant signals, an average spectrum was obtained using all the spectra of the 12 categories of samples, which contained information from the 12 categories of samples. The spectral features were obtained by peak extraction of the average spectrum. The results of peak detection are shown in Figure 1C. The blue line is the average spectrum and the red circles are the detected spectral peak locations. A total of 1987 spectral peaks were extracted from the average spectrum. The peaks are used as the input of the classification model to perform the sample recognition.
After the spectral peak extraction, the selected 1987 spectral features are used as the input of four commonly used machine learning models. To prevent the false high recognition accuracy of the test set, The training and test sets are divided by sample division rather than by spectra division. 50,000 spectra containing only the extracted peak features are divided into validation sets and training sets according to the ratio of 3:7. The training set is used for model training, and the validation set is used for model parameter adjustment. There were 20,000 spectra containing only the extracted peak features in the test sets. The confusion matrix of the random subspace method ensemble learning (RSM-EL) model is shown in Figure 2E. The recognition accuracy rates of categories 1 to 11 are 44.76%, 96.36%, 13.44%, 86.21%, 33.68%, 89.43%, 87.50%, 95.21%, 99.01%, 93.97%, and 25.16%, respectively. 5,000 spectra and 2,000 spectra randomly extracted from training sets and test sets are used for nonlinear feature conversion and mapping to two-dimensional space using the PHATE method. The spatial distribution of the training set samples is shown in Figure 2A. The distribution of 2,000 samples of 11 categories in the test set is shown in Figure 2B. Category 12 does not exist in the test set, because the five different kinds of samples with category 12 are all in the training set. The recognition accuracy of the category 9 sample is as high as 99.01%. From visualization results, category 9 samples are far away from other samples (except for the category 3 samples). From the elemental point of view, the Fe content of the samples in category 9 is much higher than the other samples. In the training set and test set samples, category 3 and category 9 samples have a large overlap, there are 86.19% of the category 3 samples which were identified as category 9 samples. This is because the number of samples in category 9 is larger than that in category 3, and the DNN model has less loss in identifying category 3 as category 9.
Figure 2.
Classification recognition based on traditional machine learning
(A) The distribution of 5,000 samples in 12 categories in the training set.
(B) The distribution of 2,000 samples in 11 categories in the test set, category 12 does not exist in the test set.
(C) Comparison of classification results of four common machine learning models (KNN, SVM, TREE, and RSM-EL).
(D) Comparison of sample distribution range between training set and test set.
(E) The confusion matrix of the RSM-EL model.
The recognition accuracy rates of the training set and the test set of the four models used are shown in Figure 2C. The recognition accuracy rates of the SVM, TREE, KNN, and RSM-EL models used in the recognition validation set are 97.29%, 86.79%, 85.69%, and 96.99%, respectively. The recognition accuracy rates of the test set are 61.72%, 52.69%, 53.13%, and 69.98%, respectively. The classification average accuracy of the test set of those four models is 32.31% lower than that of the validation set. The distribution of the test set and the training set is shown in Figure 2D, the test set samples and the training set samples do not completely overlap, resulting in the model trained on the training set which is not able to predict the data of the test set well.
Classification with DNN model
The DNN model is a basic deep learning model. The structure of the DNN model used in this work is shown in Figure 3A. The main purpose of the fully connected layer is for feature mapping, and the purpose of the batchnorm layer is for feature standardization. The activation function, which adopts “clippedRelu”, is used to add nonlinear factors to improve the expressive ability of the model. After the adaptive feature extraction from the second layer to the seventh layer, the softmax classifier is used to output the classification probability. The main advantage of using softmax is the output probabilities range. The range will be 0–1, and the sum of all the probabilities will be equal to one. After the softmax layer, the classification result can be obtained.
Figure 3.
Classification recognition based on DNN model
(A) Structure of fully connected deep learning network.
(B) Effect of the number of nodes in the three fully connected layers on the classification results.
(C) Quantile-Quantile (Q-Q) plot using three different optimization algorithms for DNN model.
(D) Q-Q plot using five different activation functions for DNN model.
(E) Classification accuracy of training set and validation set.
(F) Loss of training set and validation set.
(G) The confusion matrix of DNN model.
The main parameters of the model are the type of optimization method, the type of activation function, and the number of nodes in the fully connected layer. For the optimization of the number of nodes in the fully connected layer, the model optimization methods, and activation functions, 1/5 samples of the training set are randomly selected for 5-fold cross-validation for parameter optimization. The average accuracy of the validation set is shown in Figure 3B. The number of nodes in the fully connected layer has no significant effect on the recognition accuracy (alpha = 1%), with a mean of 0.96 and a variance of 0.0002. Three model optimization methods (including adaptive moment estimation [Adam], stochastic gradient descent with momentum [SGDM], and root mean squared propagation [RSMPROP]) are used for the DNN model. The optimization result of model optimization methods was shown in Figure 3C. With the SDGM method, the recognition accuracy of the DNN model is significantly higher than the other two methods. The same method is used to select the activation function of the DNN model. Alternative activation functions included elulayer, clippedrelulayer, leakyrelayer, relulayer, and tanhlayer. The optimization result of the activation function is shown in Figure 3D, among them, the three activation functions of elulayer, tanhlayer, and clippedrelulayer have better performance, but there is no significant difference among these three functions, and in this work, the clippedrelulayer was selected as activation function.
After the above optimization, the accuracy of the training set and validation set of the final training set model is shown in Figure 3E and the loss is shown in Figure 3F. The accuracy and loss of the training set and verification are close, indicating that the model performs well. The confusion matrix of the DNN model is shown in Figure 3G. The recognition accuracy rates of categories 1 to 11 are 39.70%, 90.09%, 77.16%, 79.48%, 89.41%, 99.81%, 41.79%, 97.15%, 96.19%, 96.50%, and 51.96%, respectively. The average accuracy rate of the test set with the DNN model is 75.92%, which shows that the recognition accuracy of the DNN model is higher than that of the other four machine learning models. DNN models trained with large amounts of LIBS spectra have stronger nonlinear fitting ability and generalization ability, while DNNs can adaptively extract LIBS spectral features, resulting in higher recognition accuracy of the test dataset.
The data feature evolution of the DNN model training process is shown in Figure 4. The element information is extracted through spectral peaks, and the data of the training set are feature-mapped through the PHATE method, and the position information of the samples is shown in Figure 4A. Among them, various types of samples overlap each other in the low-dimensional space, making it difficult to be distinguished. For example, in the upper left corner of Figure 4A, there are different degrees of overlap among the samples of categories 2, 5, and 6. As the epoch of the DNN model training increases, the response of each fully connected layer to the peak of the element spectral lines gradually separates the positions of the samples in the low-dimensional space.
The output data of the first fully connected layer (layer = 4) in the DNN model is shown in Figure 4B. The distribution range of the sample data shrinks, and the distance among various types of samples becomes longer. In the second fully connected layer (layer = 6) shown in Figure 4C, the sample distribution range further shrinks. After the output features of the third fully connected layer (layer = 8), as shown in Figure 4D, are mapped to low dimensions, there are only a few overlaps among the samples. For example, several samples of category 5 are distributed near the samples of category 3. The overlap of the three types of samples of categories 2, 5, and 6 disappear, and the overlap among the samples is greatly reduced.
As the epoch of training increases (epoch = 1092), the spatial distribution of low-dimensional samples is shown in Figures 4E–4G. Compared with the DNN model with 270 training times, the sample distribution range of each class is smaller. The sample distributions with training times of 2730 and 5460 are shown in Figures 4H–4J and K–M, respectively. The distribution range of each sample tends to stabilize, and the distance among the classes gradually stabilizes.
In general, the data characteristics of each sample output after the fully connected layer are easier to be distinguished, which also explains the adaptive feature extraction of the DNN model. Therefore, the DNN model can also be used as a feature mapping method to perform the feature extraction of the LIBS spectrum.
The DNN model is used as a feature extraction method. The element information of the input layer passes through the third fully connected layer of the DNN model to output features, and the output features are used as the input of the recognition model for classification. The recognition results are shown in Table 3. Compared with the traditional PCA method and direct classification results, The DNN model can be used as an effective spectral feature extraction method to improve the recognition accuracy.
Table 3.
Comparison of recognition accuracy rates using three different features
| Classifier | Peak features | PCA | DNN |
|---|---|---|---|
| TREE | 52.69% | 48.72% | 63.42% |
| SVM | 61.72% | 71.14% | 75.07% |
| KNN | 53.13% | 57.28% | 72.42% |
| RSM-EL | 69.98% | 68.07% | 74.56% |
The schematic diagram of the connection of the DNN model is shown in Figure 5C. The weight of the first fully connected layer is shown in Figure 5A. For the selected element peaks, a neuron responds to different peaks of several elements. For example, the average weight of the first neuron is −0.001, and the SD is 0.0307. The weight of Ca II 393.37 nm is −0.0077(within ), indicating that the first neuron does not respond to it, while the element weight of the spectral line at 794.80 nm is 0.205(>3 ), which indicates that the first neuron responds to it. The greater the weight, the greater the influence of the spectral line on the final classification result. The average weights of the selected peaks are shown in Figure 5B.
Figure 5.
Classification result analysis of DNN model
(A) Schematic diagram of the connection of the DNN model.
(B) Weight of firstly fully connected layer.
(C) Average weight of firstly fully connected layer and the average spectrum.
(D) Accuracy rate and the number of corrected predicted samples using different thresholds.
(E) Correct number of test set samples predicted under different thresholds taking label-2 as the example.
The output coefficient of the DNN model is judged to obtain the output label of the sample. The output coefficient is close to 1, which indicates that the model has greater "confidence" in this prediction. The accuracy of the output result and the number of correct judgments vary with the threshold as shown in Figure 5D. As the threshold increases, the accuracy of the output result is higher, but the number of results that can be output is fewer. For example, when the threshold is 0.99, the recognition accuracy rate is 91.90, and the number of samples accurately predicted is 9924, which means that nearly half of the test samples have no output results.
Accuracy improvement
The recognition accuracy of the test set is much lower than that of the validation set, which is an indication of overfitting of the training model. The reason for the overfitting is that the test set samples and the training set samples are from different samples, causing the test set data and training set data to be distributed inconsistently. Thus, classification becomes very difficult. In the output result of the DNN model, when the output threshold is greater than 0.99, the accuracy of the test data is higher. Therefore, the data of the test set can be used to update the model, thereby improving the accuracy of recognition.
The algorithm flow of updating the training set based on the output coefficients of the DNN model is shown in Figure 6A. The algorithm flow is as follows:
Figure 6.
Classification recognition based on training set update method
(A) Schematic diagram of model training process and diagram of model structure.
(B) Classification accuracy of training set and validation set.
(C) Loss of training set and validation set.
(D) The recognition accuracy of the model increases with the number of updates.
Step a. Extract peaks from the average spectra of twelve types of samples, with element peaks as initial feature data; Step b. Divide the extracted feature samples into training set and validation set randomly according to 7 to 3; Step c. According to the optimized model parameters for model training, the DNN model structure is shown in Figure 3A; Step d. Input the test data into the model to calculate the output coefficient of the eighth layer, and compare the output coefficient with the set threshold, and add it to the training set when it is greater than the threshold; Step e. Use the set threshold to select the test set samples to update the training set, and apply the updated training set in training new model; Step f. Repeat steps (b)–(e).
The accuracy and loss of the training set and validation set of the final model are shown in Figures 6B and 6C. The variation of recognition accuracy with the number of training set updates is shown in Figure 6D. The confusion matrix of the model test results is shown in Figure 7. The recognition accuracy rates of categories 1 to 11 are 45.33%, 99.90%, 98.53%, 99.75%, 96.09%, 99.94%, 95.54%, 99.55%, 98.79%, 99.42%, and 67.39%, respectively. The test set accuracy rate of the DNN model improves from 75.92% to 85.54%. The improvement of the sample of category 7 samples is the most significant, and the recognition accuracy is increased from 41.79% to 95.54%. Compared with the training set update method (81.04%) proposed in ref. 41, the recognition accuracy of this method is higher. When multiple models are used for voting, part of the models themselves do not have sufficient accuracy leading to inaccurate results in the final voting. This results in low accuracy in identifying the samples involved in the update, which can lead to poor accuracy of the final model.
Figure 7.
The confusion matrix of DNN model using the updated train dataset
The sensitivity and specificity of the DNN model are listed in Table 4. With the training set update method, the average sensitivity and specificity of the DNN model improve from 74.95% and 97.60% to 87.29% and 98.54%, respectively. The main reason for the high recognition accuracy of the sample update method is that the DNN model firstly achieves a higher accuracy rate relative to the traditional model. Secondly, only when the DNN output probability exceeds 0.99, the test set samples can be added to the model update.
Table 4.
The sensitivity and specificity of the DNN model
| Label | DNN |
DNN (with training set update) |
||
|---|---|---|---|---|
| Sensitivity (%) | Specificity (%) | Sensitivity (%) | Specificity (%) | |
| 1 | 66.90 | 89.54 | 73.51 | 90.48 |
| 2 | 98.88 | 98.19 | 99.78 | 99.98 |
| 3 | 94.80 | 99.37 | 99.26 | 99.96 |
| 4 | 82.14 | 98.22 | 92.75 | 99.98 |
| 5 | 33.54 | 99.35 | 48.48 | 99.77 |
| 6 | 63.93 | 99.98 | 73.08 | 99.99 |
| 7 | 44.66 | 98.33 | 96.57 | 99.87 |
| 8 | 94.88 | 99.76 | 99.94 | 99.96 |
| 9 | 90.14 | 99.29 | 85.71 | 99.77 |
| 10 | 55.54 | 99.91 | 91.25 | 99.98 |
| 11 | 99.10 | 91.62 | 99.91 | 94.16 |
In addition, the recognition accuracy of category 1 samples is still less than 50%. The main reason is that when the output probability is 1 for category 1 samples, the prediction accuracy rate of category 1 samples is only 44.54%, this indicates that when the training set is updated, some new samples added to the training set are incorrectly labeled as 1.
Conclusions
In this work, the DNN model is mainly used to extract the self-adaptive feature of the LIBS spectra and perform the classification of the ore. The PHATE model is applied for visual interpretation. For feature extraction, the DNN model can be used to adaptively extract spectral features. After each fully connected layer mapping, the feature dimension is reduced. The visualization results show that after the feature extraction, the distribution range of each type of sample shrinks, and the sample distance among classes is larger. Compared with direct classification results, the recognition accuracy of traditional machine learning models (SVM, TREE, KNN, and RSM-EL) is improved by 4.58% to 13.35%, which indicates that the DNN model can be used as an effective spectral feature extraction method to improve the recognition accuracy.
On this basis, the method of updating the training set alleviates the problem of low recognition accuracy caused by the inconsistent sample distribution of the training set and the test set. For accuracy rate improvement, the method based on the update of the training set improves the recognition accuracy of samples other than category 1 samples and category 11 samples to more than 95%. The average recognition accuracy of the final test set samples increases from 75.92% to 85.54%, which shows that the DNN model based on the training set update can significantly improve the recognition accuracy to achieve high-precision identification of ore.
Limitations of the study
In this article, the deep learning model for LIBS spectra recognition is updated by updating the training set, which improves the accuracy of recognition and alleviates the overfitting of the model. However, it is still not possible to eliminate overfitting, or directly improve the accuracy of the test set samples by extracting LIBS spectral features.
STAR★Methods
Key resources table
| REAGENT or RESOURCE | SOURCE | IDENTIFIER |
|---|---|---|
| Deposited data | ||
| Dataset | This paper | https://libs.ceitec.cz/benchmarking/ |
| Software and algorithms | ||
| MATLAB | this paper | ww2.mathworks.cn |
| PHATE | Moon et al.32 | https://doi.org/10.1101/120378 |
Resource availability
Lead contact
Further information and requests for resources should be directed to and will be fulfilled by the lead contact, Lianbo Guo (e-mail: lbguo@hust.edu.cn).
Materials availability
The program of this paper is developed on the MATLAB software platform. The minimum hardware requirement is to be able to run MATLAB 2021a software.
Experimental model and subject details
The dataset of LIBS is from the benchmark classification dataset for LIBS. Raw LIBS spectra are acquired using most traditional LIBS detection systems. Specific experimental details and instrument parameters refer to the section LIBS experimental setup and datasets.
For the experimental samples, the soils samples certified reference materials purchased from Ore Research & Exploration Pty Ltd (Melbourne, Australia) and dental gypsum (Spofadental, Czechia). Increasing the classification difficulty of LIBS spectra by mixing samples. Sample processing details and number of spectra for sample with different labels collected refer to section LIBS experimental setup and datasets.
Method details
Traditional machine learning models including SVM, KNN, TREE and ensemble learning were implemented using MATLAB built-in toolbox. Model parameters of classifiers refer to section algorithm description.
PHATE generates low-dimensional embeddings. PHATE has better denoising than existing visualization methods. The PHATE calculation process refer to section algorithm description. For more details of PHATE, refer to key resources table.
The DNN model was designed using MATLAB. The specific model structure is referred to the section algorithm description and classification with DNN model.
Quantification and statistical analysis
The evaluation indicators of the model include the accuracy rate, sensitivity (sensitivity = TP/(TP + FN)), specificity (specificity = TN/(TN + FP)), and the confusion matrix. TP, TN, FP, and FN stand for true positive, true negative, false positive, and false negative, respectively.
Acknowledgments
The authors would also like to acknowledge the EMSLIBS contest. This research was financially supported by the National Natural Science Foundation of China (No. 62205339, 61575073).
Author contributions
Conceptualization, Y.C., M.H.; Methodology, Y.C., C.Z., T.G.; Software, Y.L., F.C.; Writing – Original Draft, Y.C., Y.W.; Writing –Review & Editing, Y.C., L.G.; Funding Acquisition, Y.C., L.G.; Supervision, L.G., M.H.
Declaration of interests
The authors declare no competing interests.
Inclusion and diversity
We support inclusive, diverse, and equitable conduct of research.
Published: February 9, 2023
Contributor Information
Lianbo Guo, Email: lbguo@hust.edu.cn.
Minghui Hong, Email: elehmh@nus.edu.sg.
Data and code availability
All training and test data used are have been released publicly at the benchmark classification dataset for LIBS: https://libs.ceitec.cz/benchmarking/. Any additional information for reanalyzing this work is available from the lead contact upon request.
References
- 1.Busser B., Moncayo S., Coll J.L., Sancey L., Motto-Ros V. Elemental imaging using laser-induced breakdown spectroscopy: a new and promising approach for biological and medical applications. Coord. Chem. Rev. 2018;358:70–79. [Google Scholar]
- 2.Wu J., Liu Y., Cui Y., Zhao X., Dong D. A laser-induced breakdown spectroscopy-integrated lateral flow strip (LIBS-LFS) sensor for rapid detection of pathogen. Biosens. Bioelectron. 2019;142 doi: 10.1016/j.bios.2019.111508. [DOI] [PubMed] [Google Scholar]
- 3.Abdel-Salam Z.A., Palleschi V., Harith M.A. Study of the feeding effect on recent and ancient bovine bones by nanoparticle-enhanced laser-induced breakdown spectroscopy and chemometrics. J. Adv. Res. 2019;17:65–72. doi: 10.1016/j.jare.2018.12.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Araújo A.S., Castro J.P., Sperana M.A., Andrade D.F., de Mello M.L., Pereira-Filho E.R. Multiway calibration strategies in laser-induced breakdown spectroscopy: a proposal. Anal. Chem. 2021;93:6291–6300. doi: 10.1021/acs.analchem.0c04722. [DOI] [PubMed] [Google Scholar]
- 5.Yuan R., Tang Y., Zhu Z., Hao Z., Li J., Yu H., Yu Y., Guo L., Zeng X., Lu Y. Accuracy improvement of quantitative analysis for major elements in laser-induced breakdown spectroscopy using single-sample calibration. Anal. Chim. Acta. 2019;1064:11–16. doi: 10.1016/j.aca.2019.02.056. [DOI] [PubMed] [Google Scholar]
- 6.Chu Y., Zhang Z., He Q., Chen F., Sheng Z., Zhang D., Jin H., Jiang F., Guo L. Half-life determination of inorganic-organic hybrid nanomaterials in mice using laser-induced breakdown spectroscopy. J. Adv. Res. 2020;24:353–361. doi: 10.1016/j.jare.2020.05.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Zhang D., Chu Y., Ma S., Zhang S., Cui H., Hu Z., Chen F., Sheng Z., Guo L., Lu Y. A plasma-image-assisted method for matrix effect correction in laser-induced breakdown spectroscopy. Anal. Chim. Acta. 2020;1107:14–22. doi: 10.1016/j.aca.2020.02.003. [DOI] [PubMed] [Google Scholar]
- 8.Zhang D., Chu Y., Ma S., Sheng Z., Chen F., Hu Z., Zhang S., Wang B., Guo L. Three-dimensional elemental imaging of material surface using image-assisted laser-induced breakdown spectroscopy. Appl. Surf. Sci. 2020;534 [Google Scholar]
- 9.Abdel-Salam Z.A., Abdel-Salam S.A.M., Abdel-Mageed I.I., Harith M.A. Evaluation of proteins in sheep colostrum via laser-induced breakdown spectroscopy and multivariate analysis. J. Adv. Res. 2019;15:19–25. doi: 10.1016/j.jare.2018.07.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Cousin A., Forni O., Maurice S., Gasnault O., Fabre C., Sautter V., Wiens R., Mazoyer J. Laser induced breakdown spectroscopy library for the Martian environment. Spectrochim. Acta B Atom Spectrosc. 2011;66:805–814. [Google Scholar]
- 11.Thomas N.H., Ehlmann B.L., Anderson D.E., Clegg S.M., Forni O., Schröder S., Rapin W., Meslin P.Y., Lasue J., Delapp D.M., et al. Characterization of hydrogen in basaltic materials with laser-induced breakdown spectroscopy (LIBS) for application to MSL ChemCam data. J. Geophys. Res. Planets. 2018;123:1996–2021. [Google Scholar]
- 12.Xu W., Liu X., Yan Z., Li L., Zhang Z., Kuang Y., Jiang H., Yu H., Yang F., Liu C., et al. The MarSCoDe instrument suite on the mars rover of China’s tianwen-1 mission. Space Sci. Rev. 2021;217:64. [Google Scholar]
- 13.Zou Y., Zhu Y., Bai Y., Wang L., Jia Y., Shen W., Fan Y., Liu Y., Wang C., Zhang A., et al. Scientific objectives and payloads of Tianwen-1, China’s first Mars exploration mission. Adv. Space Res. 2021;67:812–823. [Google Scholar]
- 14.Chen M., Yuan T., Hou Z., Wang Z., Wang Y. Effects of moisture content on coal analysis using laser-induced breakdown spectroscopy. Spectrochim. Acta B Atom Spectrosc. 2015;112:23–33. [Google Scholar]
- 15.Chu Y., Chen T., Chen F., Tang Y., Tang S., Jin H., Guo L., Lu Y.f., Zeng X. Discrimination of nasopharyngeal carcinoma serum using laser-induced breakdown spectroscopy combined with an extreme learning machine and random forest method. J. Anal. At. Spectrom. 2018;33:2083–2088. [Google Scholar]
- 16.Ghasemi F., Parvin P., Reif J., Abachi S., Mohebbifar M.R., Razzaghi M.R. Laser induced breakdown spectroscopy for the diagnosis of several malignant tissue samples. J. Laser Appl. 2017;29 [Google Scholar]
- 17.Sheng L., Zhang T., Niu G., Wang K., Tang H., Duan Y., Li H. Classification of iron ores by laser-induced breakdown spectroscopy (LIBS) combined with random forest (RF) J. Anal. At. Spectrom. 2015;30:453–458. [Google Scholar]
- 18.Yan C., Wang Z., Ruan F., Ma J., Zhang T., Tang H., Li H. Classification of iron ore based on acidity and alkalinity by laser induced breakdown spectroscopy coupled with N-nearest neighbours (N3) Anal. Methods. 2016;8:6216–6221. [Google Scholar]
- 19.Death D., Cunningham A., Pollard L. Multi-element and mineralogical analysis of mineral ores using laser induced breakdown spectroscopy and chemometric analysis. Spectrochim. Acta B Atom Spectrosc. 2009;64:1048–1058. [Google Scholar]
- 20.Chen T., Zhang T., Li H. Applications of laser-induced breakdown spectroscopy (LIBS) combined with machine learning in geochemical and environmental resources exploration. TrAC, Trends Anal. Chem. 2020;133 [Google Scholar]
- 21.Wang Z., Afgan M.S., Gu W., Song Y., Wang Y., Hou Z., Song W., Li Z. Recent advances in laser-induced breakdown spectroscopy quantification: from fundamental understanding to data processing. TrAC, Trends Anal. Chem. 2021;143 [Google Scholar]
- 22.Huang L., Meng L., Yang L., Wang J., Li S., He Y., Wu D. A novel method to extract important features from laser induced breakdown spectroscopy data: application to determine heavy metals in mulberries. J. Anal. At. Spectrom. 2019;34:460–468. [Google Scholar]
- 23.Liu L., Liu J., Zhao N., Lu C., Chen D., Shi H., Wang C., Zhang Y., Liu W. Study on the automatic extraction method of spectral data features in laser induced breakdown spectroscopy. Guang Pu Xue Yu Guang Pu Fen Xi. 2011;31:3285–3288. [PubMed] [Google Scholar]
- 24.Labbé N., Swamidoss I.M., André N., Martin M.Z., Young T.M., Rials T.G. Extraction of information from laser-induced breakdown spectroscopy spectral data by multivariate analysis. Appl. Opt. 2008;47:G158–G165. doi: 10.1364/ao.47.00g158. [DOI] [PubMed] [Google Scholar]
- 25.Killiny N., Etxeberria E., Flores A.P., Blanco P.G., Reyes T.F., Cabrera L.P. Laser-induced breakdown spectroscopy (LIBs) as a novel technique for detecting bacterial infection in insects. Sci. Rep. 2019;9:2449. doi: 10.1038/s41598-019-39164-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Chen T., Men J., Zhao M., Zhang T., Li H. The spectral fusion of laser-induced breakdown spectroscopy (LIBS) and mid-infrared spectroscopy (MIR) coupled with random forest (RF) for the quantitative analysis of soil pH. J. Anal. At. Spectrom. 2021;36:1084–1092. [Google Scholar]
- 27.Saetchnikov A.V., Tcherniavskaia E.A., Saetchnikov V.A., Ostendorf A. Deep-learning powered whispering gallery mode sensor based on multiplexed imaging at fixed frequency. Opto-Electronic Advances. 2020;4 [Google Scholar]
- 28.Chen L., Yin Y., Li Y., Hong M. Multifunctional inverse sensing by spatial distribution characterization of scattering photons. Opto-Electronic Advances. 2019;2:19001901–19001908. [Google Scholar]
- 29.Liao M., Zheng S., Pan S., Lu D., He W., Situ G., Peng X. Deep-learning-based ciphertext-only attack on optical double random phase encryption. Opto-Electronic Advances. 2021;4 [Google Scholar]
- 30.Wang X., Chen S., Wu M., Zheng R., Liu Z., Zhao Z., Duan Y. Low-cost smartphone-based LIBS combined with deep learning image processing for accurate lithology recognition. Chem. Commun. 2021;57:7156–7159. doi: 10.1039/d1cc01844b. [DOI] [PubMed] [Google Scholar]
- 31.Castorena J., Oyen D., Ollila A., Legett C., Lanza N. Deep spectral CNN for laser induced breakdown spectroscopy. Spectrochim. Acta B Atom Spectrosc. 2021;178 [Google Scholar]
- 32.Moon K.R., van Dijk D., Wang Z., Gigante S., Burkhardt D.B., Chen W.S., Yim K., Elzen A.v. d., Hirn M.J., Coifman R.R., et al. Visualizing structure and transitions in high-dimensional biological data. Nat. Biotechnol. 2019;37:1482–1492. doi: 10.1038/s41587-019-0336-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Képeš E., Vrábel J., Střítežská S., Pořízka P., Kaiser J. Benchmark classification dataset for laser-induced breakdown spectroscopy. Sci. Data. 2020;7:53. doi: 10.1038/s41597-020-0396-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Zhang T., Wu S., Dong J., Wei J., Wang K., Tang H., Yang X., Li H. Quantitative and classification analysis of slag samples by laser induced breakdown spectroscopy (LIBS) coupled with support vector machine (SVM) and partial least square (PLS) methods. J. Anal. At. Spectrom. 2015;30:368–374. [Google Scholar]
- 35.Li X., Yang J., Chang F., Zheng X., He X. LIBS quantitative analysis for vanadium slags based on selective ensemble learning. J. Anal. At. Spectrom. 2019;34:1135–1144. [Google Scholar]
- 36.Messaoud Aberkane S., Abdelhamid M., Mokdad F., Yahiaoui K., Abdelli-Messaci S., Harith M.A. Sorting zamak alloys via chemometric analysis of their LIBS spectra. Anal. Methods. 2017;9:3696–3703. [Google Scholar]
- 37.Dingari N.C., Barman I., Myakalwar A.K., Tewari S.P., Kumar Gundawar M. Incorporation of support vector machines in the LIBS toolbox for sensitive and robust classification amidst unexpected sample and system variability. Anal. Chem. 2012;84:2686–2694. doi: 10.1021/ac202755e. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Kang T.G., Lee K.H., Kang W.H., Bae S.H., Kim N.S. Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA)(IEEE2016) IEEE; 2016. DNN-based voice activity detection with local feature shift technique; pp. 1–4. [Google Scholar]
- 39.Yang X., Li F., Liu H. A survey of DNN methods for blind image quality assessment. IEEE Access. 2019;7:123788–123806. [Google Scholar]
- 40.Hussain M.A., Hamarneh G., Garbi R. International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer; 2019. ImHistNet: learnable image histogram based DNN with application to noninvasive determination of carcinoma grades in CT scans; pp. 130–138. [Google Scholar]
- 41.Vrábel J., Képeš E., Duponchel L., Motto-Ros V., Fabre C., Connemann S., Schreckenberg F., Prasse P., Riebe D., Junjuri R., et al. Classification of challenging Laser-Induced Breakdown Spectroscopy soil sample data-EMSLIBS contest. Spectrochim. Acta B Atom Spectrosc. 2020;169 [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
All training and test data used are have been released publicly at the benchmark classification dataset for LIBS: https://libs.ceitec.cz/benchmarking/. Any additional information for reanalyzing this work is available from the lead contact upon request.







