Connectivity

Authors: Hossein Shahabi, Raymundo Cassani, Takfarinas Medani, François Tadel

Cognitive and perceptual functions are the result of coordinated activity of functionally specialized regions in the brain. Brain connectivity investigates how these different regions (or nodes) interact as a network, with the goal of having a better understanding of how the brain processes information. Depending on which connectivity characteristic is studied, a distinction is made between structural (fiber pathways), functional (non-directed statistical dependency) and effective (causal interaction) connectivity between regions. Effective connectivity is often referred as directed functional connectivity. In this tutorial we will see how to compute different connectivity metrics for non-directed and directed functional analyses in Brainstorm, first with simulated data and later with real data.

General considerations

Definitions

Connectivity analyses are commonly performed by computing a bivariate connectivity metric for all the possible pairs of time series or signals. The result of such approach can be presented as a connectivity graph (left image), where each signal is represented as a node, and the value of the connectivity metric is the value of the edge between the corresponding nodes. This graph representation becomes overwhelming when too many nodes are considered, as such, the connectivity graph can be represented with its connectivity matrix, aka adjacency matrix (right image).

cnx_graph_matrix.png

Sensors or sources: The signals used for the connectivity analysis can be derived from the sensor data (EEG/MEG signals) or from the reconstructed sources (voxels or scouts).

Directed and non-directed: The direction of the interaction between signals (as statistical causation) can be measured with directed metrics. However, this is not possible with non-directed metrics, as result, the connectivity metric "from Signal

latex error! exitcode was 2 (signal 0), transscript follows:

to Signal
latex error! exitcode was 2 (signal 0), transscript follows:

" is equal to the connectivity metric "from Signal
latex error! exitcode was 2 (signal 0), transscript follows:

to Signal
latex error! exitcode was 2 (signal 0), transscript follows:

".

Recording condition: Connectivity analyses can be performed on resting-state (spontaneous) and event-related (trials) recordings, the appropriate connectivity method depends on the recording condition.

Full network vs point-based connectivity: In full network, the connectivity metric is computed for all the possible node pairs in the network (N×N approach), and gives as result a detailed connectivity graph. Alternatively, point-based analysis is performed solely between one node (aka seed) and the rest of the nodes in the network (1×N approach), this approach is faster to compute and is more useful when you are interested in the connectivity of a specific sensor or source.

Temporal resolution: Connectivity analyses can be performed in two ways: static and dynamic. Time-varying networks can present the dynamics of brain networks. In contrast, the static graphs illustrate a general perspective of brain connectivity which is helpful in specific conditions. Users need to decide which type of network is more informative for their study.

Time-frequency transformation: Several connectivity metrics rely on the time-frequency representation of the signals, which is obtained with approaches such as the short-time Fourier transform, Hilbert transform, and Morlet wavelet.

Sensor-level

The different connectivity metrics can be computed with sensor or source data. However, sensor connectivity analyses present two important limitations:

  1. They are not interpretable, as the relation between the estimated connectivity and the underlying neuroanatomy is not straightforward.

  2. Sensor data is severely corrupted by effects of field spread and volume conduction. Due to these effects the activity of a single brain area could cause a spurious connectivity between MEG/EEG sensors.

Despite these limitations, sensor connectivity analyses are commonly used.

Source-level

One approach to reduce the negative impact of field spread on connectivity analyses is to perform them at the source level. In addition, source connectivity analyses are interpretable as neuroanatomy is considered. As consequence, findings in the source level can be easily used in group studies using a normalization / registration. Regardless of the data, sensors or sources, it is highly recommended to have a clear hypothesis to test before starting the connectivity analysis. Although sensor- and source-level connectivity analyses use different assumptions, the outcomes regarding the topology of the underlying networks should be consistent (Lai et al., 2018).

Full resolution

The number of sources can be in the order of tens of thousands, making the full network analyses (N×N) impractical. With 15000 vertices on the cortex surface, a correlation matrix on a constrained source model would be 15000x15000x8 bytes = 1.6Gb, and a coherence matrix with 50 frequency points on an unconstrained source model would be 45000X45000x50 = 754 Gb, multiplied by the numbers of trials and subjects in the experiment. Such computations must be considered carefully as they can crash computers and fill hard drives quickly.

Regions of interest

A possible strategy to reduce the dimensionality of the source space is to group the sources in regions of interests (ROIs), aka scouts in Brainstorm jargon. Therefore, the most critical step in performing a source-domain connectivity analysis is the definition of these ROIs, which is not a trivial procedure as it depends on the source estimation method, experimental task, and data available (Schhoffen and Gross, 2009). Common approaches found in the literature to select the ROIs for connectivity analysis are:

Being an exploratory analysis, the full-brain connectivity analysis can help to get a better understanding of the acquired data, and to develop hypotheses to test. However its outcomes should not be considered conclusive, as they may be the result of circular analysis (Kriegeskorte et al., 2009).

The optimal selection of ROIs to perform source connectivity analysis is still an open question.

Requirements

Please note that this is an advanced tutorial, it assumes that that you have already followed all the introduction tutorials. For readability, most of the interface details are omitted, you must be familiar with the Brainstorm software in order to reproduce the computations illustrated below.

This tutorial is mostly based on simulated data, and independent from the other tutorials. Only one part at the end uses the results of the introduction tutorials (auditory oddball dataset), in order to illustrate how to apply the connectivity processes to real MEG recordings.

Let's start by creating a new protocol in the Brainstorm database:

Simulated data

To compare different connectivity metrics, we use simulated data with known ground truth using a multivariate autoregressive (MVAR) model. This model consist in three signals in a way that:

Simulation process:

Process options:

Execution:

Credits:



Correlation

Correlation is a non-directed connectivity metric that can be used to show similarity, dependence or association among two random variables or signals. While this metric has been widely used in electrophysiology, it should not be considered the best technique to evaluate connectivity. Due to its nature, correlation fails to alleviate the problem of volume conduction and cannot explain the association in different frequency bands. However, it still can provide valuable information in case we deal with a few narrow-banded signals.

Process options

Result visualization

Display options:



Coherence

Coherency or complex coherence,

latex error! exitcode was 2 (signal 0), transscript follows:

, is a complex-valued metric that measures the linear relationship of two signals in the frequency domain. Its magnitude square coherence (MSC),
latex error! exitcode was 2 (signal 0), transscript follows:

, often referred to as coherence, measures the covariance of two signals in the frequency domain. For a pair of signals
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, with spectra
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, the MSC is defined as:

Two related measures, which alleviate the problem of volume conduction, are imaginary coherence (Nolte et al., 2004),

latex error! exitcode was 2 (signal 0), transscript follows:

, and the lagged coherence (Pascual-Maqui, 2007),
latex error! exitcode was 2 (signal 0), transscript follows:

, which are defined as:

where

latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

describe the imaginary and real parts of a complex number.

To calculate coherence values in Brainstorm, select the process.

Process options

Result visualization

Coherence is a function of frequency, as such, for each frequency point there is a connectivity graph and a connectivity matrix. Right-click on the coherence result file to see its display options:

Open the 3 representations. These representations are linked such as by clicking on the spectral representation of the coherence, we change the frequency that is displayed in the connectivity graph and matrix. This frequency can be also changed in the Time panel.

res_cohere1n_a.png

res_cohere1n_a2.png

res_cohere1n_b.png

res_cohere1n_c.png

In the same way, we can compute the other types of coherence. The figure below presents the spectra for the imaginary coherence (left) and the lagged coherence (right). Both, imaginary and lagged coherence aim to address the volume conduction problem, although they present small differences.

res_cohere1n_d.png

res_cohere1n_e.png



Granger causality

Granger causality (GC) is a method of directed functional connectivity, which is base on the Wiener-Granger causality methodology. GC is a measure of linear dependence, which tests whether the prediction of signal

latex error! exitcode was 2 (signal 0), transscript follows:

(using a linear autoregressive model) is improved by adding signal
latex error! exitcode was 2 (signal 0), transscript follows:

(also using a linear autoregressive model). If this is true, signal
latex error! exitcode was 2 (signal 0), transscript follows:

has a Granger causal effect on the first signal. In other words, independent information of the past of signal
latex error! exitcode was 2 (signal 0), transscript follows:

improves the prediction of signal
latex error! exitcode was 2 (signal 0), transscript follows:

obtained with the past of signal
latex error! exitcode was 2 (signal 0), transscript follows:

alone. GC is nonnegative, and zero when there is no Granger causality. As only the past of the signals is considered, the GC metric is directional. The term independent is emphasized because it creates some interesting properties for GC, such as, that it's invariant under rescaling of
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, as well as the addition of a multiple of
latex error! exitcode was 2 (signal 0), transscript follows:

to <<latex($$y(t)$$).
See Granger causality - mathematical background for a complete formulation of the method.

Despite the name, Granger causality indicates directionality but not true causality.
For example, if a variable

latex error! exitcode was 2 (signal 0), transscript follows:

is causing both
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, but with a smaller delay for
latex error! exitcode was 2 (signal 0), transscript follows:

than for
latex error! exitcode was 2 (signal 0), transscript follows:

, then the GC measure between
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

would show a non-zero GC for
latex error! exitcode was 2 (signal 0), transscript follows:

-->
latex error! exitcode was 2 (signal 0), transscript follows:

, even though
latex error! exitcode was 2 (signal 0), transscript follows:

is not truly causing
latex error! exitcode was 2 (signal 0), transscript follows:

(Bressler and Seth, 2011).

Process options

Result visualization

In the connectivity graph (left) the directionality is shown with an arrow head at the center for the arc connecting nodes. As GC metric is not symmetric, the connectivity matrix (right) is not symmetric. The upper right element of this matrix shows there is a signal flow from signal 1 to signal 3.

res_granger1n_a.png

res_granger1n_b.png



Spectral Granger causality

GC lacks of resolution in the frequency domain, as such, the spectral Granger causality was developed (Dhamala et al., 2008).

Process options

Result visualization

As with coherence, spectral GC can be plotted as a function of frequency. The plot below clearly shows a peak around 25 Hz for the interaction from signal 1 to signal 3, as expected.

res_spgranger1n.png

Envelope correlation

In the time-frequency tutorial the Morlet wavelets and Hilbert transform were introduced as methods to decompose signals in the time-frequency (TF) domain. The result of this TF transformation can be seen as a set of narrowband complex signals, which are analytic signals.

The analytic signal,

latex error! exitcode was 2 (signal 0), transscript follows:

, is a complex signal uniquely associated to a real signal,
latex error! exitcode was 2 (signal 0), transscript follows:

, that has been useful in signal processing due to its characteristics, more specifically, its module
latex error! exitcode was 2 (signal 0), transscript follows:

, and phase
latex error! exitcode was 2 (signal 0), transscript follows:

, correspond to the instantaneous amplitude (or envelope) and instantaneous phase of the associated real signal
latex error! exitcode was 2 (signal 0), transscript follows:

. The real part of
latex error! exitcode was 2 (signal 0), transscript follows:

is its associated real signal
latex error! exitcode was 2 (signal 0), transscript follows:

, and the imaginary part is the Hilbert transform of the same real signal
latex error! exitcode was 2 (signal 0), transscript follows:

.

The instantaneous amplitude (or envelope) of these band analytic signals can be used to carry out pairwise connectivity analysis with metrics such as correlation and coherence (including lagged coherence).

In computing the envelope correlation, an optional step is to orthogonalize the envelopes by removing their real part of coherence before the correlation (Hipp et al., 2012). This orthogonalization process alleviates the effect of volume conduction in MEG/EEG signals.

Process options

Result visualization

Similar to the results from coherence and spectral Granger causality, the envelope correlation can be plotted as a function of frequency, and as a function of time if the Time resolution option is set to Dynamic. Below, the results obtained with the Hilbert transform (left) and with Morlet wavelet (right) for the first 5-s window (top) and the 5-s last window (bottom).

res_henv1n_h.png

First 5-s window

res_henv1n_w.png

res_henv1n_h2.png

Last 5-s window

res_henv1n_w2.png

Phase locking value

An alternative class of connectivity metrics considers only the relative instantaneous phase between the two signals, i.e., phase-locking or synchronization (Tass et al., 1998). Phase locking is a fundamental concept in dynamical systems that has been used in control systems (the phase-locked loop) and in the analysis of nonlinear, chaotic and non-stationary systems. Since the brain is a nonlinear dynamical system, phase locking is an appropriate approach to quantifying connectivity. A more pragmatic argument for its use in studies of LFPs, EEG, and MEG is that it is robust to fluctuations in amplitude that may contain less information about interactions than does the relative phase (Lachaux et al., 1999; Mormann et al., 2000).

The most commonly used phase connectivity metric is the phase-locking value (PLV), which is defined as the length of the average vector of many unit vectors whose phase angle corresponds to the phase difference between two signals (Tass et al., 1998). If the distribution of the phase difference between the two signals is uniform, the length of such an average vector will be zero. Conversely, if the phases of the two signals are strongly coupled, the length of the average vector will approach unity. For event-related studies, we would expect the phase difference across trials to be uniform distributed unless the phase is locked to the stimulus. In that case, we may have nonuniform marginals which could in principle lead to indications of phase locking between two signals. Considering a pair of narrow-band analytic signals

latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, obtained from the TF transformation using the Hilbert transform:

latex error! exitcode was 2 (signal 0), transscript follows:

with:

latex error! exitcode was 2 (signal 0), transscript follows:

plv.png

Process options

Result visualization

PLV is frequency resolved, and it was computed for the delta, theta, alpha, beta and gamma bands. With the simulated data, we expect a higher PLV value in the beta band (15 to 29 Hz), between signal 1 and signal 3. This result is seen as a peak at 22 Hz (center of beta band) shown in PLV as a function of frequency.

res_plv1n.png

Phase transfer entropy

Phase transfer entropy (PTE) is a directed connectivity metric that quantifies the transfer entropy (TE) between two instantaneous phase time series (Lobier et al., 2014). Similar to GC, TE estimates whether including the past of both source and target time-series influences the ability to predict the future of the target time-series. In PTE, if a phase signal

latex error! exitcode was 2 (signal 0), transscript follows:

causes the signal
latex error! exitcode was 2 (signal 0), transscript follows:

, the mutual information, between
latex error! exitcode was 2 (signal 0), transscript follows:

and the past of
latex error! exitcode was 2 (signal 0), transscript follows:

i.e.
latex error! exitcode was 2 (signal 0), transscript follows:

is larger than the mutual information of
latex error! exitcode was 2 (signal 0), transscript follows:

, the past of
latex error! exitcode was 2 (signal 0), transscript follows:

i.e.
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

. This relationship can be seen on the Venn diagram below, where
latex error! exitcode was 2 (signal 0), transscript follows:

and
latex error! exitcode was 2 (signal 0), transscript follows:

, indicate mutual information and the individual entropies respectively. Lastly, PTE cannot be negative, and its magnitude does not have a meaningful upper bound.

pte.png

Process options

Result visualization

PTE was computed for the delta, theta, alpha, beta and gamma bands. With the simulated data, we expect a higher PTE value in the beta band, From signal 1 To signal 3, as PTE is directed metric. This is confirmed with a peak at 22 Hz (center of beta band) shown in PTE frequency representation.

res_pte1n.png .

Method selection and comparison

The following table list the available connectivity metrics in Brainstorm and their description.

Metric

Directionality

Domain

1×N

N×N

Time resolved

Process

Info

Correlation

Non-directed

Time

✅

✅

✅

bst_corrn.m

Link

Coherence

Non-directed

Frequency

✅

✅

✅

bst_cohn.m

Link

Granger causality

Directed

Time

✅

✅

❌

bst_granger.m

Link

Spectral Granger causality

Directed

Frequency

✅

✅

❌

bst_granger_spectral.m

Link

Envelope Correlation (2020)

Non-directed

T-F

✅

✅

✅

bst_henv.m

Link

Phase locking value

Non-directed

Phase

✅

✅

❌

bst_connectivity.m

Link

Phase transfer entropy

Directed

Phase

❌

✅

❌

PhaseTE_MF.m

Link

Real data: Auditory dataset [TODO]

In this section we will use the results obtained in the introduction tutorials. The goal here is only to illustrate the interface of these tools on real data, as the results are not particularly interesting. The corticomuscular coherence tutorial provides more complete and meaninful guidelines for computing connectivity measures on real MEG recordings.

Let's go back to our auditory oddball dataset, available in the protocol TutorialIntroduction if you have followed the introduction tutorials. As the stimulus is played on both ears, we expect to observe highly correlated activity in the primary auditory cortices, in both experimental conditions (standard and deviant beeps), around 0 to 150 ms after the stimulus due to auditory evoked responses at 50 and 100 ms (M50, M100).

---

TODO:

In the rest of this section, correlation is computed on the scouts time series of the average response for the standard and deviant conditions. On practice connectivity metrics are computed trial-wise and the results are aggregated. An example of this approach can be seen in the corticomuscular coherence tutorial.

In the Scouts tutorial, we have created 4 scouts for these regions of interest: A1L and A1R for the left and right primary cortices respectively, IFGL for the left inferior frontal gyrus, and M1L for the left primary motor cortex.

scouts_avg_rel.png

Let's compute source-domain correlation for standard and deviant conditions for the Run #1: S01_AEF_20131218_01_600Hz_notch data.

  1. Drag and drop the source files associated to the average standard response (Avg: standard (193 files)) and the average deviant response (Avg: deviant (193 files)) within the Process1 tab, select the option 'source process' ( https://neuroimage.usc.edu/moin_static198/brainstorm1/img/iconResultList.gif ), and click on the [Run] button.

  2. Add a the process, Connectivity > Correlation NxN. Set the time window from 0 to 150 ms. Check the Use scouts option, and select User scouts as atlas in the drop menu. Set the Scout function to Mean, for When to apply the scout function select Before. And select Save individual results (one file per input). Finally click on [Run].

  3. Display the connectivity matrices as Image (top) and as Graph (bottom). Adjust the colormaps to show signed values (no absolute), and set the a custom range from -0.8 to 0.8. Lastly, adjust the Intensity threshold for the graph to the maximum (around 0.7), so only the strongest correlations are kept, mainly, between scouts in the left and right auditory cortices.

Standard

Deviant

corr_0_150_std_intro.png

corr_0_150_dev_intro.png

corrg_0_150_std_intro.png

corrg_0_150_dev_intro.png

In this early response period, we appreciate that the correlation matrices for the standard ann deviant response are quite similar, and the strongest correlation happens between the scouts on the primary auditory cortices; just as expected.

Unconstrained sources [TODO]

Statistics [TODO]

Computing statistical thresholding of the connectivity matrices using non-parametric tests

TODO

On the hard drive

The connectivity files are extension of the time-frequency failes, therefore their file names start with timefreq_, followed by connect1 (1xN) or connectn (NxN or AxB), the connectivity method and a time stamp. Example: timefreq_connectn_corr_220120_1350.mat.

Right click on of the first connectivity file computed here > File > View file contents.

The data structure is the same as for the time-frequency files. Only the fields that some specificity related with the connectivity analysis are documented here.

Additional documentation

Articles

Forum discussions








Feedback on the documentation (typos, unclear sections, missing information)
For questions, bug reports, and feature requests, please use the Brainstorm Forum.
Email address (if you expect an answer):


Tutorials/Connectivity (last edited 2022-01-22 11:03:12 by FrancoisTadel)