NMR relaxation time inversion method based on unsupervised neural network

11680998 · 2023-06-20

Assignee

Inventors

Cpc classification

International classification

Abstract

An NMR relaxation time inversion method based on an unsupervised neural network includes simulating inversion kernel matrix, simulating continuous NMR relaxation time spectrum, simulating noise, calculating NMR relaxation signals as samples, various samples forming a sample set, constructing an unsupervised neural network model, and defining a loss function of the unsupervised neural network model; and taking the samples in the training sample set as an input of the unsupervised neural network model, to obtain an optimal mapping relationship between the NMR relaxation signals and the NMR relaxation time spectrum with a minimum loss function. The present invention provides the possibility of using experimental data as the sample for training since the trading sample does not need to be labeled, can automatically learn the optimal regularization parameters without depending on the initial value and manual experience, and predicts fast.

Claims

1. An NMR relaxation time inversion method based on an unsupervised neural network, wherein the NMR relaxation time inversion method comprises: step 1, simulating an inversion kernel matrix K, simulating a continuous NMR relaxation time spectrum F, simulating noise ε, calculating NMR relaxation signals custom character according to custom character=KF+ε as samples, various samples forming a sample set, and dividing the sample set into a training sample set and a test sample set; step 2, constructing an unsupervised neural network model, and defining a loss function of the unsupervised neural network model as: 1 N B .Math. .Math. = 1 N B ( .Math. .Math. - KH ( .Math. , Θ ) .Math. 2 2 α .Math. 1 2 + W ( .Math. ) α .Math.2 2 + 2 log α .Math. 1 α .Math.2 ) where N.sub.B is a number of the NMR relaxation signals, custom character.sub..Math. is an .Math.-th NMR relaxation signal, K is the inversion kernel matrix, H(custom character.sub..Math.,Θ) is a mapping relationship between the .Math.-th NMR relaxation signal custom character.sub..Math. and the corresponding .Math.-th NMR relaxation time spectrum F.sub..Math., Θ is a weight of the unsupervised neural network model, W(custom character.sub..Math.)=δ.sub..Math.∥H(custom character.sub..Math.,Θ)∥.sub.1+(1−δ.sub..Math.)∥H(custom character.sub..Math.,Θ)∥.sub.2.sup.2, δ.sub..Math. is a standard deviation of the .Math.-th NMR relaxation signal custom character.sub..Math. in a range of (0, 1), and α.sub.l1 and α.sub.l2 are regularization parameters, ∥ ∥.sub.1 is 1-norm, and ∥ ∥.sub.2.sup.2 is a square of 2-norm; and step 3, taking the samples in the training sample set as an input of the unsupervised neural network model, to obtain an optimal mapping relationship between the NMR relaxation signals and the continuous NMR relaxation time spectrum with a minimum loss function.

2. The NMR relaxation time inversion method based on the unsupervised neural network according to claim 1, wherein the simulating the inversion kernel matrix K comprises: predefining echo signal parameters, the echo signal parameters predefined comprising a number of echo signals and an interval of sampling time points of two adjacent echo signals; predefining NMR relaxation time parameters, the NMR relaxation time parameters comprising a range and a number of predefined NMR relaxation times; and calculating the inversion kernel matrix K according to the echo signal parameters and the NMR relaxation time parameters.

3. The NMR relaxation time inversion method based on the unsupervised neural network according to claim 1, wherein the simulating the continuous NMR relaxation time spectrum F comprises: simulating the continuous NMR relaxation time spectrum F by randomly generating a plurality of Gaussian functions on a logarithmic scale with full width half maxima of random peaks, random positions and random relative amplitudes, full width half maxima of spectral peaks being between 0.1 and 1, and positions of the spectral peaks varying from a maximum value to a minimum value of each of predefined NMR relaxation times.

4. The NMR relaxation time inversion method based on the unsupervised neural network according to claim 1, wherein the unsupervised neural network model comprises a first sub-network comprising one input layer, four hidden layers and one output layer; and a second sub-network comprising one input layer, two hidden layers and one output layer; the first sub-network and the second sub-network sharing the same input layer.

5. The NMR relaxation time inversion method based on the unsupervised neural network according to claim 4, wherein an activation function of the one output layer of the first sub-network is a softmax function; and an activation function of the one output layer of the second sub-network is a softplus function.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 is a structural diagram of an unsupervised neural network model;

(2) FIG. 2A is a simulated NMR transverse relaxation multi-exponential decay signal with a narrow peak width of NMR transverse relaxation time spectrum;

(3) FIG. 2B is a contrast diagram of the NMR transverse relaxation time spectrum (solid line) predicted by the prediction model and the corresponding simulated continuous NMR transverse relaxation time spectrum (dashed line) by inputting the NMR transverse relaxation multi-exponential decay signal in FIG. 2A to the prediction model;

(4) FIG. 3A is a simulated NMR transverse relaxation multi-exponential decay signal with a wide peak width of NMR transverse relaxation time spectrum; and

(5) FIG. 3B is a contrast diagram of the NMR transverse relaxation time spectrum (solid line) predicted by the prediction model and the corresponding simulated continuous NMR transverse relaxation time spectrum (dashed line) by inputting the NMR transverse relaxation multi-exponential decay signal in FIG. 3A to the prediction model.

DETAILED DESCRIPTION OF THE EMBODIMENTS

(6) In order to facilitate the understanding and practice of the present invention by those of ordinary skill in the art, the present invention is described in further detail below in connection with embodiments, and it should be understood that the examples of implementation described herein are intended to illustrate and explain the invention only and are not intended to limit the present invention.

(7) The NMR relaxation time includes a transverse relaxation time and a longitudinal relaxation time. This embodiment is explained with the transverse relaxation time as an example, and the difference between the longitudinal relaxation time and the transverse relaxation time is only in the formula of the relaxation signal. The transverse relaxation signal is a decay signal (decreasing with time) and the longitudinal relaxation signal is a recovery signal (increasing with time). Inversion algorithms of longitudinal relaxation time T.sub.1 spectrum and transverse relaxation time T.sub.2 spectrum are consistent in mathematical principle, so T.sub.2 is often taken as an example in discussing and studying multi-exponential inversion algorithms. Therefore, this embodiment is illustrated by the inversion of NMR transverse relaxation time T.sub.2.

(8) The simulated NMR relaxation signal is used as a sample, which in this embodiment is an NMR transverse relaxation multi-exponential decay signal. In this embodiment, the mathematical model of the NMR relaxation signal is expressed in Formula (1):

(9) M ( τ ) = f ( T 2 ) exp ( - τ T 2 ) dT 2 + ε , f ( T 2 ) 0 Formula ( 1 )

(10) Where τ denotes an echo sampling time, T.sub.2 denotes the NMR relaxation time, the NMR relaxation time in this embodiment is the NMR transverse relaxation time, M(τ) denotes the amplitude of the NMR relaxation signal, the amplitude of the NMR relaxation signal in this embodiment is an amplitude of the NMR transverse relaxation multi-exponential decay signal, f(T.sub.2) denotes a distribution of the NMR relaxation time (T.sub.2), i.e., corresponding to an NMR relaxation time spectrum F, and the NMR relaxation time spectrum F in this embodiment is the NMR transverse relaxation time spectrum, ε denotes noise.

(11) NMR relaxation time inversion refers to presetting a series of values of τ, measuring a set of NMR relaxation signal intensities M(τ), and calculating a distribution f(T.sub.2) of the NMR relaxation time spectrum.

(12) To solve the above problems, firstly, the formula (1) is discretized:
custom character=KF+ε  Formula (2)

(13) where

(14) = { M ( τ i ) , i = 1 , .Math. , n } , F = { f ( T 2 _ j ) , j = 1 , .Math. , m } , K = { K ij = exp ( - τ i T 2 _ j ) , i = 1 , .Math. , n ; j = 1 , .Math. , m }

(15) K denotes an inversion kernel matrix, custom character denotes an NMR relaxation signal, F denotes a continuous NMR relaxation time spectrum, m denotes the number of predefined NMR relaxation times (T.sub.2), j denotes the number of predefined NMR relaxation times (T.sub.2), T.sub.2_j denotes the j-th predefined NMR relaxation times (T.sub.2), n denotes the number of echo signals, n denotes the number of the echo signals, f(T.sub.2_j) denotes the amplitude corresponding to the j-th predefined NMR relaxation times T.sub.2_j, and τ.sub..Math. denotes the sampling time of the i-th echo. M(τ.sub..Math.) denotes the amplitude of the i-th echo signal, which is the superposition of multiple single exponential echo signal amplitudes. In this embodiment, the amplitude of the single exponential echo signal is a amplitude of a single exponential decay echo signal.

(16) Then, a mapping relationship H between custom character and F is calculated, as shown in Formula 3.
H:custom character.fwdarw.F  Formula (3)

(17) The inversion method provided by the present invention is implemented by an unsupervised depth neural network, and an unsupervised neural network model can be expressed as the following formula:
F=H(custom character,Θ)  Formula (4)

(18) The NMR relaxation signal custom character is an input of the unsupervised neural network model; the NMR relaxation time spectrum F is an output of the unsupervised neural network model; Θ is a weight of the unsupervised neural network model; and H is the mapping relationship between NMR relaxation signal and the NMR relaxation time spectrum.

(19) An NMR relaxation time inversion method based on an unsupervised neural network, which includes:

(20) Step 1. preparation of a training sample set and a test sample set

(21) The simulated NMR relaxation signal is used as a sample, which in this embodiment is an NMR transverse relaxation multi-exponential decay signal, the samples are generated as follows:

(22) 1) simulating inversion kernel matrix K:

(23) predefining echo signal parameters, in particular: the number n of predefined echo signals is 2048, TE is 0.2 ms, that is, the number of sampling time points of the echo signals is 2048, and an interval between sampling time points of adjacent two echo signals is 0.2 ms;

(24) Predefining NMR relaxation time (T.sub.2) parameters, the NMR relaxation time in this embodiment is the NMR transverse relaxation time, in particular: predefining the number m of the NMR relaxation time (T.sub.2) to be 128, that is, 128 predefined NMR relaxation times T.sub.2 are logarithmically distributed within an NMR relaxation time range of 0.1 ms to 1000 ms; and

(25) calculating the inversion kernel matrix K according to the set echo signal parameters and the NMR relaxation time parameters.

(26) 2) Simulating continuous NMR relaxation time spectrum F, where the NMR relaxation time spectrum F is the NMR transverse relaxation time spectrum: simulating the continuous NMR relaxation time spectrum F by randomly generating four Gaussian functions on a logarithmic scale with the full width half maxima of random peaks, random positions and random relative amplitudes. The full width half maxima of spectral peaks are between 0.1 and 1, and the positions of the spectral peaks vary from the maximum value to the minimum value of the 128 predefined NMR relaxation times T.sub.2; and the amplitudes of the spectral peaks are normalized.

(27) 3) Simulating noise ε (signal-to-noise ratio is randomly generated between 10 and 80), and the noise e is Rayleigh noise. According to custom character=KF+ε, the NMR relaxation signal custom character containing noise can be calculated as a sample, and various sample constitutes a sample set, which is divided into a training sample set and a test sample set.

(28) In this embodiment, the total number of samples in the training sample set is 50,000.

(29) Step 2. establishment of an unsupervised depth neural network model

(30) The unsupervised neural network model established in this embodiment consists of two sub-networks, namely, a first sub-network and a second sub-network. As shown in FIG. 1, the first sub-network includes one input layer, four hidden layers and one output layer; and the second sub-network includes one input layer, two hidden layers and one output layer. The first sub-network and the second sub-network share the same input layer, and the number of neurons in the input layer is 2,048. In the first sub-network, there are 2,048 neurons in each hidden layer and 128 neurons in the output layer. In the second sub-network, there are 2,048 neurons in each hidden layer and 2 neurons in the output layer. An activation function of the hidden layer of the first sub-network and the second sub-network is a Rectified Linear Unit (ReLU). The activation function of the output layer in the first sub-network is a softmax function; and the activation function of the output layer in the second sub-network is a softplus function.

(31) The training process of the unsupervised neural network is the process of determining the weight Θ of neural network model by minimizing the predefined loss function.

(32) The predefined loss function of the unsupervised neural network model established in this embodiment is:

(33) 1 N B .Math. i = 1 N B ( .Math. i - KH ( i , Θ ) .Math. 2 2 α i 1 2 + W ( i ) α i 2 2 + 2 log α i 1 α i 2 )

(34) where N.sub.B is the number of NMR relaxation signals, custom character.sub..Math. is the i-th NMR relaxation signal, K is an inversion kernel matrix, H(custom character.sub..Math.,Θ) is a mapping relationship between the .Math.-th NMR relaxation signal custom character.sub..Math. and the corresponding .Math.-th NMR relaxation time spectrum F.sub..Math., Θ is a weight of the neural network model, W(custom character.sub..Math.)=δ.sub..Math.∥H(custom character.sub..Math.,Θ)∥.sub.1+(1−δ.sub..Math.)∥H(custom character.sub..Math.,Θ)∥.sub.2.sup.2, δ.sub..Math. is a standard deviation of the .Math.-th NMR relaxation signal custom character.sub..Math. in a range of (0, 1). α.sub.l1 and α.sub.l2 are regularization parameters, output results of the second network: ∥ ∥.sub.1 is 1-norm; and ∥×∥.sub.2.sup.2 is a square of 2-norm.

(35) The first term in the loss function:

(36) .Math. i - KH ( i , Θ ) .Math. 2 2 α i 1 2 ,
is the fidelity loss term of the NMR relaxation signal. Fidelity loss is defined according to the forward physical model and data noise characteristics. Fidelity term is used to restrict the consistency between network output and measurement data.

(37) The second term in the loss function:

(38) W ( i ) α i 2 2 ,
is a continuity constraint term of the NMR relaxation time spectrum of the network output.

(39) The third term in the loss function: 2 log α.sub.l1 α.sub.l2, is a regularization parameter term, which is a balance term between the first term and the second term of the loss function.

(40) Step 3, training of the unsupervised neural network model

(41) The input of the unsupervised neural network model is the samples in the training sample set. The unsupervised neural network model established in the step 2 is trained to self-learn the optimal regular parameters α.sub.l1 and α.sub.l2, and self-learn the optimal mapping relationship between the NMR relaxation signal and the NMR relaxation time spectrum. For all the samples in the training sample set, the loss function is minimized, that is, the optimal mapping relationship is obtained. The trained unsupervised neural network model is called predictive model T2Inversion-UTD.

(42) In this embodiment, before training the unsupervised neural network model, the hyper parameters of the unsupervised neural network model are set as follows: a batch size of learning is 2; initial bias vectors of the input layer, each hidden layer and the last output layer are all zero, and an iteration epoch is 2,000. The iterative algorithm adopts adaptive moment estimation algorithm (Adam) with a learning rate of 1e-5.

(43) Step 4, inversion

(44) The samples in the test sample set are input into the prediction model T2Inversion-UTD learned in step 3 for prediction, and the corresponding calculated NMR relaxation time spectrum is output.

(45) FIG. 2A is a simulated NMR transverse relaxation multi-exponential decay signal with a narrow peak width of NMR transverse relaxation time spectrum;

(46) FIG. 3A is a simulated NMR transverse relaxation multi-exponential decay signal with a wide peak width of NMR transverse relaxation time spectrum; and

(47) FIG. 2B is a contrast diagram of the NMR transverse relaxation time spectrum (solid line) predicted by the prediction model and the corresponding simulated continuous NMR transverse relaxation time spectrum (dashed line) by inputting the NMR transverse relaxation multi-exponential decay signal in FIG. 2A to the prediction model;

(48) FIG. 3B is a contrast diagram of the NMR transverse relaxation time spectrum (solid line) predicted by the prediction model and the corresponding simulated continuous NMR transverse relaxation time spectrum (dashed line) by inputting the NMR transverse relaxation multi-exponential decay signal in FIG. 3A to the prediction model. The simulated NMR transverse relaxation decay signal in FIG. 2A is a signal with a narrow peak width of the NMR transverse relaxation time spectrum, and the simulated NMR transverse relaxation decay signal in FIG. 3A is a signal with a wide peak width of the NMR transverse relaxation time spectrum.

(49) It can be seen from the experimental results that the method of the present invention can better determine the width and position of the NMR transverse relaxation time spectrum peak under a certain signal-to-noise ratio condition.

(50) On the computer equipped with GTX1080Ti, the total prediction time for the 629 samples in the test sample set was 1.03125s, and the prediction time for one sample was 1.6395 ms.

(51) The specific embodiments described herein are merely illustrative of the spirit of the present invention. Those skilled in the art to which the present invention pertains may make various modifications or additions to or similarly replace the detailed embodiments described without departing from the spirit of the present invention or exceeding the scope defined by the appended claims.