[Eeglablist] ICA on concatenated sleep-stage segments in overnight EEG

Cedric Cannard ccannard at protonmail.com
Tue Jan 6 21:00:31 PST 2026


Hi Satomi,

1) Do you deal with bad electrodes? I’m guessing with the long period of recording and movements, some electrodes may be good/bad in some parts of the night and not others. I’d make sure you are dealing with them properly (e.g. removing, interpolating, accounting for data rank reductions when calling ica with pca input). You will get very poor decomposition if you don’t do this properly.

2) what is your sampling rate? I could see how down sampling is tenpting with such long recordings. ICA in my experience works much better with >500 hz sampling rate.

3) what threshold did you use for asr? If your data still contain lots of artifacts, you will end up with a poor decomposition. Finding a good threshold is likely challenging for such a long recordings where so many things change over time (e.g impedance, skin temperature, etc). Note that, if I recall correctly, increasing ASR’s window size can help for sleep data. I believe Makoto has a paper for adapting ASR to sleep data.

4) most importantly, performing ICA on data high pass filtered data under 1 hz gives terrible results. I suspect this is the main reason This is tricky for studies that are interested in frequencies below 1 hz (sleep, slow cortical potentials, CNV component, etc). One option is to make a copy of your dataset filtered at 0.2 hz, filter at 1 hz, run ica on the 1 hz filtered data for good decomposition quality, and transfer the ica weights to your 0.2 hz datset. Then your iclabel classification should perform better. there are some caveats obviously, but I don’t know of a better solution.


Cedric

Sent from Proton Mail for iOS.

-------- Original Message --------
On Tuesday, 01/06/26 at 06:52 Scott Makeig via eeglablist <eeglablist at sccn.ucsd.edu> wrote:
Satomi -

ICA decomposition of EEG time series data pays no attention to the time
course of the data. In fact, during the training process the order of the
time points is shuffled before each iteration.  What ICA decomposition
thereby 'sees' is a pile of scalp maps. It attempts to find
source-projection maps whose contributions to each time-point map are as
independent as possible of the contributions of the other source-projection
maps, considered across the whole set of (unordered) time points.
Therefore, discontinuities in the time order of the data entered into the
decomposition is of no matter - it is destroyed before the first training
iteration.

However, nonstationarity in the locations (and therefore the scalp
projections) of the most-independent 'Independent Component' sources across
the data are a source of 'confusion' for ICA decomposition. Performing ICA
decomposition on a set of data implicitly assumes that the source
constellation remains in place throughout the data time course.

Here, Jason Palmer's AMICA algorithm is of distinct use -- though not yet
widely exploited. See Shawn Hsu's paper in which he decomposed full night
sleep data allowing AMICA to segregate the data into different source
domain periods. He was then able to map the model time domains to
traditional sleep stages (though not trivially).  Read his paper here
<https://urldefense.com/v3/__https://www.sciencedirect.com/science/article/am/pii/S1053811918306888__;!!Mih3wA!DCOIb8Jelx24qh2CPzY_h2UtsBdEZw4LAp20Pdmm9MsDWBxsprVD4HLe7r1vVc20z_yTvZuGsr1n59x0i0im$ >.
In another paper
<https://urldefense.com/v3/__https://www.sciencedirect.com/science/article/am/pii/S1053811922000039__;!!Mih3wA!DCOIb8Jelx24qh2CPzY_h2UtsBdEZw4LAp20Pdmm9MsDWBxsprVD4HLe7r1vVc20z_yTvZuGsr1n5-8srTqD$ >,
he decomposed ~90-minute recordings during which participants were
imagining being in different emotional situations using a 20-model
decomposition that, in many or most cases, identified and separated out
single emotion periods within the session (as belonging to one source
model). Recently, an optimized version of AMICA has been mounted by Jason
and the Neuroscience Gateway <https://urldefense.com/v3/__https://www.nsgportal.org__;!!Mih3wA!DCOIb8Jelx24qh2CPzY_h2UtsBdEZw4LAp20Pdmm9MsDWBxsprVD4HLe7r1vVc20z_yTvZuGsr1n50gt4gIq$ > team on the UCSD
supercomputer, which has the ability to run EEGLAB scripts on
uploaded data.(For serious use in this way, I suggest getting a free GLOBUS
COMPUTE <https://urldefense.com/v3/__https://docs.globus.org/compute/__;!!Mih3wA!DCOIb8Jelx24qh2CPzY_h2UtsBdEZw4LAp20Pdmm9MsDWBxsprVD4HLe7r1vVc20z_yTvZuGsr1n591Y9-zG$ > account to upload large data
files quickly). Be sure to download the post-AMICA toolbox plug-in to
review the performance of multi-model decomposition.

If you do not want to tackle using multi-model AMICA, then perhaps
separately decomposing data from different rated sleep stages might be wise.

Another point: Really speaking, ICA decomposition separates the data into
Independent Component source spaces.  When these are 1-dimensional (i.e.,
from a single, spatially static source), these are the Independent
Components (ICs) of interest for analysis. However, in the case of moving
source activity, ICA decomposition can also segregate it into an
independent component source space of 2 or more dimensions - comprising a
set of IC maps. The activity in this IC subspace is thereby separated (as
best possible) from all the other ICs and IC subspaces. How can you tell
which ICs are truly spatially stationary independent sources, and which are
part of an independent source space?  Here Jason has contributed a
computing and plotting function using a pairwise mutual information (pmi)
metric.

Finally, how to tell whether the results of single-model (or multi-model)
ICA decomposition are stable across the training data? Here, for
single-model decompositions, Fiorenzo Artoni's RELICA plug-in
<https://urldefense.com/v3/__https://www.sciencedirect.com/science/article/pii/S1053811914007526?casa_token=NFEQK1FlE04AAAAA:UDXUL3GVOvooaK8DwX7V2Arr0_GGhRvemEyR_6xBlC8valVqC2iZ1HKp7DVODxfAhqFLnPVPZQ__;!!Mih3wA!DCOIb8Jelx24qh2CPzY_h2UtsBdEZw4LAp20Pdmm9MsDWBxsprVD4HLe7r1vVc20z_yTvZuGsr1n57Ij6FuH$ >is
of use. It should be extended to examine the stability of the boundaries of
the source domains found by multi-model AMICA decomposition, but so far no
one has volunteered to program that enhancement.

Yes, brains - and brain dynamics - are complicated ...  Could we expect
otherwise?

Scott Makeig



On Tue, Jan 6, 2026 at 2:50 AM Okabe Satomi via eeglablist <
eeglablist at sccn.ucsd.edu> wrote:

> Dear EEGLAB community,
>
> I would like to ask for your advice regarding the application of ICA to
> overnight sleep EEG data.
>
> I am currently working with continuous overnight EEG recordings that have
> been sleep-staged every 30 seconds. The sleep stages are classified into
> five categories: Wake, NREM1, NREM2, NREM3, and REM. While sleep staging is
> performed in 30-second units, the EEG data themselves are continuous.
>
> One approach I am considering is to first determine sleep stages, then
> extract continuous segments belonging to the same sleep stage (for example,
> REM sleep periods that occur multiple times throughout the night),
> concatenate these segments, and run ICA separately for each sleep stage.
> The motivation for this approach is that EEG characteristics differ
> substantially across sleep stages, and I was concerned that applying ICA to
> the entire night at once might not yield an effective decomposition. In
> fact, when I applied ICA to the whole-night data and classified components
> using ICLabel, the resulting components were dominated by noise.
>
> On the other hand, concatenating sleep-stage-specific segments may
> introduce discontinuities at the boundaries between segments, leading to
> abrupt voltage jumps. I am therefore uncertain to what extent such
> discontinuities may negatively affect ICA decomposition.
>
> At the same time, I am aware that ICA has been applied to data composed of
> multiple temporally non-contiguous continuous segments in previous studies
> (e.g. Epoched EEG data in ERP study). This suggests that strict temporal
> continuity may not be an absolute requirement for ICA. However, I am unsure
> how important the issue of discontinuities becomes in practice,
> particularly when concatenating long segments that are temporally distant
> within an overnight recording.
>
> As additional information, ICA using runica did not converge on my data,
> so I am currently using Picard. When applying ICA to the entire night, I
> performed ASR (via Dusk2Dawn) and band-pass filtering at 0.2–40 Hz. I plan
> to apply the same preprocessing to the sleep-stage-specific data unless
> there is a strong reason not to do so.
>
> My main questions are as follows:
>
> 1. Is it methodologically reasonable to extract and concatenate segments
> belonging to the same sleep stage across the night and apply ICA to the
> resulting data?
> 2. Are the discontinuities introduced by such concatenation likely to pose
> serious problems for ICA, and if so, are there commonly recommended
> strategies to mitigate these effects?
> 3. Given the strong non-stationarity across sleep stages in sleep EEG,
> would you generally recommend applying ICA to the entire night or
> performing ICA separately for each sleep stage?
>
> I would greatly appreciate any insights or shared experiences.
>
> Best regards,
> Satomi Okabe
> _______________________________________________
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu or visit
> https://sccn.ucsd.edu/mailman/listinfo/eeglablist  .
>


--
Scott Makeig, Research Scientist and Director, Swartz Center for
Computational Neuroscience, Institute for Neural Computation, University of
California San Diego, La Jolla CA 92093-0559, http://sccn.ucsd.edu/~scott 
_______________________________________________
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu or visit https://sccn.ucsd.edu/mailman/listinfo/eeglablist .


More information about the eeglablist mailing list