Wearable for the Brain

Supported by a Y Combinator summer research grant, I built a discreet EEG device that sits behind the ear and measures brain activity throughout the day. The data is processed using large-scale Brain Foundation Models (inspired by recent progress in LLMs) to infer metrics related to cognitive load, arousal, and fatigue, while being very robust to noise. The goal was to understand how real-world behavior influences mental performance and longer-term brain health, especially for knowledge workers and individuals at risk of chronic cognitive strain. This work led to US Provisional Patent No. 63/883,254.

nature and person

For hardware, my latest prototype used the Xiao nRF52840 Sense, a Texas Instruments ADS1299 front-end, and a 3.7 V 50 mAh Li-ion rechargeable cell. The enclosure was designed in Onshape and 3D-printed, and the electronics were laid out in KiCad / EasyEDA. My custom PCBs were manufactured and assembled through JLCPCB. I also made my own dry electrodes using a PDMS base with silver nanoparticles and Triton X-100 to provide conductivity without the wet gels normally required for EEG.

The Arduino-based firmware was written in C. It handled sampling and basic filtering on-device, while model inference was deferred to the backend. The frontend was a Swift iOS app; the backend used Python (FastAPI) with Supabase.

Much of the work involved condensing lab-grade EEG equipment, typically a bulky headset with long setup times and conductive gels, into a small, behind-the-ear device someone could realistically wear in everyday life. Replacing wet electrodes with soft, biocompatible dry electrodes was an important step toward that goal.

On the software side, most progress came from applying Brain Foundation Models (BFMs). Traditional EEG signals were often considered too noisy, especially from consumer-friendly electrodes and positions. But recent work showed that BFMs (large models pretrained on institutional EEG datasets) could generalize across subjects, sessions, and setups.

Using this approach, I trained and tested on a standard cognitive-load benchmark dataset: while conventional approaches typically reached ~60% accuracy, the BFM-based pipeline reached ~95% accuracy. That said, this result was achieved using data collected on conventional EEG hardware, so I subsequently retrained the models on data from my own device. I didn’t yet have enough scale for full generalization, but when fine-tuned to an individual with ≥6 hours of labeled data, I still saw compelling performance.

I collaborated heavily with Hector Astrom and Trevor Xing-Xie.