BOLD, non-BOLD, and TE-dependence with tedana#
In Signal Decay, we saw that changes in \(S_{0}\) and changes in \(T_{2}^{*}\) affect multi-echo data in different ways,
and that this is what lets multi-echo data tell them apart.
This chapter turns that observation into a test.
We first work out how each kind of change depends on echo time,
then use simulations to build two models that tedana fits to its components,
and finally follow the same ideas through tedana’s processing of a real multi-echo run.
How signal changes depend on echo time#
Recall the monoexponential decay model from Signal Decay, now written for volume \(t\):
Let \(\bar{S}_{0}\) and \(\bar{R}_{2}^{*}\) be the average values of \(S_{0}\) and \(R_{2}^{*}\) over the run, and let \({\Delta}S_{0}(t)\) and \({\Delta}R_{2}^{*}(t)\) be how far they are from those averages in volume \(t\). The average signal at each echo time is then \(\bar{S}(TE) = \bar{S}_{0} e^{-TE \cdot \bar{R}_{2}^{*}}\).
Real fluctuations in \(S_{0}\) and \(R_{2}^{*}\) are small, typically a few percent or less. When they are small, a first-order Taylor expansion of (8) gives a simple, linear approximation:
Subtracting \(\bar{S}(TE)\) and dividing by it gives the fractional signal change at each echo time:
This equation is the basis of multi-echo denoising. A change in \(S_{0}\) produces the same fractional change at every echo time. A change in \(R_{2}^{*}\), which is how the BOLD effect shows up, produces a fractional change that is zero at \(TE = 0\) and grows in proportion to the echo time.
The figure below shows both kinds of change for a voxel with \(\bar{S}_{0} = 16000\) and \(\bar{T}_{2}^{*} = 45\) ms, a typical value for gray matter at 3T. In the left column, \(S_{0}\) increases by 5%. In the right column, \(T_{2}^{*}\) increases by 5%, as it would when local blood oxygenation increases.
Fig. 22 How a 5% increase in \(S_{0}\) (left) or \(T_{2}^{*}\) (right) changes the signal at each echo time. Top: the average signal and the signal after the change. Middle: the absolute signal change. Bottom: the percent signal change, computed exactly (thick line) and with the first-order approximation in (10) (dashed line).#
There are a few things to notice in this figure.
Top row: realistic changes are small, so the curves before and after the change nearly overlap.
Middle row: the absolute changes differ in shape. The \(S_{0}\) change is largest at \(TE = 0\) and shrinks as the signal decays. The \(T_{2}^{*}\) change is zero at \(TE = 0\), peaks near \(TE = T_{2}^{*}\), and then shrinks. This peak is why single-echo fMRI uses an echo time close to the typical \(T_{2}^{*}\) of gray matter, and why the optimal combination weights echoes by \(TE \cdot e^{-TE / T_{2}^{*}}\) (see Optimal combination with t2smap).
Bottom row: the percent signal change makes the difference obvious. The \(S_{0}\) change is 5% at every echo time, while the \(T_{2}^{*}\) change grows in proportion to the echo time, following a straight line through the origin. The first-order approximation (dashed) is very close to the exact change, because the change is small.
The TE-dependence and TE-independence models#
In real data, we never observe \({\Delta}S_{0}\) and \({\Delta}R_{2}^{*}\) directly. What we can measure is how large a given fluctuation is at each of our echo times, \({\Delta}S(TE_k)\), where \(TE_k\) is the \(k\)-th of our \(n\) echo times. Multiplying (10) by \(\bar{S}(TE_k)\) gives two candidate explanations for those measurements.
If the fluctuation comes from a change in \(S_{0}\), then
If the fluctuation comes from a change in \(R_{2}^{*}\), then
The first is called the TE-independence (or \(S_{0}\)) model, because the fractional change does not depend on echo time, and the second is called the TE-dependence (or \(R_{2}^{*}\)) model. Each model is a regression with a single regressor and no intercept. The regressor is known: it is built from the average signal at each echo, \(\bar{S}(TE_k)\), and the echo times themselves. The coefficient, \(X_{S_0}\) or \(X_{R_2^*}\), is unknown, and is estimated with least squares.
To measure how well each model fits, tedana computes an F-statistic,
where \(SSE\) is the sum of squared residuals of the model fit. The better the model explains the measurements, the smaller \(SSE\) is and the larger \(F\) is.
Below, we fit both models to the two simulated changes from Fig. 22, measured at the five echo times of our real data, with a small amount of random noise added to each measurement.
Fig. 23 The TE-independence (\(S_{0}\), red) and TE-dependence (\(R_{2}^{*}\), blue) models fit to a simulated change in \(S_{0}\) (left) and in \(T_{2}^{*}\) (right), measured at five echo times with added noise. The legend gives each model’s F-statistic.#
Each model fits the change it was built for and fails on the other one. For the \(S_{0}\) change, the \(S_{0}\) model has \(F\) ≈ 789 and the \(R_{2}^{*}\) model has \(F\) ≈ 6. For the \(T_{2}^{*}\) change, the \(R_{2}^{*}\) model has \(F\) ≈ 1162 and the \(S_{0}\) model has \(F\) ≈ 6.
Applying the models to components#
In real data, we cannot apply the models to each volume separately,
because each volume contains many fluctuations at once, along with thermal noise.
Instead, tedana applies them to components.
Each component has a time series, and regressing that time series on the data from each echo
gives a parameter estimate, \(PE(TE_k)\), in each voxel.
The parameter estimate is how much the signal at \(TE_k\) changes for each unit of the component,
so it plays the role of \({\Delta}S(TE_k)\) in (11) and (12):
Both models are fit in every voxel, which gives a map of F-statistics for each model.
tedana summarizes each map with a weighted average across voxels,
giving more weight to the voxels where the component is strongest.
The summary of the \(R_{2}^{*}\) model is called \(\kappa\) (kappa), and the summary of the \(S_{0}\) model is called \(\rho\) (rho).
Components with a high \(\kappa\) and a low \(\rho\) look like BOLD signal,
and components with a high \(\rho\) and a low \(\kappa\) look like non-BOLD noise.
To see how this works, we simulate 300 volumes of a single voxel at our five echo times. The \(T_{2}^{*}\) time series is a series of blocks of activity, convolved with a hemodynamic response function, so it looks like a BOLD response to a task. The \(S_{0}\) time series is a slow drift with a few abrupt jumps, like the effects of head motion. Both fluctuate by about 5%, and we add a small amount of thermal noise to the signal at each echo.
Fig. 24 Simulated \(T_{2}^{*}\) (blue) and \(S_{0}\) (red) fluctuations, each converted to z-scores.#
Fig. 25 The simulated signal at each echo time. Each time series is scaled separately. The slow \(S_{0}\) drift and abrupt \(S_{0}\) jumps appear at every echo time, while the block-shaped \(T_{2}^{*}\) responses become more prominent at later echo times, because the fractional \(T_{2}^{*}\) effect grows with echo time.#
Now we build three components from these time series: one that follows the \(T_{2}^{*}\) fluctuations only, one that follows the \(S_{0}\) fluctuations only, and one that is an equal mixture of the two. For each component, we regress its time series on the signal at each echo to get \(PE(TE_k)\), and then fit the two models.
Fig. 26 Parameter estimates (gray) and the fits of the \(R_{2}^{*}\) (blue) and \(S_{0}\) (red) models for three simulated components.#
For the pure \(T_{2}^{*}\) component, the parameter estimates follow the \(R_{2}^{*}\) model closely,
and \(\kappa\) (951) is much larger than \(\rho\) (5).
For the pure \(S_{0}\) component, the opposite is true:
\(\rho\) is 7604 and \(\kappa\) is 6.
For the equal mixture, neither model fits well, and \(\kappa\) (26)
and \(\rho\) (50) are much closer together.
Real components often fall somewhere between these extremes,
which is why tedana classifies components with a decision tree that uses several metrics, not only \(\kappa\) and \(\rho\).
The values of \(\kappa\) and \(\rho\) depend on the number of echoes, the noise level, and the number of voxels, so they are only meaningful relative to other components from the same data, not as absolute thresholds.
TE-dependence in real data with tedana#
So far, we have worked with simulated signals.
In this section, we follow the same ideas through tedana’s processing of the five-echo resting-state run used throughout this book,
from the raw echoes to the denoised data.
The tedana outputs come from Multi-Echo Denoising with tedana.
To keep the figures readable, we focus on a single voxel:
the voxel with the highest weight on the most BOLD-like accepted component.
The adaptive mask#
Longer echo times are more susceptible to signal dropout,
which means that certain brain regions (e.g., orbitofrontal cortex, temporal poles) only have good signal for some echoes.
To avoid using bad signal from the affected echoes when it estimates \(T_{2}^{*}\) and \(S_{0}\),
tedana generates an adaptive mask, where the value for each voxel is the number of echoes with “good” signal.
Each voxel’s \(T_{2}^{*}\) and \(S_{0}\) are then estimated from only its first \(n\) echoes,
where \(n\) is the value for that voxel in the adaptive mask,
using the log-linear fit described in Signal Decay.
Fig. 27 tedana’s adaptive mask, which counts the echoes with good signal in each voxel.
Voxels in ventral frontal and temporal cortex, near the sinuses and ear canals,
have good signal in fewer echoes than the rest of the brain.#
Optimal combination#
Next, tedana combines the echoes into a single time series in each voxel,
using a weighted average in which each echo’s weight is proportional to its expected BOLD sensitivity,
\(TE_{n} e^{-TE_{n} / T_{2}^{*}}\).
The weights depend on the voxel’s own \(T_{2}^{*}\),
so echoes near the voxel’s \(T_{2}^{*}\) get the most weight.
Optimal combination with t2smap describes the optimal combination in more detail.
Fig. 28 Optimal combination in a single voxel. Left: the weight of each echo, which peaks at the echo time closest to the voxel’s \(T_{2}^{*}\). Right: the time series of each echo and the optimally combined time series (red). Each time series is scaled separately, so the y-axes are not comparable.#
Why use a decomposition?#
The optimally combined data still contain both BOLD and non-BOLD fluctuations.
In principle, we could separate them by fitting \(S_{0}\) and \(T_{2}^{*}\) to every volume
(see Volume-wise T2*/S0 estimation with t2smap),
but with only a handful of echoes per volume, thermal noise makes the volume-wise estimates very noisy.
Instead, tedana decomposes the optimally combined data into components,
each with a time series and a spatial map.
The TE-dependence of a component is then estimated from all of the volumes at once,
and evaluated across all of the voxels where the component is present,
which makes it far more reliable than the TE-dependence of any single volume.
Principal component analysis#
First, the optimally combined data are decomposed with principal component analysis (PCA),
and components that look like noise are discarded.
tedana offers several ways to choose the components to keep,
including model-selection criteria such as the Akaike information criterion,
a decision tree based on the TE-dependence metrics described below,
and a threshold on the variance explained.
Fig. 29 Time series of the first three PCA components.#
The retained components are then recombined into a dimensionally reduced version of the optimally combined data, which keeps most of the structured signal but less of the random noise.
Independent component analysis#
The dimensionally reduced data are then decomposed with independent component analysis (ICA).
The number of ICA components is set to the number of components retained by the PCA,
in order to reflect the true dimensionality of the data.
ICA produces a mixing matrix, which contains a time series for each component.
Below are the time series of two components that tedana classified very differently:
the accepted component with the highest \(\kappa\) and the rejected component with the highest \(\rho\).
Fig. 30 Time series of a BOLD-like (accepted) component and a non-BOLD-like (rejected) ICA component.#
The accepted component fluctuates slowly throughout the run, as we would expect from BOLD signal. Most of the rejected component’s variance is in the first few volumes. This pattern is typical of the start of a run, before the magnetization has reached a steady state and the signal is brighter at every echo. That kind of change affects \(S_{0}\) rather than \(T_{2}^{*}\), which fits this component’s high \(\rho\).
Fitting the TE-(in)dependence models to components#
As in the simulation above, tedana regresses each component’s time series on the data from each echo
and fits (14) and (15) to the resulting parameter estimates in every voxel.
The figure below shows the parameter estimates and model predictions in a single voxel for the two example components,
in the voxel where each component has its highest weight.
For the accepted component, the parameter estimates grow with echo time and closely follow the \(R_{2}^{*}\) model.
For the rejected component, they do not grow with echo time,
so the \(R_{2}^{*}\) model fits them poorly and the \(S_{0}\) model fits them better.
Real components are rarely as clean as the pure simulated components above:
even the accepted component is not fit perfectly by either model,
which is why \(\kappa\) and \(\rho\) are summarized across many voxels.
Fig. 31 Echo-wise parameter estimates (gray) and the predictions of the \(R_{2}^{*}\) (blue) and \(S_{0}\) (red) models for the accepted and rejected example components, each in the voxel where the component has its highest weight.#
Component selection and multi-echo denoising#
A decision tree uses \(\kappa\), \(\rho\), and other metrics to classify each component as BOLD-like (accepted) or non-BOLD-like (rejected).
tedana then produces two main denoised datasets:
The MEDN data are the optimally combined data with the rejected components regressed out. They keep the accepted components, as well as any variance that was not explained by the ICA.
The MEHK data are built from the accepted components alone, so they also lose the variance that was not explained by the ICA.
Fig. 32 Time series of the optimally combined, denoised (MEDN), and high-kappa (MEHK) data in our voxel.#
Post-processing to remove spatially diffuse noise#
Spatial ICA looks for components whose maps are spatially independent of one another.
That works well for noise that is localized, such as motion artifacts at the edges of the brain or pulsation near large vessels,
but noise that is spread out across the whole brain, such as fluctuations related to respiration,
overlaps with every other component’s map and does not separate cleanly into components of its own.
One of several post-processing strategies may be applied to the MEDN or MEHK data to remove this spatially diffuse noise.
Methods that have been used in the past include global signal regression (GSR),
minimum image regression (MIR), anatomical CompCor,
Go Decomposition (GODEC), and robust PCA.
tedana implements GSR and MIR (the gscontrol option), and they work at different stages of the pipeline.
tedana’s version of GSR is applied before the decomposition,
to the optimally combined data and to each echo.
Rather than averaging the signal across the brain, as standard GSR does,
it removes slow drifts from the optimally combined data and takes the minimum of each voxel’s time series,
which gives a spatial map of the global signal.
It then estimates the time course of that map by regression
and regresses the time course out of the optimally combined data and each echo.
MIR is applied after the decomposition, to the MEDN and MEHK data,
and it estimates the global signal from the BOLD-like (accepted) components only.
tedana’s documentation notes that the benefits and drawbacks of both options are not yet clear.
Fig. 33 Time series of the MEDN and MEHK data in our voxel, before (gray) and after (black) minimum image regression.#
MIR estimates the global noise from the minimum, over time, of each voxel’s BOLD-like signal. This minimum image of the BOLD-like data tends to look like a \(T_{1}\)-weighted image, so the global fluctuation that MIR removes is called the “\(T_{1}\)-like effect.” The steps of minimum image regression are as follows.
Algorithm 1 (Minimum image regression)
Inputs
\(\mathbf{O}\) is the matrix of optimally combined (OC) data, of shape \(v \times t\), where \(v\) is the number of voxels in the brain mask and \(t\) is the number of timepoints in the scan.
\(\mathbf{M}\) is the mixing matrix from the ICA decomposition, of shape \(c \times t\), where \(c\) is the number of components.
\(W\) is the set of indices of all components in \(\mathbf{M}\): \(W = \{1, 2, 3, ..., c\}\)
\(N\) is the set of indices of all non-ignored components (i.e., all accepted or BOLD-like, and rejected or non-BOLD components) in \(\mathbf{M}\): \(N \in \mathbb{N}^k \text{ s.t. } 1 \leq k \leq c, N \subseteq W\)
\(A\) is the set of indices of all accepted (i.e., BOLD-like) components in \(\mathbf{M}\): \(A \in \mathbb{N}^l \text{ s.t. } 1 \leq l \leq k, A \subseteq N\)
Outputs
Multi-echo denoised data without the T1-like effect, referred to as \(\mathbf{D}\) or MEDN+MIR.
Multi-echo BOLD-like data without the T1-like effect, referred to as \(\mathbf{H}\) or MEHK+MIR.
ICA mixing matrix with the T1-like effect removed from component time series (\(\mathbf{K}\)).
Map of the T1-like effect (\(\mathbf{m}\))
Algorithm
The voxel-wise means (\(\mathbf{\overline{O}} \in \mathbb{R}^{v}\)) and standard deviations (\(\mathbf{\sigma_{O}} \in \mathbb{R}^{v}\)) of the optimally combined data are computed over time.
The optimally combined data are z-normalized over time (\(\mathbf{O_z} \in \mathbb{R}^{v \times t}\)).
The normalized optimally combined data matrix (\(\mathbf{O_z}\)) is regressed on the ICA mixing matrix (\(\mathbf{M} \in \mathbb{R}^{c \times t}\)) to construct component-wise parameter estimate maps (\(\mathbf{B} \in \mathbb{R}^{v \times c}\)).
\[ \mathbf{O_{z}} = \mathbf{B} \mathbf{M} + \mathbf{\epsilon}, \enspace \mathbf{\epsilon} \in \mathbb{R}^{v \times t} \]\(N\) is used to select rows from the mixing matrix \(\mathbf{M}\) and columns from the parameter estimate matrix \(\mathbf{B}\) that correspond to non-ignored (i.e., accepted and rejected) components, forming reduced matrices \(\mathbf{M}_N\) and \(\mathbf{B}_N\). The normalized time series matrix for the combined ignored components and variance left unexplained by the ICA decomposition is then computed by subtracting the matrix product of the non-ignored beta weight and mixing matrices from the normalized OC data time series (\(\mathbf{O_{z}}\)). The result is referred to as the normalized residuals time series matrix (\(\mathbf{R} \in \mathbb{R}^{v \times t}\)).
\[ \mathbf{R} = \mathbf{O_{z}} - \mathbf{B}_N \mathbf{M}_N, \enspace \mathbf{B}_N \in \mathbb{R}^{v \times |N|}, \enspace \mathbf{M}_N \in \mathbb{R}^{|N| \times t} \]We can likewise construct the normalized time series of BOLD-like components (\(\mathbf{P} \in \mathbb{R}^{v \times t}\)) by multiplying similarly reduced parameter estimate and mixing matrices composed of only the columns and rows, respectively, that are associated with the accepted components indexed in \(A\). The resulting time series matrix is similar to the MEHK data described above, except that the component time series have been normalized prior to reconstruction.
\[ \mathbf{P} = \mathbf{B}_A \mathbf{M}_A, \enspace \mathbf{B}_A \in \mathbb{R}^{v \times |A|}, \enspace \mathbf{M}_A \in \mathbb{R}^{|A| \times t} \]The map of the T1-like effect (\(\mathbf{m} \in \mathbb{R}^{v}\)) is constructed by taking the minimum across timepoints from the normalized MEHK time series (\(\mathbf{P}\)) and then mean-centering across brain voxels. Let \(J = \{1, ..., t\}\) denote the indices of the columns of matrix \(\mathbf{P}\), and let \(p_{ij}\) denote the value of the element \(\mathbf{P}[i,j]\).
\[ \mathbf{q_{i}} = \min_{j\in{J}}p_{ij} \quad \forall i = 1,...,v \]\[ \mathbf{m} = \mathbf{q} - \mathbf{\overline{q}}, \enspace \mathbf{q} \in \mathbb{R}^{v} \]The standardized optimally combined time series matrix (\(\mathbf{O_z}\)) is regressed on the T1-like effect map (\(\mathbf{m}\)) to estimate the volume-wise global signal time series (\(\mathbf{g} \in \mathbb{R}^t\)).
\[ \mathbf{O_{z}} = \mathbf{m} \otimes \mathbf{g} + \mathbf{\epsilon}, \enspace \mathbf{\epsilon} \in \mathbb{R}^{v \times t} \]Where \(\otimes\) is the outer product.
The normalized BOLD time series matrix (\(\mathbf{P}\)) is then regressed on this global signal time series (\(\mathbf{g}\)) in order to estimate a global signal map (\(\mathbf{s} \in \mathbb{R}^v\)) and the normalized BOLD time series matrix without the T1-like effect (\(\mathbf{E} \in \mathbb{R}^{v \times t}\)).
\[ \mathbf{P} = \mathbf{s} \otimes \mathbf{g} + \mathbf{E} \]The time series matrix of BOLD-like components without the T1-like effect (MEHK+MIR, \(\mathbf{H} \in \mathbb{R}^{v \times t}\)), scaled to match the original OC time series matrix, is constructed by multiplying each column of \(\mathbf{E}\) by the vector \(\mathbf{\sigma_{O}}\).
\[\begin{split} \mathbf{H} = \mathbf{E} \circ \underbrace{ \pmatrix{ \mathbf{{\sigma_{O}}_1} & \cdots & \mathbf{{\sigma_{O}}_1}\\ \vdots & \vdots & \vdots \\ \mathbf{{\sigma_{O}}_v} & \cdots & \mathbf{{\sigma_{O}}_v}\\ } }_{t} \end{split}\]Where \(\circ\) is the Hadamard product for element-wise multiplication of two matrices.
The ICA-denoised time series without the T1-like effect (MEDN+MIR, \(\mathbf{D} \in \mathbb{R}^{v \times t}\)) is constructed by adding the residuals time series (\(\mathbf{R}\)) to the normalized BOLD time series (\(\mathbf{E}\)), multiplying each column of the result by the vector \(\sigma_{O}\), and adding back in the voxel-wise mean of the OC time series (\(\mathbf{\overline{O}}\)).
\[\begin{split} \mathbf{D} = \mathbf{\overline{O}} + (\mathbf{E} + \mathbf{R}) \circ \underbrace{ \pmatrix{ \mathbf{{\sigma_{O}}_1} & \cdots & \mathbf{{\sigma_{O}}_1}\\ \vdots & \vdots & \vdots \\ \mathbf{{\sigma_{O}}_v} & \cdots & \mathbf{{\sigma_{O}}_v}\\ } }_{t} \end{split}\]The ICA mixing matrix without the T1-like effect is then derived by regressing the global signal time series \(\mathbf{g}\) from each component’s time series. Let \(\mathbf{r}\) be the vector of parameter estimates from these regressions (\(\mathbf{r} \in \mathbb{R}^{c}\)).
\[ \mathbf{M} = \mathbf{r} \otimes \mathbf{g} + \mathbf{K} \]\[ \mathbf{K} = \mathbf{M} - \mathbf{r} \otimes \mathbf{g} \]