A Deep Learning-Based Method for Processing Two-Dimensional Diffusion Ranking Spectra of Nuclear Magnetic Resonance
By generating simulated datasets and labels using deep learning-based methods and building a network model, the requirement for prior knowledge in traditional DOSY data processing is addressed, enabling fast, accurate peak alignment and high-separation NMR two-dimensional diffusion sorting spectrum data processing.
Patent Information
- Application Number
- CN202210820413.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Existing techniques for processing two-dimensional diffusion ordering spectral data of nuclear magnetic resonance require prior knowledge and complex parameter adjustments, and are difficult to process data of various sizes quickly, resulting in poor peak alignment and separation of the processed data.
A deep learning-based approach is adopted, which builds a deep learning network model by generating a simulated dataset and labels, and trains it using a multi-head attention module and a feedforward module to generate a two-dimensional matrix of chemical shift and diffusion coefficient, enabling fast processing.
It requires no prior knowledge, processes DOSY data quickly, has good peak alignment, high separation, strong robustness, and fast processing speed.
Smart Images

Figure CN115329658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear magnetic resonance technology, and in particular to a method for processing two-dimensional diffusion sorting spectrum data based on deep learning. Background Technology
[0002] Nuclear magnetic resonance (NMR) is a versatile analytical technique in chemistry, pharmacology, and biology, enabling users to interpret rich structural information from samples. Diffusion ordering spectroscopy (DOSY) is an NMR technique used for the analysis of material composition. By processing DOSY experimental data, a two-dimensional spectrum can be constructed, with one dimension representing chemical shift and the other representing diffusion coefficient. This spectrum can be used for the separation, identification, and analysis of interactions between components in mixtures.
[0003] In high-resolution DOSY spectra, peaks of the same molecule exhibit excellent alignment, and peaks of different compounds can also be well separated. To reconstruct high-resolution DOSY spectra from experimental data, various processing methods have been proposed, which can be broadly categorized into two types: univariate methods and multivariate methods. Univariate methods such as multi-exponential fitting, CONTIN, maximum entropy, and iRRT independently fit the attenuation of a single one-dimensional signal. While they generally perform well when processing data with high signal-to-noise ratios, in real-world environments, experimental noise often leads to poor alignment of peaks belonging to the same chemical composition. Unlike univariate methods, multivariate methods process multiple one-dimensional signals simultaneously, or even the entire spectrum. Their advantage lies in utilizing information from non-overlapping signals to improve the resolution and accuracy of overlapping signals.
[0004] On the other hand, DOSY spectral processing can be divided into two categories: exponential fitting and inverse Laplace transform. Some multivariate methods, such as CORE (compositional analysis NMR), SCORE (fast compositional analysis), and DECRA (direct exponential curve analysis algorithm), belong to the exponential fitting method. This type of method can directly output the predicted diffusion coefficient value, but requires the exact quantity of the molecular components of the sample as prior knowledge. Unlike exponential fitting methods, the inverse Laplace transform (ILT) method generates a diffusion coefficient distribution spectrum, but does not directly reflect the precise value of the diffusion coefficient. The peak positions represent the most likely values of the diffusion coefficient, and the full width at half maximum (FWHM) of these peaks represents the uncertainty. The construction of the distribution spectrum is considered an inverse problem, and many algorithms have been proposed to solve it, including the Non-negative Minimum Mean (NNLMS) algorithm, CONTIN, the Maximum Entropy method (MaxEnt), the Iterative Thresholding Algorithm with Multiple Exponential Decay (ITAMeD), the Enhanced Recognition Multidimensional Inverse Laplace Transform (EDMILT), and the Low-Rank Sparse Inverse Laplace Transform (LRSpILT), etc. The main difference between these algorithms lies in the regularization method used. Although the ILT method does not require the actual number of molecular components as input, it does require some adjustments to the parameters of the optimization formula, and only when the parameters are properly adjusted can the expected results be produced.
[0005] With the development of deep learning, more neural network frameworks have been developed and widely used in fields such as machine translation, computer vision, medical imaging, and nuclear magnetic resonance data processing. In DOSY data processing, Coordinated Multiple Exponential Fitting (CoMeF) is a technique for DOSY data processing that uses neural networks to solve highly nonlinear and nonconvex optimization problems. However, CoMeF is not a true deep learning method because it only uses a neural network as an optimizer, and its training process is similar to the iterative solution process of a nonconvex optimization problem. In other words, when processing multiple DOSY experimental datasets, each dataset needs to be trained independently and at a time-consuming pace. There are still two challenges in using deep learning methods for DOSY data processing: (1) Deep learning methods usually require a large number of training samples. However, due to the limitations of experimental samples and instrument time, it is impossible to build a sufficiently large dataset for DOSY spectra. (2) Most neural networks require the test data to be the same size as the training data. However, the signal obtained from the Pulse Gradient Spin Echo (PGSE) experiment varies with the experimental samples and instrument parameters, especially in the gradient dimension. Summary of the Invention
[0006] The main objective of this invention is to overcome the aforementioned deficiencies in the prior art and propose a deep learning-based method for processing two-dimensional diffusion ordering spectrum (DOSY) nuclear magnetic resonance data. This method can solve the problems of the need for prior knowledge and complex parameter adjustment in traditional DOSY data processing, and can quickly process DOSY data of various sizes. The processed results have good peak alignment, high separation, and strong robustness.
[0007] The present invention adopts the following technical solution:
[0008] A deep learning-based method for processing two-dimensional diffusion ordering spectral data of nuclear magnetic resonance includes:
[0009] Step 1: Based on the characteristics of the two-dimensional diffusion sorting spectrum signal of nuclear magnetic resonance, generate simulation data using relevant mathematical models and construct a simulation dataset;
[0010] The relevant mathematical model is as follows:
[0011]
[0012] Where b = -γ 2 δ 2 g 2 △′, f represents the nuclear chemical shift, D l Let γ be the diffusion coefficient of the l-th molecular component, γ be the gyrometry ratio, δ be the gradient pulse width, g be the pulse gradient field amplitude, Δ′ be the diffusion time after correction for finite gradient pulse width, and C be the diffusion coefficient of the l-th molecular component. l (f) represents the spectrum of the l-th molecular component, simulated by a linear combination of peaks with Lorentz-shaped peaks in the frequency dimension, where f i Let w be the position of the i-th peak. i Let A be the full width at half maximum (FWHM) of the i-th peak. i Let ε be the amplitude of the i-th peak, and ε be the Gaussian noise.
[0013] Step 2: Generate labels for network training. The labels are a two-dimensional matrix, with the chemical shift coefficient and diffusion coefficient as the two dimensions, respectively.
[0014] Step 3: Build a deep learning network model and set training parameters;
[0015] The deep learning network model includes: the main structure of the network model, the loss function of the network model, and related training parameters;
[0016] Step 4: Train the deep learning network model using the constructed simulated dataset;
[0017] After normalizing the constructed simulated dataset, it is input into the deep learning network model. The network output and training labels are used to calculate the loss value through the mean square loss function. The parameter gradient is obtained through the backpropagation algorithm. Based on the calculated gradient, the network parameters are updated through the Adam optimization algorithm. New data is input into the new network to obtain a new loss value. The network parameters are iteratively updated until the loss value decreases to convergence or reaches the set number of training rounds. Then the training is terminated, and the trained deep learning network model is obtained.
[0018] Step 5: Testing the deep learning network model;
[0019] The two-dimensional diffusion sorting spectrum data of nuclear magnetic resonance to be processed is first subjected to gradient dimension interpolation fitting, and then normalized; it is input into the trained deep learning network model, and a two-dimensional matrix is obtained at the output end, with the two dimensions being chemical shift and diffusion coefficient, respectively.
[0020] Specifically, in step 3, the deep learning network model includes: the main structure of the network model, the loss function of the network model, and related training parameters, specifically:
[0021] The main structure of the network model is as follows: First, there is a linear layer, followed by N main modules. Each main module includes a multi-head attention module, a feedforward module, and two Add & Norm modules, with the multi-head attention module being the core architecture of the network. The input matrix is first processed through three different linear layers to obtain three matrices Q, K, and V. These matrices are then divided into multiple blocks and fed into the attention modules for computation. The mathematical model of the attention module is as follows:
[0022]
[0023] Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k The last dimension value of the key matrix, A, serves as a scaling factor. h The attention matrix is calculated for the h-th "head".
[0024] The outputs are concatenated after the attention module and constructed into a complete multi-head attention module through a linear layer;
[0025] The feedforward module consists of two linear layers, a Dropout layer, and a nonlinear activation unit.
[0026] The Add&Norm module includes residual connections and LayerNorm layers.
[0027] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:
[0028] (1) This invention provides a deep learning-based method for processing two-dimensional diffusion ordering spectrum data of nuclear magnetic resonance. First, based on the signal characteristics of two-dimensional diffusion ordering spectrum of nuclear magnetic resonance, simulated data is generated using a relevant mathematical model to construct a simulated dataset; labels for network training are generated, wherein the labels are two-dimensional matrices with the chemical shift coefficient and diffusion coefficient as the two dimensions; a deep learning network model is built and training parameters are set; the deep learning network model is trained using the constructed simulated dataset; and the deep learning network model is tested. The method provided by this invention does not require the exact quantity of molecular components of the sample to be tested as prior knowledge, and the training data are all simulated data, eliminating the need to collect a large amount of real data.
[0029] (2) The method provided by the present invention has a fast processing speed, requiring only a few seconds, and has high computational efficiency. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the deep learning network model training process according to an embodiment of the present invention;
[0031] Figure 2 A diagram of a deep learning network model according to an embodiment of the present invention;
[0032] Figure 3 This is a two-dimensional spectrogram obtained by processing test data using a deep learning network model trained according to an embodiment of the present invention.
[0033] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Detailed Implementation
[0034] This invention provides a deep learning-based method for processing two-dimensional diffusion ordering spectrum (DOSY) nuclear magnetic resonance data. It can solve the problems of the need for prior knowledge and complicated parameter adjustment in traditional DOSY data processing, and can quickly process DOSY data of various sizes. The processed results have good peak alignment, high separation, and strong robustness.
[0035] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0036] For ease of description, the relevant technical terms appearing in the specific implementation method will be explained first:
[0037] ILT (Inverse Laplace Transform): Inverse Laplace Transform
[0038] DOSY (Diffusion Ordered Spectroscopy): Two-dimensional diffusion ordering spectrum of nuclear magnetic resonance
[0039] Adam parameter optimization algorithm: Adaptive Moment Estimation
[0040] This specific implementation trains a model using simulated data. The trained model is then used to process the DOSY data to be tested, obtaining a spectrum showing the relationship between chemical shifts and diffusion coefficients. This spectrum is used to analyze intermolecular interactions and identify mixture components. During training, the input data dimension is S1: 48×300×30, where 48 represents the batch size, 300 represents the chemical shift dimension, and 30 represents the attenuation signal length. The output data dimension is S2: 48×300×140, where 48 represents the batch size, 300 represents the chemical shift dimension, and 140 represents the diffusion coefficient dimension. The network exhibits good versatility; when processing the test DOSY data, there are no restrictions on the size of the chemical shift dimension or the attenuation signal dimension. The output chemical shift dimension is the same as the input, while the output attenuation signal dimension is fixed at 140.
[0041] The specific steps are as follows:
[0042] Step 1: Based on the characteristics of the DOSY signal, generate simulated data using a relevant mathematical model and add simulated noise to construct a simulated dataset.
[0043] The relevant mathematical model is as follows:
[0044]
[0045] Where b = -γ 2 δ 2 g 2 △′, f is the nuclear resonance frequency, D l Let γ be the diffusion coefficient of the l-th molecular component, γ be the gyrometry ratio, δ be the gradient pulse width, g be the pulse gradient field amplitude, Δ′ be the diffusion time after correction for finite gradient pulse width, and C be the diffusion coefficient of the l-th molecular component. l (f) represents the spectrum of the l-th molecular component, simulated by a linear combination of peaks with Lorentz-shaped peaks in the frequency dimension, where f i Let w be the position of the i-th peak. i Let A be the full width at half maximum (FWHM) of the i-th peak. i Let be the amplitude of the i-th peak, and ε be the Gaussian noise. In this embodiment, b is a one-dimensional array uniformly distributed within the interval 0 to 1.2, with an array length of 30. l f is a random number between 0 and 14, l is a random integer between 1 and 3, and f is a random number between 1 and 3. i w is a random integer between 0 and 300. iIt is 18, A i A random number in the range of 0 to 1.
[0046] Step 2: The generated network labels are a two-dimensional matrix, with the chemical shift and diffusion coefficient as the two dimensions. In this embodiment, the chemical shift dimension is 300, and the diffusion coefficient dimension is 140. The chemical shift is the same as that in the simulated training data. The ILT method is used in the diffusion coefficient dimension, with a Gaussian distribution representing the probability of different diffusion coefficient values. The center value of the Gaussian distribution is the predicted value, and the half-width at half-maximum (WHM) represents the confidence level of this predicted value.
[0047] Step 3: Build a deep learning network model and set the relevant training parameters;
[0048] The network model is as follows: Figure 1 As shown, this includes: the main structure of the network model, the loss function of the network model, and the relevant training parameters. The main structure of the network model: The model begins with a linear layer, followed by N main modules. Each main module includes a multi-head attention module, a feedforward module, and two add & normalization modules. The multi-head attention module is the core architecture of the network. First, the input matrix is passed through three different linear layers to obtain three matrices: Q (Query), K (Key), and V (Value). These matrices are then divided into multiple blocks (referred to as multi-head attention to improve the flexibility of network training) and fed into the attention module for calculation. The mathematical model of the attention module is as follows:
[0049]
[0050] The outputs of the attention module are concatenated and passed through linear layers to form a complete multi-head attention module. The feedforward module consists of two linear layers, a Dropout layer, and a ReLU nonlinear activation unit. The Add&Norm module includes residual connections and LayerNorm layers.
[0051] In this example, the parameters of the linear layer before the main network are set to 30-140, which expands the dimension of the input attenuation signal from 30 to 140. There are 6 main modules, the head of the Multi-HeadAttention module is set to 7, the parameters of the two linear layers in the feedforward module are set to 140-4096 and 4096-140 respectively, and the Dropout is set to 0.001.
[0052] Step 4: Train the model using the generated simulated dataset;
[0053] like Figure 2As shown, the simulated data constructed in step 1 is first normalized (each decay signal is divided by the first value of the decay signal to ensure that the decay signal starts to decay from 1) and then input into the network. The network output and network label are compared using the mean squared loss function (MSE) to obtain the loss value. The parameter gradient is obtained through the backpropagation algorithm. Based on the calculated gradient, the network parameters are updated using the Adam optimization algorithm. New data is input into the new network to obtain a new loss value. The network parameters are iteratively updated until the loss value decreases to convergence or reaches the set number of training epochs, at which point training is terminated. The loss value represents the error between the network output and the label. The smaller the error, the closer the network output is to the label, and the better the network output performance. In this embodiment, the initial learning rate is set to 10. -3 The batch size is set to 48, and the number of network training rounds is set to 40.
[0054] Step 5: Network Testing; First, perform gradient-dimensional interpolation fitting on the DOSY data to be tested, then normalize it (divide each decay signal by the first value of the decay signal to ensure that the decay signal starts to decay from 1), and then input it into the trained model. The output will yield a two-dimensional matrix, and the contour plot is shown below. Figure 3 As shown, where Figure 3 (a) is the expected value. Figure 3 (b) shows the actual output of the model, with the one-dimensional curve at the top representing the corresponding 1H NMR spectrum. In the contour plot, the vertical axis of the peak center value represents the model's estimate of the diffusion coefficient of a certain molecular component, while the horizontal axis corresponds to its chemical shift in the one-dimensional 1H NMR spectrum. The linewidth on the diffusion dimension represents the uncertainty of this estimate. The results processed by this embodiment... Figure 3 It can be seen that the three different diffusion coefficient values in the diffusion dimension of the test data correspond to three different molecular components, and the results exhibit good alignment and low uncertainty. Overall, the deep learning-based NMR two-dimensional diffusion ordering spectrum data processing method described above demonstrates high accuracy and robustness, along with a fast processing speed.
[0055] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may modify or supplement the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
[0056] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A method for processing two-dimensional diffusion sorting spectrum data based on deep learning nuclear magnetic resonance, characterized in that, include: Step 1: Based on the characteristics of the two-dimensional diffusion sorting spectrum signal of nuclear magnetic resonance, generate simulation data using relevant mathematical models and construct a simulation dataset; The relevant mathematical model is as follows: Where b = -γ 2 δ 2 g 2 △′, f represents the nuclear chemical shift, D l Let γ be the diffusion coefficient of the l-th molecular component, γ be the gyrometry ratio, δ be the gradient pulse width, g be the pulse gradient field amplitude, Δ′ be the diffusion time after correction for finite gradient pulse width, and C be the diffusion coefficient of the l-th molecular component. l (f) represents the spectrum of the l-th molecular component, simulated by a linear combination of peaks with Lorentz-shaped peaks in the frequency dimension, where f i Let w be the position of the i-th peak. i Let A be the full width at half maximum (FWHM) of the i-th peak. i Let ε be the amplitude of the i-th peak, and ε be the Gaussian noise. Step 2: Generate labels for network training. The labels are a two-dimensional matrix with the chemical shift and diffusion coefficient as the two dimensions, respectively. Step 3: Build a deep learning network model and set training parameters; The deep learning network model includes: the main structure of the network model, the loss function of the network model, and related training parameters; Step 4: Train the deep learning network model using the constructed simulated dataset; After normalizing the constructed simulated dataset, it is input into the deep learning network model. The network output and training labels are used to calculate the loss value through the mean square loss function. The parameter gradient is obtained through the backpropagation algorithm. Based on the calculated gradient, the network parameters are updated through the Adam optimization algorithm. New data is input into the new network to obtain a new loss value. The network parameters are iteratively updated until the loss value decreases to convergence or reaches the set number of training rounds. Then the training is terminated, and the trained deep learning network model is obtained. Step 5: Testing the deep learning network model; The two-dimensional diffusion sorting spectrum data of nuclear magnetic resonance to be processed is first subjected to gradient dimension interpolation fitting, and then normalized; it is input into the trained deep learning network model, and a two-dimensional matrix is obtained at the output end, with the two dimensions being chemical shift and diffusion coefficient, respectively.
2. The method for processing two-dimensional diffusion sorting spectrum data based on deep learning nuclear magnetic resonance according to claim 1, characterized in that, In step 3, the deep learning network model includes: the main structure of the network model, the loss function of the network model, and the relevant training parameters, specifically: The main structure of the network model is as follows: First, there is a linear layer, followed by N main modules. Each main module includes a multi-head attention module, a feedforward module, and two Add & Norm modules, with the multi-head attention module being the core architecture of the network. The input matrix is first processed through three different linear layers to obtain three matrices Q, K, and V. These matrices are then divided into multiple blocks and fed into the attention modules for computation. The mathematical model of the attention module is as follows: Where Q is the query matrix, K is the key matrix, V is the value matrix, and d k The last dimension value of the key matrix, A, serves as a scaling factor. h The attention matrix calculated for the h-th "head"; The outputs are concatenated after the attention module and constructed into a complete multi-head attention module through a linear layer; The feedforward module consists of two linear layers, a Dropout layer, and a nonlinear activation unit. The Add&Norm module includes residual connections and LayerNorm layers.
Citation Information
Patent Citations
Two-dimensional diffusion-ordered nuclear magnetic resonance spectroscopy method used for any magnetic field environments
CN105651803A
Nuclear magnetic resonance pulse sequence controller
CN112379317A