EduSpeak — EEG-to-Text Decoding for the Classroom

Inspiration

Every teacher has asked this: Did my students actually understand what I just said? Right now there's no signal. You're flying blind. We wanted to change that — not with surveys or quizzes, but with the brain itself.

What we built

A lightweight pipeline that maps EEG brain signals to decoded words and flags where students lost comprehension in real time. The teacher gets a per-word confusion map. The student keeps learning naturally.

How we built it

We built on top of state-of-the-art non-invasive EEG decoding research, extending It goes in two directions.

Signal side. We extract two neuro-cognitive features per 3-second epoch:

$$A_{N400} = \frac{1}{|C| \cdot (t_2 - t_1)} \sum_{c \in C} \int_{t_1}^{t_2} V_c(t)\, dt$$

where $C$ is the set of centro-parietal channels (Cz, Pz, CP1, CP2), and the window is $t_1 = 300\text{ms},\ t_2 = 500\text{ms}$ post word onset. A large negative $A_{N400}$ means the brain found that word semantically unexpected.

The second feature is theta band power, computed via Welch's PSD:

$$P_\theta = \int_{4}^{8} S_{xx}(f)\, df$$

Both scalars are concatenated to the EEG feature vector before the embedding prediction step.

Decoding side. A ridge regression maps the augmented feature vector to a T5 word embedding. We retrieve the top-$K$ candidates per position via cosine similarity over a fixed vocabulary:

$$\hat{w} = \underset{w \in V}{\arg\max}\ \frac{\hat{y} \cdot y_w}{|\hat{y}| |y_w|}$$

A language model then sees the full candidate grid plus the per-word $A_{N400}$ surprise signal and reconstructs the most coherent sentence using global context — something the base system cannot do word-independently.

Hardware. Unicorn 8-electrode EEG headset + lapel microphone. Under $500.

Challenges

  • Noisy EEG on 8 channels. Consumer hardware is far from the 128-channel lab setups in the literature. We leaned into artifact rejection and the N400 Averaging Oracle to compensate.
  • No real-time labeled data. We used a synthetic EEG with a realistic N400 signatures to validate the pipeline end-to-end before connecting live hardware.
  • Honest framing. We were careful not to overclaim. The base decoding architecture is not ours — we built on published research and added two concrete, measurable contributions on top.

What we learned

The N400 has been replicated thousands of times in the literature for good reason — it is a remarkably clean signal even on consumer hardware. Pairing a neuroscience-grounded feature with a language model that understands sentence context turned out to be a natural and powerful combination. We also learned that honest scope is a strength, not a weakness, when presenting to a technical audience.

Built With

Share this project:

Updates