MRS data are subject to shot-to-shot frequency and phase errors that often arise from B0 field drift and participant motion. These result in misalignment of individual subspectra, leading to signal loss and—in the case of J-difference editing—subtraction artifacts. Here, we present a frequency-and-phase correction algorithm, built upon the time-domain-based spectral registration method, that is robust against alignment errors resulting from large B0 field drift, substantial head motion and strong lipid contamination. The method has the same strengths as standard spectral registration but outperforms it in challenging cases and is applicable to multiplexed edited MRS data.
Robust regression
SR aligns each mth FID Sm(t) to a reference signal R(t) by adjusting its frequency (f) and phase ($$$\phi$$$) using nonlinear least-squares minimization:
$$\min_{f,\phi}‖R(t)-G_m(t,f,\phi)‖_2$$
where
$$G_m(t,f,\phi)=S_m(t)\exp(2\pi(ft+\phi/360))$$
R(t) is typically chosen as the first (or any mth) FID in a dataset of M FIDs. Ordinary least squares (OLS) minimization usually assumes that the fit residuals are normally distributed and homoscedastic—the optimal fit parameters are found by minimization of the sum of the squared residuals (the L2 norm). However, examination of previous SR data from the Big GABA study (5) revealed that the residuals are not always normally distributed (Fig. 1), because the assumptions of SR are violated by changes in water suppression quality, B0 shim and contamination by lipid signals. In cases of a non-Gaussian error distribution, it is desirable for fitting to be not-so-strongly influenced by the most poorly fitted points. This can be achieved with robust regression, which effectively weights the residuals such that outlier points are less influential during the minimization.
In this case, the objective function becomes:
$$\min_{f,\phi}\sum\rho(R(t)-G_m(t,f,\phi))=\min_{\beta}\sum\rho(e)$$
$$$\rho$$$(.) is an M-estimator that weights influential points in e. Here, the “fair” method was selected as the M-estimator of choice:
$$\rho(e)=c^2(|e|/c-\ln(1+|e|/c))$$
where c is a tuning constant (by default = 1.4) that modulates the down-weighting applied to the larger values in e. The M-estimator is solved by iteratively reweighted least squares minimization (6):
$$\beta_{b+1}=\min_{\beta}\sum_{}w_{b}|e|^2$$
where
$$w(e)=1/(1+|e|/c)$$
The weighted residuals w(e) are iteratively updated B times until the fit parameters converge.
Reference updating
Setting R(t) as the first (or any mth) FID is not always optimal in cases of highly misaligned (or low-SNR) data. An alternative approach is to update the reference signal by using a weighted moving average whereby R(t) is updated after each mth SR computation, such that:
$$R_{m}(t)=\begin{cases}S_{1}(t)&m=1\\\frac{1}{2}(R_{m-1}(t)+\hat{G}_{m-1}(t))&m>1\end{cases}$$
Lipid filtering
The presence of strong lipid contamination can detrimentally impact SR given the limitations of OLS minimization discussed above. This can be mitigated by first filtering out the contamination in the pre-aligned FIDs—a sixth-order Fourier series is fitted to the lipid signal in the frequency domain (0–1.85 ppm) and subtracted from the pre-aligned signals. After inverse Fourier transformation, the FIDs can be aligned through SR.
Robust spectral registration
The combined use of robust regression, reference updating and (when needed) lipid filtering is termed robust SR (rSR). Case examples of edited MRS data are presented to demonstrate the performance of rSR in situations where standard SR may fail. These were: large B0 field offsets (Issue 1), large head motion (Issue 2) and strong lipid contamination (Issue 3).
The example datasets were acquired by either GABA-edited MEGA-PRESS (7) or GABA-/GSH-edited HERMES (8). For the latter, rSR was incorporated into our previously published alignment algorithm for HERMES data (2). Alignment quality was quantified as: $$$Q=1-(\sigma_{SA}-\sigma_{\epsilon})/\sigma_{\epsilon}$$$, where $$$\sigma$$$SA is the standard deviation of the Cho subtraction artifact (3.175–3.285 ppm) and $$$\sigma_{\epsilon}$$$ is the estimate of noise (10–11 ppm). A higher Q score indicates smaller subtraction artifacts. We also assessed alignment quality by calculating the median (across the M FIDs) mean squared error (MSE) in each dataset.
Issue 1: rSR produced better alignment results in two MEGA-PRESS and one HERMES datasets with large B0 field offsets (Fig. 2). Mean QSR,GABA = –0.43; mean QrSR,GABA = 0.36. In addition, rSR produced visually cleaner spectra with clearly reduced spectral distortion.
Issue 2: rSR produced better alignment results in a pediatric HERMES dataset with motion artifacts (Fig. 3). QSR,GABA = –4.36; QrSR,GABA = –1.21; QSR,GSH = –2.79; QrSR,GSH = –0.28. rSR again produced visually improved spectral quality.
Issue 3: rSR produced better alignment results in three MEGA-PRESS datasets with strong lipid contamination (Fig. 4). Mean QSR,GABA = –4.87; mean QrSR,GABA = –0.18. Spectral quality was again visually improved with rSR.
1. Near J, Edden R, Evans CJ, Paquin R, Harris A, Jezzard P. Frequency and phase drift correction of magnetic resonance spectroscopy data by spectral registration in the time domain. Magn. Reson. Med. 2015;73:44–50. doi: 10.1002/mrm.25094.
2. Mikkelsen M, Saleh MG, Near J, et al. Frequency and phase correction for multiplexed edited MRS of GABA and glutathione. Magn. Reson. Med. 2018;80:21–28. doi: 10.1002/mrm.27027.
3. Wiegers EC, Philips BWJ, Heerschap A, van der Graaf M. Automatic frequency and phase alignment of in vivo J-difference-edited MR spectra by frequency domain correlation. Magn. Reson. Mater. Physics, Biol. Med. 2017;30:537–544. doi: 10.1007/s10334-017-0627-y.
4. Cleve M, Krämer M, Gussew A, Reichenbach JR. Difference optimization: Automatic correction of relative frequency and phase for mean non-edited and edited GABA 1 H MEGA-PRESS spectra. J. Magn. Reson. 2017;279:16–21. doi: 10.1016/j.jmr.2017.04.004.
5. Mikkelsen M, Barker PB, Bhattacharyya PK, et al. Big GABA: Edited MR spectroscopy at 24 research sites. Neuroimage 2017;159:32–45. doi: 10.1016/j.neuroimage.2017.07.021.
6. Holland PW, Welsch RE. Robust regression using iteratively reweighted least-squares. Commun. Stat. - Theory Methods 1977;6:813–827. doi: 10.1080/03610927708827533.
7. Mescher M, Merkle H, Kirsch J, Garwood M, Gruetter R. Simultaneous in vivo spectral editing and water suppression. NMR Biomed. 1998;11:266–272. doi: 10.1002/(SICI)1099-1492(199810)11:6<266::AID-NBM530>3.0.CO;2-J.
8. Saleh MG, Oeltzschner G, Chan KL, Puts NAJ, Mikkelsen M, Schär M, Harris AD, Edden RAE. Simultaneous edited MRS of GABA and glutathione. Neuroimage 2016;142:576–582. doi: 10.1016/j.neuroimage.2016.07.056.