Skip to content

rigelfalcon/BiSCA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiSCA: BiSpectral EEG Component Analysis

Paper: The influence of nonlinear resonance on human cortical oscillations

License: GPL v3 MATLAB bioRxiv

Official MATLAB implementation of the BiSpectral EEG Component Analysis (BiSCA) framework. This repository contains the code to reproduce the analysis and figures presented in our paper.

About The Project

A longstanding debate in neuroscience concerns whether macroscale brain signals can be described as purely linear Gaussian processes or they harbor the more complex statistics of nonlinear dynamics. This project introduces BiSCA, a framework unifying power spectral and bispectral analysis to test for nonlinearity by identifying inter-frequency harmonic relationships and disambiguating them from superimposed components.

Our key findings show that:

  • The brain's broadband, aperiodic background behaves as a linear, Gaussian process.
  • Narrowband Rho oscillatory components, including the Alpha and Mu rhythms, are the primary source of cortical nonlinearity, exhibiting significant quadratic cross-frequency coupling.
  • There is a clear dissociation between signal power and nonlinearity: while the occipital Alpha rhythm dominates the power spectrum, the strongest nonlinear signatures arise from the less dominant parietal Mu rhythm.

These findings suggest that nonlinear resonance is pervasive in cortical signals, primarily expressed through resonant oscillations rather than aperiodic activity.

Key Features

  • Joint Spectral and Bispectral Modeling: A generalized model that fits the power spectrum and bispectrum simultaneously.
  • Nonlinearity Detection: Identifies nonlinear resonance phenomena by modeling harmonically related spectral peaks and their bispectral counterparts.
  • Component Decomposition: Additively separates the signal into an aperiodic (linear, Gaussian) Xi (ξ) process and an oscillatory (nonlinear) Rho (ρ) process.
  • Statistical Testing: Provides a robust statistical framework for testing the Gaussianity and linearity of each signal component.

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

This code is written in MATLAB. The following toolboxes are required to run the analysis:

  • Signal Processing Toolbox
  • Statistics and Machine Learning Toolbox

Installation

  1. Clone the repository:
    git clone https://github.com/rigelfalcon/BiSCA.git
  2. Open MATLAB, navigate to the cloned directory, and run the setup.m script to add all necessary subdirectories to your MATLAB path:
    setup

Usage

To get started, run the example\BiSCA\demo_BiSCA.m script located in the example/BiSCA directory. This script demonstrates how to apply the BiSCA model to sample EEG data and reproduce key figures from the paper.

demo_BiSCA

Reproduce Paper Figures

The reproduce/ directory contains scripts to regenerate all main and supplementary figures from the paper using pre-computed results.

Quick Start

  1. Download the pre-computed data (~516 MB) and extract it under reproduce/data/:
    reproduce/
      data/
        iEEG/           (demo channels)
        sEEG/           (metadata, anatomy)
        EEG/            (head models, scouts)
        result/         (pre-computed BiSCA results)
    
  2. Run any figure script:
    setup                                                          % add paths
    run('reproduce/example/main_figures/fig1_bisca.m')             % Fig. 1d-e
    run('reproduce/example/main_figures/fig1_spa.m')               % Fig. 1f
    run('reproduce/example/main_figures/fig2_nar_lpr_ieeg_eq.m')   % Fig. 2
    run('reproduce/example/main_figures/fig3_ieeg_freq_bct.m')     % Fig. 3 (iEEG)
    run('reproduce/example/main_figures/fig4_pearson_r.m')         % Fig. 4

Additional Requirements

  • GPU (optional but recommended): Fig. 2 and Fig. S3 scripts use gpuArray for NAR model training; an NVIDIA GPU with the Parallel Computing Toolbox is needed for these.
  • Figures output to reproduce/figure/ (gitignored).

Script Index

Script Figure
fig1_bisca.m Fig. 1d (spectrum fit) and 1e (bicoherence fit)
fig1_spa.m Fig. 1f (SPA decomposition)
fig2_nar_lpr_ieeg_eq.m Fig. 2 (NAR/LPR model)
fig2_nar_lpr_ieeg_eq_sym.m Fig. 2 (symmetric variant)
fig3_eeg_spatial_freq_statistic.m Fig. 3 (EEG topographies)
fig3_ieeg_freq_bct.m Fig. 3 (iEEG freq-BCT)
fig3_ieeg_sig.m Fig. 3 (iEEG significance)
fig3_ieeg_spatial_freq_statistic.m Fig. 3 (iEEG spatial)
fig4_component_metric_surfplots.m Fig. 4 (surface plots)
fig4_ieeg_global_comp_bc.m Fig. 4 (global bicoherence)
fig4_pearson_r.m Fig. 4 (Pearson correlations)
figS3_bc_stat_simulation.m Fig. S3 (bicoherence stat test)
supp_validation_main_abc.m Fig. S2 (validation A/B/C)
supp_validation_bicoherence.m Fig. S1 (bicoherence normalization)
supp_region_histogram_*.m Fig. S1 (region histograms)
supp_volume_conduction_*.m Fig. S (volume conduction)

Data Availability

The scalp EEG and intracranial EEG (iEEG) data analyzed in this study were obtained from the following publications:

  • EEG: Li et al. (2022), "Harmonized-Multinational qEEG Norms (HarMNqEEG)". NeuroImage.
  • iEEG: Frauscher et al. (2018), "Atlas of the normal intracranial electroencephalogram". Brain.

Please refer to the original publications for information on accessing the datasets.

Citation

If you use this code or our findings in your research, please cite our paper:

Wang, Y., Li, M., Garcia Reyes, R., Bringas-Vega, M. L., Minati, L., Breakspear, M., & Valdes-Sosa, P. A. (2025). The influence of nonlinear resonance on human cortical oscillations. bioRxiv. https://doi.org/10.1101/2025.06.27.661950

@article{Wang2025Nonlinear,
  title={The influence of nonlinear resonance on human cortical oscillations},
  author={Wang, Ying and Li, Min and Garc{\'i}a Reyes, Ronaldo and Bringas-Vega, Maria L. and Minati, Ludovico and Breakspear, Michael and Valdes-Sosa, Pedro A.},
  journal={bioRxiv},
  year={2025},
  doi={10.1101/2025.06.27.661950},
  publisher={Cold Spring Harbor Laboratory}
}

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.

Contact

Pedro A. Valdes-Sosa - [email protected]

Project Link: https://github.com/rigelfalcon/BiSCA

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors