ICA for EEG — Interactive Concept Demo

This single-page demo is designed to help build intuition for how ICA works: it shows general ICA (recovering hidden independent sources from mixed observations) and then a simplified EEG ICA story (scalp channels are mixtures of brain + artifact sources; ICA estimates components you can remove). Tip: the recovered components may differ by order and sign from the originals — that’s normal.

Controls

Goal: build intuition for ICA as “unmixing” latent independent sources from observed mixtures. Try switching to Audio clips to hear the classic “two microphones, two speakers” story.
3 sources
3 sensors
noise σ = 0
scale = 1.00
Mixtures and ICA update automatically as you move speakers/microphones or adjust parameters (no “run” buttons needed).
Ready.
Mental model: there are hidden sources (independent causes) and your sensors record mixtures.
We assume a simple linear mixing story: X = A·S where S are the latent sources (rows = sources), X are the observed channels (rows = sensors), and A contains the sensor weights (how much each source “shows up” in each channel).
ICA estimates an unmixing matrix W so the components Ŝ = W·X are as statistically independent as possible (using higher‑order information, not just correlation). In audio mode, this corresponds to the classic “two speakers → two microphones” cocktail party problem.
After ICA, you can ask two complementary questions: (1) Which sensors contribute most to a component? (row of W) and (2) Which components contribute most to a sensor? (row of A). The “Channel contributions” plot visualizes these weightings using RMS contributions.
Implementation note: this page runs a small FastICA variant (tanh nonlinearity) in your browser. It’s meant for intuition, not production analysis.

Controls

noise σ = 0.10
6 s
Ready.
EEG intuition: Each channel is a weighted sum of latent sources (brain rhythms + artifacts). ICA estimates components with distinct time courses and scalp weight patterns.
After ICA, you can “zero out” artifact components and reconstruct cleaned channels.
Pedagogy note: in real pipelines you also care about referencing, filtering, rank, and stability; component identification is not purely automatic.

Interactive Visualization

Room model: hidden speakers (sources) → microphones (sensors). Drag icons to change mixing.
Hidden sources (S) — (may be hidden)
Observed sensors (X) — mixtures
Recovered components (Ŝ) — ICA estimate