[Eeglablist] ICA components distorted after rereferencing, saving and reloading

Tomko Settgast tomko.settgast at uni-wuerzburg.de
Thu Jul 24 10:30:52 PDT 2025


Dear EEGLAB team,

I encountered a puzzling issue while applying common average referencing (CAR) after ICA, as currently recommended in the EEGlab tutorial (https://urldefense.com/v3/__https://eeglab.org/tutorials/06_RejectArtifacts/RunICA.html*issues-with-data-rank-deficiencies__;Iw!!Mih3wA!Hy4Uj5ky7Dr8niY5yJBllkYbV8sC-8D2mnYBuaJiqvb2aYgEkuwDK9M_9PyFCOjmtEKMU505X4gXGbOKz39zcB4VawTXegSozL76zYdG$ ) to address rank deficiencies.

In one specific dataset, ICA components appear strongly corrupted after saving and reloading the dataset, although they looked perfectly normal before saving. This issue does not occur in other datasets processed by the same automated pipeline.

Steps to reproduce:

  1.  Run runica and perform MARA artifact rejection.
  2.  Apply CAR using pop_reref(EEG, []) after ICA (as recommended).
     *   The components looked completely normal at this point (see attached ICsBeforeSaving.gif)
  3.  Save the dataset using pop_saveset.
  4.  Close EEGLAB, reload the dataset, and inspect ICA components with pop_eegplot .
     *   After reloading, the ICA time series look heavily distorted (see attached ICsAfterReload.gif)

To investigate further, I saved the EEG structure as .mat immediately before saving with pop_saveset and compared it with the EEG structure after reloading the saved dataset.
There are mismatches between the ICA matrices in these two structures - which aligns with the visual differences in the component time series.

For a better understanding:

  *   MARA did not reject components for this dataset (0 entries in gcompreject).
  *   The ICA was computed with proper PCA reduction to the data rank (rank = 10), following the recommendations in Kim et al. (2023) (https://urldefense.com/v3/__https://doi.org/10.3389/frsip.2023.1064138__;!!Mih3wA!Hy4Uj5ky7Dr8niY5yJBllkYbV8sC-8D2mnYBuaJiqvb2aYgEkuwDK9M_9PyFCOjmtEKMU505X4gXGbOKz39zcB4VawTXegSozNk76r1m$ ), so ghost components are unlikely.
     *   I am aware that common average re-referencing is commonly not recommended for datasets with a low number of channels but we were trying to follow the guidelines expressed by Hu et al. (2018; 10.1088/1741-2552/aaa13f)
  *   The issue seems to occur only in this particular dataset - as far as I can trust my visual comparison.
In other datasets where MARA rejected components, I did not encounter this behavior (again, only checked visually) - even though the same pipeline and re-referencing strategy was applied.

After discussing the issue with ChatGPT, the suggestion came up that applying re-referencing after ICA might silently disrupt the ICA-to-data mapping, and this mismatch only becomes apparent after saving and reloading the dataset.

However, what I find particularly confusing is that this issue only occurs when MARA does not reject any components - which would normally indicate better signal quality.

My questions:

  *   Can you confirm whether re-referencing after MARA-based component rejection might break the ICA structure in this way?
  *   Is this a known issue with pop_reref in combination with ICA, and MARA?
  *   Would you recommend re-referencing before ICA, especially if PCA is already used to adjust for rank deficiency?
  *   Do you have any suggestions on how to safely apply re-referencing post-ICA without compromising the ICA decomposition?

I'd be happy to share the script or provide further information if helpful.

Thank you very much in advance for your time and support!

Best regards,
Tomko

Tomko Settgast, MSc
Section Intervention Psychology
University of Würzburg



More information about the eeglablist mailing list