Phase Locking Index
NeuroAnalyzer tutorials: Analyze: Functional connectivity: PLI / PLV
Initialize NeuroAnalyzer
using NeuroAnalyzer
using Plots
eeg = load("files/eeg.hdf");
e10 = epoch(eeg; ep_len = 10);4. Phase Lag Index (PLI)
- Definition: Measures asymmetry in phase differences between two signals, ignoring zero-lag synchronization (which may be due to volume conduction).
- Formula:
$
= | _{k=1}^N ((_1(k) - _2(k))) |
$- sign(sin(Δϕ))(())sign(sin(Δϕ)): Returns 1 if the phase difference is positive, -1 if negative.
- Interpretation:
- PLI = 0: No consistent phase lag (random or zero-lag synchronization).
- PLI = 1: Perfect consistent phase lag (true directional connectivity).
- Advantages:
- Reduces volume conduction effects by ignoring zero-lag synchronization.
- Use Case: Studying directional connectivity in brain networks.
Phase Locking Index (PLI) is a measure used to quantify the consistency of phase differences between two signals across trials or time windows. It is particularly useful for studying functional connectivity and synchronization between brain regions.
PLI uses the Hilbert transform to calculate instantaneous phases, hence the signal should be narrowband. Phase values are from \(-\pi\) to \(+\pi\). We then extract the sign value of the phases to get upper and lower peaks.
\[ PLI = \frac{1}{N} \left \vert \mathrm{sgn}(\varphi_1 - \varphi_2) \right \vert \] \(\mathrm{sgn}\): sign function
PLI reflects the proportion of phase angle differences above or below the real (horizontal) axis.
PLI is not sensitive to volume conduction.
PLI is robust common noise sources.
It only measures phase synchronization, not amplitude correlation.
For multiple channels, you can compute PLI between all pairs to create a connectivity matrix.
PLI is insensitive to instantaneous (zero-lag) synchronization, which helps reduce the influence of volume conduction artifacts.
Interpretation: PLI = 0: no consistent phase locking (random phase differences), PLI = 1: perfect phase locking (constant phase difference).
High PLI: Indicates strong phase synchronization between the two signals, suggesting true interaction between sources.
Low PLI: Indicates weak or no phase synchronization.
Calculate PLI:
p, _, _, _, _ = pli(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1);
println("PLI: $(p[1])")PLI: 0.04453125
Weighted Phase Locking Index (wPLI) is designed to estimate the true phase synchronization between two signals, reducing the influence of spurious connections that can arise from common reference electrodes or volume conduction.
5. Weighted Phase Lag Index (wPLI)
- Definition: A weighted version of PLI that accounts for the magnitude of phase differences.
- Formula:
$
=
$- S12(k)S_{12}(k)S12(k): Cross-spectrum between the two signals at time point kkk.
- Im(S12(k))(S_{12}(k))Im(S12(k)): Imaginary part of the cross-spectrum.
- Advantages:
- More robust to noise than PLI.
- Less sensitive to volume conduction.
- Use Case: Studying functional connectivity in noisy or artifact-contaminated data.
The wPLI weights each phase difference by the magnitude of the imaginary component of the cross-spectrum, which helps to downplay the contribution of phase differences around \(0\) or \(\pi\) (which are more likely to be due to volume conduction).
\[ wPLI = \frac{\left \vert \sum{\left \vert \mathfrak{I}(P_{xy}) \right \vert \times \mathrm{sgn}(\mathfrak{I}(P_{xy}))} \right \vert}{\sum{\left \vert \mathfrak{I}(P_{xy}) \right \vert}} \] \(P_{xy}\): cross spectrum density
wPLI is more robust to volume conduction and noise compared to traditional PLI (Phase Locking Index) and provides a more accurate estimate of true brain connectivity.
Calculate wPLI:
p, _, _, _, _ = wpli(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1);
println("wPLI: $(p[1])")wPLI: 2.0229218207816276e-17
Additionally, a debiased wPLI estimator can be calculated:
p, _, _, _, _ = wpli(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1, debiased = true);
println("wPLI: $(p[1])")wPLI: -0.006158630306069087
Directed Phase Lag Index (dPLI) was introduced in by Stam et al. (2012) to capture the phase and lag relationship as a measure of directed functional connectivity.
dPLI is defined as the probability that the instantaneous phase of \(x\) was smaller than the phase of \(y\) (modulo \(\pi\)).
- if \(0.5 < dPLI_{xy} \leq 1.0\), \(x\) is leading \(y\)
- if \(0.0 \leq dPLI_{xy} = 0.5\), \(y\) is leading \(x\)
- if \(dPLI_{xy} = 0.5\), neither \(x\) nor \(y\) is leading or lagging
p, _, _, _, _ = dpli(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1)
println("dPLI: $(p[1])")dPLI: 0.417578125
Null connectivity is 0 for PLI and wPLI, but 0.5 for dPLI.
wPLI is less sensitive to noise and is the method of choice for studying an underlying phase relationship.
To study directionality, use wPLI or dPLI.
Phase Locking Value
Phase Locking Value (PLV)
- Definition: A normalized measure of phase synchronization between two signals, ranging from 0 (no synchronization) to 1 (perfect synchronization).
- Formula:
$
= | _{k=1}^N e^{i (_1(k) - _2(k))} |
$- Same as ISPC, but often used interchangeably.
- Advantages:
- Phase-invariant: Does not depend on the absolute phase of oscillations.
- Robust to noise: Less sensitive to amplitude variations.
- Use Case: Studying functional connectivity in cognitive tasks or clinical conditions.
Phase Locking Value (PLV): reflects the proportion of phase angle differences above or below the real (horizontal) axis.
It is used for measuring synchrony (especially changes in synchrony) across brain regions/electrodes.
\[ PLV = \frac{1}{N} \left \vert \sum{e^{1i \times (\varphi_1 - \varphi_2)}} \right \vert \] \(e^{\varphi_1 - \varphi_2}\) gives the randomness of \(\Delta \varphi\)
\(N\): number of segments to average. In practice it is best if you have a large number of trials.
Interpretation: PLV \(\approx\) 0: phases are randomly distributed (no phase locking), PLV ≈ 1: phases are highly synchronized (perfect phase locking).
| Feature | PLV | PLI |
|---|---|---|
| Primary goal | Measures the stability of the phase difference between two signals | Measures the consistency of the sign of the phase difference |
| Sensitivity | All phase differences | Only non-zero phase lags |
| Volume Conduction | Affected by zero-lag artifacts | Less affected |
| Range | 0 to 1 | 0 to 1 |
| Sensitivity to noise | Less sensitive to noise | More sensitive to noise perturbations |
| Use Case | General phase synchronization | True interaction detection |
Use PLV if you want to detect any phase synchronization, regardless of lag.
Use PLI if you want to minimize the effect of volume conduction and focus on true interactions between sources.
PLV uses the Hilbert transform to calculate instantaneous phases, hence the signal should be narrowband.
Calculate PLV:
p, _, _, _, _ = plv(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1);
println("PLV: $(p[1])")PLV: 0.14681551787660263
Since we might be interested whether PLV changed after a stimulus, we need to normalize (using z score) using the the pre-stimulus period as a baseline (subtract z score of the baseline PLV values from PLV).
Imaginary Phase Locking Value (IPLV) was proposed to resolve PLV’s sensitivity to volume conduction and common reference effects.
\[ IPLV = \frac{1}{N} \left \vert \mathfrak{I} \left ( \sum{e^{1i \times (\varphi_1 - \varphi_2)}} \right ) \right \vert \]
p, _, _, _, _ = iplv(e10, e10; ch1 = "F3", ch2 = "F4", ep1 = 1, ep2 = 1);
println("IPLV: $(p[1])")IPLV: 0.062038174364113366