Full text
Computers in Biology and Medicine 158 (2023) 106837 Available online 5 April 2023 0010-4825/© 2023 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). Physics-informed deep learning approach to quantification of human brain metabolites from magnetic resonance spectroscopy data Amirmohammad Shamaei a , b , * , Jana Starcukova a , Zenon Starcuk Jr. a a Institute of Scientific Instruments of the Czech Academy of Sciences, Brno, Czech Republic b Department of Biomedical Engineering, Brno University of Technology, Czech Republic ARTICLE INFO Keywords: MR spectroscopy Inverse problem Deep learning Machine learning Convolutional neural network Metabolite quantification ABSTRACT Purpose: While the recommended analysis method for magnetic resonance spectroscopy data is linear combination model (LCM) fitting, the supervised deep learning (DL) approach for quantification of MR spectroscopy (MRS) and MR spectroscopic imaging (MRSI) data recently showed encouraging results; however, supervised learning requires ground truth fitted spectra, which is not practical. Moreover, this work investigates the feasibility and efficiency of the LCM-based self-supervised DL method for the analysis of MRS data. Method: We present a novel DL-based method for the quantification of relative metabolite concentrations, using quantum-mechanics simulated metabolite responses and neural networks. We trained, validated, and evaluated the proposed networks with simulated and publicly accessible in-vivo human brain MRS data and compared the performance with traditional methods. A novel adaptive macromolecule fitting algorithm is included. We investigated the performance of the proposed methods in a Monte Carlo (MC) study. Result: The validation using low-SNR simulated data demonstrated that the proposed methods could perform quantification comparably to other methods. The applicability of the proposed method for the quantification of in-vivo MRS data was demonstrated. Our proposed networks have the potential to reduce computation time significantly. Conclusion: The proposed model-constrained deep neural networks trained in a self-supervised manner can offer fast and efficient quantification of MRS and MRSI data. Our proposed method has the potential to facilitate clinical practice by enabling faster processing of large datasets such as high-resolution MRSI datasets, which may have thousands of spectra. 1. Introduction Accurate spectral analysis of in vivo magnetic resonance spectroscopy (MRS) data is complicated by overlapping of resonance lines from different metabolites, which precludes or inhibits accurate identification of low-concentration metabolites, and also by the presence of a broad background of rapidly decaying macromolecule (MM) and lipid signals [1,2]. Linear combination model (LCM) fitting, peak fitting, and peak integration are the three most often used methods for spectral analysis of an MRS signal [3]. In LCM fitting, each metabolite in the spectrum is represented by a "basis spectrum," which is a description of the spectral shape of an individual metabolite [2–5]. Contrary to LCM fitting, peak fitting uses a simple lineshape model function to fit isolated peaks within a spectrum. Peak fitting is highly dependent on the prior knowledge of the parameters of peaks, and imposing a large amount of prior knowledge may be burdensome in crowded spectra like 1 H-MRS of the brain due to the excessive number of metabolites and peaks per metabolite [2–5]. LCM fitting is the expert-recommended approach [6] owing to its shown efficacy, adaptability, and relative simplicity of usage. The choice of basis spectra over individual peak components (peak fitting method) reduces the number of model functions necessary to adequately describe the spectrum, which leads to fewer fitting parameters. Basis spectra are realistic since they are derived directly from phantom experiments or numerical simulations [2–5,7,8]. A long-standing interest in LCM fitting has resulted in the development of a variety of fitting techniques, including time-domain and * Corresponding author. Magnetic Resonance Group, Institute of Scientific Instruments of the Czech Academy of Sciences, Kralovopolska 147, CZ 61264, Brno, Czech Republic. E-mail address: [email protected] (A. Shamaei). Contents lists available at ScienceDirect Computers in Biology and Medicine journal homepage: www.elsevier.com/locate/compbiomed https://doi.org/10.1016/j.compbiomed.2023.106837 Received 28 October 2022; Received in revised form 6 March 2023; Accepted 26 March 2023
Computers in Biology and Medicine 158 (2023) 106837 2 frequency-domain algorithms [4,9–15]. The recent success of deep learning (DL), one of the latest machine learning approaches, in a variety of tasks, including applications with a low signal-to-noise ratio (SNR) [16,17], suggests that it might also handle the spectral analysis of an MRS signal. Moreover, supervised DL-based approaches have been used for ghosting artifacts detection and removal [18], spectral reconstruction [19], automatic peak picking [20], magnetic resonance spectroscopic imaging (MRSI) spatial resolution enhancement [21], localized correlated spectroscopy acceleration [22], frequency and phase correction of MRS signals [23,24], and poor-quality spectra identification [25]. These studies showed results competitive with traditional methods using supervised learning, in which the input and the output were simulated spectra and known values, respectively. The true output values are unknown in in-vivo MRS data. Moreover, a network trained in a supervised manner using simulated data might be prone to overfit training data [26]; thus, any discrepancy between the in-vivo and the simulated training spectra, such as the presence of nuisance peaks, frequency, and phase shifts, and line-broadening, may result in errors in metabolite quantification. Self-supervised learning may eliminate the drawbacks of supervised learning. A deep autoencoder (DAE) is typically designed to encode the input into a low-dimensional embedding space and then reconstruct the input from the encoding in a self-supervised manner [16]. A DAE has also been successfully used for metabolite and MM separation in MRS signals, as well as for quantification and noise removal of MRSI signals [27,28]. A common belief among traditional statisticians and DL practitioners is that "more data is always better" [29]. The effects of model complexity, dataset size, and data augmentation were empirically investigated in computer vision and natural language processing [29,30]; however, these effects have not been investigated in MRS data quantification using DL. 2. Authors’ contributions In this paper, we present a novel DL-based LCM algorithm for MRS data quantification, which uses the advantages of LCM and the capabilities of DAE in self-supervised learning. We designed a DAE network that can learn in a self-supervised manner to fit a linear combination of quantum-mechanically simulated basis spectra to the acquired MR spectrum. We utilize the LCM fitting and integrate it into a DAE to estimate relative concentrations of metabolites. We trained, validated, and evaluated our proposed network using simulated MRS data, and in-vivo MRS data obtained from the publicly accessible Big GABA repository [31,32]. We compared the performance of our proposed model with other LCM packages, namely, QUEST [13] and FiTAID [9], in terms of accuracy and time efficiency. In addition, we designed an experiment to evaluate the effect of the dataset size and neural network architecture in our proposed model. 3. Related work Hiltunen et al. [33] have demonstrated the feasibility of constructing a quantifying analyzer for long echo time (TE) in vivo proton magnetic resonance spectroscopy (1H NMR) spectra using artificial neural networks with magnitude spectra. Bhat et al. [34] investigated the application of a radial basis function neural network (RBFNN) for the automatic quantification of short echo time, multi-voxel, and phased spectral data. Hatami et al. [35] and Lee et al. [36] applied supervised DL approaches to metabolite quantification and presented results comparable to conventional LCM approaches. Chandler et al. [37] also applied a supervised DL approach to study metabolite quantification in edited human brain MRS spectra. Gurbani et al. [38] presented a self-supervised DL architecture that integrates a convolutional neural network (CNN) with peak fitting. In their approach, a DAE, introduced by Hinton et al. [39] as a specific type of neural network, is used as a framework for unsupervised learning. Shamaei et al. [40] extracted characteristics from the MRS data using a wavelet scattering transform and predicted metabolite concentrations using a shallow neural network implementation. Rizzo et al. [41] explored the effect of DL architectures, spectroscopic input types, and learning designs on the quantification of simulated MR spectroscopy. A list of related work is provided in Table 1. 4. Material and methods 4.1. Data sets 4.1.1. The simulated dataset One significant challenge in metabolite quantification is that the ground truth values are unknown; thus, it is hard to compare the results of different quantification methods. This problem can be addressed by creating a dataset with known ground truth values using prior physical knowledge and basis spectra. The MRS signal can be described as a linear combination of amplitude-scaled metabolite signals, the baseline, and noise. The simplified model describing a time-domain MRS signal S(t)as a combination of several metabolite profiles is: S(t)=(∑ M m=1 AmXm(t)+AbB(t))e(Δ α +2i π Δf)teiΔθ+ξ(t),[1] where i= −1 √and Am and Xm(t)are the scaling factor (amplitude) and the model (basis) function (signal) for the m-th metabolite, respectively. Δ α , Δf,and Δθ are the global damping factor, the global frequency shift, and the global phase shift, respectively. M is the number of metabolites. Ab and B(t)is the scaling factor and the signal for MMs, and ξ(t)is noise. Our simulated dataset, containing 96000 signals, was generated using Eq. (1) and the publicly available metabolite basis set from the ISMRM MRS study group’s fitting challenge [43] (19 metabolites signals (see Table 2) and one MM signal, 3T, PRESS, TE =30 ms, spectral width =4000 Hz, 2048 points). The range of parameters (Am,Δ α , Δf,and Δθ) were determined according to the literature [2,44] (listed in Table 2). The parameters were chosen randomly from the defined ranges with a uniform distribution. The mean SNR of the dataset (largest metabolite peak height in the magnitude spectrum to standard deviation of noise in the frequency domain) was set to 67 ±15 by introducing random complex Gaussian white noise (ξ). Signals in the simulated dataset were shuffled randomly, and 90% of each dataset was allocated to the training subset, 9% to the validation subset, and the rest 1% to the test subset. 4.1.2. The in vivo dataset Data from the public repository Big GABA [31,32] were used to demonstrate the applicability of the proposed model for the quantification of in-vivo signals. We selected 48 single-voxel short-TE PRESS brain datasets (subjects) from 48 healthy volunteers acquired on Siemens scanners from 4 different sites (S1, S5, S6, and S8, 3 T field strength, spectral width = 4000 Hz, 4096 points, TE =35 ms, TR =2000 ms; 64 transients; 30 × 30 ×30 mm 3 ; medial parietal lobe voxel). Water reference scans without water suppression were obtained with similar parameters, except for 8–16 averages. It is well recognized that the sufficient size and diversity of data are crucial for the success of the majority of DL models [16]. However, rich and adequate datasets are uncommon [27] in the field of MRS and MRSI. Data augmentation is a possible technique for simulating realistic data by making slight modifications to a small existing dataset. A two-step data augmentation was applied. In the first step, 16 transients of 64 transients of each subject dataset were randomly selected. Then, the transients were frequency- and phase-aligned using A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 3 the spectral registration method [45,46] and were processed into an averaged signal. Eddy-current effects in the averaged signal were corrected using the corresponding water reference signal. Then, the residual water components were removed from the averaged signal with the Hankel Lanczos singular value decomposition (HLSVD) method [47]. The first step was repeated 64 times, producing 64 signals for each subject and thus producing a new extended subject dataset [47]. Totally, 3072 (48 ×64) signals, each representing a corrected 16- transient average, were generated and stacked together to create a new in vivo dataset from all subjects. In the second step of augmentation, first, each complex signal S(t) from the new in vivo dataset generated in step 1 was rescaled as S(t)normalized =S(t) max τ (|S( τ )|).[2] Then five extended subject datasets (320 (5 ×64) signals) were included in a test dataset and excluded from the in vivo dataset. Signals with substantial lipid contamination were removed from the in vivo dataset in the following way: Time-domain signals were Fouriertransformed, then the mean of the magnitude of each signal between 0 and 1.85 ppm was calculated. Finally, based on prior testing on the dataset, signals with a mean value above six were labeled as strongly contaminated signals and discarded from the dataset. Further, we denote this dataset as the filtered dataset (2624 signals). In the following, ten signals were generated from each signal of the filtered dataset, such that signals were apodized by dampings corresponding to Lorentzian linewidths drawn from a uniform distribution over [0 Hz, 2 Hz]. Then artificial frequency and phase offsets were drawn from a uniform distribution in the ranges of −3 to 3 Hz and −9◦–9◦, respectively, and added to apodized signals (ranges were extracted from in vivo brain spectra subjected to spectral fitting). The final training dataset consisted of 28864 (10 ×2624 +2624) signals. The mean SNR of the training dataset was set to 256 ±72 by introducing random complex Gaussian noise with a uniform spectral power. Finally, all signals were dedicated to the training set. To decrease the complexity of the network (number of weights) and the contribution of noise, which typically predominates in the later part of time domain signals (FIDs), the FIDs were shortened to maintain the first 1024 points. Example spectra from the simulated dataset and the in-vivo dataset are provided in Fig. 1. 4.2. The deep model 4.2.1. The proposed DAE DAE is a sort of deep artificial neural network designed to learn an efficient data coding in a self-supervised way [16,39]. The basic idea behind DAEs is to utilize the input data as the target that should be reconstructed in the output layer [16]. A DAE is typically composed of two parts: an encoder and a decoder. The encoder function h=f(x) maps the n-dimensional input vector (x∈Rn) to the n′-dimensional latent vector (h∈Rn′), while the decoder function x=g(h)aims to reconstruct the n-dimensional output vector (x∈Rn) from the latent space representation. Typically, the latent space representation has significantly lower dimension than the input (n′≪n). Interestingly, the LCM approach toward the quantification of MRS signal can be seen as a DAE, where the few parameters of a model are the interpretable latent space parameters, and the metabolites basis set and Table 1 A summary of related work. Model architectures Input types Learning process Data type (training) Prior metabolite resonances model Hiltunen et al. [33] Shallow Neural Networks Magnitude spectra (1D) Supervised Simulated _ Bhat et al. [34] Radial basis function neural network Real components of spectra (1D) Selfsupervised In-vivo Lorentzian-Gaussian lineshape Hatami et al. [35] Convolutional neural network Complex spectra (1D) Supervised Simulated – Lee et al. [36] Convolutional neural network Complex spectra (1D) Supervised Simulated – Chandler et al. [37] Convolutional neural network Real, imaginary, and magnitude components of spectra (2D) Supervised Simulated – Gurbani et al. [38] Convolutional neural network Real components of spectra (1D) Selfsupervised In-vivo Lorentzian-Gaussian lineshape Shamaei et al. [42] Convolutional neural network Time-frequency domain scalogram (wavelet coefficients) (2D) Supervised Simulated – Shamaei et al. [40] Wavelet scattering network Complex time-domain signal (FID) (1D) Supervised Simulated – Rizzo et al. [41] Convolutional neural network Real and imaginary components of spectra, timefrequency domain spectrograms (2D) Supervised Simulated – Our work Physics-informed convolutional neural network Complex time-domain signal (FID) (1D) Selfsupervised Simulated and in-vivo Quantum-mechanics simulated metabolite responses Table 2 Parameters used in the simulated dataset. A(.), Δ α , Δf,and Δθ are the metabolite amplitudes, the global damping factor, the global frequency shift, and the global phase shift, respectively. Parameter Min Max A(Ala)0.1 1.8 A(Asc)0.2 1.8 A(Asp)1 2 A(Cr)4.5 10.5 A(GABA)1 2 A(Glc)1 2 A(Gln)3 6 A(Glu)6 12.5 A(GPC)0.5 1.8 A(GSH)1.5 3 A(Gly)0.2 1 A(Ins)4 9 A(Lac)0.2 1 A(NAA)7.5 17 A(NAAG)0.5 2.5 A(PCho)0.2 1 A(PCr)3 5.5 A(PE)1 2 A(sIns)0.2 0.5 A(Tau)3 6 Ab 14 17 Δ α (s ¡1 ) 0 15 Δf (Hz) −3 3 Δθ (◦) - π /10 + π /10 A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 4 prior knowledge are the decoders. For the DAE to be useable for quantifying MRS signals, its latent-space representation must be interpretable as metabolite concentrations. Therefore, it is natural to desire that it includes parameters such as all individual relative metabolite concentrations (amplitudes), damping factors, frequencies, and phases. However, a DAE with the typical architecture [39] is not useful for quantifying MRS signals. To this end, a convolutional encoder–model decoder [38] was employed, incorporating a parametric analysis into a DL model. Our proposed DAE consisted of a conventional encoder and a model decoder. The encoder was composed of sequential layers of convolutional layers [48,49], Gaussian error linear units (GELU) [50], and a fully connected (FC) layer [16,49]. Furthermore, a Softplus function [16] was applied to estimated amplitudes to ensure that the relative metabolite concentrations (amplitudes) were non-negative. The model decoder was composed of a model function (Eq. (1)) that reconstructs the representation of the input signal using the assigned latent space parameters and basis spectra. The proposed DAE architecture is depicted in Fig. 2a. The encoder computes four types of parameters: amplitude, frequency, phase, and damping. The input and output of the proposed DAE were complex signals in the time domain. Training our proposed network is a self-supervised learning task that does not require ground truth values. It minimized the differences between the original input and the consequent reconstruction. In each iteration step of training, the parameters of the encoders were adjusted according to the gradient of the loss function with respect to the given parameters of the model (Am,Ab,Δ α , Δf, and Δθ). The mathematical representation of training can be written as follows: w=argmin wL(x,x(w)),[3] ∂ L(x,x) ∂ wi=∑ ρ ∈P ∂ L(x,x) ∂ x• ∂ x ∂ρ • ∂ρ ∂ wi ,[4] where x and x are the n-dimensional input vector (x∈Cn) and the n-dimensional output vector (x∈Cn), respectively. Eq. (3) is the objective function of training, L is the loss function, wi is an element of the parameters set (weights and biases) of the encoder, and P= {A1,A2, ..., AM,Ab,Δ α ,Δf,Δθ}. Gradients were computed with the help of Pytorch using its automatic gradient computation [51], which is a reverse automatic differentiation system. 4.2.2. Modeling of macromolecules Short-TE MRS signals contain a contribution of MMs that overlap with metabolites [52]. Thus, MM modeling or MM removal from the signal should be included in the spectra analysis. The presence of MMs may be accounted for in a variety of ways [6]. MMs can be included as a numerical pattern (found, for instance, from metabolite-nulling inversion recovery measurements) [53]. Another approach is to include a set of parametric patterns in the spectral fitting algorithm [2,3]. We implemented both approaches to MM handling in the proposed DAE, which resulted in two models. The first model (referred to as deep learning-based quantification using a numeric MM pattern [DQ-nMM]) includes a MM signal as a numerical pattern [53] in Eq. (1). The second model (referred to as deep learning-based quantification using parametric MM components [DQ-pMM]) includes a MM signal as a combination of parametric MM components in Eq. (1) (the detailed model is provided in Supporting Information Text S1). However, the increased number of fitted parameters without constraints increases the risk of over-parametrization [42] in the DQ-pMM model. Another approach to handling MM is to remove the initial part of the FID [4], which eliminates MM signals thanks to their decay being faster than that of metabolites. Nevertheless, the disadvantages of this approach are neglecting important information in the early part of the time domain signal and difficulty in determining the number of removed initial points [4]. To overcome these disadvantages and handle the overparametrization problem in the DQ-pMM model, we proposed a novel approach for MM modeling, which resulted in the third model (referred to as deep learning-based quantification using parametric MM components and a regularization term [DQ-rpMM]). DQ-rpMM includes a combination of parametric MM components in Eq. (1) and adds a regularization term (Eq. (5)) to the loss function. (xinput(t)− xmetabolites(t))(1+sgn(t−tr) 2) 2 2+λ‖tr‖1,[5] where sgn is a sign function, its shift tr is a parameter determined by the network, xinput and xmetabolites are the input signal and the reconstructed signal from the metabolite components, respectively. Parameter λ tunes the significance of the regularization term. Brackets ‖.‖2 2 and ‖.‖1 represent squared L2-norm and L1-norm, respectively. The first term promotes consistency between xmetabolites and xinput. Intuitively, the cutoff time tr should increase to a point where the contribution of MM is low, and the contribution of metabolites is reasonably high. Excessive cutoff of useful signal (that would lead to fitting the non-informative end tail of xmetabolites to the noisy part of xinput) Fig. 1. Example spectra from (a) the simulated dataset and (b) the invivo dataset. A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 5 Fig. 2. (a) Illustration of the proposed convolutional encoder–model decoder network. The input of the network is a complex signal (x)in the time domain, which is fed to the encoder. The encoder consisted of eight convolutional blocks and an FC layer (see details in Supporting Information Table S2). A convolutional block is composed of a 1D convolution (Conv1d) layer followed by a GELU layer. The model decoder reconstructs the output signal (x) using Eq. (1), basis set, and MM prior knowledge. The DAE was trained to encode the input vector x in the time domain into parameters (the amplitudes, damping factor, resonance frequency, and zeroorder phase of the basis spectra) that can be used to reconstruct the output vector x in the time domain. The proposed network is trained by minimizing the mean square error (MSE) between x and x. (b) Illustration of three proposed models (DQ-nMM, DQ-pMM, and DQ-rpMM). (c) Illustration of three variants of the DQ-rpMM model with different encoder architectures (ConvNext, MLP-Mixer, and our proposed network with FC layers). CNN, Convolutional Neural Network; Conv1d, (in channels » out channels, kernel size, stride); FC, Fully Connected; GELU, Gaussian Error Linear Unit; MM PK, Macromolecule prior knowledge; DQ-nMM, deep learning-based quantification using a numeric MM; DQ-pMM, deep learning-based quantification using parametric MM; DQ-rpMM, deep quantification using parametric MM and a regularization term. A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 6 should be prevented by the contradictory force of the second term. The architectures of the proposed models are depicted in Fig. 2b. 4.3. Implementation details and training All steps were run on a computer with a dual EPYC 7742 (2 ×64 cores) processor and one graphics processing unit (NVIDIA A100 40 GB). The DAE was implemented in Python programming language [51] with the help of the Pytorch lightning interface [54]. The initial architecture of the network and the training parameters were optimized using the Bayesian Optimization HyperBand algorithm [55] with the help of the Tune framework [56]. The optimization details are given in Supporting Information Text S2. All training was performed using the mean-squared error loss (MSE) and the Adam optimizer [57] with a batch size of 128, a learning rate of 0.001, and 200 epochs. An early-stopping strategy [51] was performed by monitoring the MSE of the validation subset at the end of every epoch and stopping the training when no improvement was observed in 50 epochs. As reported [58], reducing the learning rate is beneficial when learning becomes stagnant. The learning was reduced twice by a factor of 10 during training. Our source codes and data (in NIfTI-MRS format [59]) are available at https ://github.com/isi-nmr/Deep-MRS-Quantification. All proposed models (DQ-nMM, DQ-pMM, and DQ-rpMM) were tested on the simulated dataset. Moreover, The DQ-rpMM model was tested on the in vivo dataset to show the applicability of our method to in-vivo data in which a numeric pattern of MMs is not available. For the simulated dataset, the basis set and the numeric pattern of MMs from the ISMRM MRS study group’s fitting challenge [43] were utilized in the model decoder. The provided numeric pattern of MMs was parametrized using AMARES [60] algorithm and utilized in the models with parametrized MMs, i.e., DQ-pMM and DQ-rpMM (the details of the parametrization are provided in Supporting Information Table S1). For the in vivo dataset (Big GABA), the publicly available metabolite basis set [61] consisted of 19 metabolites was used in the model decoder: alanine (Ala), aspartate (Asp), creatine (Cr), negative creatine methylene (-CrCH2), γ-aminobutyric acid (GABA), glycerophosphocholine (GPC), glutathione (GSH), glutamine (Gln), glutamate (Glu), water (H2O), myo-inositol (mI), lactate(Lac), NAA, N-acetylaspartylglutamate (NAAG), phosphocholine (PCho), PCr, phosphoethanolamine, scyllo-inositol, and taurine. MM components (13 gaussian lineshapes, previously reported in Ref. [62]) were used to generate the lipid and MM basis signals. 4.4. Accuracy analysis (for the simulated data set) For the simulated data set, in which the true amplitudes were known, we compared the results, i.e., the estimated amplitudes, obtained with our approach with those obtained by traditional LCM methods using mean absolute percentage error (MAPE) and the coefficient of determination (R 2 ) metrics. It has been reported that R 2 is more informative than MAPE [63]. In fact, MAPE does not reveal much information about the effectiveness of regression with regard to the distribution of the ground truth values. 4.5. Monte Carlo analysis Monte Carlo (MC) studies were carried out to investigate the bias and the standard deviation of the proposed DQ-nMM estimates. A signal without noise was generated using Eq. (1) with known global frequency (2 Hz), phase (45◦), damping (5 Hz), and known amplitudes of metabolites and MMs. Second, 256 realizations of a normally distributed random complex noise were added to the signal such that SNR was in the range of ~50. Finally, the amplitudes of metabolite components were estimated for the 256 signals using the network trained with the simulated dataset, and the estimation errors (MAPE) were measured. 4.6. Data size effects In this experiment, five variants of the simulated dataset with different sizes (1000, 12000, 24000, 96000, and 384000 signals) were generated using the same procedure mentioned for generating the simulated dataset. 90% of each dataset was allocated to the training subset and 10% to the validation subset. Then, the first proposed model (DQ-nMM) was trained using each training dataset. The performance of each dataset in terms of R 2 of each metabolite and the reconstruction loss (MSE) was monitored using its validation subset during training. 4.7. The regularization term effects The significance of the regularization term (i.e., λ) in Eq. (5) determines from which time point, xmetabolites and xinput must be consistent. An experiment was designed to address the effect of λ on the performance of the proposed model. DQ-rpMM methods were trained seven times with varying λ ({0,1,2,3,4,6,8}). All runs used the simulated dataset with a size of 24000 (90% of each dataset was allocated to the training subset and 10% to the validation subset) and were trained for 65000 iterations. All other training parameters were identical to those indicated in the Implementation Details section. 4.8. The architecture effects To test the applicability of successful machine-vision architectures, we used two cutting-edge architectures, ConvNext [64] and MLP-Mixer [65], as the encoder of the DQ-rpMM model, which resulted in two variants of the DQ-rpMM model. To test the effect of convolutional layers on the performance of our proposed models, we substituted FC layers for the convolutional layers in the DQ-rpMM model, which resulted in the third variant of the DQ- rpMM model. We modified ConvNext [64] and MLP-Mixer [65] architectures to process 1D signals. The architectures of the proposed variants are depicted in Fig. 2c. The details of ConvNext, MLP-Mixer, and our proposed network with FClayers architectures are provided in Supporting Information Tables S3, S4, and S5. These three variants of the DQ-rpMM model were trained for 100 epochs using the simulated dataset and the parameters mentioned in section 2.4 for DQ-rpMM, except that the initial learning was decreased to 1 ×10 −4 . Table 3 gives a list of the experiments that were carried out in this study. 5. Results and discussion All proposed models were validated using 128 signals selected randomly from the test signals of the simulated dataset, and the DQ- rpMM model was evaluated using the test subset of the in vivo datasets (320 signals). Based on the results and interpretation of the fitting challenge conducted by the MRS study group of ISMRM [43], in this work, two LCM fitting methods were used, namely, QUEST [13,66] and FiTAID [9], in order to compare the results obtained for the simulated data and Table 3 A list of experiments. Experiment Dataset Models Monte Carlo analysis Simulated DQ-nMM Data size effects Simulated DQ-nMM Regularization term effects Simulated DQ-rpMM Architecture effects Simulated DQ-rpMM(CNN) DQ-rpMM(FC) DQ-rpMM(MLP-Mixer) DQ-rpMM(ConvNext) A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 7 determine whether our proposed models are generally comparable to existing fitting procedures. The purpose of utilizing QUEST was for its optimal performance in the challenge for the artifact-free healthy-brain-like dataset [43]. FiTAID performed close to the top in the challenge [43] and also offers fitting in both time and frequency domains, allowing for a wider comparison. The simulated test signals were processed using the QUEST method (the QUASAR plugin in the jMRUI software package [66]) in two distinct ways. The first procedure (labeled as QUEST) included the numeric MM signal in the basis set. In the second procedure (labeled as QUEST-Subtract), the MM signal was not included in the basis set but estimated with the QUEST subtract technique [13] (the first 100 points were cut off). The simulated test signals were processed using the FiTAID software in the time (labeled as FiTAID [time]) and frequency (labeled as FiTAID [freq.]) domains over specified ranges (TD =[1.1024]) points, FD = [0,5] ppm). Eq. (1) was utilized as a model in the QUEST and the FiTAID software for quantification. Table 4 contains a list of used methods. Table 5 and Fig. 3 illustrate a comparison of our DL-based proposed models and traditional methods using the test signals of the simulated dataset. On average, DQ-nMM produced better performance in terms of R 2 and MAPE than QUEST and FiTAID (time and freq.). QUEST-Subtract showed the worst performance in terms of R 2 and MAPE. DQ-rpMM presented a slightly better performance compared with DQ-pMM in all terms. The DQ-pMM method with parametrized MM showed poor performance. DQ-nMM outperformed other methods in the quantification of most metabolite concentrations. DL-based methods showed an excellent performance in the estimation of Cr concentration. However, DQ-pMM and DQ-rpMM struggled to estimate NAA concentration. In general, all methods reported relatively high MAPEs in the estimation of GPC, PCho, Tau, and NAAG concentrations. All methods showed a poor performance in estimating low-concentration metabolites, for example, Ala, Asp, GABA, Gly, and PE. The effect of damping, frequency, phase, and SNR of spectra on quantification accuracy is provided in Supporting Information Fig. S1. The training time for DQ-nMM, DQ-pMM, and DQ-rpMM were 40.7, 73.9, and 89.6 min, respectively. The processing time per signal for DQ- nMM, DQ-pMM, and DQ-rpMM were 0.031, 0.507, and 0.517 ms, respectively. The processing time per signal for FiTAID (time), FiTAID (freq.), QUEST, and QUEST-Subtract were 2500, 2500, 560, and 1518 ms, respectively. Table 4 A list of all utilized models in this study. Model Dataset MM model Fitting domain simulated in vivo DQ-nMM (ours) a ✓ – Numerical pattern Time DQ-pMM (ours) a ✓ – Parametric MM components Time DQ-rpMM (ours) a ✓ ✓ Parametric MM components and regularization term FiTAID [time] b ✓ – Pumerical pattern Time FiTAID [freq.] b ✓ – Pumerical pattern Frequency QUEST b ✓ – Pumerical pattern Time QUEST- Subtract b ✓ – Subtract technique [13] Time a The source code is available at https://github.com/isi-nmr/Deep -MRS-Quantification. b QUEST and FiTAID software are available in the jMRUI software package (version 7) at http://www.jmrui.eu/. Table 5 Testing results of the simulated dataset using DQ-nMM, DQ-pMM, DQ-rpMM, QUEST, and FiTAID. R 2 and MAPE are calculated between the true and estimated values. All metabolites and seven methods are reported in rows and columns, respectively. MAPE, mean absolute percentage error; R 2 , coefficient of determination; MM, macromolecule; DQ-nMM, deep quantification using numeric MM; DQ-pMM, deep quantification using parametric MM; DQ-rpMM, deep quantification using parametric MM and a regularization term; QUSET (Sub.), Subtract-QUEST; FiTAID (Time), FiTAID with the time-domain fit; FiTAID (freq.), FiTAID with the frequency-domain fit. Ala Asp Cr GABA Glc Gln Glu Gly GPC GSH Ins Lac NAA NAAG PCho PCr PE sIns Tau DQ-nMM R 2 −0.02 −11.80 0.88 −3.89 −4.75 −0.53 0.68 −2.42 0.67 −0.29 0.71 −0.47 0.98 0.46 0.62 0.54 −9.26 −2.37 0.66 MAPE (%) 87.87 47.52 6.02 33.04 32.97 19.11 8.88 41.69 16.27 17.47 8.30 41.37 2.96 19.15 18.22 9.12 51.21 26.94 14.91 DQ-pMM R 2 −2.85 −105.51 0.73 −71.35 −16.15 −2.32 −2.01 −32.73 0.23 −8.49 0.21 −4.94 0.56 −5.31 0.34 −0.70 −40.08 −2.34 −0.23 MAPE (%) 109.19 149.18 9.07 101.61 70.00 31.10 29.88 131.96 24.01 49.55 14.89 70.78 12.17 78.63 25.56 18.07 124.28 27.10 30.51 DQ-rpMM R 2 −1.68 −125.81 0.76 −57.36 −14.55 −3.18 −1.56 −14.91 0.40 −5.96 0.45 −4.34 0.57 −4.00 0.50 −0.39 −35.00 −2.76 0.03 MAPE (%) 98.43 166.13 8.55 101.28 65.50 33.49 27.31 93.06 21.97 43.34 12.06 63.80 11.55 68.75 21.05 16.63 118.87 27.54 26.62 FITAID (Freq.) R 2 −1.69 −24.72 0.80 −26.13 −9.27 −2.02 0.38 −19.87 0.03 −1.08 0.34 −5.53 0.96 0.24 −0.06 0.13 −16.85 −4.08 0.45 MAPE (%) 90.19 80.52 7.85 99.65 51.01 25.95 13.01 94.65 27.32 22.68 12.80 75.75 3.50 25.84 27.02 12.29 78.81 36.48 18.78 FITAID (Time) R 2 −1.37 −24.40 0.69 −26.27 −8.72 −1.94 0.44 −15.06 0.03 −0.92 0.60 −6.09 0.95 0.11 −0.01 −0.47 −13.71 −4.42 0.45 MAPE (%) 84.46 80.83 8.43 100.00 50.07 25.51 12.13 100.00 27.39 21.75 10.57 75.05 3.92 27.52 27.15 13.55 69.89 36.96 18.84 QUEST R 2 −1.54 −22.82 0.83 −10.07 −8.86 −1.84 0.55 −18.97 0.10 −0.88 0.35 −5.97 0.97 0.30 0.10 0.19 −16.18 −4.00 0.42 MAPE (%) 91.07 78.58 7.12 52.73 48.17 24.54 11.05 92.70 26.06 21.48 12.88 78.09 3.36 24.84 25.75 11.79 76.50 35.05 19.21 QUEST (Sub.) R 2 −2.37 −106.81 0.35 −72.01 −22.98 −6.71 −1.27 −48.42 −0.22 −2.93 −0.26 −7.44 0.51 −2.19 −0.30 0.00 −95.47 −8.21 −2.34 MAPE (%) 100.99 149.09 15.45 146.23 78.23 47.05 24.54 138.09 29.80 31.21 17.84 86.95 14.38 56.88 31.95 13.40 157.56 51.00 47.70 A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 8 Fig. 3 illustrates scatterplots between estimated and ground truth values for eight metabolites (Cr, Gln, GPC, Glu, Ins, NAA, NAAG, PCho, PCr, and Tau). The values of R 2 , MSE, and tr during training are reported in Supporting Information Fig. S3. DQ-nMM revealed a very good performance in the estimation of Cr (R 2 =0.88), Glu (R 2 =0.68), GPC (R 2 =0.67), Ins (R 2 =0.71), NAA (R 2 =0.98), PCho (R 2 =0.62), PCr (R 2 =0.54), and Tau (R 2 =0.66) concentration and a good performance in estimation of NAAG (R 2 =0.46). Interestingly, DQ-nMM outperformed QUEST in the estimation of GPC (R 2 =0.10), Ins (R 2 =0.35), PCho (R 2 =0.10), PCr (R 2 =0.19), and Tau (R 2 =0.42). Fig. 4 illustrates example spectra from the test signals of the simulated dataset quantified by DQ-nMM, DQ-pMM, and DQ-rpMM, along with the ground truth spectra. On visual inspection, DQ-pMM and DQ- rpMM showed higher residual compared with DQ-nMM. Fig. 5 shows the results of the MC analysis for the DQ-nMM method. Fig. 5a shows the distribution of estimated concentrations as histogram plots. In most metabolites, the histogram peak is close to the true value, Fig. 3. Testing the results of the simulated dataset. Plots of estimated concentrations against the ground truth concentrations in arbitrary units (a.u.). Algorithms are color-coded. DQ-nMM, deep learning-based quantification using a numeric MM; DQ-pMM, deep learning-based quantification using parametric MM; DQ-rpMM, deep quantification using parametric MM and a regularization term; Quest (Sub.), Subtract-QUEST; FiTAID (freq.), FiTAID with frequency domain fit. A. Shamaei et al.
Computers in Biology and Medicine 158 (2023) 106837 9 except that the concentration of NAAG was slightly underestimated. Fig. 5b shows a scatter visualization of a joint distribution of estimated frequencies and dampings of spectra, illustrating the bias and variance of the DQ-nMM method for individual metabolites in the test subset of MC analysis. Results revealed robust performance in detecting dampings and frequencies of spectra. Fig. 5c shows a heatmap of a correlation matrix representing the correlation between estimated concentrations in the test subset of MC analysis. The heat map highlighted a high correlation between PCr and Cr, and GPC and PCho. Fig. 6a shows the effect of dataset size during the training of the DQ- nMM method using the validation subset. The mean R 2 value is calculated across selected metabolites (Cr, GPC, Ins, NAA, PCho, Tau). Fig. 6b highlights the effect of λ on the performance of the DQ-rpMM method. The mean R 2 value is calculated across the selected metabolites (Cr, GPC, Ins, NAA, PCho, Tau). Moreover, the trend of tr in the DQ-rpMM method with seven different λ during training is shown. The influence of the encoder architecture on the performance of the proposed model (DQ-rpMM) is illustrated in Fig. 7. The performance of the proposed networks with convolutional layers was superior to those with fully connected layers. Fig. 8 illustrates four example spectra from the test subset of the in vivo dataset quantified by DQ-rpMM. The reconstruction capability of our proposed model is clearly shown. The mean, standard deviation (SD), and coefficient of variation (CV) of each metabolite-to-creatine ratio for five subjects are summarized in Table 6 for in-vivo data. The CV was lowest for Glx (0.9%) and highest for tCho (10.6%) in subject 3. The means of the tNAA-to-Cr ratio were relatively consistent among subjects. Moreover, the SDs of the tNAA-to-Cr ratio were found to be minimal. Given the recent agreement on using LCM fitting [3] and several pioneering research highlighting the possible use of DL in MRS [18,25, 36,38], this work demonstrates that an LCM fitting-based self-- supervised DL approach can be used to quantify both simulated and in-vivo MRS data. No labels or ground truth were required during training since the proposed method maximized the use of prior knowledge in a deep neural network to limit a model solution. The network can identify the contribution of basis metabolite spectra and MM to crowded MRS spectra such as those in Figs. 4 and 8. The network can reconstruct the input signal by a linear combination of basis spectra, therefore highlighting the contribution of each basis spectrum to the total spectrum (Figs. 4 and 8). Moreover, the difference between the data and fit can be calculated and served as an indicator of whether the fitting operation was successful or not [5]. The network was validated using simulated data in which in-silico ground truth values were available. A comparison between this novel DL-based LCM and traditional LCM fitting algorithms, namely QUEST, QUEST-Subtract, and FiTAID, was performed (Fig. 3, Table 5). The results show that the DL-based algorithm can achieve comparable performance with a significantly shorter amount of time for quantification of an MRS signal (0.031 ms) compared with traditional methods (560 ms). For metabolites such as NAA, Ins, Glu, Tau, and Cr, which have relatively high concentration levels, all methods provided with a numeric MM pattern (DQ-nMM, QUEST, FiTAID) showed good performance (Fig. 3 and Table 5). Noteworthy, DQ-nMM showed remarkable results for metabolites such as PCho (R 2 =0.62, MAPE =18.2%) and PCr (R 2 =0.54, MAPE =9.12%) which overlap with GPC (R 2 =0.67, MAPE =16.27%) and Cr (R 2 =0.88, MAPE =6.02%), respectively, while traditional method, such as QUEST struggled with quantification of GPC (R 2 =0.1, MAPE =26.06%), PCr (R 2 =0.19, MAPE =11.79%) and PCho (R 2 =0.10, MAPE =25.75%). Moreover, DQ-nMM showed a good performance in the decomposition of NAA and NAAG, which is notoriously challenging owing to the low concentration of NAAG and spectral overlap [67]. DQ-rpMM showed better performance than DQ-pMM and QUEST- Fig. 4. Example spectra from the test subset of the simulated dataset quantified by (a) DQ-nMM, (b) DQ-pMM, and (c) DQ-rpMM. Spectra are color-coded. The contribution of each basis spectrum to the total spectrum was illustrated in Supporting Information Figure S6. GT, ground truth; DQ-nMM, deep learning-based quantification using a numeric MM; DQ-pMM, deep learning-based quantification using parametric MM; DQ- rpMM, deep quantification using parametric MM and a regularization term. A. Shamaei et al.