-
Notifications
You must be signed in to change notification settings - Fork 13
Frequently Asked Questions (FAQ)
Welcome to the GEDAI Denoising FAQ. This page addresses common questions regarding pipeline integration, parameter tuning, data formatting, and downstream analysis based on the GEDAI preprint and community discussions.
- 1. Preprocessing Pipeline & Integration
- 2. Data Structure, Epoching & Memory Management
- 3. Filtering, Wavelets & Sampling Rates
- 4. Core Parameters & Thresholding
- 5. Post-Processing & Downstream Analysis
Q: Where does GEDAI fit into a standard EEG preprocessing pipeline?
A: For the best results, GEDAI should be applied to continuous, lightly preprocessed data. A recommended pipeline for standard or ERP analysis looks like this:
- Load channel locations.
- Remove non-brain channels (EOG, ECG, etc.).
- Re-reference.
- Band-pass filter (and apply dedicated line noise removal if needed).
- Apply GEDAI.
- Extract epochs.
- Run ICA to catch residual artifacts (Optional).
Q: GEDAI does not do a good job at denoising my EEG data. What could be going wrong?
A: If the denoising does not sufficiently remove artifacts, try the more aggressive auto+ option and see if you get a higher SENSAI score (comparing the SENSAI score within the same recording is justified). If the denoising removes genuine brain signals (e.g. oscillations), try with the milder auto- setting.
If GEDAI removes generally all of the EEG data, this could indicate a problem with the channel locations/labels (you can check them using Plot -> Channel locations -> By name).
Finally, if GEDAI fails repeatedly independent of threshold setting, it might indicate a rarer case of EEG cap or head model 'misalignment', where the EEG electrodes have not been placed near the standard 10-5 system locations represented by their labels/locations and/or the head model is misspecified (i.e. check your leadfield matrix).
Q: Should I remove or interpolate bad channels before running GEDAI?
A: It is not strictly necessary. GEDAI performs its own intrinsic interpolation based on a theoretical Boundary Element Method (BEM) leadfield, which performs comparably to classic spherical interpolation. You can run automated bad channel rejection before GEDAI if you wish (GEVD is quite robust to rank reduction), but it is often easier to skip it or apply channel interpolation after GEDAI or ICA.
Q: How does GEDAI handle line noise? Should I use tools like ZapLine?
A: While GEDAI can handle line noise, its upper wavelet frequencies are quite wide-band and might "wash out" narrow-band noise, occasionally leaving residual line noise. Using a dedicated line-noise removal tool like ZapLine before running GEDAI is highly recommended, as both methods complement each other (and both are based on generalized eigenvalue decomposition).
Q: Do I need to re-reference my data before or after GEDAI?
A: GEDAI automatically re-references your input data to an Average Reference (using Makoto's non-rank-deficient scheme). This is required because GEDAI's precomputed leadfield matrix is average-referenced. You technically do not need to re-reference before GEDAI, but you can do so after cleaning.
Q: Has it been tested on other montages with more or less electrodes (e.g., <32, 64, 128, etc.)?
A: Yes, it has been tested with data ranging from low channel counts (10 channels) to high-density EEG (256 channels). Theoretically, the more channels you have, the better the denoising performance. Denoising data with lessthan 10 channels will be compromised, as there are fewer GED components available to remove.
Q: What if I have an asymmetric montage or missing electrodes?
A: GEDAI maps your actual electrode layout to its theoretical leadfield. Unless you have a severe asymmetry (e.g., an entirely missing hemisphere), GEDAI should still function relatively well. Denoising accuracy is generally more impacted by critically low spatial coverage (e.g., fewer than 10 electrodes) than by spatial asymmetry.
Q: Can I run GEDAI on data that has already been epoched?
A: No. GEDAI must be applied to continuous raw data (a 2D matrix of channels × time). It cannot process pre-epoched, 3D data matrices. You should denoise the continuous data first, and then segment your epochs.
Q: What does the "Epoch size" parameter in GEDAI mean, then?
A: The Epoch size [Default: 12] in the GEDAI parameters refers strictly to the denoising window (the number of wave cycles for each wavelet band) used by the algorithm. It has nothing to do with your experimental EEG epochs. If you want more "dynamic" denoising (i.e. sensitivity to artifacts with shorter duration) you can decrease the epoch size from 12 cycles to 6 cycles, for example.
Q: GEDAI runs out of memory on my computer with long datasets. What should I do?
A: Memory overhead multiplies significantly when parallel processing is enabled. If you are working with longer recordings (e.g., >15 minutes), turn off Parallel processing (set to false or untick the GUI box). Processing continuously in a single run without parallelization should prevent out-of-memory errors, even on datasets over an hour long.
Q: What sampling rate is ideal for GEDAI?
A: High original sampling rates (e.g., 1000 Hz) require too many wavelet levels to accurately reach low frequencies. It is highly recommended to downsample your data to 200–250 Hz. This ensures that a standard 8-level wavelet decomposition provides enough band-range for the low-frequency bands (below 5 Hz) and allows for accurate drift removal. Because wavelet decomposition is dyadic (dividing the Nyquist frequency in half consecutively), the exact Hz bounds will shift slightly depending on your sampling rate.
Q: If I band-pass filter my data beforehand, how should I configure the lowcut_frequency?
A: If your data's high-pass frequency is already higher than GEDAI's default lowcut_frequency [Default: 0.5 Hz], simply leave the parameter at 0.5 Hz. GEDAI uses a built-in 0.1 Hz high-pass to zero-center the data for covariance estimation. The lowcut_frequency acts to ensure a reliable data covariance matrix (lower frequencies require much longer data windows). If the upper bound of a wavelet band falls below your lowcut_frequency, GEDAI forces that band to exactly zero.
Q: Why isn't there a "high-cut frequency" parameter?
A: Because GEDAI uses a dyadic wavelet decomposition, high-frequency bands are very wide and cannot cleanly resolve a specific prior cut-off (like 40 Hz). For simplicity, GEDAI processes all higher frequencies. If you want to restrict high frequencies, simply low-pass filter your data prior to running GEDAI.
Q: How should I set the Denoising Strength?
A: It is best to use the adaptive, SENSAI-based options:
-
auto[Default]: Balanced threshold. -
auto+: Stronger threshold (removes more noise, may sacrifice some signal). -
auto-: Milder threshold (retains more signal, may leave some noise).
Note: If you want finer control, newer versions of GEDAI (v1.5) allow decimal inputs for threshold strength (0 to 10) available through the command-line. (for reference: auto- = 4, auto = 7, auto+ = 8.5).
Q: Should I use the "Reject bad epochs" (ENOVA) feature?
A: This is optional [Default: false]. It prevents GEDAI from trying to clean potentially "irrecoverable" bad data segments (for example, if most electrodes lost contact with the scalp during movement). It uses the Explained Noise Variance (ENOVA) metric. A threshold of 0.9 removes segments with >90% noise variance, while an aggressive 0.3 removes segments with >30% noise.
Q: What if I would like to run GEDAI with a "custom" reference covariance matrix (e.g. derived from empirical data or another leadfield)?
A: You can do this using the command line with a custom [channel x channel] reference matrix predefined in a MATLAB workspace variable (e.g., your_custom_refCOV):**
[EEG] = GEDAI(EEG, 'auto', 12, 0.5, your_custom_refCOV);
Q: Is it safe to perform 1/f, connectivity, cross-frequency coupling, or microstate analysis on GEDAI-cleaned data?
A: Yes. While GEDAI relies on a theoretical leadfield of independent sources, GEDAI acts strictly as a spatial filter. It identifies artifacts based on spatial signatures (covariance) and removes them. Temporal dynamics—such as 1/f characteristics and correlated brain signals—are allowed to vary freely and are preserved. Thus, you can consider GEDAI being more like 'spatial' ICA (which does not enforce temporal independence, commonly used in fMRI) rather than "temporal" ICA (which enforces temporal but not spatial independence).
Q: Is it necessary or valid to run ICA after GEDAI?
A: While ICA is not required, running it after GEDAI (e.g., alongside IClabel) is a valid sanity check to remove any potentially residual ocular or muscular artifacts. Because GEDAI reduces rank locally epoch-by-epoch, you might wonder about ICA's reliability—but in practice, there is typically more than enough rank left in the data to validly identify main artifact components.
Q: How can I measure how much the data was changed by GEDAI?
A:
- mean ENOVA: An absolute metric. It represents the variance of the removed noise expressed as a proportion of the original EEG data's variance. It effectively tells you the percent "noise" removed (i.e. how noisy the original recording was).
- SENSAI score: A relative metric of EEG quality after denoising indicating the "goodness of fit" between the denoised data and the theoretical leadfield matrix (higher is better), though this can vary between recordings and montages.
Q: Can I visualize the individual GED artifact components?
A: Since GEDAI denoises individual epochs (which can be of sub-second duration), visualizing individual components would cause information overload, as GED generates thousands of them (e.g., a 60-channel, 100-second recording with a 1-second epoching window would yield 6,000 components). Instead, it is better to analyze the discarded noise data (the second output of GEDAI) by looking at its power spectrum or running IClabel on the discarded data to see what was removed.