2004

ProFit-v3: accuracy and precision evaluation of a new spectral fitting software
Tamas Borbath1,2, Saipavitra Murali-Manohar1,2, Johanna Dorst1,3, Andrew Martin Wright1,3, and Anke Henning1,4
1High-field Magnetic Resonance, Max Planck Institute for biological Cybernetics, Tübingen, Germany, 2Faculty of Science, University of Tübingen, Tübingen, Germany, 3IMPRS for Cognitive & Systems Neuroscience, Tübingen, Germany, 4Advanced Imaging Research Center, UT Southwestern Medical Center, Dallas, TX, United States

Synopsis

In this work, we present the newly developed MRS fitting software ProFit-v3, including adaptive baseline stiffness control and a newly proposed cost function calculation. ProFit-v3 was evaluated for accuracy and precision using both simulated and in vivo spectra, and the results were compared against LCModel. The adaptive spline baseline model of ProFit-v3 modelled different simulated baseline distortions well. The fitting accuracy measured on simulated data was slightly better for ProFit-v3 than for LCModel. While the fitting precision of ProFit-v3 was comparable to that of LCModel for the simulated data, LCModel proved to be somewhat more precise for in vivo spectra.

Purpose

Magnetic resonance spectroscopy (MRS) has proven its diagnostic value for several clinical applications1. A key factor for MRS is spectroscopic quantification. Several quantification algorithms have been proposed2-5, while the community standard program is the commercial software LCModel6,7. Limitations of LCModel include the fitting of the spline baseline and macromolecular background signal8,9, and it being an expensive closed-source software not adoptable to several advanced applications. This work proposes a fitting algorithm, ProFit-v3, with adaptive baseline fitting and a new cost function. The algorithm is a further development of the previous 2D fitting software ProFit10,11. Code will be open-source.

Theory

We define the free-induction-decay $$$\boldsymbol{\hat{y}}$$$ of an MRS spectrum ($$$\boldsymbol{\hat{Y}}$$$) as Eq. 1:$$\hat{y}=\left\{exp\left[i\frac{\pi\varphi_0}{180}-\frac{\left(\pi\,\nu_g\textbf{t}\right)^2}{4\,ln(2)}\right]\cdot\sum_k^K{c_k\boldsymbol{\beta_k}exp\left[-\pi\,\nu_{e,k}\right(TE+\textbf{t}\left)+i2\pi\omega_k\textbf{t}\right]}\right\}\otimes{}exp\left[i\frac{\pi\varphi_1}{180}\left(\boldsymbol{\delta_{ppm}}-\delta_{ref}^I\right)\right]$$where each metabolite, $$$k$$$, contributes with the concentration $$$c_k$$$, basis set $$$\boldsymbol{\beta_k}$$$, its Lorentzian line-shape parameter $$$\nu_{e,k}=\frac{1}{\pi\,T_{2,k}^*}\approx\frac{1}{\pi\,T_{2,k}}$$$ and frequency shift $$$\omega_k=\omega_{local,k}+\omega_{global}$$$. $$$\omega_{global}$$$ represents a frequency shift impacting all metabolites identically, while $$$\omega_{local,k}$$$ is individual to each metabolite. The entire spectrum is characterized by a Gaussian line-broadening factor $$$\nu_g$$$, and zeroth- and first-order phases $$$\left(\varphi_0,\varphi_1\right)$$$. The terms $$$\textbf{t}$$$ and $$$\boldsymbol{\delta_{ppm}}$$$ stand for the acquisition time and ppm vectors, $$$\delta_{ref}^I$$$ the acquisition frequency, and $$$\otimes$$$ is convolution in the time-domain. A measured spectrum ($$$\textbf{Y}$$$), however, contains both noise and a baseline (Eq. 2):$$\textbf{Y}=\hat{\textbf{Y}}+\textbf{noise}+\textbf{baseline}.$$For the spectral fitting, we define the residual $$$\textbf{R}$$$ as:$$\textbf{R}=\textbf{Y}-\hat{\textbf{Y}}-\textbf{B}\,\textbf{a}$$where $$$\textbf{B}$$$ is a vector of tensor splines modelling the baseline scaled by their corresponding spline coefficients $$$\textbf{a}$$$.
For ProFit-v3 we propose a new cost function $$$\boldsymbol{R_x}$$$ for the minimization process, composed of the frequency-domain residual $$$\boldsymbol{R}\left[\boldsymbol{\delta_{ppm}}\left(\boldsymbol{FOI}\right)\right]$$$ in the fit area of interest ($$$\textbf{FOI}$$$), the time-domain residual $$$\boldsymbol{R}\left[\boldsymbol{t}\left(1:truncPoint\right)\right]$$$ up to the signal decay point ($$$truncPoint$$$), and the weighted frequency-domain residual $$$\boldsymbol{R}\left[\boldsymbol{\delta_{ppm}}\left(\boldsymbol{FOI}\right)\right]\cdot\textbf{weights}$$$:$$\boldsymbol{R_x}=\left\{\boldsymbol{R}\left[\boldsymbol{\delta_{ppm}}\left(\boldsymbol{FOI}\right)\right]\quad\boldsymbol{R}\left[\boldsymbol{t}\left(1:truncPoint\right)\right]\quad\boldsymbol{R}\left[\boldsymbol{\delta_{ppm}}\left(\boldsymbol{FOI}\right)\right]\cdot\textbf{weights}\right\}$$The frequency-domain residual weighting is calculated from the active metabolites in the fitting iteration (Fig. 1B):$$\textbf{weights}=\sum_k^K\left\{Re\left(\boldsymbol{\beta_k}\right)>0.25\cdot{}max\left[Re\left(\boldsymbol{\beta_k}\right)\right]\right\}$$The minimization is performed on the following equation:$$\displaystyle\min_{\boldsymbol{c},\boldsymbol{a},\varphi_0,\varphi_1,\boldsymbol{\nu_e},\nu_g,\boldsymbol{\omega}}\left\|\boldsymbol{R_x}\right \|^2 + \lambda\left\|\boldsymbol{D}\,\boldsymbol{a}\right\|^2$$where $$$\lambda$$$ is the regularization parameter controlling the spline baseline flexibility and $$$\textbf{D}$$$ the second-order difference operator.
The optimal value of $$$\lambda$$$ is derived using the modified-Akaike’s information criterion ($$$mAIC$$$) proposed by Wilson2. For this, the effective dimension ($$$ED$$$) is defined as:$$ED=tr\left(\boldsymbol{H}\right)=tr\left(\begin{bmatrix}\boldsymbol{B}\\\sqrt{\lambda}\boldsymbol{D}\end{bmatrix}^{-1}\begin{bmatrix}\boldsymbol{B}\\0\end{bmatrix}\right)$$and the$$$\,mAIC\,$$$as:$$mAIC=ln\left[\left\|\boldsymbol{Y}-\hat{\boldsymbol{Y}}\right\|_2^2\right]+2\,m\,ED/n$$where $$$n$$$ is the number of data points and $$$m$$$ an arbitrary value set to 15. Finally, the optimal spline baseline flexibility is found by choosing the minimum $$$mAIC\,$$$value over a series of possible$$$\,\lambda$$$; and hence also$$$\,ED\,$$$values. The optimal solution to the minimization problem of $$$\boldsymbol{R_x}$$$ is found through multiple iterations. First iterations aim to determine global parameters, while later iterations permit higher degrees of freedom for individual metabolite parameters (Fig. 1A).

Methods

To test the accuracy and precision of ProFit-v3, in vivo quality spectra were simulated, while varying only one parameter of Eqs. 1 and 2 at a time, and keeping all others constant. Spectral baselines were created artificially to mimic typical artefacts or extracted from previous LCModel fit results of in vivo spectra (Fig. 2).
Fitting accuracy and precision were determined by comparing each fitted concentration to the simulated concentration using:$$c_{\%,k}=\frac{c_{simulated,k}-c_{fitted,k}}{c_{simulated,k}}\cdot\,100$$In vivo spectra were measured in the occipital lobe of the human brain at 9.4 T (Siemens Healthineers) with a metabolite-cycled semi-LASER sequence (TE: 24 ms, TR: 6 s, bandwidth 8 kHz, $$$\boldsymbol{\delta_{ref}}$$$ 7.0 ppm, NEX 96) in eleven healthy volunteers (27.8±1.9 years, three females). Data were preprocessed as described in Murali-Manohar et al.12 To test in vivo reproducibility, two sub-spectra with 64 averages and two sub-spectra with 32 averages were created. The test-retest concentration results ($$$c_{i,k}^{fits1}$$$ and $$$c_{i,k}^{fits2}$$$) from the $$$i$$$ subjects for both the 32 and 64 averages sub-spectra were plotted using Bland-Altman plots13. Percentual concentration changes are shown via the y-axes, while reproducibility coefficients13 ($$$RPC$$$) are reported in the legends.

Results

A sample of the simulated baseline variations and fit results of ProFit-v3 and LCModel are shown in Fig. 2.
The accuracy and precision analysis for concentration estimates for the spectra simulated with individual parameter variations is presented in Fig. 3.
Similar fit quality is observed for the in vivo spectra fitted by ProFit-v3 and LCModel (Fig. 4).
The Bland-Altman plots of the in vivo test-retest data are shown in Fig. 5. These reveal that LCModel has on average a 2-10% higher precision than ProFit-v3 for the fitted concentrations (also depending on SNR).

Discussion

Both ProFit-v3 and LCModel fitted the spectra with the simulated baseline variations well (Fig 2). The fitted baselines show the same trends for both fitting software, and the residual is minimal. The $$$mAIC$$$ curves detected the needed baseline flexibility well and in a fully automatized manner.
The individual parameter variations in Fig. 3 show that while the ProFit-v3 fit results were slightly more accurate, the LCModel fit results are somewhat more precise. Lower concentration and coupled spin system metabolites are fitted less accurately by LCModel, whereas ProFit-v3 is less precise for these. Similarly, LCModel had a higher reproducibility for in vivo spectra; however, the ground truth for these is not known.
While LCModel is a commercial software optimized for 30 years, the fit results from the new ProFit-v3 software are very promising.

Conclusion

The newly developed open-source ProFit-v3 fitting algorithm was evaluated for both accuracy and precision with simulated and in vivo spectra. In comparison with LCModel, ProFit-v3 was slightly more accurate; however, LCModel proved to be somewhat more precise.

Acknowledgements

This project was co-sponsored by the Horizon 2020 grant / CDS-QUAMRI / 634541, the ERC Starting grant / SYNAPLAST / 679927, and the Cancer Prevention and Research Institute of Texas (CPRIT) grant / RR180056.

References

1. Öz G, Alger JR, Barker PB, et al. Clinical proton MR spectroscopy in central nervous system disorders. Radiology. 2014;270(3):658-679.

2. Wilson M. Adaptive Baseline Fitting for 1H MR Spectroscopy Analysis. bioRxiv. 2020.

3. Chong DG, Kreis R, Bolliger CS, Boesch C, Slotboom J. Two-dimensional linear-combination model fitting of magnetic resonance spectra to define the macromolecule baseline using FiTAID, a Fitting Tool for Arrays of Interrelated Datasets. Magnetic Resonance Materials in Physics, Biology and Medicine. 2011;24(3):147-164.

4. Wilson M, Reynolds G, Kauppinen RA, Arvanitis TN, Peet AC. A constrained least‐squares approach to the automated quantitation of in vivo 1H magnetic resonance spectroscopy data. Magnetic resonance in medicine. 2011;65(1):1-12.

5. Vanhamme L, van den Boogaart A, Van Huffel S. Improved method for accurate and efficient quantification of MRS data with use of prior knowledge. Journal of magnetic resonance. 1997;129(1):35-43.

6. Provencher S. LCModel & LCMgui user’s manual. Stephen W Provencher. 2005.

7. Provencher SW. Estimation of metabolite concentrations from localized in vivo proton NMR spectra. Magnetic resonance in medicine. 1993;30(6):672-679.

8. Giapitzakis IA, Borbath T, Murali‐Manohar S, Avdievich N, Henning A. Investigation of the influence of macromolecules and spline baseline in the fitting model of human brain spectra at 9.4 T. Magnetic resonance in medicine. 2019;81(2):746-758.

9. Marjańska M, Terpstra M. Influence of fitting approaches in LCModel on MRS quantification focusing on age‐specific macromolecules and the spline baseline. NMR in Biomedicine. 2019:e4197.

10. Fuchs A, Boesiger P, Schulte RF, Henning A. ProFit revisited. Magnetic Resonance in Medicine. 2014;71(2):458-468.

11. Schulte RF, Boesiger P. ProFit: two‐dimensional prior‐knowledge fitting of J‐resolved spectra. NMR in Biomedicine: An International Journal Devoted to the Development and Application of Magnetic Resonance In vivo. 2006;19(2):255-263.

12. Murali‐Manohar S, Borbath T, Wright AM, Soher B, Mekle R, Henning A. T2 relaxation times of macromolecules and metabolites in the human brain at 9.4 T. Magnetic resonance in medicine. 2020;84:542–558.

13. Bland JM, Altman D. Statistical methods for assessing agreement between two methods of clinical measurement. The lancet. 1986;327(8476):307-310.

Figures

Fig. 1 A: The ProFit-v3 algorithm is depicted with the successive optimization steps: first preprocessing steps affect the spectrum to be fit while the fitting iterations optimize the linear combination of the basis sets. In later iterations, more metabolites are added, and additional metabolite specific local degrees of freedom are allowed while keeping the previously optimized global parameters. B: Metabolite weighting envelopes are displayed in red. Summing the weights of active metabolites for the fit iteration gives the weights of the spectral residual RX shown on the right.

Fig. 2: Fit results for the baseline simulations are shown. The blue line shows the input spectrum; the black line the input baseline. Fitted baselines (dashed lines) and resulting residuals (continuous lines) are shown in red for LCModel and purple for ProFit-v3. Offsets used for plotting are indicated on the right of each subplot. Inlays show the mAIC curves for the ProFit-v3 fitting. These spectra show a simulated zero baseline, an in-phase (φ0 = 0°) and an out of phase (φ0 = 90°) lipid peak at 1.3 ppm, but also an extracted baseline from a previous LCModel fit of an in vivo spectrum.

Fig. 3: Concentration changes in percent c%,k for each metabolite for simulation setups with induced variations in φ0, φ1, νg, and ωglobal. Both ProFit-v3 and LCModel results are shown, and for comparison reasons, the tCr(CH3) concentration was used for normalization. Concentration changes for the ωlocal, νe, noise, c, and baseline simulations are not shown due to space constraints. Horizontal lines inside the boxes indicate median values (50% quartile), whereas the bottom and top box boundaries illustrate 25% and 75% quartiles, respectively. Plus signs (+) show outliers.

Fig. 4: In vivo spectra and metabolite fits for a sample subject. A: shows the fit results for ProFit-v3, while B: the fit results for LCModel. The inlay shows the mAIC curve, used for the determination of the regularization term λ, and hence, the smoothness of the spline baseline (purple line) used for ProFit-v3 fitting. That λ and effective dimension (ED) is chosen, for which the mAIC is minimal. Both the splines baseline and the residue from the two fitting software show similar characteristics. Minor lipid contaminations can be observed between 1.2 and 1.9 ppm.

Fig. 5: Bland-Altman plots shown for 8 out of the 17 fitted metabolites, odd rows showing the concentrations fitted with ProFit-v3, while the even rows show the results for LCModel. The individual scatter-points represent the test and re-test concentrations for the eleven volunteers. One sub-spectra with 32 averages is compared against the other sub-spectra with 32 averages. Similarly, the comparison was made for the two 64 averages sub-spectra per subject. The labels also report the calculated reproducibility coefficients (RPC).

Proc. Intl. Soc. Mag. Reson. Med. 29 (2021)
2004