Project 1: Characterizing Finger-Specific Motor Encoding, Error Signals, and Learning Dynamics with sEEG in Epilepsy Patients Towards Bidirectional Brain–Computer Interfaces

Motivation

Stereo-EEG (sEEG) monitoring in epilepsy patients provides rare access to high-resolution neural activity across deep and distributed brain regions, creating a unique opportunity to study how the human brain encodes fine-grained motor commands, detects errors, and adapts during short-timescale learning. Because patients spend several days implanted with multi-contact depth electrodes during routine clinical monitoring, this setting enables controlled experiments on finger-specific motor representations that are inaccessible with non-invasive methods. The goal of this project is to determine whether sEEG contains the temporal precision, spatial selectivity, and stability required for future minimally invasive, bidirectional BCIs. Achieving this requires a behavioral paradigm with precisely timed motor events, explicit error structure, and synchronized logging aligned to clinical-grade neural recordings.

Our Solution

We built a fully modular EMU experimental stack centered on a Typing Blind paradigm, launched and orchestrated through the Dareplane Control Room. The entire system runs on the EMU workstation and is started via a single command using a macro configuration (macros_typing_blind.toml). From one operator UI, the experimenter can launch the Typing Blind task, PREP/START/STOP/CLEAR LabRecorder, and optionally run a mock Neurofax LSL streamer for dry runs and testing. The Typing Blind task emits structured JSON LSL markers for all trial-level events, including motor targets, keypress responses, hits/misses, error types, and feedback delivery. These markers are recorded in lockstep with the Neurofax sEEG stream via LabRecorder, producing unified XDF files in which neural and behavioral data are precisely synchronized. In parallel, the task writes TSV logs that share the same filename stem as the corresponding XDF, ensuring straightforward alignment during analysis.Experimental blocks are fully parameterized through Dareplane macros and explicitly designed to probe motor specificity and learning. Sessions can be configured as single-finger blocks, mixed-hand blocks, or error-enriched runs that emphasize mistake detection and adaptation. By combining per-finger control, variable cue timing, and feedback modes within a single synchronized acquisition pipeline, the system supports clean isolation of motor execution signals alongside error- and learning-related dynamics.

My Contributions

I engineered the Typing Blind task end-to-end, including its core logic, timing guarantees, and the complete JSON marker schema defining targets, responses, errors, and feedback. I implemented synchronized TSV logging that shares filename stems with LabRecorder XDF outputs, ensuring behavioral and neural data remain tightly coupled across the pipeline. I built and configured the Dareplane Control Room stack and macro system to parameterize experimental blocks (finger/hand sets, cue speed, feedback mode) and to orchestrate LabRecorder PREP/START/STOP actions so that streams and filenames remain aligned across runs. I integrated the full LSL pipeline, combining task-level markers with Neurofax sEEG acquisition, and implemented a mock Neurofax streamer to enable dry runs, debugging, and operator training without a patient connected. Finally, I developed downstream analysis utilities (plot.py) to inspect XDF files, validate synchronization against TSV logs, overlay behavioral events on multichannel sEEG, and perform rapid sanity checks on timing and data integrity. Together, these contributions resulted in a reproducible, operator-friendly EMU rig suitable for fine-grained motor decoding and learning analyses.

Project Outcomes

Looking to discuss further? Contact me at research@mkmaharana.com