← All projects

2026Research

Kahlus: leak-proof EEG foundation models for sleep

Founder and first author, with Krish GargKahlus

200,000,000-parameter EEG foundation models, pretrained on 157 million seconds of sleeping-brain EEG on a 24-GPU cluster, and a leak-proof benchmark the standard task cannot game.

Six headline numbers: 200,000,000 parameters; 157,503,600 seconds of sleep EEG; 7,849 overnight recordings; 24 datacenter GPUs; 2,031 sealed replication nights; IEEE IECBES 2026 first-author paper.
Pipeline in four panels. 01 Data: NSRR SHHS-1 5,793 nights, MESA 2,056 nights with 2,031 sealed, Sleep-EDF 78 subjects, 574 subjects held out. 02 Causal preprocessing: every feature ends at time t, input and target share zero samples. 03 Foundation-model pretraining: MAE and latent targets at 10M, 50M and 200M parameters, 99 runs, 190+ H100-hours on 16× H100 + 8× A100. 04 Probes and evaluation: frozen linear probes for arousal detection and sleep staging, the leak-proof forecasting benchmark, sealed-cohort replication
The Kahlus pipeline, from NSRR overnight recordings to evaluation on people the models never saw.

Kahlus builds EEG foundation models for sleep. Kahlus-V1 set the evaluation standard. Kahlus-V2 applies that standard at scale, to 7,849 overnight recordings from the National Sleep Research Resource (NSRR).

The standard EEG forecasting task scores a model on a target that shares 126 of 127 samples with its input. Scored on the strictly future sample instead, the same ridge baseline goes from MSE 0.0018 to 0.227: 126× inflation from the scoring rule alone. Kahlus-V1 is a leak-proof benchmark: subject-disjoint splits, zero shared samples, and a derived bound on overlap inflation, tested on 286 configurations with 0 violations.

On that benchmark, our GRU beats a tuned ridge on 27 held-out Sleep-EDF subjects at every horizon from 10 to 160 ms: on all 27 subjects at 40 ms, and with 12.4% lower error at 160 ms. The work is published at IEEE IECBES 2026, first author.

Kahlus-V2 pretrains EEG foundation models up to 200,000,000 parameters on 5,194 SHHS-1 nights (43,751 hours), on a 16× H100 + 8× A100 cluster across 99 pretraining runs. Preprocessing is causal end to end, so every filter, resample and patch reads only the past.

At matched compute, masked-signal pretraining (MAE) improves at every scale step. Held-out loss falls from 0.247 to 0.221 to 0.214 nats on 574 subjects who never entered pretraining or probe fitting.

Headline analyses are pre-specified and tested on new people. A pre-specified sleep-EEG effect found on 5,768 SHHS-1 nights replicated on 2,031 MESA nights that stayed sealed in code until one final look: relative risk 5.01 [4.83, 5.18] in development and 3.79 [3.56, 4.02] on the sealed cohort, against 0.995 and 1.004 for a time-shifted control.

Kahlus also develops a stimulation-safety model (patent pending).

Line chart of held-out log loss in nats against trainable parameters on a log scale. Masked signal (MAE) falls from 0.247 at 11M to 0.221 at 51M to 0.214 at 204M.
Masked-signal pretraining scales. Frozen linear probe for arousal detection on 574 held-out SHHS-1 subjects, mean of 3 seeds per point, matched compute.
Dot plot on a log scale: ridge MSE 0.0018 with the overlapping window, 0.227 on the strictly future sample, a gap of about 126 times
The same ridge baseline on the same held-out Sleep-EDF subjects, scored two ways: MSE 0.0018 on the overlapping window, 0.227 on the strictly future sample.
A real Sleep-EDF EEG trace with input samples 0 to 126 marked; in the leaky layout the target is samples 1 to 127, in the leak-free layout only sample 127
A real Sleep-EDF trace (SC4002E0, Fpz-Cz). In the standard task the target is the input shifted one sample, so 126 of 127 samples are shared. In the leak-proof task the target is strictly after the input.
ResultValueTest set
Score inflation exposed126× (MSE 0.0018 vs 0.227)Held-out Sleep-EDF subjects
Inflation bound286 configurations, 0 violations11 signals
GRU vs tuned ridge, 160 msMSE 0.7268 vs 0.8298, 26 of 27 subjects27 held-out Sleep-EDF subjects
Scaling to 200,000,000 parameterserror falls 13% (0.247 to 0.214 nats)574 held-out SHHS-1 subjects
Sealed-cohort replicationRelative risk 5.01 then 3.795,768 SHHS-1 nights, then 2,031 sealed MESA nights
Headline results. Intervals are 95% subject-level bootstrap.
Venue
IEEE IECBES 2026, first-author paper (published)
Data
NSRR SHHS-1 and MESA, 7,849 nights; Sleep-EDF, 78 subjects
Models
Up to 200,000,000 parameters, masked-signal pretraining
Compute
16× H100 + 8× A100, 99 pretraining runs
Bound
286 configurations, 0 violations
IP
Stimulation-safety model, patent pending