Coherence-based connectivity

Introduction

Definition

Coherence is a measure of functional connectivity between two signals based on the consistency of their phase and amplitude relationships across time or trials. It is commonly used in neuroscience and signal processing to analyse oscillatory interactions between brain regions, usually using EEG, MEG or LFP signals.

Key concept

Two signals are considered to be coherent if they maintain a consistent phase relationship across a specific frequency range while also exhibiting correlated amplitude fluctuations. This means that not only do their oscillations stay phase-locked to some degree, but their power dynamics are also related. This suggests a functional interaction between the underlying sources that generate these signals.

Example: Computing the Coherence (Coh)

Let us assume two noisy oscillating signals \(S_1\) and \(S_2\) of amplitudes \(A_1\) and \(A_2\), frequencies \(f_1\) and \(f_2\), and phase shifts \(\theta_1\) and \(\theta_2\), respectively. These signals are written as: $$S_1(t) = A_1(t)\cos(2\pi f_1t + \theta_1) + \epsilon_1(t), and$$ $$S_2(t) = A_2(t)\cos(2\pi f_2t + \theta_2) + \epsilon_2(t)$$ $$\epsilon_i \sim \mathcal{N}(0,\sigma^{2}).$$ \(f_1\), \(\theta_1\) are fixed, \(f_1 = 10\textrm{ Hz}, \theta_1=0\textrm{ rad}\), \(t\) is the time.
\(f_2\), \(\theta_2\) and \(\sigma\) are user defined.
As for the \(\text{PLV}\), we need to estimate a phase, but this time we also need an amplitude. Here we will again use the instantaneous phase given by their analytic signal (\(\widehat{S_1}\) and \(\widehat{S_2}\)). Note, however, that the coherence is generally presented as a spectral measure obtained with the phase of the Fourier transform. Both implementation are valid, but it highly depends on the context. Thanks to the Hilbert transform (\(\mathcal{H}(.)\)) and Euler's formula, we obtain: $$\widehat{S_1}(t)= S_1(t)+i\mathcal{H}(S_1(t)) = A(t)e^{i(2\pi f_1t + \theta_1)} + \widehat{\epsilon_1}(t),$$ $$\widehat{S_2}(t)= A(t)e^{i(2\pi f_2t + \theta_2)} + \widehat{\epsilon_2}(t).$$ The instantaneous phase is defined as: $$\phi_i(t)= 2\pi f_it + \theta_i,$$ $$\textrm{so }\widehat{S_i}(t)= A_i(t)e^{i\phi_i(t)} + \widehat{\epsilon_i}(t),$$ as \(\widehat{\epsilon_i}\) is also a complex, we can write again thanks to Euler's formula: $$\widehat{S_i}(t)= \tilde{A}(t)e^{i\tilde{\phi_i}(t)}$$ where \(\tilde{A}\) and \(\tilde{\phi_i}\) are the (noisy) estimation of \(A\) and \(\phi_i\). In other word, when the noise becomes null, \(\lim_{\sigma\to0} \tilde{A} = A\) and \(\lim_{\sigma\to0} \tilde{\phi_i} = \phi_i\). For simplicity of the notation we will only use \(A\) and \(\phi_i\).
The Coherence (Coh) measures the consistency of both phase and power correlations between two signals, ranging from 0 (no synchrony) to 1 (perfect synchrony)(Nunez et al., 1997). $$\text{Coh}(S_1,S_2) = \frac{\left| \sum_{t=1}^{N} \widehat{S_1}(t) \widehat{S_2}^{*}(t) \right|}{\sqrt{\sum_{t=1}^{N} \left| \widehat{S_1}(t) \right|^2 \sum_{t=1}^{N} \left| \widehat{S_2}(t) \right|^2}}$$ $$\text{Coh}(S_1,S_2) = \frac{\left| \sum_{t=1}^{N} A_1(t)e^{i\phi_1(t)} A_2(t)e^{-i\phi_2(t)} \right|}{\sqrt{\sum_{t=1}^{N} A_1^2(t) \sum_{t=1}^{N} A_2^2(t)}}$$ $$\text{Coh}(S_1,S_2) = \frac{\left| \sum_{t=1}^{N} A_1(t)A_2(t)e^{i\Delta\phi_{1,2}(t)} \right|}{\sqrt{\sum_{t=1}^{N} A_1^2(t) \sum_{t=1}^{N} A_2^2(t)}}$$
\(N\) is the total number of time points, \(\Delta\phi_{1,2}\) the phase difference, and \(\left| . \right|\)the absolute value. From the definition it is clear that the coherence is symmetrical or undirected, i.e. \(\text{Coh}(S_1,S_2) = \text{Coh}(S_2,S_1)\).
$$\Phi_{\text{Coh}}(S_1,S_2) = \arg \left( \frac{ \sum_{t=1}^{N} A_1(t)A_2^*(t)e^{i\Delta\phi_{1,2}(t)}}{\sqrt{\sum_{t=1}^{N} A_1^2(t) \sum_{t=1}^{N} A_2^2(t)}} \right)$$ \(\arg(.)\) is the argument function, which gives the phase angle of the complex mean phase difference.
\(\Phi_{\text{Coh}}\) represents the preferred phase difference. Note that \(\Phi_{\text{Coh}}(S_1,S_2) = -\Phi_{\text{Coh}}(S_2,S_1)\)
One can represent both information as a phasor, using the complex valued coherence (before applying \(\left| . \right|\)) in a polar plot, where its radius would be the \(\text{Coh}\) and \(\Phi_{\text{Coh}}\) its angle. $$\mathcal{P}_{\text{Coh}}(S_1,S_2) = \frac{\sum_{t=1}^{N} A_1(t)A_2(t)e^{i\Delta\phi_{1,2}(t)} }{\sqrt{\sum_{t=1}^{N} A_1^2(t) \sum_{t=1}^{N} A_2^2(t)}}$$

Case 1: constant amplitude

As a first example, let us define \(A_1=A_2=A=1\). The plot below let you modify \(f_2\), \(\theta_2\) and \(\sigma\) and see their effect on the \(\text{Coh}\).
First, you could test that when \(\sigma = 0\), \(\Phi_{\text{Coh}} = - \theta_2\) whatever the value of \(\theta_2\) and \(\text{Coh} = 1\). When you change \(f_2\), \(\text{Coh}\) tends to zero, since the two signals are not phase consistent anymore.
10 Hz 0 rad 0.10 Show: Cases:

Case 2: amplitude modulated signal

Let us now investigate the coherence metric when the amplitude is not constant, but varies over time. $$A_1(t) = \frac{1}{2}(m\cos(2\pi f_{A_1}t + \theta_{A_1}) + 1)$$ \(f_{A_1}\) the frequency of the cosine amplitude modulation, \(\theta_{A_1}\) the phase shift of the cosine amplitude modulation and \(m\) the amplitude of modulation. Let us set \(f_{A_1} = 2\textrm{ Hz}\), \(\theta_{A_1} = 0\textrm{ rad}\) and \(m = \frac{4}{5}\).

Note that now when \(\sigma = 0\), \(\text{Coh} \neq 1\). This is because, even though the signals still have a consistent phase difference over time, their amplitude variations are not consistent anymore.

Something strange happens when \(f_{2} = 8\textrm{ Hz}\) or \(f_{2} = 12\textrm{ Hz}\). For these frequencies, \(\text{Coh} \neq 0\) even if \(f_{1} \neq f_{2}\). Do you know why?

Case 3: TODO

Version of the Coherence robust to spatial leakage.

In case of spatial leakage (signal mixing), such in Electrical Source Imaging, \(S_1\) and \(S_2\) can be spuriously correlated. However, this spurious correlation is instantaneous and thus occurs at 0-lag. One way to compensate for that is by removing the contribution to the 0-lag in the computation of the Coh. Importantly, 0-lag means that the phase difference equals 0. Any contribution at 0-lag happens on the real axis. Therefore the imaginary part of the Coh \(\text{imCoh}\) is defined as (Nolte et al., 2004): $$\text{imCoh} = \left|\Im\left( \mathcal{P}_{\text{Coh}} \right)\right|$$
\(\Im\) is the imaginary part. This metric is now robust to spurious 0-lag but also removes any genuine 0-lag. We cannot, however, estimate the true preferred phase due to the mixing. Intuitively, \(\text{imCoh}\) is the projection of the \(\text{Coh}\) phasor onto the imaginary axis. Check the \(\text{imCoh}\) box, and see how this metric behaves according to different changes in phase and noise.

Unfortunately, \(\text{imCoh}\) is sensitive to the preferred phase difference \(\Phi_{\text{Coh}}\). A corrected version of \(\text{imCoh}\), named corrected imCoh (Pascual-Marqui et al., 2011), mitigates this effect and is defined as: $$\text{cimCoh} = \frac{\Im\left( \mathcal{P}_{\text{Coh}}\right)}{\sqrt{1-\Re\left( \mathcal{P}_{\text{Coh}} \right)^2}}$$
\(\Re\) is the real part.
Check the \(\text{cimCoh}\) box, and see how this metric behaves according to different changes in phase and noise.