Warning: The developments described below have been abandonned. Please refer to the source estimation tutorial.

...

Beamforming methods

Authors: Hui-Ling Chan, Francois Tadel, Sylvain Baillet

The estimation of source distribution is an important step to understand the brain activity from EEG and MEG data. Dipole fitting, minimum norm estimation and beamformer are three commonly used methods. It has been proved that beamforming methods provide good spatial resolution. This tutorial will show how to apply beamforming methods to MEG data and obtain the statistic map of source activation.

IMPORTANT: The LCMV beamformer is now part of the main Brainstorm distribution. We recommend you refer instead to the new documentation in the introduction tutorials: Source estimation.

Installation

This tutorial requires you download the two processes below and copy them to your personal process folder ($HOME/.brainstorm/process):

Introduction

Beamforming methods scan each targeted source position $\bf r$ and estimate the spatial filter ${\bf w}_{\bf r,q}$. By multiplying with the MEG recordings ${\bf m}(t)$, the spatial filter ${\bf w}_{\bf r,q}$ outputs the temporal waveform $y_{\bf r,q}(t)$ of the dipole source at that position with the dipole orientation $\bf q$ as below:

$ y_{\bf r,\bf q}(t) = {{\bf w}_{\bf r,\bf q}}^{\rm T}{\bf m}(t)\enspace, $

where 'T' indicates the transpose of a matrix or vector. The beamforming spatial filter can be vector-type or scalar-type.

Vector-type beamformer

For each position $\mathbf{r}$, three orthogonal spatial filters $\mathbf{W}_{\mathbf{r}}=\left[\mathbf{w}_{\mathbf{r},\mathbf{q}_x},\mathbf{w}_{\mathbf{r},\mathbf{q}_y},\mathbf{w}_{\mathbf{r},\mathbf{q}_z}\right]$ are computed by applying the unit-gain constraint as well as the minimum norm and minimum variance criteria as below [Liu and Van Veen, 1992; Van Veen et al., 1997]:

$ \hat{\mathbf{W}}_{\mathbf r}=(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}\left(\mathbf{L}_\mathbf{r}^{\rm T}(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}\right)^{-1} \enspace,$

where ${\bf C}_{\rm s}$ is the covariance matrix of MEG recordings during window $T_{\rm_s}$, $\mathbf{I}$ is the identity matrix, $\mathbf{L}_{\mathbf{r}}$ is the gain matrix for the dipole located at position $\bf{r}$, and $\alpha$ is the regularization parameter which compromises the minimum norm and minimum variance criteria.

Scalar-type beamformer

For each position $\mathbf{r}$, the source orientation $\mathbf{q}$ is first estimated to enable the spatial filter to output the source activity with maximum power or fitting some other criteria. The dipole orientation can be obtained by exhaustive search, non-linear search [Robinson and Vrba, 1999], or analytical solution [Chen et al., 2006]. The estimated dipole orientation $\hat{\mathbf{q}}$ is then applied to calculate the spatial filter as follows [Robinson and Vrba, 1999]:

$ \hat{\mathbf{w}}_{\mathbf{r,q}}=(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}\hat{\bf{q}}\left(\hat{\bf q}^{\rm T}\mathbf{L}_\mathbf{r}^{\rm T}(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}\hat{\bf q}\right)^{-1} \enspace.$

LCMV beamformer

LCMV stands for linearly-constrained minimum variance. LCMV beamformer is vector-type beamformer [Van Veen et al., 1997]. For each position $\mathbf{r}$, this method calculates the neural activity index, which is interpreted as the estimate of source to noise variance.

Neural activity index

For each position $\mathbf{r}$, the variance of source activity during active state $T_{\rm a}$ is calculated as follows [Liu and Van Veen, 1992; Van Veen et al., 1997]:

$ \rm{Var}_{\rm a}(\bf r) =\rm{trace} \left \{{\bf W}_{\bf r}^{\rm T}{\bf C}_{\rm a}{\bf W}_{\bf r}\right \} \enspace, $

or

$ \rm{Var}_{\rm a}(\bf r) =\rm{trace} \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm a}^{-1}{\bf L}_{\bf r}]^{-1}\right \} \enspace, $

where ${\bf C}_{\rm a}$ is the covariance matrix computed from MEG recordings during active state $T_{\rm a}$. Alternatively, the variance of beamformer outpout along the dominant direction can be calculated by using the singular value decomposition [Gross et al., 2001]:

$ \rm{Var}_{\rm a}(\bf r) = \lambda_1 \left \{{\bf W}_{\bf r}^{\rm T}{\bf C}_{\rm a}{\bf W}_{\bf r}\right \}\enspace, $

or

$ \rm{Var}_{\rm a}(\bf r) =\lambda_1 \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm a}^{-1}{\bf L}_{\bf r}]^{-1}\right \} \enspace, $

where $\lambda_1\{\}$ indicates the maximum eigenvalue of the expression in braces.

When the location $\mathbf{r}$ is far from sensors, the elements of lead field matrix $\mathbf{L}_{\bf r}$ are small. So the elements of $\mathbf{W}_{\bf r}$ are generally large and the estimated variance for the deep source becomes large. When the location $\mathbf{r}$ is close to sensors, the elements of lead field matrix $\mathbf{L}_{\bf r}$ are large. It results in small values of the elements of $\mathbf{W}_{\bf r}$ and small estimated variance for the superficial source. To reduce the effect caused by the depth of source location, the estimated source variance $\rm{Var}_{\rm a}(\bf r)$ is normalized by the noise variance $\rm{Var}_{\rm c}(\bf r)$ as follows:

$ \rm{Var}_{\rm N}(\bf r) =\rm{trace} \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm a}^{-1}{\bf L}_{\bf r}]^{-1}\right \} / \rm{trace} \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm c}^{-1}{\bf L}_{\bf r}]^{-1}\right \}\enspace, $

or

$ \rm{Var}_{\rm N}(\bf r) =\lambda_1 \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm a}^{-1}{\bf L}_{\bf r}]^{-1}\right \} / \lambda_1 \left \{[{\bf L}_{\bf r}^{\rm T}{\bf C}_{\rm c}^{-1}{\bf L}_{\bf r}]^{-1}\right \}\enspace, $

where ${\bf C}_{\rm c}$ is the covariance matrix computed from MEG recordings during control state $T_{\rm c}$. The normalized variance $ \rm{Var}_{\rm N}(\bf r)$ is called neural activity index (NAI). In the Brainstorm, the noise covariance will be used as the covariance matrix for control state. Please refer to Tutorial 7: Noise covariance matrix for the details of noise covariance computation.

LCMV process

  1. Drag and drop all of the epochs in Subject01 / right / right | timeoffset (98 files) into Process1.

  2. Click on [RUN] and select the process "Sources > Beamformer: LCMV".
    Configure the options as follows:

    LCMV_options.png

  3. With this window you can select the method you want to use to estimate the source variance and noise variance, the time window of active state, the regularization parameter, and the sensors you are going to use for this estimation. You can edit the following options:

    • Comment: This field contains what is going to be displayed in the database explorer.

    • Method:

      • Unconstrained (max singular value): Calculates the variances of source activity and noise by using the maximum singular value.

      • Unconstrained (trace): Calculates the variances by using the trace.

      • Constrained (normal to cortex): The dipole orientation for each vertex is set to the normal vector to the cortex surface (not available for volume head models). This method may give less smooth results than the unconstrained methods.

    • Time window of active state: The neural activity index is computed using the source activity variance during the active state $T_a$.

    • Time range of interest: Total time period over which we want to calculate the neural activity index.

    • Active window size: Defines the duration of the active state. The active window is slided all along the time range of interest. A large active window size is recommended, at least larger than the number of sensors in number of time samples.

    • Temporal resolution: Defines the time lapse between two estimations of the neural activity index. If this "active size window" or "temporal resolution" are set to zero, the active window size is set to the entire time range of interest. The temporal resolution becomes irrelevant because only one neural activity index will be estimated. If there are multiple active state windows, the time label of the neural activity index will be set as the middle time of each active state window, that is, $t_1,t_2,t_3,\ldots,t_{N-1},t_{N}$ in the following figure. You are going to obtain the spatiotemporal dynamics of neural activity index bewteen $t_1$ and $t_N$.

      slidingwindow.png

    • Regularization parameter: This value will be multiplied with the maximum eigenvalue of the covariance matrix computed from the recordings during Time range of interest. A larger value of regularization parameter would give smoother results. Large regularization parameter value is more suitable for noisy data. When analyzing simulation data sets, the regularization parameter value can be reduced.

    • Sensors type: Modalities that are used for the reconstruction. Here we only have one type of MEG sensors, so nothing to change.

    • Save spatial filters: Check this option if you want to save the spatial filters. Checking this option if you want to observe the temporal profile of source or compute functional connectivity. Note that the amplitudes of these temporal profiles are not meaningful because the spatial filter is caluclated for one voxel at a time without the holistic consideration on whole brain activity. So, the amplitude of beamformer outpout can not represent the source amplitude and the relationship of the amplitude between each grid point is meaningless. However, the beamformer outpouts can further be used to calculate correlation or coherence between each region because these two estimations include the normalization of amplitude and thus the ampltidue of source waveforms doesn't effect the results.

  4. Two new files are available in the database explorer.

    • right: LCMV (Unconstr/svd, 5-296ms): This file saves the neural activity index for every dipole position.

      LCMV_results_list_svd_source.png

      Double click on this file. Right click on anywhere of the pop-out window. From the pop-out menu, select Colormap:Sources > Maximum: Custom.... Set Minimum to be 1.2 and Maximum to be 2.0. Click Ok.

      Colormaplimit.png

      Set the time to be anytime between 0 and 296 ms. Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 50% and Data options > Min Size to be 5.

      LCMV_right_NAImap.png

      The maps of neural activity index estimated using Unconstrained (max sigular value), Unconstrained (trace), and Constrained (normal to cortex) are shown from left to right. All maps display strong activations in the left primary somatosensory area (S1).

    • right: LCMV/filter (Unconstr/svd, 5-296ms): This file saves the three spatial filters along the x, y, and z directions for each dipole position. These spatial filters are normalized by the standard deviation of noise. Note that there is one spatial filter for each dipole location if the method Cortically Constrained (normal to cortex) is used.

      LCMV_results_list_svd_filter.png

  5. Explore spatiotemporal dynamics of anatomically constrained beamformer outputs in the right condition.

    DatabaseExploreRightAvgConstr.png

    Double click on this file. Set the time to be 15.8 ms, 30 ms, or 60 ms. Right click on anywhere of the pop-out window. From the pop-out menu, select Colormap:Sources > Maximum: Local.... Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 70% and Data options > Min Size to be 5.

    • 16 ms (left): left S1

    • 30 ms (middle): left S1

    • 60 ms (right): left S2

      LCMV_right_constr_16ms.png LCMV_right_constr_30ms.png LCMV_right_constr_60ms.png

    • 70 ms: bilateral S2

      Set the time to be 70 ms. Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 41% and Data options > Min Size to be 5.

      LCMV_right_constr_70ms.png

  6. Explore spatiotemporal dynamics of anatomically constrained beamformer outputs in the right condition.

    LCMV_left_Constr_filter.png

    Double click on this file. Set the time to be 20 ms, 30 ms, or 60 ms. Right click on anywhere of the pop-out window. From the pop-out menu, select Colormap:Sources > Maximum: Local.... Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 60% and Data options > Min Size to be 5.

    • 20 ms (left): right S1

    • 30 ms (middle): right S1

    • 60 ms (right): right S2

      LCMV_left_constr_20ms.png LCMV_left_constr_30ms.png LCMV_left_constr_60ms.png

    • 73.3 ms: bilateral S2. Set the time to be 73.3 ms. Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 45% and Data options > Min Size to be 5.

      LCMV_left_constr_73.3ms.png

Maximum constrast beamformer

Maximum constrast beamformer (MCB) is scalar-type beamformer [Chen et al., 2006]. For each position \bf r, it provides an analytical solution of dipole orientation \bf q, which maximizes the constrast of beamformer outputs between active state and control state as bellow:

$\hat{\bf q}=\arg \max_{\bf q} \rm{Var}_{\rm N}(\bf r) = \arg \max_{\bf q} \bf{w}_{\bf{r,q}}^{\rm T} {\bf C}_{\rm a} \bf{w}_{\bf{r,q}} \left(\bf{w}_{\bf{r,q}}^{\rm T} {\bf C}_{\rm c} \bf{w}_{\bf{r,q}} \right)^{-1}\enspace,$

where ${\bf C}_{\rm a}$ is the covariance matrix computed from the measurements during active state and ${\bf C}_{\rm c}$ is the covariance matrix computed from the measurements during control state.

Solution of dipole orientation

The solution of spatial filter can be rewritten as

$ \mathbf{w}_{\mathbf{r,q}}=(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}\bf{q}\left({\bf q}^{\rm T}\mathbf{L}_\mathbf{r}^{\rm T}(\mathbf{C}_{\rm s}+\alpha\mathbf{I})^{-1}\mathbf{L}_\mathbf{r}{\bf q}\right)^{-1} = {\bf A}_{\bf r}{\bf q}\left( {\bf q}^{\rm T}{\bf B_{r}q}\right)^{-1}\enspace,$

where both ${\bf A}_{\bf r}=({\bf C}_{\rm s}+\alpha {\bf I})^{-1}{\bf L_r}$ and ${\bf B}_{\bf r}={\bf L_r}^{\rm T}{\bf A}_{\bf r}$ depend only on the dipole location $\bf r$. Then the objective function for obtaining the dipole orientation \bf q can be rewritten as

$ \rm{Var}_{\rm N}(\bf r) = {\bf q}^{\rm T}{\bf A}_{\bf r}^{\rm T}{\bf C}_{\rm a}{\bf A}_{\bf r}{\bf q} \left({\bf q}^{\rm T}{\bf A}_{\bf r}^{\rm T}{\bf C}_{\rm c}{\bf A}_{\bf r}{\bf q} \right)^{-1}={\bf q}^{\rm T}{\bf P}_{\bf r}{\bf q} \left({\bf q}^{\rm T}{\bf Q}_{\bf r}{\bf q} \right)^{-1}\enspace,$

where both of the 3-by-3 matrices ${\bf P}_{\bf r} = {\bf A}_{\bf r}^{\rm T}{\bf C}_{\rm a}{\bf A}_{\bf r}$ and ${\bf Q}_{\bf r}={\bf A}_{\bf r}^{\rm T}{\bf C}_{\rm c}{\bf A}_{\bf r}$ does not depend on the dipole orientation $\bf q$. The solution of dipole orientation $\hat{\bf q}$ is the eigenvector corresponding to the maximum eigenvalue of the matrix ${\bf Q}_{\bf r}^{-1}{\bf P}_{\bf r}$.

Statistical mapping

After obtaining the dipole orientation $\hat{\bf{q}}$ and the spatial filter $\bf{\hat{w}_{r,q}}$ for dipole position \bf r, the F-statistic value at time $t$ can be obtained using the following formula:

${\rm F}({\bf r},t)=\hat{{\bf w}}_{\bf{r,q}}^{\rm T} {\bf C}_{T_t}\hat{\bf{w}}_{\bf{r,q}} \left(\hat{\bf{w}}_{\bf{r,q}}^{\rm T} {\bf C}_{\rm c} \hat{\bf{w}}_{\bf{r,q}} \right)^{-1} \enspace,$

where ${\bf C}_{T_t}=\sum_{T_t}{\|{\bf m}(t)-(\sum_{T_t}{{\bf m}(t)/N_{\rm T}}) \|^{2}}/(N_{\rm T}-1)$ is the covariance matrix computed from the measurements during window $T_t$, $N_{\rm T}$ is the size of $T_t$, and the range of $T_t$ is $t \pm 0.5N_{\rm T}$ . $T_t$ is a segment of active state $T_{\rm a}$. The meaning of F-statistic is the same as the normalized variance $\rm{Var}_{\rm N}(\bf r)$ used in LCMV beamforming method.

If the number of $N_{\rm T}$ is small, the peak of temporal dynamics of F-statistic value may shift. In this case, it is more appropriate to replace the covariance matrix ${\bf C}_{T_t}$ with

${\bf P}_{T_t}=\sum_{T_t}{\|{\bf m}(t)\|^{2}}/(N_T-1)\enspace,$

or

${\bf Z}_{T_t}=\sum_{T_t}{\|{\bf m}(t)-(\sum_{T_{\rm B}}{{\bf m}(t)/N_{\rm B}}) \|^{2}}/(N_{\rm T}-1)\enspace,$

where $T_{\rm B}$ represents the window of baseline and its size is $N_{\rm B}$. When ${\bf P}_{T_t}$ is used, the F-statistic value represents the estimate of source power to noise variance.

MCB process

  1. Drag and drop all of the epochs in Subject01 / right / right | timeoffset (98 files) into Process1.

  2. Click on [RUN] and select the process "Sources > Maximum Contrast Beamformer".

    MCBPipelineEditorFmap2.png

    With this window you can select the dipole orientation you want to use, the time window of active state, the window size you are going to use for the computation of F-statistics, the regularization parameter, and the sensors you are going to use for this estimation. You can edit the following options:

    • Comment: This field contains what is going to be displayed in the database explorer.

    • Dipole orientation: Please select Unconstrained, which calculates the dipole orientation using the maximum contrast criterion. The method Constrained (normal to cortex) uses the orientation of cortical surface as dipole orientation. Note that the method Constrained (normal to cortex) is only available when the Head Model provides the orientation for each grid location. The unconstrained method may give more smooth results than the cortically constrained method.

    • Time windows: Three parameters have to be set: Time range of active window, F statistic window size, and Temporal resolution. The dipole orientation and spatial filter is estimated using the variance of source activity during active state $T_a$. F-statistic window size defines the length of the window for the computation of F-statistics, that is, $N_{\rm T}$. The time window for computing F-statistics is going to be slided in Time range of active state with the interval set to be Temporal resolution. If there are more than one F-statistic windows, the time label of the F statistics will be set as the middle time of each window, that is, $t_1,t_2,t_3,\ldots,t_{N-1},t_{N}$ in the following figure. And you will obtain the spatiotemporal F-statistics bewteen $t_1$ and $t_N$.

      MCBSlidingWindow.png

    • Regularization parameter: This value will be multiplied with the maximum eigenvalue of the covariance matrix computed from the recordings during Time range of interest. The larger value of regularization parameter may give the more smooth results.

    • Sensors type: Modalities that are used for the reconstruction. Here we only have one type of MEG sensors, so nothing to change.

    • Method for F statistic computation: The default is set to be Variance (use user define baseline) / Variance to compute F-statistic values. The other two methods are Power / Variance and Variance / Variance. When the methiod Variance (use user defined baseline) / Variance is selected, the field of Baseline time window for F-ststistic calculation must be given. In this example, we set the baseline to be -104.2 to -10 ms.

  3. Click on [Run]. Two new files are available in the database explorer.
    • right:MCB: SpatilFilter(Unconstr)|0.0_295.8ms: This file saved the spatial filter for each grid point. The spatial filters are normalized using the standard deviation of beamformer outpouts during control state.

      MCBSF.png

    • right:MCB: F-statistics var(b)/var(Unconstr)|0.0_295.8ms: This file saved the F-statistic value for each grid point during 0-295.8 ms.

      MCBDatabaseExplorerFmaps.png

      Double click on this file. Set the time to be anytime between 0 and 295.8 ms. Then click Surface tab on the right panel of database explorer. Set Data options > Amplitude to be 95%.

      MCBFmaps3Methods.png

      From left to right, the figures display the F statistics computed using Power / Variance, Variance / Variance, and Variance (use user defined baseline) / Variance. The baseline used in this example was set to be -104.2 ~ -10 ms.

  4. Process Subject01 / left / left | timeoffset (101 files) using the same procedure.

    MCBFmapsleft.png

    From left to right, the figures display the F statistics computed using Power / Variance, Variance / Variance, and Variance (use user defined baseline) / Variance. The baseline used in this example was set to be -104.2 ~ -10 ms.

  5. Process Subject01 / right / right | timeoffset (98 files) using the following parameter values to obtain the spatiotemporal dynamics of F-statistics.

    MCBPipelineEditorFDynamics2.png

    Two new files are available in Database explorer:

    • right:MCB: SpatilFilter(Unconstr)|0.0_295.8ms: This file saves the spatial filter for each grid points. The filename shows the time range used to compute spatial filters, that is, 0.0 to 295.8 ms in this case.

    • right:MCB: F-statistics var(b)/var(Unconstr)|10.0_290.0ms(ws:20.0ms,tr:10.0ms,bs:-104.2_-10.0ms): This file saved the spatiotemporal dynamics of F-statistics between 10.0 and 290.0 ms. The abbreviations for F-statistics window size, temporal resolution, and baseline is ws, tr, and bs. Click on this file. Choose Surface tab and set Data options > Amplitude to be 50%. Right click on the pop-out window. Select Snapshot > Time contact sheet: Figure.

      MCBSnapshotSettting.png

      In this window, set Start time (ms) to be 10, End time (ms) to be 290, and Number of snapshots to be 29. Click on Ok. You will obtain the following figures.

      MCBFdynamicsRight.png

      These figures display the F-statistics maps between 10 ms and 290 ms with 10-ms time interval. The baseline used in this example is set to be -104.2 ~ -10 ms.

  6. Process "Subject01 / left / left | timeoffset (101 files)" with the same parameter values used in the previous step to obtain the spatiotemporal dynamics of F-statistics.

    MCBFdynamicsLeft.png

References

  1. Liu TC and Van Veen BD, (1992)
    Multiple window based minimum variance spectrum estimation for multidimensional random fields
    IEEE Transactions on Signal Processing, 40(3): 578-589

  2. Van Veen BD, Van Drongelen W, Yuchtman M, Suzuki A (1997)
    Localization of brain electrical activity via linearly constrained minimum variance spatial filtering
    IEEE Transactions on Biomedical Engineering 44(9): 867-880.

  3. Gross J, Kujala J, Hamalainen M, Timmermann L, Schnitzler A, Salmelin R (2001)
    Dynamic imaging of coherent sources: Studying neural interactions in the human brain
    Proc Natl Acad Sci U S A 98(2): 694-699.

  4. Robinson SE and Vrba J (1999)
    Functional neuroimaging by synthetic aperture magnetometry
    Recent Advances in Biomagnetism. Tohoku University Press 1999: 302-305.

  5. Chen YS, Cheng CY, Hsieh JC, Chen LF (2006)
    Maximum contrast beamformer for electromagnetic mapping of brain activity
    IEEE Transactions on Biomedical Engineering 53(9): 1765-1774.





Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


Tutorials/Beamformers (last edited 2019-04-03 17:55:59 by FrancoisTadel)