Inspiration

My grandfather has been a stroke survivor for twenty years. Every time I see him struggle with daily routines like eating, driving, or walking around the house, I wish there were a tool that could help him move the way he wants to. This project is my small step toward that goal.

What it does

We built an EEG-based classifier to predict intended limb movement and execution state from short EEG epochs, as a first step toward assistive control.

How we built it

1. Preprocessing (per epoch):
  • Inf/NaN cleanup + interpolation: Convert ±Inf → NaN, linearly interpolate small gaps per channel.
  • Epoch quality control: Drop epochs if missing samples exceed 1% or any channel is fully missing.
  • Unit standardization: Detect scale and convert V → µV when needed.
  • Zero-phase denoising: Apply 60 Hz notch + 1–40 Hz bandpass (forward–backward filtering).
  • Re-referencing: Use Common Average Reference (CAR) across channels.
  • (Optional) Deduplication: Remove near-duplicate epochs via fingerprint + hash (prevents leakage) within training only.
2. Feature engineering (per epoch)
  • Spectral features: Welch PSD + bandpower (Mu 8–12 Hz, Beta 13–30 Hz, optional log power).
  • Complexity features: Hjorth parameters + Spectral Entropy.
3. Model development
  • Leakage-safe split: Split by participant ID into train/val for both baseline and advanced models.

Baseline model (CSP + LR)

  • Bandpass 8–30 Hz → one-vs-rest CSP → log-variance features → StandardScaler + LogisticRegression (balanced).

Advanced models

  • CNN (EEGNet-style): temporal conv → depthwise spatial conv → separable conv, with pooling + dropout.
  • Multi-task option (challenge): shared EEGNet backbone + two heads (Limb + Execution).
4. Additional features

Explainability (XAI)

  • Integrated Gradients (zero baseline) for the predicted/selected class.
  • Summarized attributions into channel importance, time importance, plus channel×time heatmaps and scalp topomaps.

Results are in GitHub Repo: https://github.com/KavimayilPK/Rice-Datathon-2026/tree/main/Results

Challenges we ran into

  • EEG Fundamentals: EEG domain details (referencing, filtering, band definitions) and working with tensor-shaped epoch data were new to us.
  • Stability vs. Overfitting: We iterated through baselines (CSP + Logistic Regression) and advanced models to find a setup that was stable and performed well without overfitting.

Accomplishments that we're proud of

  • Learned more about EEG: EEG fundamentals and working with multi-dimensional (tensor) data.
  • Full Pipeline Development: We completed a full pipeline, from preprocessing and modeling to evaluation and interpretability, into a finished project.

What’s next for Imagination is a Whisper

  • Different EEG modeling: Try stronger architectures (e.g., attention/TCN/Transformer-style EEG models) and tune EEGNet variants more systematically.
  • Generalization + deployment: Test on new sessions/devices and package the pipeline into a reproducible, user-friendly app/notebook.
Share this project:

Updates