The investigators will conduct the study for each subject during their stay in the epilepsy monitoring unit (EMU), which is dictated purely based on their standard clinical needs unrelated to our study. iEEG will be recorded from each patient throughout their stay in the EMU, during which the self-reports from them will be also intermittently collected using validated questionnaires that relate to depression symptoms.~The investigators will build decoders that can track these depression symptoms from iEEG activity. The investigators will also apply electrical stimulation to learn a personalized input-output model that predicts the iEEG response to ongoing stimulation. The resulting personalized decoder and the input-output model will be combined to achieve model-based personalization of stimulation therapy.~Successful completion of this study will help enable precisely-tailored deep brain stimulation therapies across diverse conditions and have a broad public health impact.
Neuropsychiatric disorders are a leading cause of disability worldwide with depressive disorders being one of the most disabling among them. Also, millions of patients do not respond to current medications or psychotherapy, which makes it critical to find an alternative therapy. Applying electrical stimulation at various brain targets has shown promise but there is a critical need to improve efficacy.~Given inter- and intra-subject variabilities in neuropsychiatric disorders, this study aims to enable personalizing the stimulation therapy via i) tracking a patient's own symptoms based on their neural activity, and ii) a model of how their neural activity responds to stimulation therapy. The study will develop the modeling elements needed to realize a model-based personalized closed-loop system for electrical brain stimulation to achieve this aim.~The study will provide proof-of-concept demonstration in epilepsy patients who already have intracranial electroencephalography (iEEG) electrodes implanted for their standard clinical monitoring unrelated to this study, and who consent to being part of the study.