✦ Day 07 · Component Labeling

ICLabel
Automated IC Classification

Replace subjective manual component inspection with a deep neural network that classifies each ICA component into Brain, Muscle, Eye, Heart, Line Noise, Channel Noise, or Other — with calibrated probability estimates.

🤖 Deep Learning 🏷 7-Class Taxonomy 📊 Probability Outputs 🐍 mne-icalabel

Manual classification of ICA components is time-consuming, subjective, and doesn’t scale. Two experts examining the same component often disagree. ICLabel solves this by using a deep convolutional neural network trained on thousands of expert-labeled components to automatically classify each IC into one of seven categories with calibrated probability estimates.


1

The Seven-Class Taxonomy
Brain, Muscle, Eye, Heart, Line Noise, Channel Noise, Other

ICLabel classifies every independent component into one of seven categories:

🧠

Brain

💪

Muscle

👁

Eye

Heart

Line Noise

🔌

Chan Noise

Other

Key insight: ICLabel outputs probabilities, not binary labels. A component might be 72% Brain and 18% Eye — your rejection threshold determines whether that component gets excluded.


2

Running ICLabel in MNE
mne-icalabel Integration

The mne-icalabel package provides a seamless interface. After fitting ICA (Day 6), you simply call label_components() to get probability vectors for every component.

Python
from mne_icalabel import label_components

# ica was fitted on Day 6
ic_labels = label_components(raw, ica, method='iclabel')

# ic_labels is a dict with 'labels' and 'y_pred_proba'
for idx, (label, probs) in enumerate(zip(
        ic_labels['labels'], ic_labels['y_pred_proba'])):
    print(f"IC{idx:02d}: {label} (p={max(probs):.2f})")

3

Automated Rejection Thresholds
Brain vs. Non-Brain Decision Boundaries

A common strategy: exclude any component whose “Brain” probability is below a threshold (e.g., <50%). Alternatively, exclude components classified as a specific artifact type with probability above a threshold.

Python
# Strategy: exclude non-brain components
labels = ic_labels['labels']
exclude_idx = [i for i, label in enumerate(labels)
               if label not in ('brain', 'other')]

ica.exclude = exclude_idx
print(f"Excluding {len(exclude_idx)} components: {exclude_idx}")

# Apply to original data
raw_clean = ica.apply(raw.copy())

Caution: ICLabel was trained primarily on data with standard 10–20 montages. Performance may degrade with high-density (>128 channel) or non-standard electrode layouts. Always spot-check a few components visually.