-
-
Our data processing pipeline uses two detectors in parallel to filter out signal artifacts.
-
Our technology (green) detects and rejects artifacts at a much higher effectiveness rate than the industry standard (orange).
-
A version of our live dashboard looking at the differences between signal processing pipelines.
-
A user testing out our BCI simulator, as a patient would use a device to type on a keyboard.
Inspiration
BCIs are transforming medicine, letting paralyzed patients control cursors, prosthetics, and keyboards with their thoughts. But underneath every BCI demo is a difficult problem: the raw neural signals are full of artifacts — voltage spikes from muscle movement, 60 Hz line noise from electronics, and flatlined electrodes from bad contacts.
The standard fix, fixed-threshold z-score thresholding, misses 87% of these artifacts. For a patient trying to spell a word or move a wheelchair, that failure rate is frustrating at best and dangerous at worst. We wanted to build something better.
What it does
artifact-reject is a real-time artifact rejection module that plugs into neural data pipelines and catches corrupted signal windows before they reach any decoder or ML model.
It runs two detectors in parallel:
- MAD (Median Absolute Deviation) — an adaptive amplitude detector that flags channels with extreme spikes or flatlines, without needing recalibration across rigs or subjects
- FFT (Fast Fourier Transform) 60 Hz detector — a spectral check that catches sinusoidal line noise that amplitude-based methods can't see at all
On synthetic 32-channel, 30 kHz data with 18% artifact injection, we detect 63% of artifacts (vs. 13% for the baseline), with 83% precision. That's a 5x improvement. It integrates as a drop-in "tap" for Science Corp's Synapse neurotech platform, requiring zero changes to existing recording setups.
How we built it
The core is pure Python + NumPy: no ML, no training data, no GPU required. Fast enough for real-time 30 kHz streaming.
- artifact_reject.py — three detection functions (MAD, FFT, fixed threshold baseline for comparison), a rolling SignalBuffer, and a Synapse tap that intercepts live broadband frames via Protocol Buffers
- visualize.py — live 3-panel matplotlib plot showing raw signal, our detector output, and baseline side-by-side in real time
- A browser-based demo dashboard built with vanilla JS and HTML5 Canvas, with a MediaPipe finger-tracking BCI keyboard showing the before/after effect of the filter
- Pre-generated JSON data (from generate_data.py, which imports the real detector functions) so the web demo replays actual pipeline output, not a simulation
Challenges we ran into
Getting the synthetic data generation right was harder than expected. Naive Gaussian white noise is too easy to detect — so we built a realistic signal model with 1/f pink noise, oscillatory bursts (alpha at 10 Hz, gamma at 40 Hz), sub-threshold transients, and harmonic interference at 50 and 70 Hz to make the benchmark meaningful.
The Synapse integration also required figuring out Protocol Buffer deserialization and device config for channel metadata on the fly, with limited documentation.
On the demo side, getting the web UI to faithfully represent real detector behavior — not a hand-crafted illusion — required careful separation of concerns between data generation (Python) and rendering (JS).
Accomplishments that we're proud of
- A 5x improvement over the industry-standard baseline on a realistic benchmark
- Clean, modular architecture that is genuinely drop-in ready for any lab running Synapse
- A demo that uses the actual detector code to generate its data, so what you see in the browser is what you'd get in the real pipeline
- No ML overhead; fully interpretable, tunable thresholds, works out of the box without training data or GPUs
What we learned
Building for real BCI pipelines taught us that signal quality is the silent bottleneck in neurotech. Companies invest heavily in electrode design and implant procedures, but the software glue between raw recordings and ML decoders gets much less attention — and it's where bad data silently poisons everything downstream.
We also learned that robust statistics (median, MAD) dramatically outperform mean/std methods on data with heavy-tailed noise, and that spectral and amplitude detectors are genuinely complementary — neither alone catches what both together do.
What's next for Artifact Reject
- More detectors — common-mode rejection for cross-channel artifacts, epoch-level drift detection, impedance-correlated flagging
- Adaptive thresholds — auto-tune MAD and FFT cutoffs per-session from the first N minutes of baseline data
- Broader platform support — beyond Synapse, integrating with OpenEphys, Blackrock Cerebus, and NeuroPace APIs
- Formal validation — testing on publicly available clinical neural datasets (e.g., BCI Competition IV, MNI Open iEEG)
- Packaging — publish as a pip-installable library so any neurotech lab can drop it in without touching their existing stack
- Integration into Science Corp Synapse platform as a Tap — adding it to their official git repo as an issue to merge into their official documentation could help out a lot of companies using the platform
Log in or sign up for Devpost to join the conversation.