Building systems that
turn neural signals
into usable interfaces.
I work across EEG, signal processing, machine learning, and real-time BCI systems, with a focus on moving neural technology from controlled experiments toward practical use.
- Cross-subject EEG decoding
- Real-time BCI
- Self-supervised learning
- EEG hardware integration
Flagship BCI and neural interface projects — the culmination of the technical journey.
Real-Time Motor Imagery BCI Pipeline
The evaluation bug that changed the result
End-to-end motor imagery BCI: EEGNet trained on BCI Competition IV-2a, exported to ONNX, streamed over LSL, with a live dashboard and a corrected evaluation methodology.
- EEG
- Motor Imagery
- EEGNet
- PyTorch
- ONNX
- LSL
- BCI IV-2a
Dual-Paradigm BCI Speller — P300 + SSVEP
Two paradigms, one interface
A dual-paradigm BCI speller built on P300 and SSVEP, with a hardware abstraction layer, browser-based calibration, LLM-assisted predictive text, and OS-level keypress output via LSL.
- P300
- SSVEP
- EEG
- xDAWN
- CCA
- FBCCA
- LSL
- GPT-2
Self-Supervised Pretraining for Cross-Subject Motor Imagery BCI
Can representation learning reduce calibration?
Self-supervised contrastive pretraining for subject-independent motor imagery EEG decoding, fused with Riemannian geometry for few-shot calibration, benchmarked against a classical baseline.
- Self-Supervised Learning
- EEG
- EEGNet
- NT-Xent
- Riemannian Geometry
- Cross-Subject
- ONNX
Alzheimer's EEG Binary Classifier
Comparing architectural assumptions for EEG classification
Binary classification of Alzheimer's disease continuum (Normal vs Impaired) using resting-state EEG with EEGNet, Transformer, and Graph Attention Networks.
- EEG
- EEGNet
- Transformer
- GAT
- Alzheimer's
- Resting-State
- PyTorch
The path from software development to real-time BCI systems.
The complete collection — every meaningful repository, organized by category.
End-to-end motor imagery BCI: EEGNet on BCI IV-2a, ONNX export, LSL streaming, live dashboard, corrected evaluation methodology.
Self-supervised contrastive pretraining for cross-subject motor imagery EEG, fused with Riemannian geometry for few-shot calibration.
Dual-paradigm BCI speller: P300 (xDAWN+LDA) and SSVEP (CCA/FBCCA), hardware abstraction layer, LLM predictive text, OS keypress output.
Binary classification of Alzheimer's continuum using resting-state EEG, comparing EEGNet, Transformer, and Graph Attention Networks.
Focused 10-day sprint building BCI components and experiments, documenting daily progress.
Exploratory work on motor imagery EEG decoding — preprocessing, epoching, CSP, and initial classifiers.
Hands-on exploration of EEG signal processing: filtering, ICA, PSD, epoching, and visualization.
Sequence modeling pipeline for EEG classification using recurrent and temporal architectures.
LSTM-based pipeline for predicting epileptic seizures from EEG recordings.
Detection of seizure events in EEG signals using deep learning approaches.
Neural decoding experiments translating EEG signal patterns into interpretable outputs.
BCI-oriented seizure prediction system — currently in development.
Emotion recognition from facial expressions — currently in development.
Remote photoplethysmography for heart rate estimation from video using computer vision.
Machine learning experiment for Parkinson's disease detection from biomedical data.
Implementation and experimentation with the ViViT (Video Vision Transformer) architecture for video understanding.
Interactive visualization tool for understanding neural network architectures and layer activations.
NLP-based conversational chatbot using sequence models and language understanding.
NLP analysis tool for WhatsApp chat exports — sentiment, word frequency, activity patterns.
Classic ML classification project predicting Titanic passenger survival using feature engineering.
Comparative study of multiple ML models on the Titanic dataset to evaluate tradeoffs.
Binary classification of diabetes onset using the Pima Indians dataset with multiple ML approaches.
Regression project predicting food prices using engineered features and ML models.
Collection of general ML experiments exploring classification, regression, and feature engineering.
Experimental sandbox for testing ML techniques, model architectures, and evaluation strategies.
Hands-on practice building and training neural networks from scratch using TensorFlow/Keras.
Deep learning project for detecting Android malware using static and dynamic features.
Web application for Urdu poetry collection and sharing, built with Firebase and JavaScript.
Demonstration of Firebase authentication flows — signup, login, session management.
Mental wellness web application built with Firebase and JavaScript.
Sandbox for practicing Python fundamentals — data types, control flow, functions.
Current areas of study and experimentation.
EEG Representation Learning
Self-supervised and contrastive methods for learning transferable EEG representations across subjects.
Cross-Subject BCI
Reducing per-user calibration burden through transfer learning and Riemannian geometry fusion.
Neural Decoding
Translating neural signal patterns into intended commands — motor imagery, P300, and SSVEP paradigms.
Real-Time BCI
Streaming acquisition, low-latency inference, and closed-loop human-computer interaction over LSL.
BCI Accessibility
Building speller and control interfaces designed for practical assistive use beyond lab demonstrations.
Human-Centered Neurotechnology
Moving BCI systems from controlled experiments toward technology people can actually use.
NEURAL SIGNALS
- EEG
- MNE
- Signal Processing
- CSP
- ICA
- PSD
MACHINE LEARNING
- Scikit-learn
- TensorFlow
- PyTorch
- EEGNet
- Transformers
- GNNs
BCI SYSTEMS
- LSL
- ONNX
- Real-Time Inference
- Streaming
- Signal Replay
SOFTWARE
- Python
- JavaScript
- React
- FastAPI
- Next.js
- Firebase
I started with software development and machine learning, gradually moving into neural signals, EEG, and brain-computer interfaces. Today I focus on building systems that connect machine learning with real-world neural interfaces.
My long-term goal is to help move BCI technology beyond controlled laboratory environments and toward systems people can actually use.
- FIELD
- Brain-Computer Interfaces
- SIGNAL
- EEG
- METHODS
- Signal Processing Machine Learning Deep Learning
- SYSTEMS
- Real-Time Inference LSL ONNX
- STATUS
- Building / Researching
Experiments, observations, and technical questions from actual project work.
Why Offline BCI Accuracy Isn’t the Whole Story
A trained EEGNet model achieves 75.4% offline on Subject 1 of BCI Competition IV-2a. In real-time streaming over LSL, the same model drops to 63.8% full-window accuracy. The gap is structural, not a bug being hidden — and it comes from a place most BCI papers don’t discuss.
The numbers
Offline evaluation: 75.4% accuracy (mean of 2 runs, corrected methodology) on Subject 1. Real-time streaming: 63.8% full-window (868/1360 scored) and 60.5% precision-window (202/334 scored). Both use the same model, the same data, and the same preprocessing pipeline.
Where the gap comes from
Offline evaluation filters the entire continuous recording once, so every training epoch has real EEG data on both sides of it. Real-time inference has no access to future data — the zero-phase filter (filtfilt) used to match training preprocessing has to pad the newest edge of each window, distorting exactly the portion closest to "now." This is not a defect being hidden; it is a known, structural consequence of using zero-phase filtering in a causal system.
Why it matters
Published real-time 4-class motor imagery systems on comparable consumer-grade hardware report online accuracies around 35–41%. This system’s 60–64% is meaningfully above that range even with the filtering limitation unresolved. But the point is not "we beat them" — it is that offline and real-time are different evaluation problems. A model that looks good in a notebook can degrade substantially when the filter no longer has future data to work with. A concrete, industry-standard fix (a causal, stateful filter using scipy.signal.sosfilt with persistent filter state) is known and scoped but not yet implemented.
What I Learned From Finding Test-Set Leakage in a BCI Pipeline
Checkpoint selection during training was using the same held-out session (1test) that final accuracy was reported against. The overall mean was 62.9%. After correction, it dropped to 59.5% — and the most interesting finding was not the drop itself, but which subjects dropped and which didn’t.
The bug
During training, the checkpoint with the best validation accuracy was selected as the final model. But the validation set was the same held-out session (1test) that final accuracy was reported against. This is a form of test-set leakage: the model was indirectly optimized against the test set through checkpoint selection, inflating the reported accuracy.
The fix
A strict three-way split was implemented: an inner train/validation split (carved from session 0train) determines the training stopping point, then a fresh model is refit on the full 0train session using that stopping point, and evaluated exactly once against the true held-out 1test session. The corrected overall mean dropped from 62.9% to 59.5%.
The interesting part
The drop was not uniform. Subjects 1, 3, 8, and 9 (strong signal) dropped modestly (2–10 points). Subjects 5 and 6 (already near chance) barely moved. But subjects 2 and 7, previously reported as solid mid-tier performers (57.6%, 61.8%), collapsed to near-chance once leakage was removed. Subject 7 then recovered to 68.8% once given the full 288-trial training set — a genuine data-starvation effect, not leakage. Subject 2 stayed near chance regardless of data volume (35.3%), evidence that its earlier "good" score was leakage-driven illusion, not real signal. This differential pattern — separating genuine signal from leakage-driven illusion — is itself one of the more informative findings of the corrected evaluation.