Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Mar 3;16:11808. doi: 10.1038/s41598-026-38266-4

Machine learning methods for designing a carbon dot based photoluminescent multimodal nanosensor

Galina Chugreeva 1,✉, Kirill Laptinskiy 1,2, Artem Guskov 1, Gavriil Kupriyanov 1, Igor Isaev 2, Sergey Dolenko 1,2, Tatiana Dolenko 1
PMCID: PMC13065744  PMID: 41775762

Abstract

This study addresses the problem of simultaneous determination of metal cations and nitrate anions concentrations in multicomponent aqueous solutions. To solve this task, a photoluminescent nanosensor based on carbon dots synthesized by the hydrothermal method from citric acid and ethylenediamine is developed. A key novel feature of the developed nanosensor is its multimodality, i.e. the ability to simultaneously determine (by the same photoluminescent spectrum) the concentrations of all ions under consideration. Various representations of the photoluminescent spectrum of carbon dots added to the studied solution are used as the source of information. To determine the target concentrations from the photoluminescent spectra under consideration, machine learning methods are used: neural networks of the multilayer perceptron type, convolutional neural networks, Kolmogorov-Arnold neural networks, gradient boosting, and linear regression. The use of the transfer learning technique for neural networks in the transition from solving a 6-parameter problem to solving a 7-parameter problem is considered. It was shown that the best results are achieved using convolutional neural networks. (The mean absolute errors of simultaneous determination of Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic , cations and Inline graphic anion concentrations were 0.68, 1.05, 0.43, 1.38, 1.08, 0.32 and 2.43 mM, respectively.) Such precision meets the requirements for determining the concentration of ions in wastewater and process water. Transfer learning allows reducing the computational cost of the solution. Kolmogorov-Arnold networks can provide a visual interpretation of the resulting model.

Keywords: Machine Learning, Convolutional Neural Networks, Transfer Learning, Kolmogorov-Arnold Networks, Carbon Nanosensors

Subject terms: Chemistry, Materials science, Mathematics and computing, Nanoscience and technology

Introduction

Monitoring the ionic composition of industrial process liquid wastes entering surface and underground waters, soils and ultimately through food and air the bodies of humans and animals is an extremely pressing issue1,2. Heavy metals, which are highly toxic and bioaccumulative, pose a particularly serious threat to aquatic ecosystems and human health2. To solve this problem, it is necessary to develop express methods for determining the qualitative and quantitative ionic composition of liquid media in real time.

Currently, there are a large number of methods that allow detecting heavy metal ions in liquid media and determining their concentration. Such methods include amperometry3, chromatography 4, atomic absorption spectroscopy5 and other approaches. Although optical methods are inferior to analytical ones in accuracy, their key advantages are the lack of need for sample preparation, rapidity and the possibility of remote sensing of the objects under study. The development of nanotechnology and machine learning (ML) has significantly accelerated the process of creating optical sensors capable of determining environmental parameters with high accuracy in real time6,7.

To study the composition of multicomponent aqueous solutions using optical spectroscopy (OS) methods, it is proposed to use nanoparticles whose optical properties are sensitive to the presence and concentration of most components of the environment. Among such nanoparticles, carbon dots (CDs) - representatives of the zero dimensional class of carbon nanoparticles - have wide prospects for application in various problems of science, technology and medicine8–10. Compared to other nanoparticles, CDs stand out due to a combination of such properties as simplicity and low cost of synthesis, stability of optical characteristics, the ability to modify and functionalize their surface, biocompatibility, and dispersibility in water11–14. Photoluminescence (PL) of CDs is very sensitive to changes in environmental parameters - such as pH and temperature of the solution15–17, the type and concentration of dissolved ions in the medium7,18–20. Moreover, the PL intensity of CDs is selective with respect to different types of ions and their concentration in solutions7,20. Such selective sensitivity of PL of CDs makes it possible to create CD-based nanosensors of various ions capable of determining the concentration of a specific ion in an aqueous medium based on the PL spectra of CDs6,7,21–23. While optical methods are less accurate than analytical methods, they don’t require sampling or special sample preparation, making them express and remote. Special attention is paid to the creation of optical nanosensors due to the active development of materials science and nanotechnology. Using spectroscopy based on PL of CDs added to the studied solution provides higher sensitivity and selectivity and lower detection cost than other types of spectroscopy not using addition of special sensors (absorption spectroscopy, Raman spectroscopy etc.). A key novel feature of the sensor is its multimodality, i.e. the ability to simultaneously determine (by the same spectrum) the concentrations of all ions under consideration.

In the studies devoted to the investigations of the applicability of CDs as nanosensors of heavy metal ions, there is a stable tendency towards the development of unimodal nanosensors19,20,23,24 with the lowest ion limit of detection (LOD). For example, in21 a nanosensor based on CDs obtained by the hydrothermal method is described, capable of determining the concentration of iron ions in the range of 0-60 Inline graphicM with a detection limit of 70 nM. The authors of22 developed a sensor for Inline graphic ions using graphene CDs with an LOD of iron ions of 30 nM. A nanocomposite based on carbon dots and cadmium sulfide quantum dots, capable of determining the concentration of Inline graphic ions with a LOD of 2.07 Inline graphicM in the ion concentration range of 2-120 Inline graphicM, was proposed in23.

In modern literature, approaches to the creation of two-parameter carbon nanosensors are being developed, allowing the determination of the concentration of one ion at a fixed concentration of the second one24–27. In Ref.24, CDs obtained by hydrothermal synthesis and doped with nitrogen and sulfur atoms were proposed to be a base for a nanosensor with the “on-off” principle proposed for determining the concentration of Inline graphic and Inline graphic ions in water. The PL of CDs quenched by lead ions was restored by adding fluorine ions to the solution. The nanosensor developed and tested in wastewater samples ensured the determination of the concentration of Inline graphic and F- ions with a LOD of 13.35 nM and 43.17 nM, respectively. The sensors developed on the basis of CDs operate in a similar way to determine the concentrations of Inline graphic ions and TNT25 with a LOD of 3.1 nM and 46 nM, respectively, Inline graphic and metalaxyl fungicide ions26 with a LOD of 5.4 nM and 8.7 nM, Inline graphic and Inline graphic ions27 with a LOD of ions of 0.41 and 1.2 Inline graphicM, respectively.

Today, machine learning methods (MLM), in particular artificial neural networks (ANN), are successfully applied to a wide range of problems, including biological sciences28–32, economics33, image recognition34, natural language processing35, and information security36. Moreover, ML methods are increasingly used for solving OS problems6,7,37–42. For example, in37, an ANN of the multilayer perceptron (MLP) type was used to solve the problem of diffuse OS to determine tissue oxygenation. The authors of43 developed a glutathione sensor based on gold nanoparticles using MLP to process spectral data. The resulting model demonstrated high accuracy in determining the concentration of glutathione based on the absorption spectra of nanoparticles. One-dimensional and two-dimensional convolutional neural networks (CNN) are actively used to process spectral data6,40,44. For example, in40, an absorption spectroscopy sensing system for acetylene and methane based on one-dimensional CNN and MLPs is presented. Some studies attempt to interpret the results of using CNN. Thus, in44, the applicability of plasma optical emission spectroscopy in combination with CNN for classification of volatile organic compounds in real time was studied. The authors also proposed a method for interpreting the obtained neural network results. The CNN spectral processing mechanism was visualized using feature maps, and critical spectral features were determined using gradient-weighted mapping of activation maps.

There are known studies in which ANN were used to solve regression inverse problems of the OS of carbon nanoparticle solutions, including CDs. In the study41 it is shown how, using such MLM as MLP, linear regression (LR), partial least squares (PLS) method, random forest (RF), gradient boosting (GB) over decision trees, it is possible to determine the pH and temperature of an aqueous solution with high accuracy from the PL spectra of CDs. The authors of this article previously developed and tested a nanosensor based on CDs on wastewater, which provides simultaneous determination of the concentrations of 4 and 6 ions in real time from the PL spectra of CD aqueous solutions using MLP and CNN6,7.

Successful application of MLMs requires highly representative spectral data sets. Obtaining high-quality data sets for solving OS inverse problems involves the work of a large number of highly qualified specialists, wear and tear of expensive equipment, and it is time-consuming. Data augmentation using generative MLMs is one of the possible ways to solve such problems38,39,45. For example, the authors of45 solved the problem of classifying bacterial strains by their Raman spectra. Using generative adversarial neural networks (GANs), they managed to increase the representativity of the spectral data set and to improve the accuracy of the problem solution. In38, an approach was proposed to increase the representativity of the Raman spectra set of water-ethanol solutions using the partial least squares (PLS) model as an additional model for analyzing the latent space generated by the conditioned variational autoencoder (cVAE). The use of this approach led to a significant decrease in the average absolute error in determining the concentration of ethanol, fusel oil, methanol, and ethyl acetate. To increase the representativity of the spectroscopic data set when solving the problem of simultaneously determining the concentration of each of the Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic and Inline graphic ions in aqueous solutions based on their absorption spectra, the authors of39 compared the algorithms for generating additional model data using variational autoencoders (VAE). It was shown that the most promising is the use of an ordinary (unconditioned) VAE with the generation of patterns from a uniform distribution in the latent space. The problems of accumulating representative sets are also characteristic of solving inverse problems of OS of CD solutions. Such MLMs as multiple linear regression and the K-nearest neighbor method were used in42 to obtain the dependence of the optical properties of CDs on their precursors. Based on data on the synthesis parameters and optical properties of CDs obtained from open sources, an ML model was developed that allows for the high-precision determination of the optical properties of CDs based on pre-set synthesis conditions and precursor types.

Among modern methods aimed to reduce the requirements for the volume of available experimental data, transfer learning methods should be also taken into account46. Within the framework of this approach, the knowledge accumulated in solving some initial problem is applied to solve new (target) problems. The approach is especially relevant when the initial problem has a high degree of generality and allows collecting or generating a sufficient amount of data (for example, image recognition problems34 and natural language processing35), while the target problem is highly specialized, which makes data collection for it difficult and expensive (for example, diagnostics of pathologies from medical images47). In such cases, transfer learning allows for the effective solution of the target problem using significantly less data compared to traditional ML, where solving each new problem requires training models from scratch on large data samples.

In the context of the growing need for prompt and high-quality solutions to increasingly complex and specialized applied problems, the implementation of approaches such as transfer learning is becoming an important step towards optimizing the processes of analyzing experimental data. Thus, in48, transfer learning techniques made it possible to increase the accuracy of determining water parameters (such as temperature, oxygen and nutrient content, transparency, etc.) in poorly monitored lakes, the collection of data for which is associated with large financial costs. This result was achieved through the use of models pre-trained on data from well-monitored lakes. Transfer learning methods were also successfully used by the authors of this article to solve inverse problems of spectroscopy of solutions49, namely, to move from diagnosing the composition of multicomponent solutions in distilled water to diagnosing their composition in natural waters.

One of the new approaches to solving inverse problems is the use of Kolmogorov-Arnold networks (KAN)50–58. KAN are based on the fundamental Kolmogorov-Arnold theorem50, which describes an approximator that is more compact and adaptive than traditional ANNs (e.g., an MLP). However, constructing KANs capable of solving practical problems was considered impossible for a long time due to certain theoretical limitations, such as the problem of approximating KANs with functions of different degrees of smoothness etc. Nevertheless, Liu Z., et.al. in their preprint51 proposed an effectively trained KAN architecture, which clearly demonstrated the advantages of KANs over MLPs on a number of test problems, and pointed out the potential of KANs to be an explainable model. Currently, there is an active search for optimal sets of basic KAN functions and alternative forms of KANs52. KAN is applied to problems of time series forecasting53,54, reinforcement learning55, and it is implemented in deep learning models with convolutional56 and transformer57 layers.

KAN is also actively used to solve inverse problems. Thus, in the study59, when solving the inverse problem of small-angle scattering (SAS), aimed at studying the structure of soft materials, KAN demonstrated higher accuracy and adaptability compared to traditional methods. KAN was successfully tested on biomedical problems: the model using KAN layers, according to the authors60, made it possible to obtain state-of-the-art results in several problems of segmentation of damaged tissues. In the problem of predicting the folding of protein molecules, KAN layers made it possible to improve the accuracy of the models, as well as to interpret more informatively the work of the model using the attribution-score technique61.

Thus, the efficiency of solving the target problem is largely determined by the correct choice of the ML model, which, in turn, depends on the type of the problem, on data features, and on the required result. In this paper, we perform comparative analysis and study the efficiency of using three ML approaches to developing a photoluminescent multimodal nanosensor based on CDs - the use of artificial neural networks (MLP and CNN), the transfer of NN learning as a method for compensating for the lack of experimental data, and the use of KAN. The use of these MLMs ensured the creation of the world’s first CDs nanosensor capable of simultaneously determining the concentrations of each of the 7 ions in aqueous media in real time using the photoluminescence excitation-emission matrices of CDs in water.

This article is organized as follows. Section 2 describes Material and Methods, including Experiment and Data Preparation (2.1), The use of ML methods (2.2), including ANN (2.2.1), Transfer Learning (2.2.2) and KAN (2.2.3), and Evaluation of the quality of the solution of the inverse problem (2.3). Section 3 provides the results of the study, for each of the three main directions – ANN (3.1), Transfer Learning (3.2), and KAN (3.3). Finally, Section 4 presents conclusions and outlook of the paper.

Materials and methods

Experiment and data preparation

Objects of research

The nanosensor was based on CDs synthesized by the hydrothermal method from ethylenediamine (EDA, Acros Organics, Belgium) and citric acid (CA, Acros Organics, Belgium) precursors. The synthesis was carried out for a molar ratio of CA:EDA precursors of 1:2 at a temperature of Inline graphic for 3 hours. The resulting nanoparticles in water had a size of 10 nm, the quantum yield of photoluminescence of the CDs was 96Inline graphic, and the lifetimes of the photoluminescence of the luminophores were 3.5 ns and 12.5 ns. A detailed description of the synthesis and the results of characterization of the obtained CDs is presented in the article11.

Metal nitrates Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic were classified as “reagent grade preparation” (PanReac AppliChem, Spain, Germany). Bi-distilled deionized water (Millipore Milli-Q water purification system) was used as a solvent.

A total of 7813 aqueous solutions containing CDs and nitrates of the following cations were prepared: Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic in various combinations. The concentration of CDs in all samples was fixed, and it was 5 mg/L. The concentrations of cations varied in the range from 0 to 6 mM with a step of 1.5 mM. The concentration of Inline graphic anions directly depended on the concentration of cations and varied from 0 to 84 mM. Among the 7813 prepared samples, there were 12 one-component solutions (containing one type of cation), 120 two-component solutions (containing any two types of cations), 640 three-component solutions, 1920 four-component solutions, 3072 five-component solutions, and 2048 six-component solutions (containing six types of cations simultaneously). Aqueous solution of CDs in the absence of ions was also studied.

Data array

To train the ML algorithms, the excitation-emission matrices of the CD PL obtained for each of the prepared aqueous solutions were used.

The PL spectra were recorded on the Shimadzu RF-6000 spectrofluorimeter in the range from 375 to 575 nm with a step of 1 nm (a total of 201 spectral channels). The PL excitation of the samples was carried out at 27 wavelengths. Thus, the initial set of input features had the form of a two-dimensional matrix of size [Inline graphic], where each element of the matrix corresponded to the value of the PL signal intensity corresponding to a specific pair of excitation and emission wavelengths. The actual dimensionality of the input data fed to the ML algorithms was determined by the type of the computational experiment (e.g., either the entire matrix or its individual fragments were used). Figure 1 shows examples of the obtained CD PL excitation-emission matrices for two prepared aqueous solutions.

Fig. 1.

Fig. 1

Excitation-emission matrices of PL of an aqueous solution of CDs with a concentration of 5 mg/l in the absence of salts (a) and in the presence of Inline graphic and Inline graphic salts (with a concentration of 6 mM each) (b).

The output features, i.e. the parameters being determined, were the concentrations of seven ions: Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic , Inline graphic. The output dimension of the problem was determined by the type of the computational experiment.

As shown in 20,62, the interaction of CD with various ions in water manifests itself in the PL spectra in a similar way: all the studied ions extinguish PL, i.e.: the intensity of PL decreases as a result of interactions; the center of mass of the PL spectrum shifts to longer wavelengths with increasing ion concentration; and the half-width increases 20. However, the quantitative changes in these spectral characteristics for different ions differ significantly. This is explained by the fact that due to the different surface densities of ions, they are located near the surface of the CD during different times; as a result of such dynamic quenching by PL ions, the changes in spectral characteristics differ 62. If the contribution of each ion to PL quenching could be determined in multicomponent salt solutions, then there would be no need to use ML. However, neural networks are able to evaluate the contribution of each type of ion to PL extinguishing during the process of training.

The use of the machine learning methods

Artificial neural networks

To solve the studied problem of photoluminescence spectroscopy, two types of artificial neural networks were used: multilayer perceptron (MLP) and convolutional neural network (CNN).

MLP is one of the most common NN architectures. The applicability of MLP to solve the stated problem is due to the well-known fact that it is a universal approximator.

The excitation-emission matrix of the CD PL is an analogue of two-dimensional single-channel images, as the PL intensity values in adjacent spectral channels are significantly correlated. Given these properties, CNNs (both one-dimensional - 1D_CNN and two-dimensional - 2D_CNN) are a promising tool for solving the stated problem. This is due to their ability to effectively process data with ordered and correlated features, such as images and spectra.

At the same time, training of MLP and CNN is often associated with significant computational costs. Due to the high dimensionality of the obtained PL excitation-emission matrices ([Inline graphic] or 5427 features) and the strong correlation between the values in adjacent spectral channels, it was proposed to study the effect of reducing the dimensionality of the input data on the computational cost and on the quality of the solution to the inverse problem. In this case, the following arrays of input data were fed to the input of the ML algorithms:

1EW_350: one-dimensional emission spectrum of CD PL at the excitation wavelength of 350 nm, corresponding to the region of maximum PL signal intensity. Dimension – [Inline graphic];

3EW_280_350_410: combination of three PL emission spectra obtained at three excitation wavelengths – 250 nm, 350 nm, and 450 nm. This approach takes into account the contributions of luminophores excited at different excitation wavelengths. Dimension – [Inline graphic];

27EW: original two-dimensional excitation-emission matrix of the PL of CDs. Dimension – [Inline graphic].

The quality of the solution of the inverse problem under consideration depends, among other things, on the dimensionality of the output data, i.e. on the number of simultaneously determined parameters. Despite comparable ranges of change in the concentrations of the ions under study, the ANN during training can “give preference” to individual components, determining their concentrations more accurately compared to others. To assess the influence of the output dimensionality of the problem on the quality of the solution of the posed problem, the ANN was trained in two modes:

  • Autonomous mode: the original task with N outputs is divided into N tasks with a single output – one for each parameter being determined. Thus, a separate model is built for each parameter being determined.

  • Simultaneous mode: simultaneous determination of all seven parameters by a single model.

Thus, the following parameters were varied during modeling:

I. NN architectures

  • Multilayer perceptrons (MLP)

  • One-dimensional convolutional neural networks (1D_CNN)

  • Two-dimensional convolutional neural networks (2D_CNN)

II. Parameters of neural network architectures:

  • Activation functions between hidden layers – Leaky ReLU and sigmoid

  • Number of hidden layers

  • Autonomous (1 neuron in the output layer) and simultaneous (7 neurons in the output layer) determination of parameters.

  • For two-dimensional CNN, the filter stride was also varied - 1 and 5.

III. Data fed to the input of the neural network:

  • One-dimensional spectrum of the PL of CDs - 1EW_350.

  • Combination of three spectra of the PL of CDs - 3EW_280_350_410.

  • Two-dimensional matrix - 27EW.

Splitting the data array into training, validation, and test sets. Cross-validation. Training. The original database was divided into training, validation, and test sets in a ratio of 70:20:10. The training set was used to train the models; the validation set was used to ensure timely stopping of training; and the test set was used for the final assessment of the quality of the trained models on independent data. The ANN training was stopped if the mean squared error on the validation set did not decrease within 100 epochs.

To prevent the influence of the data partitioning method on the results of applying the MLM to the sets of spectra, a three-fold cross-validation was applied. The original data set was divided into training/validation/test sets 3 times. The results of using the MLM with three implementations of partitioning into sets were averaged. In addition, to obtain a solution independent of random factors (for example, for NN such a factor is random initialization of weight coefficients), for each of the three partitions in each computational experiment, three identical models with different sets of random variables were trained. The presented results were obtained by averaging the statistical indicators of these nine models.

The optimizer chosen for all computational experiments in Section 2.2.1 was the Adam optimizer with a learning rate of 0.001. The mean squared error (MSE) function was chosen as the loss function. The remaining parameters of the algorithms were selected using the grid search method. Training was performed on a 12th Gen Intel(R) Core(TM) i5-12400, 2.50 GHz CPU.

Comparative analysis of IP solutions obtained using ANN and other MLMs The solutions obtained using ANN were compared with the results of using a simpler model that can solve the problem with high accuracy with minimal computational costs. One of the most common machine learning methods is Gradient Boosting (GB).

Gradient Boosting is an ensemble machine learning method that uses Decision Trees (DT) as base algorithms. In this paper, the implementation of this machine learning method in the sklearn library was used [Gradient Boosting Regressor in https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html]. The hyperparameters of the model were chosen as follows: the number of DTs was 400, the depth of trees was 3, and the learning rate was 0.1. The original data set for working with GB was divided into 2 parts - training set (90Inline graphic of the total number of patterns) and test set (10Inline graphic).

Transfer learning of neural networks

Currently, ML algorithms are successfully used to solve a wide range of applied problems. At the same time, most of these models demonstrate high performance only if the training and test data sets belong to the same feature space and have a similar distribution. Therefore, to successfully solve a new problem with a different feature space or distribution, it is necessary to train a new model from scratch on a large amount of new data corresponding to this new problem. However, in many real-world applications, collecting enough data and rebuilding models are extremely expensive and labor-intensive processes.

To solve the described problem, the transfer learning approach 46 (Fig. 2) is often used, the main idea of which is to apply the knowledge accumulated in solving some previous (initial) problem to solve a new (target) problem. In this case, the data of the initial problem is assumed to contain general patterns useful for solving the target problem. This approach allows one to reduce the requirements for the volume of available data in the target problem and ensures a faster, more efficient and economically feasible solution. At the same time, the effectiveness of transfer learning depends on the degree of similarity between the source and target tasks; transferring knowledge between substantially different problems characterized by different feature spaces or data distributions may be ineffective.

Fig. 2.

Fig. 2

The process of solving problems in traditional machine learning (a) and in the paradigm of transfer learning of neural networks (b).

One of the most common methods for transferring knowledge from a source problem to a target problem is parameter transfer46. This approach is based on the assumption that both problems have some common parameters or prior distributions of the hyperparameters of the models. In this case, knowledge is transferred through these common elements, which facilitates more efficient training of the target model.

For example, knowledge can be transferred in the form of a model previously obtained by solving the original problem. In the context of NN, this means transferring the parameters of the original model (architecture, hyperparameters, weight coefficients) to the target model. Thus, the target model will be trained not entirely from scratch, but taking into account the accumulated experience. In this case, the volume of information transferred depends on the degree of similarity between the original and target problems. In some cases, it is more appropriate to transfer only part of the weights of the original network to the target model, and to initialize the rest of the weights randomly.

The described method of knowledge transfer between NNs is actively used in solving various applied problems. Its popularity is due, on the one hand, to the availability of a large number of pre-trained universal neural network models in public domain, and on the other hand, to the relative simplicity of implementing this approach in practice.

In this paper, the transfer of knowledge between the source and target tasks is carried out using the method of transferring parameters between NNs.

Spectral database In this paper, we investigate the efficiency of applying transfer learning to neural networks to solve the inverse 7-parameter (7P) problem of photoluminescence spectroscopy. For this purpose, we use information obtained from solving a similar 6-parameter (6P) problem7.

The studied aqueous solutions for the 6P and 7P problems contained CDs (with a fixed concentration of 5 mg/L), Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic cations (with concentrations varying in the range from 0 to 6 mM with a step of 1.5 mM) and the Inline graphic anion (with a concentration depending on the cation concentration and changing in the range from 0 to 72 mM (6P) or from 0 to 84 mM (7P)). In the solutions for the 7P problem, the Inline graphic cation is additionally present with the same variation range of concentration as that of the other cations. Thus, the initial arrays of the PL excitation-emission matrices of CDs in solutions consisted of 3125 and 7813 patterns for the 6P and 7P problems, respectively.

Application of ANN. Splitting the data array into training, validation, and test sets. Cross-validation. Training. To solve the described 7P inverse problem, a multilayer perceptron type neural network was used.

As a result of grid search, the following values of the model hyperparameters were used at all stages of the computational experiment: the MLP architecture had three hidden layers consisting of 64+32+16 neurons; the transfer function for the hidden layers was sigmoidal, for the output layer it was linear; the learning rate (from the first hidden layer to the output layer) was Inline graphic; the moment value was 0.9. Network training was stopped after exceeding the timeout of 500 epochs after the minimum of the mean squared error on the validation set. Training was carried out using the stochastic gradient descent method.

As in the experiments of Section 2.2.1 “Artificial neural networks”, the original database – 27EW matrices – was divided into training, validation, and test sets in the ratio of 70:20:10. To eliminate the influence of the method of splitting the original data set on the results of applying the MLMs, the cross-validation method was used. The original data array was divided into training, validation, and test sets 3 times. In addition, to obtain a solution independent of random factors (for example, for NN such factor is random initialization of weight coefficients), for each of the three splits, three NN models, three GB, and three Random Forest models with different sets of random variables were trained. The presented results for each method were obtained by averaging the statistical indicators of nine such models.

Autonomous parameter determination was used to reduce the output problem dimension. Input dimensionality reduction for the problem was not used.

The transfer of NN learning from the 6P photoluminescence spectroscopy task to the 7P task was carried out by additional training of the NN previously trained on the 6P task data, on the 7P task data. In this case, the architecture, hyperparameters and weights of the NN act as knowledge transferred from the original task to the target one.

The study of the effectiveness of the neural network transfer learning approach for solving the problem under study was carried out by comparing the quality of the neural network trained on the 7P task data and the neural network pre-trained on the 6P task data and further trained on the 7P task data on the 7P task test set.

Comparative analysis of IP solutions obtained using ANN and other MLMs The obtained solutions of the IP using the NN transfer learning were compared with the results of applying Gradient Boosting, Random Forest and Linear Regression.

Gradient Boosting over Decision Trees (DT). The following optimal hyperparameters of the model were used: number of DTs – 700; tree depth – 3; learning rate – 0.1; fraction of features used to build each tree – 50Inline graphic of the total number of features; fraction of patterns used to train each DT – 80Inline graphic of the total number of patterns; minimum number of objects in a leaf – 1.

Random Forest (RF). The following optimal parameters of the model were found: number of DTs – 200; tree depth – 12; fraction of features used to construct each tree – 50Inline graphic of the total number of features; proportion of patterns used to train each DT – 80Inline graphic of the total number of patterns; minimum number of objects per leaf – 1.

Linear Regression (LR). The implementation of LR from the scikit-learn library (Linear Regression in scikit-learn. – URL: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html (accessed: 20.11.2024)) was used. Regularization was not applied.

Kolmogorov-Arnold network

The Kolmogorov-Arnold network (KAN) is a recently developed alternative to fully connected neural networks. Based on the Kolmogorov-Arnold theorem on the representation of a function of many variables50, KAN is based on the superposition and sums of functions of one variable. This architecture allows for a clear graphic representation of the model and for an explanation of the model’s operation51. In this paper, by explainability of a model we mean the ability to describe its operation over the entire domain of definition. An explainable model, in contrast to an interpretable one, allows one to judge the general patterns revealed by the model when solving a given problem. This information contributes to a deeper understanding of the peculiar properties of the obtained solutions to the inverse problem. In addition, an explainable model is easier to check for compliance with a priori known facts, thereby validating it for “adequacy”.

Many works using KANs indicate the explainability or interpretability of the obtained solutions, providing only a graphical representation of the models63,64. However, further analysis of the operation of such KAN is difficult, in our opinion, for the following reasons: 1) complexity of the models used61; 2) high correlation of features leading to the presence of information used by KAN and not visible to us when explaining its operation63,64.

To eliminate the first reason - poor explainability of KAN models - this study uses parametric compression of the 2-D spectrum to 11 features having some physical meaning; in addition, a preliminary search is carried out for the simplest architecture that retains its interpretative capabilities.

The second reason is the correlation of input features, a more fundamental problem inherent in most inverse problems of spectroscopy. To solve it, this paper proposes to plot the results of processing the entire data set on the KAN image, color-graded based on the selected reference input feature; and to use histograms of input and output data for each activation function of the KAN. Color grading allows us to judge the correlations not only between the reference input feature and the remaining input features, but also between the reference feature and the features in the hidden layers of the KAN formed as a result of training. It is assumed that this information will clarify the patterns extracted by the KAN. Histograms are intended for quantitative assessment of the information processed by different sections of the activation functions.

Preparation of spectral data for the use of KAN (spectral parameterization) The obtained database of 2D excitation-emission matrices (EEM) of PL of all solutions was processed (see SI) and parameterized as follows: the search for the PL maximum was performed, then the x-section and y-section of the 2D matrix passing through the maximum were described by the following 6 parameters (Fig. 3):

Fig. 3.

Fig. 3

Parameterization of 2D photoluminescence matrix. Search for photoluminescence maximum (a); parameterization of x-section (b) and y-section (c) (the parameters are described in the text).

  • Maximum PL spectrum intensity - I;

  • Coordinate of maximum PL intensity - x (y);

  • Coordinate of the spectrum center at half-height from the maximum intensity - Inline graphic;

  • Spectral width at half maximum - Inline graphic;

  • Integral spectrum intensity (Inline graphic = Inline graphic + Inline graphic).

  • The difference of the integral spectrum intensities to the right of the maximum intensity and to the left of it (Inline graphic = Inline graphic - Inline graphic).

Concentrations of 7 ions were determined autonomously based on these 11 features of the PL EEM. Input values (11 spectrum parameters) were normalized to a normal distribution with zero mean and unit variance, and the determined ion concentrations were normalized to the range [0,1].

The described base of parametrized spectra of the PL of CDs was used to train the KAN with one hidden layer having 5 neurons. B-splines with k=3, grid=3 were used as the basis for the activation functions51.

Comparative analysis of IP solutions obtained using KAN and other MLMs To compare the results obtained using KAN, the following reference models were used:

All numerical experiments were carried out with an out-of-sample test set, using cross-validation with k=10 folds; training stop on the validation set was used (tol=1E-3; n_iter_no_change=20; train:validation ratio = 70:90).

Evaluation of the quality of the solution of the inverse problem

In solving the stated problem, two approaches – ANN (MLP and CNN) and transfer learning – were applied to the same spectral database (item 2.1.2.) with the same preprocessing (see SI). KAN were applied to the parameterized spectra of the same database with the same preprocessing. The mean absolute error (MAE) was used as a metric for the quality of the solution to the problem.

Mean absolute error (MAE) is a metric that calculates the average absolute difference between predicted values and actual observed values in a data set. MAE is defined by the formula:

graphic file with name d33e1210.gif 1

where Inline graphic is the observed value for the i-th observation; Inline graphic is the predicted value for the i-th observation; N is the sample size.

Results

Artificial neural networks

In the first approach to the obtained spectral data base (Section 2.1.2 “Data array”), multilayer perceptrons and convolutional neural networks with different architectures and hyperparameters (Section 2.2.1 “Artificial neural networks”) were used.

Simultaneous determination of parameters

Application of MLP Fig. 4 and Table S1 show the results of simultaneous determination of the concentrations of all the studied ions in the solution using three MLPs, to the input of which three sets of input features of different dimensions were fed. In this case, MLPs with 1 or 2 hidden layers and with activation functions of the sigmoid or LeakyReLU type were used. As follows from Fig. 4, the best result in determining the concentration of all ions simultaneously was provided by the MLP neural network, to the input of which the stretched 27EW excitation-emission matrix of the PL of CDs was fed, with the LeakyReLU activation function and two hidden layers (Table S1). Moreover, the difference in the accuracy of determination between the input of the combined (3EW) or stretched 27EW matrix is insignificant for cations, but for the Inline graphic anion the difference is significant. This may be due to the selectivity of luminophores excited by different wavelengths with respect to cations and to the more “uniform” influence of the anion on all luminophores that were excited under the influence of radiation at 27 wavelengths.

Fig. 4.

Fig. 4

MAE of simultaneous determination of ion concentrations using MLPs, for various types of input data: (a) – the spectrum excited at the wavelength of 350 nm (1EW_350), (b) – combination of spectra excited at 280 nm, 350 nm and 410 nm (3EW_280_350_410), (c) – stretched two-dimensional map of the PL of the CDs (27EW).

Table 1 presents the best MAE values for simultaneous ion concentration determination using MLP with LeakyReLU activation function and two hidden layers.

Table 1.

The best MAE values for simultaneous determination of ion concentrations by three types of neural network architectures. Errors are given in mM.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
MLP 1.04 1.39 1.54 0.52 1.31 0.37 2.55
1D_CNN 0.86 1.22 1.42 0.40 1.18 0.32 2.24
2D_CNN 0.88 1.22 1.41 0.43 1.09 0.32 2.47

Application of one-dimensional convolutional neural networks 1D_CNN Fig. 5 and Table S2 show the results of simultaneous determination of the concentrations of all ions in the solution using three 1D_CNNs fed with three sets of input features of different dimensions. CNNs with 1 or 2 convolutional layers and sigmoid or LeakyReLU activation functions were used.

Fig. 5.

Fig. 5

MAE of simultaneous determination of ion concentrations using 1D_CNN for various types of input data: (a) – the spectrum excited at the wavelength of 350 nm (1EW_350), (b) – combination of spectra excited at 280 nm, 350 nm and 410 nm (3EW_280_350_410), (c) – stretched two-dimensional map of the PL of the CDs (27EW).

As can be seen from the presented figures, the best result was provided by the 1D_CNN neural network, which receives a stretched excitation-emission matrix of the PL of the CDs as input, with LeakyReLU activation function and two convolutional layers (Table S2). The ability of CNNs to take into account information from several spectral channels at once gives them an advantage over MLPs. The MAE values for determining ion concentrations decreased for all ions compared to the use of the MLP (Table 1).

Application of two-dimensional convolutional neural networks 2D_CNN When using 2D_CNN, a single-channel two-dimensional EEM of PL of CDs 27EW with the dimension [1x27x201] was fed to the input of the neural network. Based on the heuristic rule that the number of trainable parameters in the neural network for obtaining a stable solution should at least within an order of magnitude coincide with the dimension of the training data set, it was decided to vary the number of convolutional layers from 1 to 2, the number of neurons in the last hidden layer (32 and 24) and the filter stride (1 and 5). Since at the output of the second convolutional layer one of the dimensions of the resulting matrix was equal to 3x3, in this case it was not possible to vary the filter stride, given that the filter itself was of the size [3x3].

Figure 6 and Table S3 show the results of using 2D_CNN with different hyperparameters to simultaneously determine the concentrations of all ions. In this case of using 2D networks with different selected hyperparameters, it was not possible to establish a trend of “the influence of a certain hyperparameter on the accuracy of determining the concentration of a particular ion”. However, some dependencies can be identified. For example, the best result is provided by architectures with the LeakyReLU activation function. In addition, it was found that a smaller filter stride also reduces the MAE value. This is probably due to the ability to better take into account the correlation in neighboring spectral channels with a smaller filter stride.

Fig. 6.

Fig. 6

MAE of simultaneous determination of ion concentrations using two-dimensional CNNs with the following parameters: (a). stride 1, 1 convolutional layer, (b). stride 1, 2 convolutional layers, (c). stride 5, 1 convolutional layer.

Comparative analysis of simultaneous determination of ion concentrations using MLP and CNN Table 1 presents the best results for simultaneous determination of ion concentrations using all three types of neural network architectures. The lowest MAE values were achieved using NNs with the following hyperparameters: MLP - LeakyReLU activation function, 2 hidden layers, fed with total luminescence spectra recorded at 27 excitation wavelengths (27_EW); 1D_CNN - hyperparameters equivalent to those of MLP; 2D_CNN - LeakyReLU activation function, 2 convolutional layers, stride 1.

As follows from the obtained results, when solving the IP using the MLP, the errors in determining the concentrations of all ions are greater than using CNN. It is interesting to note that, despite the more advanced architecture, 2D_CNN determine the concentration of some ions worse than 1D_CNN. In those cases where 2D_CNN outperform 1D_CNN, the MAE values of determining the concentration decreases by only 1-7. This result can be used in the future when choosing the architecture of neural networks for solving inverse problems of nanosensorics: 1D_CNN give results no worse compared to 2D_CNN, while requiring fewer computing resources.

Autonomous determination of parameters

For autonomous determination of the concentrations of 7 ions in the solution from the PL spectra of the CDs, the neural networks MLP, 1D_CNN, 2D_CNN were trained using the hyperparameters that provided the best results in the simultaneous determination of the ion concentrations. These hyperparameters are listed above, before Table 1. One should recall that a stretched two-dimensional PL EEM of the CDs 27EW was fed to the input of all NNs. Table 2 presents the best results of autonomous determination of ion concentrations using all three types of neural network architectures and Gradient Boosting.

Table 2.

MAE values of autonomous ion concentration determination by gradient boosting and three types of neural network architectures. Errors are presented in mM.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
GB 0.80 1.37 1.48 0.60 1.36 0.37 3.37
MLP 0.88 0.95 1.41 0.32 1.38 0.22 2.45
1D_CNN 0.68 1.02 1.42 0.30 1.06 0.22 3.01
2D_CNN 0.70 1.05 1.38 0.30 1.08 0.20 2.42

As follows from the obtained results, all selected neural network architectures showed better results compared to the GB method.

With autonomous determination of the MAE values, the concentration errors (MAE) for all cations turned out to be lower than with simultaneous determination. However, the result is opposite for the anion. This may be due to the fact that: 1) the anion concentration is linearly proportional to the cation concentrations, and the neural network managed to restore this dependence; 2) the worse accuracy of determining the cation concentration with simultaneous determination of parameters may be due to the fact that the neurons determining the anion concentration have a slightly higher weight, since the variability of the anion concentration values is an order of magnitude greater than the maximum value of cation concentrations (84 mM and 6 mM, respectively); 3) the cation concentrations are not related to each other in any way, therefore, different composite features formed in the last hidden layer are optimal for determining each of them; at the same time, in the case of autonomous determination, all the formed features serve to solve the same problem, thus allowing one to improve the quality of its solution.

To provide a visual assessment of the model performance, a parity plot comparing predicted and true concentration values was constructed for Inline graphic ion using the 2D_CNN model (Fig. 7). Similar plots for other ions and ML algorithms show qualitatively similar behavior, with only quantitative differences. Therefore, only this representative plot is presented in this study, while comparisons between models and ions are reported based on statistical performance metrics.

Fig. 7.

Fig. 7

Parity plot of predicted and true concentration values for Inline graphic ion using the 2D_CNN model. The dashed line corresponds to ideal agreement (y = x).

Transfer learning of NN

In this section, we consider a 6-parameter inverse problem (6P) for determining the concentrations of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic) and a 7-parameter inverse problem (7P) for determining the concentrations of the specified initial six ions and the Inline graphic ion using the EEM of photoluminescence of CDs in aqueous solutions. We study the efficiency of NN transfer learning from the 6P to the 7P problem.

Comparative analysis of the quality of the solution of the 6P problem and the 7P problem using various machine learning methods

The 6P and 7P IP were solved using MLP, GB, RF and LR trained on the data of the 6P problem and of the 7P problem separately.

Figure 8 shows the results of a comparative analysis of the quality of the solution of 6P and 7P problems for the autonomous determination of the concentration of the studied ions using MLP, GB, RF and LR, trained separately on the data of the 6P problem (Fig. 8 (a)) and on the data of the 7P problem (Fig. 8 (b), Table S4).

Fig. 8.

Fig. 8

MAE values for determining ion concentrations using the MLP, GB, RF and LR algorithms trained on the data of the 6P problem (a) and of the 7P problem (b).

The obtained results indicate that the best solution quality among all the ML algorithms used is provided by MLP, and the worst one by LR. Comparison of the results of applying MLP to 6P and 7P problems shows that the error of the models trained on the 6P problem data is lower or comparable to the error of the models trained on the 7P problem data (except for Inline graphic) (Fig. 9).

Fig. 9.

Fig. 9

MAE values for determining the concentrations of the studied ions using MLP trained on the data of 6P and 7P tasks.

Study of the efficiency of the transfer learning approach for solving the 7P problem of determining the concentration of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic)

To study the efficiency of the transfer learning of the MLP for solving the 7P problem of determining the concentrations of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic), we compared the results obtained using the MLPs trained using the following training strategies: 1) only on the 6P problem data; 2) only on the 7P problem data; 3) pre-trained on the 6P problem data and fine-tuned on the 7P problem data (transfer learning approach). The results of applying the corresponding MLPs to the test set of the 7P problem are presented in Fig. 10 and Fig. 11.

Fig. 10.

Fig. 10

MAE values for determining the concentrations of the initial six ions using MLPs trained using three strategies. Red column – training on the data of the 6P problem; blue column – training on the data of the 7P problem; green column – preliminary training on the data of the 6P problem and fine-tuning on the data of the 7P problem.

Fig. 11.

Fig. 11

The MAE values for determining the concentrations of the initial six ions (a) and the computational cost of the training in epochs (b) of the MLP trained using two strategies. Blue column – training on the data of the 7P problem; green column – preliminary training on the data of the 6P problem and fine-tuning on the data of the 7P problem.

The NN trained on the data of the 6P problem shows low accuracy in determining the concentrations of the initial 6 ions on the test set of the 7P problem (Fig. 10), which indicates the need to use special methods for adapting such models to data with a different distribution of features.

The strategies of transfer learning of the MLP and of training the MLP only on the data of the 7P problem demonstrated comparable quality of the solution of the IP (Fig. 11, (a)). However, the transfer learning of the NN allowed us to obtain such quality of the solution with significantly lower computational costs (training the NN took fewer epochs, Fig. 11, (b)).

Study of the effectiveness of the transfer learning approach for solving the problem of determining the concentration of the seventh ion (Inline graphic)

For six initial ions Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, the solution of the 7P problem by the NN transfer learning method was carried out by fine-tuning the model, previously trained on the 6P problem data of the same ions. For the Inline graphic cation, such a scenario was not feasible, since this cation was absent in the 6P problem solutions. Therefore, a comparison was made of the quality of the problem solution using the MLP trained using the following strategies: 1) training only on the 7P problem data; 2) preliminary training on the data of the 6P problem to determine the concentrations of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic), and fine-tuning on the data of the 7P problem (in the presence of the target ion Inline graphic) - the transfer learning approach.

Figure 12 shows the results of applying the MLP trained in accordance with the specified strategies to the test set of the 7P problem. The efficiency of the NN transfer learning does not depend on the choice of the pre-trained model (it does not matter on which of the initial ions the preliminary training of the NN was carried out), which indicates the absence of a strong correlation between the concentration of the Inline graphic cation and the concentration of any of the initial ions.

Fig. 12.

Fig. 12

The MAE values for determining the concentration of Inline graphic ion (a) and the computational cost of the training in epochs (b) of the MLP trained using two strategies. Training on 7P data (blue column); preliminary training on 6P data for the task of determination of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic) and fine-tuning on 7P data for the task of determination of the target ion (Inline graphic) (a column of a certain color corresponds to a certain initial ion).

Similar to the results of section “Study of the efficiency of the transfer learning approach for solving the 7P problem of determining the concentration of the initial six ions (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic)”, the strategies of transfer learning and training the NN only on the 7P data of the problem demonstrated a comparable quality of the solution (Fig. 12, (a)). However, transfer learning made it possible to obtain such a quality of the solution with lower computational costs (Fig. 12, (b)). Thus, the transfer learning turned out to be an effective method for solving the studied IP even for an ion that is absent in the original problem. The obtained effect may indicate that the NN is trained not only on information about the specific features of the corresponding ion, but also on the shape of a spectrum as a whole.

Thus, for all the determined parameters, the transfer learning strategy and training of the NN only on the data of 7P problem demonstrate a comparable quality of the solution. However, transfer learning allows one to obtain such a quality of the solution with significantly lower computational costs. Transfer learning is an effective method for solving the studied problem even for ions that are absent in the original problem. The MAE values of autonomous determination of the concentration of each of the studied 7 ions by the specified algorithms are presented in Table 3. The computational cost of the obtained solutions is presented in Table 4.

Table 3.

MAE values of autonomous determination of concentrations of the 7 ions using MLPs trained only on 7P problem data and as a result of transfer learning. Errors are presented in mM.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Autonomous determination 0.74 1.25 1.42 1.07 0.40 0.25 2.87
Transfer learning 0.76 1.20 1.44 1.07 0.44 0.26 2.79
Table 4.

Computational cost (training epochs) of autonomous determination of concentrations of the 7 ions using MLPs trained only on 7P problem data and as a result of transfer learning.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
Autonomous determination 1721 1439 1207 1769 2147 1225 1374
Transfer learning 819 820 757 861 1003 1085 878

Kolmogorov-Arnold network

The MAE values for determining ion concentrations from parameterized spectra using the Kolmogorov-Arnold network (KAN) and reference methods are presented in Fig. 13 and Table 5. For all ions, KAN provides an accuracy of concentration determination equal to that of the reference methods. It should be noted that the accuracy of all models in this section is inferior to the accuracy of models using the full PL EEM of CDs (27EW) as input features. However, as noted earlier, KAN has advantages over the other MLMs used, consisting in its ability to interpret the relationships between input and output features.

Fig. 13.

Fig. 13

MAE values for determination of ion concentrations by KAN and by reference methods.

Table 5.

Mean absolute errors for determination of ion concentrations by KAN and by reference methods. Errors are presented in mM.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
GMDH 1.81 1.81 1.65 1.58 0.80 0.55 4.87
RF 1.26 1.72 1.60 1.41 0.63 0.45 4.36
GB 1.24 1.71 1.59 1.37 0.60 0.43 4.26
MLP 1.29 1.71 1.61 1.43 0.62 0.47 4.37
KAN 1.30 1.66 1.60 1.43 0.60 0.42 4.26

Using the example of the Inline graphic cation, we will interpret the KAN model (Fig. 14). To do this, we will use the improved visualization of the KAN. To analyze the influence of each input feature on the model’s estimation of the concentration, we will use the color gradation of activation functions based on the reference channel - the model output. The higher the Inline graphic concentration predicted by the model, the lighter the color of the section of the corresponding function activated by this pattern. Such color visualization allows one to take into account the strong mutual dependence of the input data when interpreting the operation of the KAN. In addition, the visualization uses histograms of the input and output data for each activation function of the KAN.

Fig. 14.

Fig. 14

Representation of the Inline graphic cation concentration by KAN (on the right). The output value of the concentration of this model is selected as the reference color channel. The most significant features for predicting the model are highlighted in a blue frame; the corresponding activation functions are shown in an enlarged form on the right.

Using the attribution method51 and selecting the brightest edges between the input features and the functions of the 1st activation layer in Fig. 14, we will select the input features that most significantly affect the output value of the model: Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic. Next, using color gradation in accordance with the output channel (reference channel), we will characterize the type of dependence of the model output on the 5 selected features (Fig. 14, on the right):

  • The estimation of the model increases with the value of Chx. This observation corresponds to the experimental fact of the shift of the photoluminescence spectrum of CDs to the red region with increasing concentration of Inline graphic.

  • The estimation of the model increases with the value of Inline graphic. This corresponds to the experimental observation of the broadening of the photoluminescence spectrum of CDs with increasing concentration of Inline graphic.

  • The estimation of the model prediction depends on Inline graphic parabolically with a maximum at the average value of Inline graphic.

  • The estimation of the model decreases with the value of Inline graphic (with the exception of one pattern with a minimum value of Inline graphic). With increasing concentration of Inline graphic, the effective excitation region of CDs photoluminescence narrows.

  • The estimation of the model decreases with the value of Inline graphic. This is a manifestation of the fact of quenching of CDs PL with increasing concentration of Inline graphic.

Thus, thanks to the proposed method of interpreting the KAN, it was possible to check the compatibility of the model’s principles of estimation with experimentally established facts, as well as to identify new informationally significant dependencies.

Conclusions and outlook

In this paper, a photoluminescent multimodal nanosensor for detecting concentrations of heavy metal cations (Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic) and Inline graphic anion in multicomponent aqueous solutions was developed. Carbon dots synthesized by the hydrothermal method from ethylenediamine and citric acid precursors were added to the test solution. To determine the desired concentrations from the carbon dots photoluminescence spectra, the following machine learning methods were used: artificial neural networks (multilayer perceptron, convolutional neural networks, Kolmogorov-Arnold neural networks), as well as gradient boosting and linear regression. The use of the neural network transfer learning technique when moving from solving a 6-parameter problem to solving a 7-parameter problem was considered. It is shown that the lowest errors are achieved using convolutional neural networks (Table 6).

Table 6.

MAE values of autonomous determination of ion concentrations in the range from 0 to 6 mM using artificial neural networks. Errors are presented in mM.

ions Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic Inline graphic
MLP 0.88 0.95 1.41 0.32 1.38 0.22 2.45
1D_CNN 0.68 1.02 1.42 0.30 1.06 0.22 3.01
2D_CNN 0.70 1.05 1.38 0.30 1.08 0.20 2.42
Transfer learning 0.76 1.20 1.44 1.07 0.44 0.26 2.79
KAN 1.27 1.67 1.58 1.40 0.60 0.42 4.24

The obtained errors in measuring the concentrations of metal cations fully satisfy the needs of express monitoring of wastewater66. For example, in67, wastewater from three metal coating plants was studied, and it was shown that the content of Inline graphic, Inline graphic and Inline graphic ions varied in the ranges 0.7–5.3 mM, 6.7–9.0 mM, 0.8–3.7 mM, respectively. Thus, the accuracy of determining the concentrations of these ions obtained in our study using carbon nanosensor indicates its potential for controlling waste and technological waters composition.

It is also demonstrated that the transfer learning approach can reduce the computational cost of the solution of the inverse problem, and that Kolmogorov-Arnold networks can provide a visual interpretation of the resulting model.

Supplementary Information

Acknowledgements

The work of G. Chugreeva was supported by the Theoretical Physics and Mathematics Advancement Foundation “BASIS” (project No. 23-2-2-22-1). The work of G. Kupriyanov was supported by the Theoretical Physics and Mathematics Advancement Foundation “BASIS” (project No. 24-2-1-63-1). Some of the experimental results used in this work were obtained using a system for high-speed analysis of the luminescence decay kinetics of substances, purchased under the Moscow State University Development Program (agreement No. 231 dated June 6, 2023, Quantum Technologies Collective Use Center). The authors express their deep gratitude to Utegenova L.S., Korepanova A.A., Buzanov K.A., Khmeleva M.Yu., Volkov R.R., Fedyanina A.A. for assistance in registering photoluminescence excitation-emission matrices.

Author contributions

Conceptualization, T.D., K.L., G.C. and S.D.; methodology, T.D., K.L., G.C., A.G., G.K. and S.D.; software, G.C., A.G., G.K. and K.L.; validation, G.C., A.G. and G.K.; formal analysis, T.D. and K.L.; writing—original draft preparation, G.C., A.G. and G.K.; writing—review and editing, T.D, S.D and I.I.; visualization, A.G.; supervision, T.D.; funding acquisition, T.D. All authors reviewed the manuscript.

Funding

The study was supported by the grant from the Russian Science Foundation No. 22-12-00138-P, https://rscf.ru/en/project/22-12-00138/.

Data availability

The datasets generated and/or analyzed during the current study are not publicly available due the data is undergoing the procedure of state registration of the database, prohibiting public availability of the data but are available from the corresponding author on reasonable request.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

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

Supplementary Information

The online version contains supplementary material available at 10.1038/s41598-026-38266-4.

References

  • 1.Wang, Z. et al. Overview assessment of risk evaluation and treatment technologies for heavy metal pollution of water and soil. J. Clean. Prod.379, 134043. 10.1016/j.jclepro.2022.134043 (2022). [Google Scholar]
  • 2.Costa, M. Toxicol. appl. pharmacol. Toxicol. Appl. Pharmacol.375, 1–4. 10.1016/j.taap.2019.05.006 (2019). [DOI] [PubMed] [Google Scholar]
  • 3.Guilbault, G. G. & Lubrano, G. J. An enzyme electrode for the amperometric determination of glucose. Anal. Chim. Acta64, 439–455. 10.1016/s0003-2670(01)82476-4 (1973). [DOI] [PubMed] [Google Scholar]
  • 4.Omeje, K. O. et al. Quantification of heavy metals and pesticide residues in widely consumed nigerian food crops using atomic absorption spectroscopy (aas) and gas chromatography (gc). Toxins13, 870. 10.3390/toxins13120870 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Willis, J. B. Determination of lead and other heavy metals in urine by atomic absorption spectroscopy. Anal. Chem.34, 614–617. 10.1021/ac60186a008 (1962). [Google Scholar]
  • 6.Sarmanova, O. E., Laptinskiy, K. A., Burikov, S. A., Chugreeva, G. N. & Dolenko, T. A. Implementing neural network approach to create carbon-based optical nanosensor of heavy metal ions in liquid media. Spectrochim. Acta A286, 122003. 10.1016/j.saa.2022.122003 (2023). [DOI] [PubMed] [Google Scholar]
  • 7.Chugreeva, G. N., Laptinskiy, K. A., Plastinin, I. V., Sarmanova, O. E. & Dolenko, T. A. Development of a multimodal photoluminescent carbon nanosensor for metal ions in water using artificial neural networks. Moscow Univ. Phys. Bull.79, S850–S859. 10.3103/S0027134924702308 (2024). [Google Scholar]
  • 8.Wang, Z. et al. Application of carbon dots and their composite materials for the detection and removal of radioactive ions: A review. Chemosphere287, 132313. 10.1016/j.chemosphere.2021.132313 (2022). [DOI] [PubMed] [Google Scholar]
  • 9.Omar, N. A. S. et al. A review on carbon dots: Synthesis, characterization and its application in optical sensor for environmental monitoring. Nanomaterials12, 2365. 10.3390/nano12142365 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Dolenko, T. A. et al. Optical imaging of fluorescent carbon biomarkers using artificial neural networks. J. Biomed. Opt.19, 117007. 10.1117/1.JBO.19.11.117007 (2014). [DOI] [PubMed] [Google Scholar]
  • 11.Vervald, A. M., Laptinskiy, K. A., Khmeleva, M. Y. & Dolenko, T. A. Toward carbon dots from citric acid and ethylenediamine, part 1: Structure, optical properties, main luminophore at different stages of synthesis. Carbon Trends19, 100452. 10.1016/j.cartre.2025.100452 (2025). [Google Scholar]
  • 12.Anwar, S. et al. Recent advances in synthesis, optical properties, and biomedical applications of carbon dots. ACS Appl. Bio Mater.2, 2317–2338. 10.1021/acsabm.9b00112 (2019). [DOI] [PubMed] [Google Scholar]
  • 13.Terzapulo, X., Kassenova, A., Loskutova, A. & Bukasov, R. Carbon dots: Review of recent applications and perspectives in bio-sensing and biomarker detection. Sens. Bio-Sens. Res.47, 100771. 10.1016/j.sbsr.2025.100771 (2025). [Google Scholar]
  • 14.Javed, N. & O’Carroll, D. M. Carbon dots and stability of their optical properties. Part. Part. Syst. Charact.38, 2000271. 10.1002/ppsc.202000271 (2021). [Google Scholar]
  • 15.Sarmanova, O. E. et al. Development of the fluorescent carbon nanosensor for ph and temperature of liquid media with artificial neural networks. Spectrochim. Acta A258, 119861. 10.1016/j.saa.2021.119861 (2021). [DOI] [PubMed] [Google Scholar]
  • 16.Panigrahi, A. et al. Exploring optoelectronic properties of undoped and amine-doped carbon dots: Impact of surface functionalization and ph. Carbon206, 114–123. 10.1016/j.carbon.2023.02.017 (2023). [Google Scholar]
  • 17.Ye, H.-G. et al. Mild bottom-up synthesis of carbon dots with temperature-dependent fluorescence. J. Lumin.238, 118311. 10.1016/j.jlumin.2021.118311 (2021). [Google Scholar]
  • 18.Guo, J. et al. Copper doped carbon dots as the multi-functional fluorescent sensing platform for tetracyclines and ph. Sens. Actuators B330, 129360. 10.1016/j.snb.2020.129360 (2021). [Google Scholar]
  • 19.da Silva Júnior, A. H., Pier Macuvele, D. L., Riella, H. G., Soares, C. & Padoin, N. Are carbon dots effective for ion sensing and antiviral applications? a state-of-the-art description from synthesis methods to cost evaluation. J. Mater. Res. Technol.12, 688–716. 10.1016/j.jmrt.2021.02.069 (2021). [Google Scholar]
  • 20.Vervald, A. M., Laptinskiy, K. A., Chugreeva, G. N., Burikov, S. A. & Dolenko, T. A. Quenching of photoluminescence of carbon dots by metal cations in water: Estimation of contributions of different mechanisms. J. Phys. Chem. C127, 21617–21628. 10.1021/acs.jpcc.3c05231 (2023). [Google Scholar]
  • 21.Xu, J. et al. Green one-step synthesis of boron and nitrogen co-doped carbon dots based on inner filter effect as fluorescent nanosensors for determination of . Ceram. Int.49, 7546–7555. 10.1016/j.ceramint.2022.10.253 (2023). [Google Scholar]
  • 22.Mandal, D., De, P., Khatun, S., Gupta, A. N. & Chandra, A. Highly fluorescent graphene quantum dots as “turn off-on’’ nanosensor for detecting toxic metal ions to organic pollutant. Int. J. Environ. Sci. Technol.21, 1637–1648. 10.1007/s13762-023-05033-1 (2023). [Google Scholar]
  • 23.Patil, A. B., Chaudhary, P. L. & Adhyapak, P. V. Carbon dots-cadmium sulfide quantum dots nanocomposite for ‘on-off’ fluorescence sensing of chromium(vi) ions. RSC Adv.14, 12923–12934. 10.1039/D4RA00436A (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Aladesuyi, O. A. & Oluwafemi, O. S. ‘off-on’ determination of lead () and fluoride () ion in fish and wastewater samples using n, s co-doped carbon quantum dots (N, S-cqds). Appl. Water Sci.14, 21. 10.1007/s13201-024-02191-6 (2024). [Google Scholar]
  • 25.Radhakrishnan, K. et al. Sequential detection of and tnt using a nitrogen-doped polymeric carbon dots on-off-on fluorescence sensor. Polym. Adv. Technol.35, e6608. 10.1002/pat.6608 (2024). [Google Scholar]
  • 26.Vadia, F. Y., Malek, N. I., Park, T. J. & Kailasa, S. K. Fluorescence turn-off-on sensing strategy for the detection of and metalaxyl fungicide using yellow fluorescent carbon dots from cordia dichotoma fruits. Luminescence39, e70040. 10.1002/bio.70040 (2024). [DOI] [PubMed] [Google Scholar]
  • 27.Gao, W. et al. Nitrogen and sulfur co-doped carbon quantum dots as “on-off-on’’ fluorescence probes to detect and and improving the photostability of rhodamine b. Anal. Chim. Acta1277, 341683. 10.1016/j.aca.2023.341683 (2023). [DOI] [PubMed] [Google Scholar]
  • 28.Mamoshina, P., Vieira, A., Putin, E. & Zhavoronkov, A. Applications of deep learning in biomedicine. Mol. Pharmaceutics13, 1445–1454. 10.1021/acs.molpharmaceut.5b00982 (2016). [DOI] [PubMed] [Google Scholar]
  • 29.Sabir, Z., Abdelkawy, M. A., Mehmood, M. A. & Bayram, M. Modeling typhoid dynamics using recurrent neural networks with bayesian regularization. Comput. Biol. Chem.120, 108790. 10.1016/j.compbiolchem.2025.108790 (2025). [DOI] [PubMed] [Google Scholar]
  • 30.Sabir, Z., Assaad, A. A., Alkak, A. & Bayram, M. A radial basis bayesian regularization procedure for the lassa virus mathematical model. Eur. Phys. J. Plus140, 938. 10.1140/epjp/s13360-025-06891-z (2025). [Google Scholar]
  • 31.Karay, M., Sabir, Z., Akkilic, A. N. & Bulut, H. A stochastic neural network for the numerical solutions of the nonlinear fractional order zika virus model using reservoirs and human motion. Comput. Biol. Chem.120, 108629. 10.1016/j.compbiolchem.2025.108629 (2025). [DOI] [PubMed] [Google Scholar]
  • 32.Sabir, Z. E. A. Artificial neural network scheme to solve the nonlinear influenza disease model. Biomed. Signal Process. Control75, 103594. 10.1016/j.bspc.2022.103594 (2022). [Google Scholar]
  • 33.Chen, Q., Sabir, Z., Raja, M. A. Z., Gao, W. & Baskonus, H. M. A fractional study based on the economic and environmental mathematical model. Alexandria Eng. J.65, 761–770. 10.1016/j.aej.2022.09.033 (2023). [Google Scholar]
  • 34.Tammina, S. Transfer learning using vgg-16 with deep convolutional neural network for classifying images. Int. J. Sci. Res. Publ.9, 143–150. 10.29322/IJSRP.9.10.2019.p9420 (2019). [Google Scholar]
  • 35.Raffel, C. et al. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res.21, 1–67. 10.48550/arXiv.1910.10683 (2020).34305477 [Google Scholar]
  • 36.Sabir, Z., Bano, A., Banaras, M. R., Umar, M. & Salahshour, S. An artificial deep neural network approach for the computer epidemic virus model. J. Appl. Math. Comput.72, 1–17. 10.1007/s12190-025-02683-x (2026). [Google Scholar]
  • 37.Kleshnin, M. S. Deep learning neural network estimation of tissue oxygenation based on diffuse optical spectroscopy. Laser Phys.29, 085603. 10.1088/1555-6611/ab2acc (2019). [Google Scholar]
  • 38.Efitorov, A., Burikov, S., Dolenko, T. & Dolenko, S. Use of conditional variational autoencoders and partial least squares in solving an inverse problem of spectroscopy. In Studies in Computational Intelligence, 621–630, 10.1007/978-3-031-19032-2_56 (Springer, Cham, Switzerland, 2022).
  • 39.Mushchina, A. S. et al. Comparison of approaches to increase the representativeness of spectroscopic data using variational autoencoders. Zh. Tekh. Fiz.95, 997–1007. 10.61011/JTF.2025.05.60292.15-25 (2025). [Google Scholar]
  • 40.Tian, L. et al. Retrieval of gas concentrations in optical spectroscopy with deep learning. Measurement182, 109739. 10.1016/j.measurement.2021.109739 (2021). [Google Scholar]
  • 41.Sarmanova, O. et al. Carbon nanosensors and machine learning algorithms for simultaneous measurement of ph and temperature of aqueous media. In 2021 International Conference on Information Technology and Nanotechnology (ITNT), 10.1109/ITNT52450.2021.9649347 (IEEE, Samara, Russia, 2021).
  • 42.Tuchin, V. S. et al. Optical properties prediction for red and near-infrared emitting carbon dots using machine learning. Small20, 2310402. 10.1002/smll.202310402 (2024). [DOI] [PubMed] [Google Scholar]
  • 43.Revignas, D. & Amendola, V. Artificial neural networks applied to colorimetric nanosensors: An undergraduate experience tailorable from gold nanoparticles synthesis to optical spectroscopy and machine learning. J. Chem. Educ.99, 2112–2120. 10.1021/acs.jchemed.1c01288 (2022). [Google Scholar]
  • 44.Wang, C.-Y., Ko, T.-S. & Hsu, C.-C. Interpreting convolutional neural network for real-time volatile organic compounds detection and classification using optical emission spectroscopy of plasma. Anal. Chim. Acta1179, 338822. 10.1016/j.aca.2021.338822 (2021). [DOI] [PubMed] [Google Scholar]
  • 45.Yu, S., Li, H., Li, X., Fu, Y. V. & Liu, F. Classification of pathogens by raman spectroscopy combined with generative adversarial networks. Sci. Total Environ.726, 138477. 10.1016/j.scitotenv.2020.138477 (2020). [DOI] [PubMed] [Google Scholar]
  • 46.Pan, S. J. & Yang, Q. A survey on transfer learning. IEEE Trans. Knowl. Data Eng.22, 1345–1359. 10.1109/TKDE.2009.191 (2010). [Google Scholar]
  • 47.Kim, H. E. et al. Transfer learning for medical image classification: A literature review. BMC Med. Imaging22, 69. 10.1186/s12880-022-00793-7 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48.Willard, J. D. et al. Predicting water temperature dynamics of unmonitored lakes with meta-transfer learning. Water Resour. Res.57, e2021WR029579. 10.1029/2021WR029579 (2021). [Google Scholar]
  • 49.Guskov, A. A. et al. Transfer learning for neural network solution of an inverse problem in optical spectroscopy. Moscow Univ. Phys. Bull.78, S115–S121. 10.3103/S0027134923070111 (2023). [Google Scholar]
  • 50.Kolmogorov, A. N. On representation of continuous functions of several variables by superpositions of continuous functions of a less number of variables. Izv. Akad. Nauk SSSR108, 179–182. 10.1090/trans2/028/09 (1956). [Google Scholar]
  • 51.Liu, Z. et al. Kolmogorov-arnold networks are radial basis function networks. arXiv10.48550/arXiv.2404.19756 (2024).
  • 52.Guilhoto, L. F. & Perdikaris, P. On the approximation of functions by kolmogorov-arnold networks. arXiv10.48550/arXiv.2410.01990 (2024).
  • 53.Vaca-Rubio, C. J., Blanco, L., Pereira, R. & Caus, M. Kolmogorov-arnold networks for time series forecasting. arXiv10.48550/arXiv.2405.08790 (2024).
  • 54.Xu, K., Chen, L. & Wang, S. Kan: Kolmogorov-arnold networks for multivariate regression. arXiv10.48550/arXiv.2406.02496 (2024).
  • 55.Kich, V. A. et al. Kolmogorov-arnold networks for control and automation: A case study. In 24th International Conference on Control, Automation and Systems (ICCAS), 958–963, 10.1109/ICCAS60768.2024.10477912 (IEEE, Piscataway, NJ, USA, 2024).
  • 56.Dahal, A., Murad, S. A. & Rahimi, N. Kolmogorov-arnold networks in biomedical signal processing. arXiv10.48550/arXiv.2501.15757 (2025).
  • 57.Yang, X. & Wang, X. Kolmogorov-arnold networks for high-dimensional data analysis. arXiv10.48550/arXiv.2409.10594 (2024).
  • 58.Noguer i Alonso, M. The mathematics of kolmogorov-arnold-networks versus artificial neural networks. SSRN10.2139/ssrn.5072413 (2024).
  • 59.Tung, C. et al. Scattering-based structural inversion of soft materials via kolmogorov-arnold networks. J. Chem. Phys.162, 124902. 10.1063/5.0253877 (2024). [DOI] [PubMed] [Google Scholar]
  • 60.Wu, Y., Li, T., Wang, Z., Kang, H. & He, A. Kolmogorov-arnold networks for financial time series prediction. arXiv10.48550/arXiv.2409.14676 (2024).
  • 61.Dumontet, L. et al. Kan-gan: Hybrid kolmogorov-arnold and generative adversarial networks for medical image synthesis. bioRxiv10.1101/2025.01.30.633071 (2025).
  • 62.Kozhushny, K. A., Vervald, A. M. & Dolenko, T. A. Nanosensing of metal cations in water with carbon dots: insights from molecular dynamics. J. Phys. Chem. C129, 19429–19439. 10.1021/acs.jpcc.5c04054 (2025). [Google Scholar]
  • 63.Le, T., Hwang, Y., Kang, H. & Kim, H. Robust credit card fraud detection based on efficient kolmogorov-arnold network models. IEEE Access12, 157006–157020. 10.1109/ACCESS.2024.3485200 (2024). [Google Scholar]
  • 64.Kulkarni, S. Kolmogorov-arnold networks for natural language processing. arXiv10.48550/arXiv.2501.17896 (2025).
  • 65.Team, B. Gmdh algorithm code. Available online: https://bauman-team.github.io/GMDH/python/html/, 10.5281/zenodo.1234567 (2025). Accessed on 9 July 2025.
  • 66.Dolina, L. F. Modern Equipment and Technologies for Wastewater Treatment from Heavy Metal Salts (Continent, Dnipropetrovsk, Ukraine, 2008).
  • 67.Akbal, F. & Camcı, S. Treatment of metal plating wastewater by electrocoagulation. Environ. Prog. Sustain.31, 340–350. 10.1002/ep.10546 (2012). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

The datasets generated and/or analyzed during the current study are not publicly available due the data is undergoing the procedure of state registration of the database, prohibiting public availability of the data but are available from the corresponding author on reasonable request.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES