Source-linked AI summary
HERMES: towards an integrated toolbox to characterize functional and effective brain connectivity
Guiomar Niso, Ricardo Bruña, Ernesto Pereda, Ricardo Gutiérrez, Ricardo Bajo, Fernando Maestú, Francisco del-Pozo
TL;DR
HERMES addresses the need for a unified toolbox for mathematically complex brain-connectivity analyses. It provides a Matlab-based package encompassing common functional and effective connectivity indexes, while preprocessing remains outside its scope.
Problem
The growing number and mathematical complexity of functional and effective connectivity tools make a unified toolbox desirable.
Method
HERMES is a crossplatform Matlab toolbox that encompasses several common indexes for assessing functional and effective connectivity.
Results
The toolbox supports estimation of true brain interactions as a function of time and frequency, and its Phase Slope Index has outperformed Granger causality for detecting directionality in data consisting of mixtures of independent sources.
Takeaways & Limitations
HERMES offers a single integrated environment for accessing multiple brain-connectivity analysis methods.
Takeaways & Limitations
HERMES does not include artefact-removal, detrending, or similar preprocessing tools.
Abstract
from arXiv · showhide
The analysis of the interdependence between time series has become an important field of research in the last years, mainly as a result of advances in the characterization of dynamical systems from the signals they produce, the introduction of concepts such as generalized and phase synchronization and the application of information theory to time series analysis. In neurophysiology, different analytical tools stemming from these concepts have added to the 'traditional' set of linear methods, which includes the cross-correlation and the coherency function in the time and frequency domain, respectively, or more elaborated tools such as Granger Causality. This increase in the number of approaches to tackle the existence of functional (FC) or effective connectivity (EC) between two (or among many) neural networks, along with the mathematical complexity of the corresponding time series analysis tools, makes it desirable to arrange them into a unified-easy-to-use software package. The goal is to allow neuroscientists, neurophysiologists and researchers from related fields to easily access and make use of these analysis methods from a single integrated toolbox. Here we present HERMES (http://hermes.ctb.upm.es), a toolbox for the Matlab environment (The Mathworks, Inc), which is designed for the analysis functional and effective brain connectivity from neurophysiological data such as multivariate EEG and/or MEG records. It includes also visualization tools and statistical methods to address the problem of multiple comparisons. We believe that this toolbox will be very helpful to all the researchers working in the emerging field of brain connectivity analysis.
CONTENT INDEX
HERMES is presented as a toolbox for characterizing functional and effective brain connectivity.
- HERMES is a toolbox designed to characterize functional and effective brain connectivity.
1. INTRODUCTION
Brain connectivity analysis distinguishes anatomical, functional, and effective connectivity, while increasingly diverse and mathematically complex methods motivate an integrated toolbox. HERMES addresses this need by combining connectivity indexes with visualization and statistical tools in Matlab.
- Brain connectivity is commonly divided into anatomical, functional, and effective connectivity.Functional connectivity concerns statistical dependence, whereas effective connectivity concerns causal interactions.
- Functional connectivity measures signal dependence without causal information, while effective connectivity uses techniques that provide causal information.Examples for effective connectivity include Granger causality and transfer entropy.
- The growing number and mathematical complexity of connectivity methods make a single unified toolbox desirable.The proposed toolbox is intended to give researchers easier access to these methods.
- HERMES runs under Matlab and encompasses several common indexes for assessing functional and effective connectivity.
- HERMES includes visualization routines and advanced statistical methods addressing multiple comparisons in multivariate connectivity analysis.
- The toolbox aims to provide access to connectivity measures for researchers who are not familiar with the underlying mathematics.
2. PROJECT CREATION
HERMES uses Matlab projects to organize neurophysiological data, compute connectivity indexes, configure analyses, and export results with metadata and statistical information. Users must provide appropriately prepared data because preprocessing is outside the toolbox.
- The graphical interface separates project data from connectivity measures and supports project creation through the user interface.
- HERMES is a project-based Matlab toolbox whose projects contain data matrices, metadata, and previously calculated indexes.Projects must be created before working on the data.
- HERMES does not provide artifact removal or detrending, so loaded data should already be clean and, if necessary, epoched.
- HERMES can load matrices and FieldTrip structures from MAT files and label subjects, groups, and conditions when multiple files are loaded.
- HERMES provides layouts for commonly used EEG and MEG systems and allows users to select channel subsets for visualization.
- Windowing the data: Windowing parameters control temporal segmentation, overlap, alignment, and whether the full epoch is analyzed as one window.Windows are rectangular signal segments rather than traditional Fourier-transform windows.
- Connectivity measures: HERMES computes multiple families of functional and effective connectivity indexes, each with its own configuration options.
- Exporting the results: Computed indexes can be exported in MAT format or stored in the Matlab workspace, together with configuration, dimensions, and optional p-values.
3. CONNECTIVITY MEASURES
HERMES organizes functional and effective connectivity indexes into five categories, combining classical, synchronization, Granger-causality, and information-theoretic approaches. The toolbox includes measures for dependence, lagged interactions, directionality, and source-related connectivity effects.
- Classification: HERMES groups connectivity indexes into classical, phase synchronization, generalized synchronization, Granger causality-based, and information theoretic measures.This classification is presented in Table 1.
- Classical measures: Classical measures include Pearson correlation, cross-correlation, magnitude squared coherence, and the Phase Slope Index.Pearson correlation and cross-correlation operate in the time domain, whereas coherence operates as a function of frequency.
- Classical measures: Classical measures are well known and fast to compute, but they detect only linear dependences.HERMES estimates coherence using Welch’s averaged, modified periodogram for finite data, with windowing and averaging reducing frequency resolution.
- Lagged and source-related connectivity: Lagged connectivity methods use phase relationships or signal decomposition to estimate interactions less attributable to common sources and volume conduction.HERMES includes indexes such as PLI and WPLI, while power-envelope correlation between orthogonalized signals estimates interactions over time and frequency.
- Phase Slope Index (PSI): The Phase Slope Index estimates information-flow direction from the frequency-dependent phase slope, with PSI > 2 indicating a statistically significant time delay.Its normalization uses an estimate of standard deviation obtained through leave-one-epoch-out calculations.
- Phase Slope Index (PSI): PSI indicates temporal order as a driver–responder relation, but an observed A-to-B direction does not establish that B has no impact on A.The method has outperformed Granger causality for detecting directionality in mixtures of independent sources.
X sign X X WPLI
HERMES includes phase-synchronization measures based on relative-phase distributions and model-based directionality indexes derived from phase dynamics or instantaneous periods.
- WPLI: The WPLI weights phase leads and lags by the imaginary cross-spectrum magnitude, reducing sensitivity to uncorrelated noise and increasing power to detect PS changes.
- Phase synchronization: The phase-synchronization index ρ quantifies deviation of cyclic relative-phase distributions from uniformity, ranging from 0 for no synchronization to 1 for perfect synchronization.
- Directionality Phase Indexes: HERMES covers two model-based directionality phase indexes: EMA produces dxy, whereas IPA produces rxy.
- Directionality Phase Indexes: EMA models phase increments using periodic functions of both phases, while IPA models the evolution of instantaneous periods.
- Directionality Phase Indexes: The directionality indexes range from -1 to 1, with endpoint values indicating unidirectional coupling and intermediate values indicating bidirectional coupling.
- Limitations: Both EMA and IPA assume weak coupling; under strong coupling, amplitude effects invalidate their model equations and make the indexes meaningless.
3.4 Granger causality measures
HERMES presents Granger-causality measures and related frequency-domain indexes for directed interactions, using autoregressive and multivariate autoregressive models.
- Classical Granger causality: Granger causality tests whether incorporating one signal’s past improves prediction of the other signal beyond using its own past.
- Classical Granger causality: GC from y to x ranges from 0 to infinity: zero indicates no predictive improvement from y’s past, whereas positive values indicate y improves prediction of x.
- Classical Granger causality: GC is asymmetric and can detect effective connectivity, but it is a linear parametric method dependent on autoregressive model order p.
- Frequency-domain measures: PDC and DTF are frequency-domain measures based on multivariate autoregressive processes; PDC uses coefficient matrices, whereas DTF uses the transfer-function matrix.
- Frequency-domain measures: PDC is computationally more efficient and robust than DTF, is normalized by total information inflow, and can isolate direct influences.
- Limitations: Reliable PDC and DTF estimation requires suitable MAR model order and epoch length; excessive order can capture noise, causing over-fitting and instability.
- Limitations: Because MAR assumes stationarity while neural signals are often transient and non-stationary, analyses must balance time resolution against fitted-model statistical properties.
4. STATISTICAL SIGNIFICANCE OF THE INDEXES
HERMES evaluates connectivity-index significance with surrogate-data tests that generate null comparisons and incorporate significance masks into the analyzed results.
- HERMES includes surrogate-data procedures for evaluating the statistical significance of every connectivity index.
- Surrogates compatible with signal independence are compared with original index values to test whether observed connectivity exceeds the null distribution.
- Different surrogate constructions preserve or destroy selected phase, amplitude, or temporal relationships for phase-synchronization and Granger-causality testing.
- At p=0.05, at least 20 surrogates are needed for the stated rank-based test, while p<0.01 requires 100 surrogates.
- The default is 100 surrogates for a p-value of 0.01, with a permitted range of 20 to 10000 and increasing computation time as surrogate count rises.
- For multivariate tests, HERMES creates a subject-specific mask that sets non-significant original connectivity indexes to zero before subsequent statistical analysis.
5. STATISTICAL TEST FOR MULTIPLE COMPARISONS
HERMES addresses the multiple comparisons problem in EEG/MEG connectivity statistics by providing FDR and non-parametric cluster-based permutation tests. These methods support comparisons across groups or conditions while accounting for the large number of sensor-pair, time, and frequency tests.
- Motivation: EEG/MEG connectivity analysis can involve enormous numbers of simultaneous sensor-pair, time-window, and frequency-band comparisons.Naive individual testing can make significant findings difficult to interpret because the chance of at least one apparent effect increases rapidly with the number of tests.
- Available methods: HERMES provides false discovery rate and non-parametric cluster-based permutation tests for comparisons between groups or conditions.Both methods are selectable through the toolbox’s statistics panel.
- False discovery rate: FDR controls the expected proportion of incorrectly rejected null hypotheses among rejected hypotheses, trading greater power than Bonferroni correction for increased type I-error likelihood.The toolbox supports t-tests for normally distributed measures and Wilcoxon tests as a non-parametric alternative.
- False discovery rate: The FDR procedure orders p values and thresholds them using a chosen q value, with HERMES accounting for the number of connectivity comparisons.For connectivity indexes, the comparison count depends on whether the index is symmetric or asymmetric.
- Cluster-based permutation test: Cluster-based permutation testing offers a nonparametric framework that accounts for the multiplicity inherent in connectivity, amplitude, and spectral analyses.Its working assumption is that a genuine effect should be larger than effects produced by random assignment to groups or conditions.
- Cluster-based permutation test: The cluster-based permutation test first thresholds statistical units, groups neighboring units with same-sign effects, and evaluates clusters using exceedance mass.Neighborhoods can extend across space and, when relevant, time or frequency; significance is assessed against randomly reassigned groups or conditions.
6. DATA REPRESENTATION
HERMES includes visualization tools for raw signals, power spectra, connectivity indexes, and statistical differences. Users can inspect data across sensors and adjust subjects, groups, conditions, time, frequency, and visualization thresholds.
- Visualization tools: HERMES provides a Visualization menu while relying on established external toolboxes for more extensive data-representation options.The toolbox prioritizes user-friendly FC and EC calculation over a broad visualization feature set.
- Example data: The example visualization uses 148-channel MEG recordings sampled at 250 Hz, band-pass filtered from 0.5–50 Hz, with 35 randomly selected 0.9-second epochs per participant.The dataset contains 10 subjects: 5 controls and 5 participants with mild cognitive impairment.
- Signal visualization: Raw-data displays show signals across sensor locations and allow zooming into an individual sensor with adjustable time range and channel distribution.Subject number and experimental condition can also be selected.
- Signal visualization: Power-spectrum displays show spectra across sensor locations and support zooming into an individual sensor with adjustable frequency range and channel distribution.Subject number and condition can be selected as in the raw-data visualization.
- Connectivity visualization: Two-dimensional connectivity maps display PLV segments for functional connectivity and Granger-causality arrows for effective connectivity between sensors.Arrowheads identify the sensor designated as the effect in the asymmetric Granger-causality visualization.
- Statistical visualization: Statistical visualization encodes stronger connectivity in controls with red links and stronger connectivity in the MCI group with blue links.The example compares PLV between two groups of five subjects using type I FDR with p<0.05 and q=0.3.
7. DISCUSSION
HERMES is presented as an accessible Matlab toolbox combining linear and nonlinear FC/EC indexes, visualization, and multiple-comparison statistics. The authors identify data-length, computational, update, and scope boundaries while outlining future extensions.
- Contribution: HERMES integrates linear and nonlinear functional and effective connectivity indexes with visualization tools and two statistical approaches for multiple comparisons.Its GUI is intended to make mathematically complex connectivity analyses accessible without removing methodological rigor.
- Scope: The toolbox supports multichannel EEG, MEG, fMRI, and intracranial neuroimaging data, subject to the minimum time-series length required by each index.It can work with raw data and data structures from related preprocessing toolboxes.
- Scope: HERMES is intended for spontaneous activity and event-related responses with multiple trials per subject.The discussion frames the toolbox as useful to researchers applying connectivity techniques to neurophysiological data.
- Limitations and future work: The authors note that HERMES must be updated regularly because FC/EC analysis is rapidly evolving and new connectivity indexes continue to emerge.Planned additions include directed PLI, power-envelope correlation between orthogonal signals, and other recently developed methods.
- Limitations and future work: HERMES does not cover network-level multivariate indexes or adjacency-matrix network analysis, because existing Matlab software already addresses the latter area.The authors describe multivariate connectivity indexes as a worthwhile future inclusion while excluding comprehensive network analysis from the toolbox.
- Limitations and future work: Future performance work targets the computational cost of generalized-synchronization and information-theory indexes through C/C++ implementations, MEX files, and parallel hardware.These improvements are intended to accelerate analyses involving many channels or sensors and long time series.
- Availability: The toolbox and documentation are freely available as open-source academic software under the GNU General Public License v3.The website also provides sample MEG data and coupled dynamical-system time series for download.
ROLE OF THE FUNDING SOURCE
The study received financial support from Spanish government ministries and an FPU grant. The authors state that the funding sources had no role in the study or publication decisions.
- Funding: Funding came from Spanish Ministry of Economy and Competitiveness grants, a Spanish Ministry of Science grant, and a Spanish Ministry of Education and Science FPU grant.The listed grants supported the authors and the project.
- Funding: The authors state that funding sources had no role in study design, data collection, analysis, interpretation, writing, or the decision to submit the paper.This statement covers both the research process and publication decision.
A.1 Saved results
HERMES stores each project in a dedicated folder containing project metadata, calculated indexes, and subject-specific condition data. Condition files are standardized and analyzed separately, with results retained alongside configurations and optional significance levels.
- Project storage: Each project is stored in a folder whose name replaces non-valid characters with underscores.The folder contains multiple files and folders arranged at different levels.
- Project storage: The main project folder contains a project mat-file, an indexes.data file, and zero-padded subject{n} folders.The project file stores the main project structure, while indexes.data stores calculated indexes.
- Subject data: Each subject{n} folder stores each condition separately in condition{n}.data mat-files.The condition number is represented by a correlative integer indicating the condition index.
- Data preparation: Time-series data are stored with zero mean and unity standard deviation because synchronization indexes require this standardization for accurate connectivity estimation.This normalization is applied to the data stored in the project structure.
- Analysis outputs: Each condition file is analyzed separately, enabling comparisons across subjects and conditions.Results include the calculation configuration, obtained values for each subject and condition, and optionally a significance level.
A.2 Project structure
HERMES separates project metadata, time-series data, connectivity indexes, statistical results, and session logs across structured Matlab files and folders. The project structure records acquisition, experimental, sensor, statistical, and provenance information, while compatibility across versions is handled through export/import tools.
- Project files: The project mat-file stores metadata only, while time series and calculated indexes are kept separately to minimize memory requirements.The project structure combines smaller structures, and its metadata is distributed across defined fields.
- Project metadata: Project metadata includes creation details, description, type, source, acquisition metadata, baseline, channel and sample counts, sampling rate, epoch times, subjects, groups, and conditions.The project structure also records per-subject groups, trial counts, file checksums, and sensor labels, positions, layouts, order, and system.
- Connectivity indexes: The indexes.data file stores each calculated index with its name, family, calculation date, dimensions, configuration, subject-condition data, and estimated p-values.Indexes are stored under abbreviations such as COR for correlation and GC for Granger causality.
- Statistical results: The statistics.fdr and statistics.cbpt files store statistical-method metadata, comparison settings, configurations, result structures, and whether testing used false discovery rate or nonparametric permutation testing.The comparison fields identify fixed groups or conditions and the two groups or conditions being compared.
- Versioning and logs: HERMES records project version information and creates session-log entries for index calculations, with logs stored as separate files in the <Project>/logs directory.Projects may not be directly readable across toolbox versions, so users are encouraged to use export/import tools.
determination. Biological Cybernetics, 84(6), 463–74. doi: 10.1007/PL00007990
This section lists sources related to brain connectivity, time-series analysis, signal processing, nonlinear dynamics, statistical testing, and EEG/MEG toolboxes. The references span foundational methods, methodological studies, and software resources relevant to HERMES.
- Connectivity measures: Several cited studies address phase synchronization, synchronization likelihood, coherency, mutual information, and coupling detection in neural or dynamical-system signals.The cited methods include phase synchrony, imaginary coherency, partial mutual information, and directional coupling analysis.
- Time-series methods: The bibliography covers signal-processing and nonlinear-time-series techniques including Fourier, Hilbert, wavelet, recurrence-plot, embedding, entropy, and autoregressive-model methods.These references include both methodological papers and books on time-series analysis and multivariate autoregressive modeling.
- Statistical methods: Statistical references address false-discovery-rate control, multiple comparisons, permutation inference, and nonparametric testing for neuroimaging data.The cited work includes general statistical foundations and applications to functional neuroimaging and EEG/MEG.
- Software resources: The cited software resources include EEGLAB, SIFT, NFT, BCILAB, ERICA, TISEAN, and the TIM toolbox.These tools support EEG processing, nonlinear time-series analysis, or coupling-dynamics assessment.
- Connectivity foundations: The references include foundational work on functional and effective connectivity and on measuring dependence, feedback, and information flow between time series.Examples include work by Friston, Geweke, Granger, and Kamiński and Blinowska.