CN115329802A - Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning - Google Patents

Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning Download PDF

Info

Publication number
CN115329802A
CN115329802A CN202210821340.5A CN202210821340A CN115329802A CN 115329802 A CN115329802 A CN 115329802A CN 202210821340 A CN202210821340 A CN 202210821340A CN 115329802 A CN115329802 A CN 115329802A
Authority
CN
China
Prior art keywords
relaxation time
network model
network
magnetic resonance
nuclear magnetic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210821340.5A
Other languages
Chinese (zh)
Inventor
黄玉清
陈博
吴柳滨
杨钰
陈忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen University
Original Assignee
Xiamen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen University filed Critical Xiamen University
Priority to CN202210821340.5A priority Critical patent/CN115329802A/en
Publication of CN115329802A publication Critical patent/CN115329802A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention provides a nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning, which is characterized by constructing a mathematical model of a relaxation process exponential decay signal with noise and an ideal relaxation time spectrum according to the characteristics of a Laplace nuclear magnetic resonance signal, wherein the ideal relaxation time spectrum is used as a label, and the position of a spectral peak of the relaxation time spectrum is T 1 Relaxation time or T 2 The exact value of the relaxation time, the full width at half maximum of the spectral peak corresponds to the uncertainty of the result; generating a simulation signal by a mathematical model, and constructing training set data and test set data; building a network model; inputting training set data into a network model for training; inputting test set data into a networkTesting the model; the method provided by the invention builds the data set to train by relying on the mathematical model of the exponential decay signal of the relaxation process, does not need to collect a large amount of real data, can control the calculation time of the NMR relaxation time spectrum to be in the second level, and has higher robustness to the test data with different signal-to-noise ratios.

Description

Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning
Technical Field
The invention relates to the field of nuclear magnetic resonance, in particular to a nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning.
Background
Nuclear Magnetic Resonance (NMR) is a non-invasive detection technique widely used in clinical diagnostics and industrial measurements, where Nuclear Magnetic Resonance spectroscopy is commonly used for organic molecular structure determination and substance composition analysis. Free Induction Decay (FID) signals obtained from conventional NMR experimental sampling can be converted to spectrograms by fourier transformation to reveal the relative number of nuclei with specific chemical shifts in the sample. However, relaxation times associated with molecular dynamics and spin interactions cannot be directly measured by conventional NMR experiments, which typically need to be provided by laplace NMR experiments. There are two NMR relaxation times involved in the study, one being the longitudinal (spin-lattice) relaxation time T 1 Reflecting the rate at which the longitudinal magnetization vector returns to its equilibrium value, and the other is the transverse (spin-spin) relaxation time T 2 Reflecting the decay rate of the transverse component. Important properties of substance molecules can be obtained by measuring NMR relaxation time, and related technologies are widely applied to the fields of petroleum, chemical industry, food, agriculture, medicine, materials and the like.
The measured signal in Laplace NMR experiments is the relaxation time distribution (i.e., NMR relaxation time spectrum, T) 1 Spectrum, T 2 Spectrum) and thus, theoretically, the measurement signals can be calculated by laplace inversion to obtain NMR relaxation time spectra. However, laplace inversion is an ill-posed inverse problem, i.e., one measurement signal may correspond to an infinite number of relaxation time spectra, so the uncertainty of the NMR relaxation time spectra obtained by laplace inversion is large, especially in cases where the signal-to-noise ratio (SNR) of the measurement signal is low. To obtain a high resolution NMR relaxation time spectrum, the current conventional method is to add about the inverse problem objective functionA bundle and a regularization term to constrain the nature and morphology of the solution, such as the maximum entropy method and the iterative thresholding algorithm of the multi-exponential decay. However, conventional approaches still face some challenges. First, they rely on complex optimization algorithms that decide how to search in the solution space and when to terminate and output the results, often requiring elaborate mathematical derivations and long iterations in the inversion process. Secondly, different regularization items need corresponding regularization parameters to be balanced, and the unmatched regularization parameters easily cause the uncertainty increase of a relaxation time spectrum, such as the spectral peak line width increase.
Currently, there are methods to optimize such ill-posed inverse problems through untrained neural networks. The ability of the method to process complex objective functions benefits from the strong characterization ability of the neural network, however, for different test data, the network weight needs to be reinitialized and the relevant parameters are subjected to iterative optimization, so that the corresponding result can be obtained. When a series of test data needs to be subjected to inversion calculation in batches, the method is poor in flexibility and stability.
Disclosure of Invention
The invention mainly aims to overcome the defects in the prior art, and provides a method for calculating the relaxation time distribution of nuclear magnetic resonance signals based on deep learning. Through the pre-trained network model, the calculation time of the NMR relaxation time spectrum can be controlled at the second level, and meanwhile, the robustness on test data with different signal-to-noise ratios is high.
The invention adopts the following technical scheme:
a nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning comprises the following steps:
according to the characteristics of the Laplace nuclear magnetic resonance signal, a mathematical model of the relaxation process exponential decay signal with noise and an ideal relaxation time spectrum are constructed, wherein the ideal relaxation time spectrum is used as a label, and the position of a spectrum peak of the relaxation time spectrum is T 1 Relaxation time or T 2 Definition of relaxation timeValue, the full width at half maximum of the spectral peak corresponds to the uncertainty of the result; generating a simulation signal by a mathematical model, and constructing training set data and test set data;
building a network model, and setting related training parameters;
inputting training set data into a network model for training, and adjusting network parameters until a loss function is reduced to be convergent and tend to be stable to obtain a trained network model;
inputting the test set data into the trained network model for testing; the method specifically comprises the following steps: inputting the obtained test set data signals into the trained network model to obtain a nuclear magnetic resonance relaxation time spectrum generated by performing relaxation time inversion on the trained network model, and comparing the nuclear magnetic resonance relaxation time spectrum with the position of a spectrum peak in a label, namely T 1 Relaxation time value or T 2 Comparing the relaxation time value with the full width at half maximum to verify the convergence degree of the network model; and inputting the actually acquired nuclear magnetic resonance transverse relaxation signals into the trained network model to obtain the trained network model, performing relaxation time inversion on the trained network model to generate a corresponding nuclear magnetic resonance relaxation time spectrum, and comparing the nuclear magnetic resonance relaxation time spectrum with an expected value obtained by a fitting method to verify the effectiveness of the network model.
Specifically, a network model is built, and relevant training parameters are set, specifically:
the network model is divided into a network main body structure and a loss function; the main structure of the network is formed by stacking a full-connection layer and N layers of feedforward modules, wherein the feedforward module of each layer is connected with the output result of the upper layer through residual errors, and then the feedforward module of each layer is normalized to enter the next layer; each feedforward module comprises two full-connection layers, and each full-connection layer is followed by a nonlinear unit ReLU; the loss function of the network framework is:
Figure BDA0003744610490000021
wherein S in (i) Is the amplitude of the ith point in the network tag of the input network, S out (i) For the amplitude of the ith point in the output result of the network。
Specifically, the training set data is input into the network model for training, and the network parameters are adjusted until the loss function is reduced to convergence and tends to be stable, so as to obtain a trained network model, specifically:
the network training mode is as follows: adopting an Adam (adaptive mobility optimization) optimizer for training, calculating the network loss in each iteration, and updating parameters in the network according to the loss; and when the preset maximum iteration times are reached or the loss function is reduced to be converged and tends to be stable, terminating the training and obtaining the trained network model.
As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following advantages:
(1) The invention provides a nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning, which is characterized by constructing a mathematical model of a relaxation process exponential decay signal with noise and an ideal relaxation time spectrum according to the characteristics of a Laplace nuclear magnetic resonance signal, wherein the ideal relaxation time spectrum is used as a label, and the position of a spectral peak of the relaxation time spectrum is T 1 Relaxation time or T 2 The exact value of the relaxation time, the full width at half maximum of the spectral peak corresponds to the uncertainty of the result; generating a simulation signal by a mathematical model, and constructing training set data and test set data; building a network model, and setting related training parameters; inputting training set data into a network model for training, and adjusting network parameters until a loss function is reduced to be convergent and tend to be stable to obtain a trained network model; inputting the test set data into the trained network model for testing; the method provided by the invention builds the data set for training by relying on the mathematical model of the exponential decay signal in the relaxation process, and does not need to collect a large amount of real data. Through the pre-trained network model, the calculation time of the NMR relaxation time spectrum can be controlled at the second level, and meanwhile, the robustness on test data with different signal-to-noise ratios is high.
(2) The method utilizes deep learning to realize inversion of the NMR relaxation attenuation signals containing noise to obtain the NMR relaxation time spectrum, and has the characteristics of high precision, high speed, strong universality and the like.
Drawings
Fig. 1 is an overall framework diagram of a deep learning network according to an embodiment of the present invention.
FIG. 2 shows the transverse relaxation time T obtained by the network model inversion and conventional fitting method according to an embodiment of the invention 2 And (b) comparing the values, wherein fig. 2 (a) is an expected value obtained by a traditional fitting method, and fig. 2 (b) is a predicted value obtained by network model inversion.
The invention is described in further detail below with reference to the figures and specific examples.
Detailed Description
The invention is further described below by means of specific embodiments.
The relaxation times including the transverse relaxation time T 2 And longitudinal relaxation time T 1 The transverse relaxation process corresponds to a sequence of decaying signals (decreasing with time and going towards 0), while the longitudinal relaxation process corresponds to a sequence of recovering signals (increasing with time and going towards a fixed value). The longitudinal relaxation process and the transverse relaxation process have certain difference on a signal model formula, a mathematical model of a NMR transverse relaxation process multi-exponential decay signal is shown in a formula (1), and a mathematical model of an NMR longitudinal relaxation process multi-exponential decay signal is shown in a formula (2):
Figure BDA0003744610490000031
Figure BDA0003744610490000032
where τ is the echo spacing time, T 2 And T 1 Is the NMR relaxation time, epsilon is gaussian noise,
Figure BDA0003744610490000033
and
Figure BDA0003744610490000034
is the NMR relaxation signal intensity, f (T) 1 ) And f (T) 2 ) Is NMR relaxation time T 1 And T 2 I.e. the corresponding NMR relaxation time spectrum. Without loss of generality, it is assumed that the relaxation signals are normalized, i.e. there are:
Figure BDA0003744610490000041
as can be seen by comparing the mathematical models of the two relaxation signals, the longitudinal relaxation signal can be transformed into a decay model similar to the transverse relaxation signal:
Figure BDA0003744610490000042
wherein
Figure BDA0003744610490000043
With the same form of attenuation as the transverse relaxation signal. Therefore, mathematical models of the training set are constructed according to the transverse relaxation signal formula (1), and when the longitudinal relaxation signals are inverted, the longitudinal relaxation signals can be preprocessed through the formula (3) and converted into an attenuation form with the same transverse relaxation time.
This embodiment will relax T transversely by NMR 2 The inversion of time is taken as an example for explanation, and an NMR relaxation time spectrum is obtained by generating a simulation data training model and inverting an NMR relaxation signal by using the trained network model. As shown in fig. 1, an overall framework diagram of a deep learning network according to an embodiment of the present invention includes the following specific steps:
s1: a data set is generated.
A network data set is generated according to equation (1), the input data is a relaxation multi-exponential decay signal S (τ) with data dimensions of 125 × 10, where 125 is the batch size, 10 is the number of points of the echo time τ, and the maximum value of the echo time τ is set to 12.8. The number of relaxation times superimposed in each multi-exponential decay signal is randomly chosen to be 1 or 2, and the relaxation time parameters are randomly generated with a minimum interval of 0.1. The network label is an NMR relaxation time spectrum with an ideal Gaussian line shape, wherein the position of a spectrum peak is an accurate value of the relaxation time, and the full width at half maximum of the spectrum peak is the uncertainty of the result. The data dimension of the network tag is 125 × 140, where 125 is the batch size, 140 is the number of grid points of the transverse relaxation time, and the maximum value of the transverse relaxation time is set to 14. The total simulation sample number is 30000, where 27000 is a training set, 2000 is a validation set, and 1000 is a test set, where the training set is used to train the network model, the validation set is used to evaluate the effect of the current network model, and the test set is used to validate the effect of the final network model.
S2: and (5) building a network model and setting related training parameters.
The overall framework of the network is shown in fig. 1, and can be divided into two parts, namely a network main body structure and a loss function. The main structure of the network is formed by stacking a full connection layer and N layers of feedforward modules, wherein the feedforward module of each layer is connected with the output result of the upper layer through residual errors, and then the feedforward module of each layer is normalized to enter the next layer. The first fully-connected layer has dimensions of 10 x 140, and can expand the input signal to a higher dimension feature space. Each feedforward module includes two fully-connected layers, where the number of neurons in a hidden layer is 4096, and each fully-connected layer is followed by a nonlinear unit ReLU (linear rectifying unit). The loss function of the network framework is:
Figure BDA0003744610490000044
wherein S in (i) Is the amplitude of the ith point in the network tag of the input network, S out (i) Is the amplitude of the ith point in the output of the network.
S3: and (5) network training.
The training process of the deep learning network model is iterative learning and can be divided into two stages of forward propagation and backward propagation. The forward propagation refers to a process that each layer of the neural network obtains an output through the weight of the neural network, the input summation and the bias vector and then through an activation function, and an output loss value is obtained. The back propagation is a process that the neural network calculates the influence (measured by partial derivatives) of the neural network weight of each layer on the final output through the output loss value, and updates the neural network weight through the difference value and the learning rate through the gradient descent principle.
The specific method comprises the following steps: inputting the training set data obtained in the step 1) into a network for training, and adjusting network parameters until a loss function is reduced to be convergent and tends to be stable to obtain a functional network model; the network training mode is as follows: training by adopting an Adam optimizer, wherein the learning rate is 1e-3, calculating the network loss in each iteration, and updating parameters in the network according to the loss; and when the preset maximum iteration times are reached or the loss function is reduced to convergence and tends to be stable, terminating the training and obtaining the functionalized network model.
S4: and (5) testing the network.
The specific method of the network test comprises the following steps: firstly, inputting the data signals of the test set obtained in the step 1) into a functional network model to obtain an NMR transverse relaxation time spectrum generated by inverting the relaxation time of the network, and comparing the NMR transverse relaxation time spectrum with the position (namely T) of a spectrum peak in a label 2 Relaxation time values) and the full width at half maximum to verify the performance of the network model.
Then, inputting the NMR transverse relaxation signals which are really collected into a functional network model to obtain a corresponding transverse relaxation T which is generated by inverting relaxation time through a network 2 And comparing the time spectrum with an expected value obtained by a traditional fitting method to verify the practicability of the network model. The comparison result is shown in fig. 2, in which fig. 2 (a) is the expected value obtained by the conventional fitting method, fig. 2 (b) is the predicted value obtained by the inversion of the network model, and the upper one-dimensional curve is the corresponding nmr hydrogen spectrum. In general, the NMR relaxation time inversion method based on the deep learning has higher accuracy and robustness and has higher calculation speed.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the invention relates may modify, supplement or substitute the specific embodiments described, without however departing from the spirit of the invention or exceeding the scope defined by the appended claims.
The above description is only an embodiment of the present invention, but the design concept of the present invention is not limited thereto, and any insubstantial modifications made by using the design concept should fall within the scope of infringing the present invention.

Claims (3)

1. A nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning is characterized by comprising the following steps:
according to the characteristics of the Laplace nuclear magnetic resonance signal, a mathematical model of the relaxation process exponential decay signal with noise and an ideal relaxation time spectrum are constructed, wherein the ideal relaxation time spectrum is used as a label, and the position of a spectrum peak of the relaxation time spectrum is T 1 Relaxation time or T 2 The exact value of the relaxation time, the full width at half maximum of the spectral peak corresponds to the uncertainty of the result; generating a simulation signal by a mathematical model, and constructing training set data and test set data;
building a network model, and setting related training parameters;
inputting training set data into a network model for training, and adjusting network parameters until a loss function is reduced to be convergent and tend to be stable to obtain a trained network model;
inputting the test set data into the trained network model for testing; the method specifically comprises the following steps: inputting the obtained test set data signals into the trained network model to obtain a nuclear magnetic resonance relaxation time spectrum generated by performing relaxation time inversion on the trained network model, and comparing the nuclear magnetic resonance relaxation time spectrum with the position of a spectrum peak in a label, namely T 1 Relaxation time value or T 2 Comparing the relaxation time value with the full width at half maximum to verify the convergence degree of the network model; and inputting the truly acquired nuclear magnetic resonance transverse relaxation signals into the trained network model to obtain the trained network model, performing relaxation time inversion on the trained network model to generate a corresponding nuclear magnetic resonance relaxation time spectrum, and comparing the nuclear magnetic resonance relaxation time spectrum with an expected value obtained by a fitting method to verify the effectiveness of the network model.
2. The method for calculating the relaxation time distribution of the nuclear magnetic resonance signal based on the deep learning according to claim 1, wherein a network model is built, and relevant training parameters are set, and specifically the method comprises the following steps:
the network model is divided into a network main body structure and a loss function; the main structure of the network is formed by stacking a full-connection layer and N layers of feedforward modules, wherein the feedforward module of each layer is connected with the output result of the upper layer through residual errors, and then the feedforward module of each layer is normalized to enter the next layer; each feedforward module comprises two full-connection layers, and each full-connection layer is followed by a nonlinear unit ReLU; the loss function of the network framework is:
Figure FDA0003744610480000011
wherein S in (o) amplitude of ith point in network tag of input network, S out (i) Is the amplitude of the ith point in the output of the network.
3. The method for calculating nuclear magnetic resonance signal relaxation time distribution based on deep learning according to claim 1, characterized in that training set data is input into a network model for training, and network parameters are adjusted until a loss function is reduced to convergence and tends to be stable, so as to obtain a trained network model, specifically:
the network training mode is as follows: adopting an Adam (adaptive mobility optimization) optimizer for training, calculating the network loss in each iteration, and updating parameters in the network according to the loss; and when the preset maximum iteration times are reached or the loss function is reduced to be converged and tends to be stable, terminating the training and obtaining the trained network model.
CN202210821340.5A 2022-07-13 2022-07-13 Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning Pending CN115329802A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210821340.5A CN115329802A (en) 2022-07-13 2022-07-13 Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210821340.5A CN115329802A (en) 2022-07-13 2022-07-13 Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning

Publications (1)

Publication Number Publication Date
CN115329802A true CN115329802A (en) 2022-11-11

Family

ID=83918505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210821340.5A Pending CN115329802A (en) 2022-07-13 2022-07-13 Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning

Country Status (1)

Country Link
CN (1) CN115329802A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765286A (en) * 2024-02-22 2024-03-26 清华大学 method and device for representing water phase state of cement-based material

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765286A (en) * 2024-02-22 2024-03-26 清华大学 method and device for representing water phase state of cement-based material
CN117765286B (en) * 2024-02-22 2024-05-07 清华大学 Method and device for representing water phase state of cement-based material

Similar Documents

Publication Publication Date Title
Mazor et al. Low‐rank magnetic resonance fingerprinting
US11169235B2 (en) Method and apparatus for processing magnetic resonance data
JP6797189B2 (en) Time domain MRI
Bain Chemical exchange in NMR
Kara et al. Parameter map error due to normal noise and aliasing artifacts in MR fingerprinting
Sumpf et al. Fast T2 mapping with improved accuracy using undersampled spin-echo MRI and model-based reconstructions with a generating function
CN111898734B (en) NMR relaxation time inversion method based on MLP
CN103529411B (en) A kind of automatic method for shimming based on gradient coding
Forshed et al. NMR and Bayesian regularized neural network regression for impurity determination of 4-aminophenol
US10317501B2 (en) System and method for magnetic resonance fingerprinting in the presence of inhomogeneous magnetic fields
CN115329802A (en) Nuclear magnetic resonance signal relaxation time distribution calculation method based on deep learning
EP3317688B1 (en) System and method for an eddy-current field compensation in magnetic resonance imaging
Song et al. Real-time optimization of nuclear magnetic resonance experiments
CN109799472B (en) Magnetic resonance eddy current compensation method based on deep learning
Zhang et al. Cramér–Rao bound‐informed training of neural networks for quantitative MRI
Padormo et al. Large dynamic range relative mapping
Caouette-Mansour et al. Robust spin relaxometry with fast adaptive Bayesian estimation
Hiltunen et al. Quantification of human brain metabolites from in vivo1H NMR magnitude spectra using automated artificial neural network analysis
Wang et al. Efficient approximation of Jacobian matrices involving a non-uniform fast Fourier transform (NUFFT)
Khurana et al. Spectral investigation of the noise influencing multiqubit states
CN105759233B (en) A kind of rapid chemical exchanges saturation transfer imaging method and system
CN115356672B (en) Multi-dimensional magnetic resonance imaging method, system and storage medium
Arvinte et al. Single-shot adaptation using score-based models for mri reconstruction
CN109507221B (en) Multidimensional nuclear magnetic resonance molecular diffusion coupling imaging method
Zubkov et al. Steady state effects in a two-pulse diffusion-weighted sequence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination