Figure 1
Unmixing Six Channels of Simulated EEG into Independent Components
The decomposition
The page builds the recording from four sources it knows (a parietal ERP, occipital alpha, blinks, and temporal muscle), mixes them into six channels, adds sensor noise, and runs ICA on the result. That is why Panel D can grade the components. The algorithm here is FastICA; EEGLAB's runica is extended infomax, which reaches the same kind of answer by a different route.
Figure 2
Two Sources, Two Sensors: Why Independence Is Enough to Unmix
The unmixing
Source 1 is a slow triangle wave, source 2 is a spiky signal. Both are far from Gaussian, in opposite directions. The sensors each hear a different mixture of the two.
What You Are Looking At
Every EEG channel is a weighted sum of whatever is generating voltage at that moment: cortical sources, the eyes, scalp muscle, the heart, and line noise. Each generator reaches every electrode, with weights fixed by where it sits in the head. ICA assumes exactly that picture. It takes the channels as the only input, and searches for a set of time courses that are as statistically independent of each other as possible, together with the weights that would mix them back into the recorded channels. If the assumption holds, one of the time courses is the blink, its weights are the blink's scalp map, and removing it from the sum removes the blink from every channel at once, leaving the rest of the trial intact (Makeig et al., 1996; Jung et al., 2000).
In Figure 1 the recording is six channels: Fp1 and Fp2 over the eyes, Cz, Pz, Oz, and a VEOG electrode below the left eye. Panel A shows the recording in gray and the cleaned version in teal. Panel B shows the six components ICA found, each with the scalp map that is its column of the mixing matrix. A map that is strongly positive at Fp1 and Fp2 and negative at VEOG is the signature of a blink: the eyeball is a dipole, and a blink moves the lid across it so the potential flips sign above and below the eye. Panel C shows the averaged ERP at Fp1 and Pz, and Panel D grades each component against the four true sources, which the page knows because it made them.
Figure 2 strips the problem to two sources and two sensors. Each dot in the scatter plot is one moment in time, placed by the voltage at the two sensors. The sources' cloud is a band, uniform across the triangle wave and long and tapering along the spiky one, and mixing slants it. Whitening, a step every ICA algorithm takes first, undoes the slant and the scaling, but it cannot know the rotation: every rotation of a whitened cloud is equally uncorrelated. That is where independence does the work. Projections of a mixture are closer to Gaussian than the sources themselves, so the rotation that makes the projections least Gaussian is the one that recovers the sources (Hyvärinen & Oja, 2000). The curve on the right measures that, and ICA is the search for its peak.
Try This
- In Figure 1, find the blink component. Its map is bright at Fp1 and Fp2 and inverted at VEOG, its time course has the same bumps as the top channels, and in Panel D it sits on the blink column with a correlation near 1. Click its button to remove it. The teal traces lose the bumps and the Fp1 ERP in Panel C moves onto the true one.
- Remove the parietal ERP component instead. The teal Pz average collapses. ICA cannot tell brain from artifact; it only separates. The decision about what to subtract is yours, and it is the step where damage is done.
- Drag the iteration slider to 0. The six components are an arbitrary rotation of the whitened channels and every one is a mixture. Step forward and watch them pull apart. Most of the separation happens in the first few iterations.
- Set data length to 2 seconds. The decomposition degrades: maps blur and the Panel D grid loses its clean diagonal. ICA needs many samples to estimate the statistics it relies on, and a common rule of thumb is at least 20 to 30 times the square of the number of channels (Onton et al., 2006). For 32 channels at 250 Hz that is at least a minute and a half of clean data; for 64 channels, six minutes or more.
- Raise sensor noise to 10 µV. The two extra components, which with little noise are leftovers, now carry real variance, and the four source components get noisier. Independent noise at each electrode is not a single source with a fixed map, so it has no clean solution.
- In Figure 2, turn off Whiten first and slide the rotation. No angle recovers the sources from the raw parallelogram. Turn whitening back on and go to the PCA answer: the axes are uncorrelated but each recovered signal still contains both sources. Go to the ICA answer: the recovered signals match the gold ones, and the correlation between the two projections is zero at that angle, exactly as it was at every other angle.
Why It Matters for the Pipeline
Artifact detection throws a trial away. ICA keeps the trial and subtracts the artifact, which matters when participants blink on most trials, when the task itself causes eye movements, or when the trial count is small. The costs are a model assumption that is never exactly true, a decomposition that takes minutes on real data, and a judgment call for each component. Luck (2014, Chapter 6) treats ICA as the standard correction for blinks and recommends rejection for everything else.
Three things decide whether a decomposition is any good. The first is data length, above. The second is what goes in. ICA finds a single set of fixed weights, so slow drift, a channel that went bad halfway through, and large non-stereotyped artifacts all pull components toward themselves and should be removed before ICA, not after. A 1 Hz high-pass filter before decomposition gives markedly better components (Winkler et al., 2015); many labs run ICA on a 1 Hz filtered copy and then apply the resulting weights to the 0.1 Hz data they will actually analyze. The third is rank. ICA can only find as many components as there are independent channels. Average-referencing removes one dimension and each interpolated channel removes another, so after either step tell the algorithm to look for fewer components, or interpolate after ICA rather than before.
In EEGLAB the decomposition is EEG = pop_runica(EEG, 'icatype', 'runica', 'extended', 1);, which stores the unmixing matrix in EEG.icaweights and EEG.icasphere (Delorme & Makeig, 2004). The extended algorithm handles sources that are flatter than Gaussian, like alpha and line noise, as well as the spiky ones (Lee et al., 1999). EEG = pop_iclabel(EEG, 'default'); then labels each component as brain, eye, muscle, heart, line noise, channel noise, or other, with probabilities, using a classifier trained on thousands of labeled components (Pion-Tonachini et al., 2019). Treat the labels as a second opinion and inspect the map, the time course, and the power spectrum of each component before removing it. Eye components come first and are rarely more than two or three; a decomposition where many components look like eye activity usually means the data were not clean enough going in. Removal is EEG = pop_subcomp(EEG, [3 7], 0);, with the component numbers in the brackets. Afterwards, interpolate any channels you dropped, epoch, and run artifact detection on what remains, because ICA does not catch everything.
Two properties of the output trip people up. Components have no natural sign or scale: the algorithm can flip one and double its map without changing the data, so a blink map can come out blue at the front rather than red. And the order is by variance explained, not by importance, so the blink is often component 1 simply because blinks are large.
References
Bell, A. J., & Sejnowski, T. J. (1995). An information-maximization approach to blind separation and blind deconvolution. Neural Computation, 7(6), 1129–1159. https://doi.org/10.1162/neco.1995.7.6.1129
Delorme, A., & Makeig, S. (2004). EEGLAB: An open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9–21. https://doi.org/10.1016/j.jneumeth.2003.10.009
Hyvärinen, A., & Oja, E. (2000). Independent component analysis: Algorithms and applications. Neural Networks, 13(4–5), 411–430. https://doi.org/10.1016/S0893-6080(00)00026-5
Jung, T.-P., Makeig, S., Humphries, C., Lee, T.-W., McKeown, M. J., Iragui, V., & Sejnowski, T. J. (2000). Removing electroencephalographic artifacts by blind source separation. Psychophysiology, 37(2), 163–178. https://doi.org/10.1111/1469-8986.3720163
Lee, T.-W., Girolami, M., & Sejnowski, T. J. (1999). Independent component analysis using an extended infomax algorithm for mixed subgaussian and supergaussian sources. Neural Computation, 11(2), 417–441. https://doi.org/10.1162/089976699300016719
Luck, S. J. (2014). An introduction to the event-related potential technique (2nd ed.). MIT Press.
Makeig, S., Bell, A. J., Jung, T.-P., & Sejnowski, T. J. (1996). Independent component analysis of electroencephalographic data. In D. S. Touretzky, M. C. Mozer, & M. E. Hasselmo (Eds.), Advances in neural information processing systems 8 (pp. 145–151). MIT Press.
Onton, J., Westerfield, M., Townsend, J., & Makeig, S. (2006). Imaging human EEG dynamics using independent component analysis. Neuroscience & Biobehavioral Reviews, 30(6), 808–822. https://doi.org/10.1016/j.neubiorev.2006.06.007
Pion-Tonachini, L., Kreutz-Delgado, K., & Makeig, S. (2019). ICLabel: An automated electroencephalographic independent component classifier, dataset, and website. NeuroImage, 198, 181–197. https://doi.org/10.1016/j.neuroimage.2019.05.026
Winkler, I., Debener, S., Müller, K.-R., & Tangermann, M. (2015). On the influence of high-pass filtering on ICA-based artifact reduction. 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), 4101–4105. https://doi.org/10.1109/EMBC.2015.7319296