1 Introduction

The complex interplay of neurophysiological quantities and neuronal activity determines cerebral blood flow (CBF). The ratio between oxygenated and deoxygenated hemoglobin of venous cerebral blood indirectly reflects the degree of neuronal activity in the surrounding tissue. The magnetic resonance (MR) signal is sensitive to blood oxygen level dependent (BOLD) changes due to the distorting effect of paramagnetic deoxygenated hemoglobin on the homogeneity of the magnetic field. The functional integrity of the brain depends on precise control of CBF. Differences in the hemodynamic response between normal and abnormal cerebrovascular regulation provide important insights for the understanding of brain dysfunction and disease. It is therefore important to track physiological characteristics of the CBF. The cardiac cycle produces pulsality artifacts [3] that interfere with the MR signal, impeding the correct estimation of the hemodynamic response. Pulse oximetry provides a quantitative means to record cardiac cycle during scanning. However, recordings from pulse oximetry sensors can exhibit poor signal quality due to subject motion, are usually not synchronized to scanner triggers, or are regarded as unimportant for fMRI analysis within a clinical setting. Many data-driven methodologies have been proposed when physiological recordings are not available [4]. However, to the best of our knowledge, none of them utilize physiology-derived information. In consequence, we want to directly extract and model a cardiac surrogate from the actual scan. The cardiac surrogate signal can be used as a noise regressor in large clinical cohorts in which physiological monitoring was not available. The cardiac surrogate signal can also be used to supplement physiological recordings within our proposed model. First, we show in highly sampled BOLD-fMRI images with sagittal orientation that areas affected by cardiac and respiratory cycle spatially correlate with areas of high signal variance. We therefore compute an average slice-wise signal with respect to slice ordering and BOLD signal standard deviation. The power spectrum of this cardiac surrogate signal resembles the power spectrum of the signal obtained from pulse oximetry (pulse ox.). We learn the degree of correlation between cardiac surrogate signal and pulse oximetry signal with a Multi-Task Gaussian Process (MTGP) model. Last, we show that this Gaussian Process CARdio Estimation (GPCARE) model produces robust estimates of the cardiac cycle and can also be used to fill in periods of measurement failure.

2 A Multi-Task Gaussian Process Model for Cardiac Cycle Estimation

Prior knowledge of the behavior of an examined system can be expressed within a Gaussian Process model. Furthermore, by formulating our problem in a Bayesian framework, we can infer the probabilities of our model parameters in the presence of noise, measurement failure and incompleteness of data, as often occurs within a clinical setting [5, 6].

Gaussian Process Regression Model. We consider our cardiac cycle estimation as a supervised learning problem. We detect peaks in the cardiac signals, and use the obtained time stamps \(\mathbf {x}=\{x_i | i=1,\ldots ,n\}\) as well as the period between adjacent time stamps \(\mathbf {y}=\{y_i | i=1,\ldots ,n\}\) as our training data. This data is used to learn a generative model \(\mathbf {y} = f(x) + \epsilon \) with latent function f(x) and noise \(\epsilon \sim \mathcal {N}(0,\sigma ^2)\). For given test time stamps \(\mathbf {x^*} =\{x_i^* | i=1,\ldots ,k\}\), i.e. at every slice acquisition time, we want to predict estimates of the unknown heart rate \(\mathbf {y^*} =\{y_i^* | i=1,\ldots ,k\}\). We describe the latent function f(x) with probability distributions over functions [7] given by

$$\begin{aligned} f \sim GP(\mathbf {\mu },\mathbf {\Sigma }), \end{aligned}$$
(1)

so that the behavior of the function is completely specified by its mean \(\mathbf {\mu }\) and covariance \(\mathbf {\Sigma }\). We encode our prior knowledge about the cardiac signal behavior with a squared-exponential (SE) covariance function \(k_{SE}(x,x')\) and constant mean function \(\mu (x)=c\), assuming that during rest the heart rate fluctuates slowly around a mean frequency with standard deviation [1] (hyperparameter \(\theta _A^2\)) and autocorrelation (hyperparameter \(\theta _L\)), given by

$$\begin{aligned} k_{SE}(x,x') = \theta _A^2\exp \left[ -\frac{(x-x')^2}{2\theta _L^2}\right] . \end{aligned}$$
(2)

The individual elements of the covariance matrix \(\mathbf {\Sigma (\mathbf {x},\mathbf {x})}\) for a vector \(\mathbf {x}\in \mathbb {R}^n\) are given by evaluating the covariance function at \(k_{SE}(x,x')\). Prediction on the test time stamps \(\mathbf {x^*}\) can be made by averaging over all possible parameter values weighted by their posterior probability. The predictive distribution for \(f^*\doteq f(\mathbf {x^*})\) at \(\mathbf {x^*}\) is computed using the posterior distribution

$$\begin{aligned} p(\mathbf {y^*}|\mathbf {x^*},\mathbf {x},\mathbf {y}) \sim \mathcal {N} \left( m(\mathbf {y^*}), var(\mathbf {y^*})\right) \end{aligned}$$
(3)

with mean \(m(\mathbf {y^*})=\mathbf {\mu (x^*)} + \mathbf {\Sigma }(\mathbf {x},\mathbf {x^*})^T\mathbf {\Sigma }(\mathbf {x},\mathbf {x})^{-1}(\mathbf {y}-\mathbf {\mu (x)})\) and variance \(var(\mathbf {y^*})=\mathbf {\Sigma }(\mathbf {x^*},\mathbf {x^*}) - \mathbf {\Sigma }(\mathbf {x},\mathbf {x^*})^T\mathbf {\Sigma }(\mathbf {x},\mathbf {x})^{-1}\mathbf {\Sigma }(\mathbf {x},\mathbf {x^*})\). The hyperparameters are optimized by minimizing the negative log marginal likelihood (NLML) defined as

$$\begin{aligned} -\log p(\mathbf {y}|\mathbf {x},\mathbf {\theta }) = \frac{1}{2}\log |\mathbf {\Sigma }|+\frac{1}{2}\mathbf {y^T}\mathbf {\Sigma ^{-1}}\mathbf {y} + \frac{n}{2}\log {2\pi }. \end{aligned}$$
(4)

Bayesian inference reduces to computing mean and covariance parameters of a multivariate Gaussian posterior distribution.

Multi-Task Gaussian Process Regression Models. While one could train several GP models for each individual cardiac modality, one would ideally want to model m modalities simultaneously and exploit the correlation between them. Therefore, we used a Multi-Task Gaussian Process (MTGP) model as proposed in Dürichen et al. [6]. Our training data set extends to \(\mathbf {X}=\{x_i^j | i=1,\ldots ,n^j\}\) and \(\mathbf {Y}=\{y_i^j | i=1,\ldots ,n^j\}\), in which modality j has \(n^j\) number of training data. Furthermore, we require an index \(l^j\) as an additional input to identify individual modalities. The covariance function modeling correlation between modalities is given by \(k_{CORR}(l,l')\). We assume independence between \(k_{CORR}\) and our individual modality covariance function \(k_{SE}\) [6] and combine them in

$$\begin{aligned} k_{MTGP}(x,x',l,l') = k_{CORR}(l,l') \times k_{SE}(x,x'). \end{aligned}$$
(5)

We rewrite the covariance matrix \(\mathbf {\Sigma }\) as the Kronecker product of \(\mathbf {\Sigma }_{CORR}\) and \(\mathbf {\Sigma }_{SE}\) assuming \(n^j=n\) for \(j=1,\ldots ,m\) without loss of generality, resulting in

$$\begin{aligned} \mathbf {\Sigma }_{MTGP}(\mathbf {X},\mathbf {l},\mathbf {\theta }_{CORR},\mathbf {\theta }_{SE}) = \mathbf {\Sigma }_{CORR}(\mathbf {l},\mathbf {\theta }_{CORR}) \otimes \mathbf {\Sigma }_{SE}(\mathbf {X},\mathbf {\theta }_{SE}). \end{aligned}$$
(6)

Predictions for test indices \({\mathbf {x^*},\mathbf {l^*}}\) are computed using the posterior distribution \(p(\mathbf {y^*}|\mathbf {x^*},\mathbf {l^*},\mathbf {x},\mathbf {l},\mathbf {y})\) similar to an individual GP model [6].

3 Experiments

Cardiac Surrogate Signal. We acquired five sagittal slices with high temporal resolution using a Multi-Echo BOLD-weighted Echo Planar Imaging (EPI) sequence with echo times (TE) 8.3, 21.4 and 34 ms and repetition time (TR) 300 ms on a Siemens Trio scanner. Recordings from pulse oximetry and respiration belt were used to build RETROICOR regressors [8]. Physiological respiration and cardiac cycle components can be approximated by their low-order Fourier series expansion as given by

$$\begin{aligned} y_{\delta } = \sum _{m=1}^{M} a_m^c cos(m\phi _c) + b_m^c sin(m\phi _c) + a_m^r cos(m\phi _r) + b_m^r sin(m\phi _r), \end{aligned}$$
(7)

where \(a_m^c,b_m^c\) and \(a_m^r,b_m^r\) are the coefficients for cardiac and respiratory function respectively, and \(\phi _c(t)\) and \(\phi _r(t)\) are the phases in the respective cardiac and respiratory cycles at time t. Figure 1 shows the physiological coefficient estimates from RETROICOR regressors from one of the acquired slices. Pulsation artifacts due to the cardiac cycle are mostly pronounced in approximate locations of large vasculature such as orbitofrontal, callosomarginal and pericallosal arteries. Effects from respiration on the MR signal are pronounced in the Superior Sagittal Sinus and at its crossing with the Transverse Sinus. Figure 1 also shows the large effect physiology has on the strength of variation in the BOLD time courses. The short repetition time used to acquire the five sagittal slices is not applicable for full brain coverage in BOLD fMRI imaging. The cardiac cycle is thus under-sampled in whole brain fMRI images producing low-frequency aliasing artifacts in BOLD time courses. Therefore, there is a great need to obtain information about heart rate spectrum and variation. We exploit the pulsality effect the cardiac cycle has on brain tissue and brain fluids, such as CSF, to build a cardiac surrogate. We have made the following observations in our test data. First, the power spectrum of this cardiac surrogate resembled the complete power spectrum of the cardiac cycle during the scan. Second, the cardiac surrogate can be used with or without physiological recordings to compute cardiac regressors with RETROICOR [8] or nuisance regressors for variations in heart rate [1, 2, 9]. And third, correlation between cardiac surrogate signal and actual physiological recordings can be learned to account for measurement failure as shown in the following section.

Fig. 1.
figure 1

The middle sagittal slice of the acquisition depicts the large influence of physiology on the MR signal. Most variance in the vicinity of large blood vessels can be explained with the RETROICOR cardiac (A) and respiratory (B) regressors. The regions influenced by physiology are also the regions with the greatest standard deviation in BOLD time courses (C).

Cardiac Cycle. We tested our method on a large fMRI data set that comprises 61 fMRI sessions (cohort comprises healthy adults and adults that were born preterm, with average age 19 years) acquired with a Philips 3T Achieva (TR 3000 ms, TE 30 ms, flip angle \(\mathrm {80^{\circ }}\), voxel size \(2.5 \times 2.5 \times 3\) mm\(^3\), field of view (FoV) 240 mm\(^2\), 50 oblique transverse slices, slice order descending). From the 61 data sets, 7 fMRI scans were discarded for corrupted physiological recording files and 3 for strong head movement. Motion correction was performed on all scans. BOLD time courses were corrected for polynomial trends and z-transformed. Slices were reordered with respect to their slice acquisition timing. The sagittal FoV was cropped to have an approximate equal contribution of brain tissue and cerebral fluids for each slice. The cardiac surrogate signal was obtained by computing the standard-deviation weighted average in each slice resulting in a signal sampled every TR/(number of slices). The high sampling rate captured the entire spectrum of the heart rate. The obtained signal was very noisy due to averaging from slices with different tissue compositions, which resulted in heteroscedasticity. A bandpass filter (0.6 Hz–2.0 Hz) was applied to isolate the cardiac frequency spectrum. The frequency with the greatest power in this band was peak filtered (Gaussian filter) with a bandwidth of 0.5 Hz. The same signal processing was applied to pulse oximetry signals acquired from the Philips physiological monitoring unit. Peak times were extracted from cardiac surrogate and pulse oximetry signal. The individual effects of signal processing are depicted in Fig. 2.1 for scan 19. Individual GPs (covariance function \(k_{SE}\)) and the MTGP model (covariance function \(k_{MTGP}\)) were learned on cardio surrogate and pulse ox. peaks depicted in Fig. 2.2. and 2.3, respectively. To simulate missing data, we removed peaks within time interval (84 s, 164 s). The MTGP model coped with missing data using the learned information from the correlation covariance matrix \(\mathbf {\Sigma }_{CORR}\). The MTGP pulse ox. GP follows the cardiac surrogate GP in the period of missing peaks (Fig. 2.5A) whereas the individual pulse ox. GP goes to the signal mean (Fig. 2.4A). Cardiac pulsation effects are mostly pronounced at the ventricle borders as well as in large vasculature, i.e. the transversal sinus as shown in the statistical parametric mapping of cardiac surrogate GP (individual GP framework) in Fig. 2.6.

We also acquired 3 fMRI sessions with a Siemens Trio 3T (two with TR 2060 ms, multi-echo TEs 8.3, 21.4 and 34 ms, flip angle \(\mathrm {90^{\circ }}\), voxel size 3 mm\(^3\), FoV 192 mm\(^2\), 36 oblique transverse slices, slice order descending, one with TR 2060 ms, single echo TE 30 ms, flip angle \(\mathrm {90^{\circ }}\), voxel size 3 mm\(^3\), FoV 192 mm\(^2\), 36 oblique transverse slices, slice order interleaved). Our proposed cardiac surrogate signal was also found in these scans, providing evidence towards applicability to multiple scanner models.

Fig. 2.
figure 2

The influence of signal processing on cardiac surrogate as well as final pulse ox. signal for scan 19 of 61 (1). Individual GPs (2) and MTGP model GPs (3) trained on peaks in cardiac surrogate and pulse oximetry signal. Individual GPs (4) and MTGP model GPs (5) simulating measurement failure in interval (84 s, 164 s). Increased uncertainty of the processes in the period of missing measurements (4A and 5A). The statistical parametric mapping (p-value \(\le 0.05\)) for variance explained by the cardiac surrogate GP of the MTGP model. Coefficients from low in red to high in white (6).

Individual GPs vs MTGP. We computed the difference between the frequency with the greatest power in the cardiac surrogate signal and pulse ox. signal. The spectral similarity between both signals was very high in all subjects (median 0.01, \(25^{th}\) percentile 0.008, \(75^{th}\) percentile 0.078, outliers 4). We computed the difference at slice acquisition times between cardiac surrogate GP and pulse ox. GP within the individual GP framework and in the MTGP framework as depicted in Fig. 3A. We sorted subjects by quality of their pulse ox. power spectrum from left (good) to right (noisy). We computed the frame-wise displacement from the motion realignment parameters of the rigid-body registration for each subject [4]. Some of the subjects that exhibited large head motion also showed a noisy power spectrum of the pulse ox. signal. It was thus assumed that noisy pulse ox. signals resulted mainly from subject motion but also from poor sensor connection or detachment. Nonetheless, some subjects with minor head movement where also found to have noisy pulse ox. signal. Subjects 1–29 had a Gaussian-shaped power spectrum. The pulse ox. recording of subjects 30–51 had a very wide and noisy or bimodal Gaussian-shaped cardiac bandwidth. Large variations in the heart rate are very unusual during rest. The bimodal Gaussian-shaped power spectrum of pulse ox. signals might be due to subjects falling asleep during the scan. The second quartile of differences between GPs in the individual GP framework (Fig. 3A) is below 0.05 Hz for good recordings 1–29 and below 0.1 Hz for most of the noisy recordings 30–51. The MTGP model was able to cope with missing data periods resulting in low errors between MTGP pulse ox. GP (full data) and MTGP pulse ox. GP (missing data) in time interval (84 s, 164 s) as depicted in Fig. 3B.

Fig. 3.
figure 3

The boxplots show the distribution of differences of cardiac surrogate GP and pulse ox. GP at slice acquisition times in the individual GP model (A) and in the MTGP model (B). The blue frame boxes are the \(25^{th}\) percentile to \(75^{th}\) percentile. Outliers are indicated in red dots.

4 Conclusion

The correlation between surrogate signal and pulse oximetry signal was learned within a MTGP model that produces more robust estimates of the cardiac cycle than individual signals on their own. The cardiac surrogate signal is thus supposed to be used in addition to physiological recordings such as from pulse oximetry. However, there are large clinical fMRI cohorts in which physiological monitoring was not used. For these cohorts, heart rate variation can be extracted from BOLD scans directly using the cardiac surrogate signal. The proposed model presents significant advantages when compared to current data-driven techniques [4] by providing a more realistic joint biophysical noise model of physiologic signals.