Chemometric Analysis of NMR Spectra and Machine Learning to Investigate Membrane Fouling

Efficient membrane filtration requires the understanding of the membrane foulants and the functional properties of different membrane types in water purification. In this study, dead-end filtration of aquaculture system effluents was performed and the membrane foulants were investigated via nuclear magnetic resonance (NMR) spectroscopy. Several machine learning models (Random Forest; RF, Extreme Gradient Boosting; XGBoost, Support Vector Machine; SVM, and Neural Network; NN) were constructed, one to predict the maximum transmembrane pressure, for revealing the chemical compounds causing fouling, and the other to classify the membrane materials based on chemometric analysis of NMR spectra, for determining their effect on the properties of the different membrane types tested. Especially, RF models exhibited high accuracy; the important chemical shifts observed in both the regression and classification models suggested that the proportional patterns of sugars and proteins are key factors in the fouling progress and the classification of membrane types. Therefore, the proposed strategy of chemometric analysis of NMR spectra is suitable for membrane research, which aims at investigating comprehensively the fouling phenomenon and how the foulants and environmental conditions vary according to the filtration systems.


■ INTRODUCTION
Human beings have always utilized water for survival and social activities. The worldwide population increase is resulting in more wastewater and, therefore, systems for its purification and recycling are required. During the last decades, membrane filtration technologies for desalination and wastewater treatments gained popularity; 1 for example, municipalities and industries implemented membrane bioreactors, which are hybrid systems combining membrane separation and traditional activated-sludge systems to treat wastewater and avoid its flushing into the environment. 2 These technologies are also utilized for closed-system aquaculture to preserve the water quality, 3 which is expected to achieve higher yield without being affected by environmental changes and draining the effluents into the hydrosphere. 4 One of the most critical problems in membrane filtration is fouling, that is, when the membrane pores are clogged with organic matter. 5 As the fouling proceeds, the transmembrane pressure (TMP) difference rises, increasing the energy required for filtering the same amount of water; besides, cleaning and exchanging the membrane filters to maintain the TMP difference low is expensive. To solve these problems, we need to understand the mechanisms and causes of membrane fouling. As a possible fouling mechanism, it was suggested that some specific forms of organic matter, such as polysaccharides and proteins, are adsorbed onto the filter, providing sites for microbial growth, which forms a biofilm. 6 If the fouling causative materials can be detected, this phenomenon could be delayed or even inhibited by controlling the accumulation of such materials. Besides, the operators of filtration systems can choose among various membrane materials. Some membrane filters are made of different materials, which have different filtration properties and mechanisms; 7 for efficient filtration, the features of each membrane material must be understood.
Nuclear magnetic resonance (NMR) spectroscopy is a powerful tool for analyzing compound mixtures and has been applied to various samples, including soils, 8,9 sediments, 10,11 gut contents, 12−14 and biological tissues. 15,16 The most significant strength of this technique is that it is nondestructive, nonbiased, and easily applicable for quantitative analyses. 17, 18 Furthermore, it can capture the whole signals of the mixtures with little analytical effort; therefore, it is more suitable for obtaining large-scale metabolic profile data compared with liquid chromatography−mass spectrometry and gas chromatography−mass spectrometry. 17, 18 The complex NMR spectra might seem difficult to handle, but their combination with information technologies such as chemometrics and machine learning can extract important features from the chemical shift values. 18−22 Machine learning has been applied in the membrane research field in recent years; for example, filtering performance such as permeability and rejection rate were modeled with the operating conditions, 23 with the chemical structure of membrane filters, 24 and with the chemical structure of organic solvents. 25,26 Although previous studies have used NMR spectroscopy to identify the membrane foulants by visualizing and comparing a few of the typical spectra, 27,28 the chemometrics approach, that is, the combination of NMR spectroscopy and data science, has never been adopted.
Thus, in this study, we aim to introduce NMR-based chemometrics approach into the membrane fouling study. We propose the combination of NMR spectroscopy and machine learning to detect the membrane foulants (experiment 1) and evaluate the membrane properties (experiment 2); specifically, we used a regression model for the maximum TMP estimation to determine the foulants and a classification model to predict the membrane materials based on the NMR spectra. We also calculated the importance value of each explanatory variable based on the machine learning model to visualize the contribution of each chemical shift for the prediction of fouling intensity and the classification of membrane types.
■ MATERIALS AND METHODS Experiment 1. The first experiment was conducted to identify via NMR spectroscopy the important foulants on the tested filter. We put a globefish (Takifugu poecilonotus) in a small fish tank (15 L) connected with a denitrification tank; the breeding water was filtrated by a dead-end filtration system using a Whatman polycarbonate (PC) filter of 1.0 μm pore size (Cytiva, Buckinghamshire, UK), and the filtration velocity was set to 5 mL/min for 680 min by using a diaphragm pump (Q-60, TACMINA Co., Ltd., Tokyo, Japan). During the filtration process, we monitored the TMP with a pressure sensor (HPM-M6-1.5, Surpass Industry Co., Ltd., Saitama, Japan). After filtration, we collected a total of 26 membrane filter samples and stored them in a freezer at −30°C before the NMR analysis. Experiment 2. The second experiment was performed to determine the foulant features for each membrane material via NMR spectroscopy. We put a Girella punctata fish in a small fish tank (15 L) connected with a denitrification tank. The breeding water was filtrated through four types of membrane filters: PC (Cytiva, Buckinghamshire, UK), polytetrafluoroethylene (PTFE; Merck KGaA, Darmstadt, Germany), mixed cellulose ester (MCE; Tisch Scientific, Ohio, US), or glass fiber (GF; Cytiva, Buckinghamshire, UK). All the filters had the same pore size (1.0 μm). The filtration velocity was set to 20 mL/min for 90 min by using a Perista pump (AC-2110 II, ATTO Co., Ltd., Tokyo, Japan). After filtration, we collected samples from each filter type (30 from PC, 32 from PTFE, 19 from MCE, and 34 from GF) and stored them in a freezer at −30°C.
All the samples were measured using an AVANCE II 700 MHz NMR spectrometer (Bruker BioSpin, Rheinstetten, Germany). We selected three pulse programs, that is, 2DJ-res "jresgpprgf," watergate "p3919gp," and diffusion-edited "ledbpgppr2s1d," to obtain foulant information for low, intermediate, and high molecular weights, respectively. We annotated the metabolites using 1 H− 13 C heteronuclear single quantum coherence (HSQC) and 2DJ-res spectra. The SpinAssign 29 and SpinCouple 30 tools, along with the HMDB database, were used to list the metabolite candidates of each peak.
Chemometric Analysis and Machine Learning. As for the 2DJ-res spectra, we calculated the peak strength of each region of interest (ROI) after unifying the DSS strength by using the rNMR software, 31 and the maximum intensity of each ROI was used for data analysis. As for the Watergate and diffusion-edited spectra, we binned the raw spectra into 0.01 ppm increments and then lined up the signal intensities of DSS for all of them. To minimize the noise region effect, we defined mean ± 3 × SD of the intensities in the 9.0−12.0 ppm region as noise for each spectrum and converted these noise intensities to zero. The range from 0.5 to 9.0 ppm without the H 2 O peak (4.6−4.9 ppm for the Watergate spectra and 4.5−5.5 ppm for the diffusion-edited ones) was used for the subsequent data analysis. We also normalized the spectra to extract proportional information about the organic matter; the integral of the total signal intensity was adjusted to 1.
For machine learning, we adopted the Random Forest (RF), Extreme Gradient Boosting (XGBoost), Support Vector Machine (SVM) and Neural Network (NN) algorithms using the caret package. RF is a bagging algorithm which takes majority vote on multiple decision trees, whereas XGBoost is a boosting algorithm which combines weak learner into strong learner by sequential models of decision trees. SVM is a supervised algorithm to find an optimal boundary on different outputs. NN, which mimics neural signaling in the brain, trained the biases and weights to connect each neuron. These machine learning algorithms determined the maximum TMP (model 1) or filter materials (model 2) from the NMR spectra and inferred the degree of importance from explanatory variables. For model 1, we constructed a regression model whose objective variable was the maximum TMP during experiment 1 and the explanatory variables were the intensities of each chemical shift. For model 2, we constructed a classification model whose objective variable was the filter materials and the explanatory variables were the intensities of each chemical shift. We performed machine learning on 25 samples for model 1 and 115 samples for model 2. Each algorithm was built within the scope of method "rf", "xgbTree", "svmRadial," and "mlpKerasDropout" in ceras package. NN here is a three-layered structure with an activation function in the middle layer. The analytical flow is shown in Figure 1. At first, hyperparameters were adjusted by performing grid search in 10-fold cross-validation runs and selecting the one with the best prediction accuracy. The hyperparameters adjusted in this research are shown in Table S1. To validate the versatility of the learned models without overfitting, the whole data were 10-fold split into train data set and test data set, and the models were 10-fold cross-validated by fitting trained models to the untrained data set. This cross-validation step was performed 3 times after shuffling the combination patterns of the train and test data sets. To verify chance correlation for model 1 built from a small number of data, we adopted yscrambling; a total of 30 data sets were generated by randomly shuffling only the target variables, transmembrane pressure, and each data set was subjected to 10-fold cross-validation to calculate each accuracy. The importance of each chemical shift was calculated for all models for cross-validation and finally averaged to integrate the results of all of them.
To visualize the difference in NMR spectra between membrane types, we also performed principal component analysis (PCA) for the data set of experiment 2. The normalized binned spectra were divided into PC values, of which the PC1 and PC2 scores were used for the visualization. The loading value of each binned chemical shift was also calculated.
We also performed peak separation on the NMR spectra to estimate the proportion of each functional group of the foulants. The binned NMR spectra of the foulants and those of standard materials were standardized to the integral of 1 and  then processed with a non-negative matrix factorization in the data analysis platform PKSP. 32 The matrix of the raw and standard spectra was factorized into two, that is, the spectra and the score value of each component signal. Each component signal was assigned to the functional group of the standard material having the highest score value. The proportion of each component was calculated as the ratio of the product between the target component signal and score value to the integral of the component signal and score value of all the components.

■ RESULTS AND DISCUSSION
Characterization of the Foulants on the Membrane. In this study, we treated the NMR spectra just as images without any peak picking for machine learning and calculated the importance of each chemical shift value. Then, we explored the chemical shifts with higher importance.
The NMR peak identification was performed utilizing the web tools SpinAssign 29 and SpinCouple 30 with the HMDB database ( Figure S1), revealing several clear peaks of HSQC. The collected foulants mainly contained leucine (0.93 ppm), lactic acid (1.32 and 4.10 ppm), glutamic acid (2.06, 2.12, 2.34, and 3.75 ppm), betaine (3.25 and 3.90 ppm), and taurine (3.25 ppm). We also recognized several sugar-like peaks within the 3.5−4.5 ppm range, but we could not identify them correctly ( Figure S1). These results suggest that the foulants on the tested filter were composed of sugars and proteins, with metabolic products such as carboxylic acids; this is consistent with previous studies suggesting that the foulants are mainly polysaccharides and proteins. 6 Experiment 1, Model 1. In experiment 1, we collected various NMR spectra of foulants from the PC filter samples to determine which substances cause fouling. We applied several machine learning algorithms, that is, RF, XGBoost, SVM, and NN, which processed the NMR spectra to predict the maximum TMP as a surrogate of the fouling degree. For each algorithm, we used six types of NMR spectra, that is, two pretreatments (non-normalized and normalized to the total intensity of 1) for three pulse programs (watergate, 2DJ-res, and diffusion-edited). The non-normalized NMR spectra, representing the quantitative signals, allowed for a maximum TMP prediction with relatively high accuracy rather than the normalized NMR spectra, and RF model was the best fitted ( Figure 2A, Q 2 = 0.64−0.72 with RF, 0.46−0.76 with XGBoost, 0.49−0.77 with SVM, and 0.38−0.53 with NN in cross-validation); although these accuracies are not high enough, they indicate a good prediction for such a small amount of data probably because the increase in TMP is strongly associated with the quantity of the foulants on the filters. We note here that y-scrambling showed little effect of chance correlation ( Figure S2, averaged Q 2 = 0.09−0.10).
Because high prediction performance was achieved especially for the diffusion-edited pulse, we showed the important values of the diffusion-edited based RF models (in Figure 2B). The importance of each chemical shift in the 0.01 ppm increments was visualized with a correlation coefficient between maximum TMP and its intensity, where almost the entire intensity of the important chemical shift was correlated with the maximum TMP ( Figure 2B). This indicates that the fouling degree is associated with the amount of foulant on the filter, which increases as the fouling progresses regardless of the foulant type. This result is quite reasonable because fouling is caused by the accumulation of organic matter; however, the accumulation velocity might differ depending on the type of organic matter so that the foulants are possible to change their chemical composition as the fouling progresses.
Then, we constructed regression models to predict the TMP based on the normalized NMR spectra. The models using 2DJres and Watergate spectra showed relatively lower prediction abilities (Figure 2A; 2DJ-res; 0.27, 0.36, 0.30, and 0.17, Watergate; Q 2 = 0.50, 0.20, 0.21, and 0.32, for RF, XGBoost, SVM, and NN, respectively); however, the prediction accuracy was improved when using the diffusion-edited program for RF, XGBoost, and SVM models (Figure 2A; Q 2 = 0.64, 0.74, and 0.64 for RF, XGBoost, and SVM, respectively). We also confirmed little effects of chance correlation on these models by y-scrambling ( Figure S2, averaged Q 2 = 0.11−0.14). The higher accuracy of the models with diffusion-edited pulse indicates that the compositional change progressed while the TMP increased not because of the lower-molecular-weight organic compounds but due to the higher-molecular-weight ones. Interestingly, unlike the non-normalized NMR spectra, the importance visualization with the correlation coefficient suggests that the normalized NMR spectra had two distinct chemical shift regions, where the intensity initially increased along with the maximum TMP and then decreased. As for the diffusion-edited spectra, which provided the best prediction, the more the maximum TMP increased, the smaller the relative intensities of the 0.8−1.6 ppm signal became. According to the peak identification, this region contains the signals of lactic acid (1.32 ppm) and various amino acids, that is, alanine (1.47 ppm), valine (0.98 and 1.03 ppm), leucine (0.95 ppm), and isoleucine (0.92 and 1.00 ppm). In contrast, the important signals around 2.1 and 3.6−4.3 ppm, representing glutamic acid (2.05, 2.10, 2.34, and 3.75 ppm), taurine (3.25 and 3.42 ppm), betaine (3.25 ppm), and glycerol (3.55, 3.63, and 3.77 ppm), were positively correlated with the maximum TMP; besides, the 3.6−4.3 ppm region contained signal generally attributed to polysaccharides such as glucose and galactose, but we could not identify them specifically in this case. Because the diffusion-edited pulse program focuses on macromolecular compounds, the signals observed in this region likely represent polysaccharides. Moreover, we separated the polysaccharidelike signals from the whole diffusion-edited spectra, where the proportion of the polysaccharides in the foulants significantly increased along with the maximum TMP ( Figure S3). Therefore, we assume that the polysaccharides are important fouling-causative compounds because they accumulated on the filter faster than other substances. We propose two possibilities for this compositional change. The first is that the size distribution of the particles may differ according to the chemical compounds; 33,34 as the fouling proceeds, the filter pores get clogged and smaller particles are more likely to be trapped. The second is the production of extracellular polymeric substances (EPS) by bacteria on the filter. Microbial EPS biosynthesis is a common phenomenon in membrane fouling; microbes assimilate a carbon source, synthesize polymeric substances intracellularly, and then exudate them. 6 Although the chemical composition of EPS varies greatly depending on the environmental condition and target effluents, they typically contain a large proportion of polysaccharides. 6,34 Therefore, the bacteria-produced EPS would also increase the proportion of polysaccharides in the foulants, clogging the membrane pores and, hence, causing fouling. The dominance of polysaccharides on membrane filters is also reported in previous studies. For example, Meng et al. (2011) demon-strated, with several spectroscopy tools of UV analysis, excitation-emission matrix, and NMR, that the polysaccharide/protein ratio significantly increased for membrane foulants compared with that of sludge supernatant and membrane permeate in a membrane bioreactor system. 35 They supposed that higher molecular weight and viscosity of polysaccharides glued materials on the membranes to make them huge and caused membrane fouling. Inaba et al. (2017) visualized the spatial distribution of polysaccharides, proteins, and lipids on membranes and showed that biofilms on the membranes are composed mainly of polysaccharides and lipids produced by microbes but little with proteins. 36 Similar to these studies, important parameters inferred by machine learning in our study also support the contribution of polysaccharides to cause fouling on membrane filters. Experiment 2, Model 2. In Experiment 2, we collected NMR spectra of the foulants on four types of membrane filters (PC, PTFE, MCE, and GF) and constructed membrane classification models to extract the important chemical shifts for determining the foulant composition. The spectral data were normalized to a total intensity of 1 to focus on the compositional difference among the filter types. First, we performed principal component analysis on the NMR data ( Figure 3A), and the watergate data of the GF filter were plotted separately from the others. We also constructed classification models with RF, XGBoost, SVM, and NN for the three pulse programs used. Among the three pulse programs, all algorithms could distinguish the GF filter from the others with high accuracy (Figures 3C and S4). These results suggest that the GF filter properties are significantly different from the others. Among the four membranes investigated, only the GF filter is a depth filter, where the particles move through a tortuous path and are captured within the membrane depth, 37 while the other three types are surface filters, where the particles are removed by getting stuck on the membrane before passing through its pores. 37 Depth filters have a heterogeneous pore size (with a mean value of 1.0 μm in this case); in this way, they can filtrate effluents much faster than other membranes and, hence, are suitable for prefiltration. 37 Therefore, the GF filters used in this study are likely to let the smaller particles pass through and the macromolecular compounds accumulate. This would result in NMR spectral difference between the filter types, reflecting the different chemical compositions and particle-size distributions. To elucidate the difference between the GF filter and the others, we visualized the importance of the machine learning model coupled with t-test results ( Figure 3D); for the GF filter, the intensities in the polysaccharide region at 3.6−4.2 ppm were higher, while those in the 0.8−1.1 (protein-like: valine, leucine, and isoleucine), 1.3−1.6 (lactic acid, alanine, and arginine), and 1.9 ppm (arginine) regions were lower. If we assume that the smaller particles easily pass through the GF filter, the polysaccharides are likely to accumulate dominantly in larger particles, probably acting like a glue that binds each compound and, thus, constructing a large structure. The bar colors represent the difference between GF filter and three other filters; the red bar represents the chemical shifts with higher intensity for the GF filter; the blue bar represents those with higher for the three other filters rather than the GF filter; and the gray bar represents the region with no significance between GF and other filters (t-test, p < 0.05).
The PCA results show that the medians for each membrane type are aligned along the PC1 axis in the order of GF > MCE > PTFE > PC ( Figure 3A). The loading plot in Figure 3B shows a clear difference in the chemical shifts, with positive PC1 loading values in the sugar-like region (3.2−4.2 ppm) and negative ones in the protein-like region (0.8−1.2 and 1.4−1.6 ppm). Because the pore size was unified to 1 μm, the spectral difference among the filter types cannot be explained from the size distribution of the particles. Given the chemical properties of the membranes tested, they differed in the adsorption/ desorption interactions with the chemical compounds or the process of EPS production and biofilm formation, possibly leading to the variation of the foulant composition.

■ FUTURE PROSPECTS
We suggested an NMR-based chemometrics approach to study the fouling of membrane purification systems by applying machine learning techniques to NMR data. Machine learning algorithms, especially RF, could predict the maximum TMP in experiment 1 and the filter type in experiment 2 based only on the NMR spectra. Besides, they extracted the important chemical shift region, allowing us to identify the foulingcausative substances. Interestingly, maximum TMP was predictable even from percentage information on foulant profiles of higher molecular weight (i.e. diffusion-edited spectra). This suggests that not only quantity but also a composition of larger molecules affects the degree of membrane fouling. In addition, characteristic membranes such as GF were classified clearly only from NMR spectra by machine learning. In both cases of experiment 1 and experiment 2, the polysaccharide region and protein region showed contrasting effects; the proportion of polysaccharides increased in higher maximum TMP or in GF filter while that of proteins decreased, suggesting that the foulants' composition is important to consider filtering operations and membrane properties.
Note that the foulants proposed here may reflect mainly the size-dependent distribution of the chemical compounds because we used a dead-end filtration system in a short timescale. In actual wastewater filtration systems, other techniques such as crossflow filtration are commonly adopted; the crossflow streams flush the particles on the filter sideways, reducing their accumulation and allowing for good long-term operation. In this case, not only the particle size but also the physicochemical (e.g., sorption/desorption interactions between particles and membrane filter) or biological processes involved (e.g., biofilm formation on filter) are more relevant in triggering the membrane fouling, and the foulants might vary from those identified in this study. Thus, we need to analyze several foulant data from various filtration systems to comprehensively understand the fouling-causative compounds. The Supporting Information is available free of charge at https://pubs.acs.org/doi/10.1021/acsomega.1c06891.
Metabolite annotation of the 2DJ-res and heteronuclear single quantum coherence spectra; cross-validation of RF models with y-scrambling (30 times shuffling) for non-normalized/normalized and 2DJ-res/watergate/diffusion-edited data; correlation between maximum transmembrane pressure (TMP) and polysaccharide proportion; results of the cross-validation for the classification models using RF, XGBoost, SVM, and NN with nonnormalized nuclear magnetic resonance spectra and different pulse programs; and list of hyperparameters of each machine learning in caret package (PDF)