Neural Signal Decoder

EEG Signal Decoding with Frequency-Aligned Modeling

An end-to-end neural signal decoding pipeline using simulated EEG data. Evaluate multiple architectures (LSTM, Transformer, Spectral Models) with focus on engineering rigor and inductive bias alignment.

Project Overview

Mission

Decode multichannel EEG-like signals into discrete control classes using engineered neural architectures. This project emphasizes rigorous evaluation of modeling paradigms under controlled conditions.

By systematically evaluating different architectural approaches, we identify the inductive biases that matter most for neural signal decoding, providing insights applicable to real BCI systems.

Signal Simulation

Multichannel EEG with class-specific frequency bands (Alpha, Beta, Theta, Gamma) and controlled noise

Multiple Architectures

LSTM, Transformer, and Spectral MLP models for comprehensive architectural comparison

Frequency Alignment

Bandpower-based feature extraction reflecting established neuroscience priors

Reproducibility

Modular design with comprehensive documentation for full reproducibility

Key Metrics

85%
Test Accuracy
Bandpower-based Transformer achieving state-of-the-art decoding performance
4
Frequency Bands
Alpha, Beta, Theta, and Gamma bands for comprehensive spectral analysis
8
Channels
Multichannel EEG simulation with realistic phase variation
3
Model Types
LSTM, Transformer, and Spectral models for architectural comparison

Pipeline Architecture

End-to-End Neural Signal Decoding Pipeline

Signal Generation

Simulated EEG with class-specific frequency bands

Preprocessing

Z-score normalization per channel

Windowing

Sliding window segmentation

Feature Extraction

Bandpower or time-domain features

Model

LSTM, Transformer, or MLP

Classification

Discrete class prediction

Model Architectures

LSTM Decoder

Sequential LSTM architecture for time-domain signal processing. Captures temporal dependencies but struggles with frequency-aligned features due to inductive bias mismatch.

Transformer Decoder

Attention-based sequence model with better generalization. Time-domain Transformer shows improvement over LSTM but benefits significantly from frequency-domain features.

Spectral MLP

Bandpower-based MLP operating on frequency-aligned features. Achieves highest accuracy by leveraging established neuroscience priors about EEG representation.

Technology Stack

Python 3.9+

Core language and runtime

PyTorch 2.0+

Deep learning framework

NumPy

Numerical computing

SciPy

Signal processing & DSP

scikit-learn

ML utilities & metrics

Matplotlib

Visualization & plotting

TQDM

Progress tracking

Jupyter

Interactive notebooks

Key Results & Findings

Bandpower-Based Transformer

Achieves 85% test accuracy by combining Transformer architecture with frequency-aligned bandpower features. This represents the best architectural-feature alignment.

Inductive Bias Mismatch

Time-domain LSTM and Transformer show systematic performance degradation due to inductive bias mismatch with the frequency-dominant class separability in EEG signals.

Feature Engineering Matters

Frequency-aligned features (bandpower) dramatically outperform raw time-domain features, validating neuroscience priors and emphasizing domain knowledge in neural signal processing.

Reproducibility

Complete modular pipeline with seed control and documentation enables full reproducibility. All experimental conditions and hyperparameters are clearly specified.