Inspiration
Every stroke or spinal injury patient who undergoes motor rehabilitation faces the same invisible problem: the AI model trained to decode their brain signals on week 1 is nearly useless by week 12 — because the brain changes, and that history is thrown away. There is no "version control" for neural states. We asked: what if we could Git-commit a patient's motor profile to an immutable blockchain after every session?
What it does
NeuroChain is a blockchain provenance framework for EEG-based Brain-Computer Interface (BCI) systems. It:
- Captures EEG motor imagery signals (left hand, right hand, feet, tongue)
- Trains a personalized EEGNet model per session
- Hashes the model weights using SHA-256 (real cryptography, not simulated)
- Anchors each snapshot as an immutable block in a local blockchain
- Detects tampering in under 1ms when any data is altered
- Rolls back to the last verified optimal neural state
- Generates AI-powered clinical reports via Google Gemini API explaining what was compromised and recommending rehabilitation protocols
How we built it
Pipeline: EEG Signal → Butterworth Filter (8–30 Hz) → CSP Features → EEGNet Classifier → SHA-256 Hash → Blockchain Block → Gemini Report
- Python / Google Colab for the ML pipeline and blockchain core
- EEGNet (Lawhern et al., 2018) as the neural classifier
- hashlib for SHA-256 — real cryptography, not simulation
- Google Gemini API for natural language clinical audit reports
- HTML/CSS/JS for the interactive demo interface
- Web Crypto API for browser-side hashing in the frontend
The blockchain is a linked list where each block stores:
- Session timestamp
- SHA-256 hash of model weights
- Hash of the previous block
- Patient session metadata
Tampering any block breaks the hash chain — detectable instantly.
Challenges we ran into
- Intra-subject variability: EEG signals from the same patient differ significantly between sessions. This is precisely why versioning matters — and also why training a robust personalized model in a hackathon timeframe required careful data augmentation.
- No ground truth for latency: The academic literature confirms zero studies have measured combined blockchain + BCI latency. We measured our own: tamper detection runs in <1ms; block anchoring adds ~12ms per session.
- Blockchain without a network: We implemented a single-node chain. True decentralization would require consensus (e.g., Ethereum smart contracts), which is future work.
What we learned
That the gap is real: a systematic review of 729 papers found fewer than 1% address blockchain provenance in BCI systems. The FlyWire connectome project (Nature, 2024) demonstrated that preserving synaptic weight snapshots allows reproducing complex behavior — the same principle, scaled down, is what NeuroChain does for clinical motor rehabilitation.
What's next
- Integration with real EEG hardware (OpenBCI)
- Ethereum smart contracts for decentralized consent management
- Longitudinal study with stroke rehabilitation patients
- Quantum-resistant hashing (SHA-3) for long-term provenance
Log in or sign up for Devpost to join the conversation.