preprocessing Level 2 pf-interpolation-rank

ICA after interpolation without rank adjustment

Symptom. Duplicated or degenerate components; ICA fails to converge.

Symptom

An ICA decomposition that looks wrong in a characteristic way: pairs of components with near-identical topographies and mirror-image time courses; components with speckled, physically implausible maps; components whose spectra are flat noise; a decomposition that changes completely when you re-run it with a different seed. Or, more bluntly, the fit does not converge, or converges after many more iterations than usual. Downstream, the classifier (or you) cannot label half the components, and removing any of them changes the data in ways that do not correspond to any artifact.

Cause

ICA is a change of basis. It can only find as many independent components as the data has independent dimensions — its rank. A recording’s rank is not its channel count if anything linear has been done to it:

  • each interpolated channel is a weighted sum of the remaining good channels, so it adds a row without adding a dimension;
  • an average reference makes the channels sum to zero at every time point, costing one more dimension;
  • a reconstructed online-reference channel added back as zeros adds a row and no dimension;
  • SSP projections remove exactly one dimension each.

A 64-channel recording with 3 interpolated channels and an average reference has 64 rows and rank 60. Nothing in the array’s shape records this, and the default number of components in most implementations is derived from the number of channels. Asking for 64 components from rank-60 data asks the estimator for four directions that do not exist; it obliges, by fitting numerical noise, and the four spurious directions are not neatly isolated — they degrade the whole decomposition.

Detect

  • Compute the rank explicitly and compare it with the channel count (mne.compute_rank(inst, rank='info'), or the arithmetic above done by hand). A gap you cannot account for is the finding.
  • Look at the singular values of the channel covariance: a sharp drop to near-zero after k values means the true rank is k.
  • Inspect the decomposition for near-duplicate pairs (high absolute correlation between component time courses, or near-identical topographies of opposite sign).
  • Re-run the fit with a different seed. A well-conditioned decomposition is broadly reproducible up to order and sign; a rank-deficient one is not.
  • Check the pipeline log for every step that touched the channel set: interpolation, referencing, projections, and any channel dropped after the montage was set.

Fix

  • Carry the rank through the pipeline as a number, updated at every linear step, and log it (L2.8). Start at the channel count and subtract: one per interpolated channel, one for an average reference, one per projector.
  • Pass it explicitly: ICA(n_components=rank, ...), or MNE’s rank argument, rather than relying on a default derived from the channel count.
  • Prefer to detect bad channels, re-reference and interpolate before the ICA fit, in the canonical order of L2.8, so that there is one rank to track rather than a moving target.
  • If rank is low enough that the decomposition is unstable — few channels, many interpolated, short recording — reduce the requested number of components deliberately and report it, rather than letting the estimator discover the deficiency for you.
  • Record the seed, so that “the components changed” is a statement you can check rather than a suspicion.

Example

Two ICA decompositions of the same recording after three channels were interpolated and an average reference applied. Left, fitted with the number of components set to the channel count: a grid of component topographies that includes near-duplicate pairs with mirror-image maps and several speckled, non-dipolar maps. Right, fitted with the number of components set to the true rank: the same recording yields distinct, mostly smooth and dipolar topographies with the blink and muscle components clearly separated.
ds-erpcore P3 sub-002, 1-100 Hz, the 3 channels C5, P8, FC4 marked bad and interpolated (spherical spline) and an average reference applied. The array still has 30 rows; the header still reports 30; `mne.compute_rank` on the data reports 27; the eigenvalue spectrum of the channel covariance drops by nineteen orders of magnitude after 26, which is the arithmetic the pitfall page gives (30 − 3 interpolated − 1 average reference = 26). Extended-Infomax ICA (seed 20260917) fitted twice on exactly the same data: asking for 30 components leaves 435 topography pair(s) correlated above 0.9 (largest |r| = 1.00); asking for 26 leaves 0 (largest |r| = 0.83). MNE says so at fit time — "the ratio between the largest and smallest variances is too large" — and fits anyway. Numbers TODO(confirm) at author review. Data: ds-erpcore · license CC-BY-SA-4.0 · DOI 10.18112/openneuro.ds003069.v1.0.0. Source: data/scripts/make_figures_p2.py.