Learning Pathological Brain Dynamics: EEG Foundation Models and Epilepsy
Skip to main content
eScholarship
Open Access Publications from the University of California

UCLA

UCLA Electronic Theses and Dissertations bannerUCLA

Learning Pathological Brain Dynamics: EEG Foundation Models and Epilepsy

Abstract

Epilepsy affects approximately 50 million people worldwide, and roughly one-third of patients are drug-resistant. For these patients, closed-loop neurostimulation offers an alternative to surgical resection, but current devices close the loop on detection rather than on outcome: stimulation parameters are set at periodic clinic visits and are not informed by what the brain is currently doing or about to do. Progress depends on two open problems: how to track brain state in real time from EEG, and how seizure activity evolves through thalamocortical networks. This dissertation studies both problems and connects them through a learned model of seizure dynamics for closed-loop intervention planning. The first thread develops scalable self-supervised methods for EEG representation learning, progressing from a pretrained transformer-CNN for seizure detection from wearable behind-the-ear EEG, to Mentality, a Mamba-based foundation model that learns from reconstruction, to Laya, the first LeJEPA-based EEG foundation model. Predicting in latent space rather than signal space produces more transferable representations of brain state across downstream tasks, suggesting that the choice of pretext task shapes what is clinically useful. The second thread characterizes thalamocortical network dynamics across focal seizures using intracranial EEG. At ictal onset, the anterior and centromedian thalamic nuclei are recruited bidirectionally, with broadband inflow from the seizure onset zone to the thalamus and slow-frequency outflow from the thalamus to cortex; the centromedian nucleus is preferentially recruited in frontal seizures and the anterior nucleus in limbic seizures. Slow- and beta-band thalamocortical coupling builds through the late ictal phase and disengages at termination. Thalamic spectral and thalamocortical connectivity features classify seizure state, supporting their evaluation as candidate biomarkers for adaptive thalamic stimulation. These two threads are brought together conceptually and architecturally in Alap, an action-conditioned world model of seizure dynamics. Alap connects learned EEG representations with mechanistic network measurements. Empirical validation against the thalamocortical signatures identified here remains future work. Together these contributions move toward a mechanistic, predictive account of pathological brain dynamics and a foundation for personalized neurostimulation.