{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,9]],"date-time":"2026-03-09T22:11:33Z","timestamp":1773094293190,"version":"3.50.1"},"reference-count":42,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2025,2,18]],"date-time":"2025-02-18T00:00:00Z","timestamp":1739836800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Artif. Intell."],"abstract":"<jats:p>Brain stimulation has become a widely accepted treatment for neurological disorders such as epilepsy and Parkinson\u2019s disease. These devices not only deliver therapeutic stimulation but also record brain activity, offering valuable insights into neural dynamics. However, brain recordings during stimulation are often blanked or contaminated by artifact, posing significant challenges for analyzing the acute effects of stimulation. To address these challenges, we propose a transformer-based model, Stim-BERT, trained on a large intracranial EEG (iEEG) dataset to reconstruct brain activity lost during stimulation blanking. To train the Stim-BERT model, 4,653,720 iEEG channels from 380 RNS system patients were tokenized into 3 (or 4) frequency band bins using 1\u202fs non-overlapping windows resulting in a total vocabulary size of 1,000 (or 10,000). Stim-BERT leverages self-supervised learning with masked tokens, inspired by BERT\u2019s success in natural language processing, and shows significant improvements over traditional interpolation methods, especially for longer blanking periods. These findings highlight the potential of transformer models for filling in missing time-series neural data, advancing neural signal processing and our efforts to understand the acute effects of brain stimulation.<\/jats:p>","DOI":"10.3389\/frai.2025.1502504","type":"journal-article","created":{"date-parts":[[2025,2,18]],"date-time":"2025-02-18T06:51:21Z","timestamp":1739861481000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Reconstructing signal during brain stimulation with Stim-BERT: a self-supervised learning model trained on millions of iEEG files"],"prefix":"10.3389","volume":"8","author":[{"given":"Karthik","family":"Menon","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Thomas","family":"Tcheng","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Cairn","family":"Seale","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"David","family":"Greene","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Martha","family":"Morrell","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Sharanya Arcot","family":"Desai","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1965","published-online":{"date-parts":[[2025,2,18]]},"reference":[{"key":"ref1","doi-asserted-by":"publisher","first-page":"251","DOI":"10.1016\/j.yebeh.2018.09.030","article-title":"Automated seizure prediction","volume":"88","author":"Acharya","year":"2018","journal-title":"Epilepsy Behav."},{"key":"ref2","doi-asserted-by":"publisher","first-page":"719","DOI":"10.3390\/bioengineering10060719","article-title":"Robust removal of slow Artifactual dynamics induced by deep brain stimulation in local field potential recordings using SVD-based adaptive filtering","volume":"10","author":"Bahador","year":"2023","journal-title":"Bioengineering"},{"key":"ref3","doi-asserted-by":"publisher","first-page":"697","DOI":"10.3389\/fnins.2021.667373","article-title":"A high accuracy electrographic seizure classifier trained using semi-supervised labeling applied to a large spectrogram dataset","volume":"15","author":"Barry","year":"2021","journal-title":"Front. Neurosci."},{"key":"ref4","doi-asserted-by":"publisher","first-page":"696","DOI":"10.1016\/j.conb.2003.11.001","article-title":"Deep brain stimulation for Parkinson\u2019s disease","volume":"13","author":"Benabid","year":"2003","journal-title":"Curr. Opin. Neurobiol."},{"key":"ref5","doi-asserted-by":"publisher","first-page":"1364","DOI":"10.1016\/j.clinph.2019.05.017","article-title":"Quantitative electrocorticographic biomarkers of clinical outcomes in mesial temporal lobe epileptic patients treated with the RNS\u00ae system","volume":"130","author":"Desai","year":"2019","journal-title":"Clin. Neurophysiol."},{"key":"ref6","first-page":"04805","volume-title":"Bert: Pre-training of deep bidirectional transformers for language understanding","author":"Devlin","year":"2018"},{"key":"ref7","doi-asserted-by":"publisher","first-page":"25422","DOI":"10.1038\/srep25422","article-title":"Detection of epileptic seizures using phase\u2013amplitude coupling in intracranial electroencephalography","volume":"6","author":"Edakawa","year":"2016","journal-title":"Sci. Rep."},{"key":"ref8","doi-asserted-by":"publisher","first-page":"899","DOI":"10.1111\/j.1528-1167.2010.02536.x","article-title":"Electrical stimulation of the anterior nucleus of thalamus for treatment of refractory epilepsy","volume":"51","author":"Fisher","year":"2010","journal-title":"Epilepsia"},{"key":"ref9","doi-asserted-by":"publisher","first-page":"994","DOI":"10.1111\/epi.13740","article-title":"Brain-responsive neurostimulation in patients with medically intractable mesial temporal lobe epilepsy","volume":"58","author":"Geller","year":"2017","journal-title":"Epilepsia"},{"key":"ref10","doi-asserted-by":"publisher","first-page":"181","DOI":"10.1016\/S0165-0270(01)00491-5","article-title":"A template subtraction method for stimulus artifact removal in high-frequency deep brain stimulation","volume":"113","author":"Hashimoto","year":"2002","journal-title":"J. Neurosci. Methods"},{"key":"ref11","doi-asserted-by":"publisher","first-page":"55","DOI":"10.1016\/0165-0270(95)00099-2","article-title":"Stimulus artifact removal in EMG from muscles adjacent to stimulated muscles","volume":"64","author":"Hines","year":"1996","journal-title":"J. Neurosci. Methods"},{"key":"ref12","doi-asserted-by":"publisher","first-page":"659410","DOI":"10.3389\/fnhum.2021.659410","article-title":"Decoding EEG brain activity for multi-modal natural language processing","volume":"15","author":"Hollenstein","year":"2021","journal-title":"Front. Hum. Neurosci."},{"key":"ref13","author":"Hua","year":"2020"},{"key":"ref14","doi-asserted-by":"publisher","first-page":"182238","DOI":"10.1109\/ACCESS.2019.2956865","article-title":"Epileptic seizure detection with permutation fuzzy entropy using robust machine learning techniques","volume":"7","author":"Hussain","year":"2019","journal-title":"IEEE Access"},{"key":"ref15","doi-asserted-by":"publisher","first-page":"102400","DOI":"10.1016\/j.compmedimag.2024.102400","article-title":"Progress and trends in neurological disorders research based on deep learning","volume":"116","author":"Iqbal","year":"2024","journal-title":"Comput. Med. Imaging Graph."},{"key":"ref16","doi-asserted-by":"publisher","first-page":"129","DOI":"10.1080\/17434440.2019.1683445","article-title":"The RNS system: brain-responsive neurostimulation for the treatment of epilepsy","volume":"18","author":"Jarosiewicz","year":"2021","journal-title":"Expert Rev. Med. Devices"},{"key":"ref17","first-page":"11943","volume-title":"BERT: A review of applications in natural language processing and understanding","author":"Koroteev","year":"2021"},{"key":"ref18","doi-asserted-by":"publisher","first-page":"653659","DOI":"10.3389\/fnhum.2021.653659","article-title":"BENDR: using transformers and a contrastive self-supervised learning task to learn from massive amounts of EEG data","volume":"15","author":"Kostas","year":"2021","journal-title":"Front. Hum. Neurosci."},{"key":"ref19","doi-asserted-by":"publisher","first-page":"623","DOI":"10.1038\/nrn2196","article-title":"Translational principles of deep brain stimulation","volume":"8","author":"Kringelbach","year":"2007","journal-title":"Nat. Rev. Neurosci."},{"key":"ref20","doi-asserted-by":"publisher","first-page":"618","DOI":"10.1038\/s41582-018-0055-2","article-title":"Seizure prediction\u2014ready for a new era","volume":"14","author":"Kuhlmann","year":"2018","journal-title":"Nat. Rev. Neurol."},{"key":"ref21","doi-asserted-by":"publisher","first-page":"796","DOI":"10.3390\/w9100796","article-title":"Interpolation in time series: an introductive overview of existing methods, their performance criteria and uncertainty assessment","volume":"9","author":"Lepot","year":"2017","journal-title":"Water"},{"key":"ref22","doi-asserted-by":"publisher","first-page":"S44","DOI":"10.1016\/S1353-8020(13)70013-0","article-title":"The functional role of beta oscillations in Parkinson's disease","volume":"20","author":"Little","year":"2014","journal-title":"Parkinsonism Relat. Disord."},{"key":"ref23","doi-asserted-by":"publisher","first-page":"79043","DOI":"10.1063\/1.4979043","article-title":"Balance of excitation and inhibition determines 1\/f power spectrum in neuronal networks. Chaos: an interdisciplinary","volume":"27","author":"Lombardi","year":"2017","journal-title":"J. Nonlinear Sci."},{"key":"ref24","doi-asserted-by":"publisher","first-page":"314","DOI":"10.1093\/brain\/awl241","article-title":"Seizure prediction: the long and winding road","volume":"130","author":"Mormann","year":"2007","journal-title":"Brain"},{"key":"ref25","doi-asserted-by":"publisher","first-page":"1295","DOI":"10.1212\/WNL.0b013e3182302056","article-title":"Responsive cortical stimulation for the treatment of medically intractable partial epilepsy","volume":"77","author":"Morrell","year":"2011","journal-title":"Neurology"},{"key":"ref26","doi-asserted-by":"publisher","first-page":"102741","DOI":"10.1016\/j.bspc.2021.102741","article-title":"Review of challenges associated with the EEG artifact removal methods","volume":"68","author":"Mumtaz","year":"2021","journal-title":"Biomed. Signal Proc. Control"},{"key":"ref27","doi-asserted-by":"publisher","first-page":"e1244","DOI":"10.1212\/WNL.0000000000010154","article-title":"Nine-year prospective efficacy and safety of brain-responsive neurostimulation for focal epilepsy","volume":"95","author":"Nair","year":"2020","journal-title":"Neurology"},{"key":"ref28","first-page":"13638","volume":"2410","author":"Narayanswamy","year":"2024","journal-title":"Scaling wearable foundation models."},{"key":"ref29","first-page":"06435","volume":"2307","author":"Naveed","year":"2023","journal-title":"A comprehensive overview of large language models."},{"key":"ref30","doi-asserted-by":"publisher","first-page":"1175","DOI":"10.1109\/34.954607","article-title":"Toward machine emotional intelligence: analysis of affective physiological state","volume":"23","author":"Picard","year":"2001","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref31","doi-asserted-by":"publisher","first-page":"1209","DOI":"10.1016\/j.clinph.2021.03.013","article-title":"Acute effects of brain-responsive neurostimulation in drug-resistant partial onset epilepsy","volume":"132","author":"R\u00f8nborg","year":"2021","journal-title":"Clin. Neurophysiol."},{"key":"ref32","doi-asserted-by":"publisher","first-page":"1306","DOI":"10.1111\/epi.16895","article-title":"The SANT\u00c9 study at 10 years of follow-up: effectiveness, safety, and sudden unexpected death in epilepsy","volume":"62","author":"Salanova","year":"2021","journal-title":"Epilepsia"},{"key":"ref33","doi-asserted-by":"publisher","first-page":"714256","DOI":"10.3389\/fnhum.2021.714256","article-title":"Analysis-rcs-data: open-source toolbox for the ingestion, time-alignment, and visualization of sense and stimulation data from the medtronic summit RC+ S system","volume":"15","author":"Sellers","year":"2021","journal-title":"Front. Hum. Neurosci."},{"key":"ref34","doi-asserted-by":"publisher","first-page":"192","DOI":"10.1016\/j.yebeh.2018.04.003","article-title":"Clinical and electrocorticographic response to antiepileptic drugs in patients treated with responsive stimulation","volume":"83","author":"Skarpaas","year":"2018","journal-title":"Epilepsy Behav."},{"key":"ref35","doi-asserted-by":"publisher","first-page":"481","DOI":"10.1016\/j.nec.2011.07.007","article-title":"Responsive neurostimulation suppresses synchronized cortical rhythms in patients with epilepsy","volume":"22","author":"Sohal","year":"2011","journal-title":"Neurosurg. Clin."},{"key":"ref36","doi-asserted-by":"publisher","first-page":"676","DOI":"10.1016\/j.clinph.2017.10.036","article-title":"Changes in the electrocorticogram after implantation of intracranial electrodes in humans: the implant effect","volume":"129","author":"Sun","year":"2018","journal-title":"Clin. Neurophysiol."},{"key":"ref37","doi-asserted-by":"publisher","first-page":"046006","DOI":"10.1088\/1741-2552\/aabc9b","article-title":"Adaptive deep brain stimulation for Parkinson\u2019s disease using motor cortex sensing","volume":"15","author":"Swann","year":"2018","journal-title":"J. Neural Eng."},{"key":"ref38","doi-asserted-by":"publisher","first-page":"1930","DOI":"10.1038\/s41591-023-02448-8","article-title":"Large language models in medicine","volume":"29","author":"Thirunavukarasu","year":"2023","journal-title":"Nat. Med."},{"key":"ref39","article-title":"Attention is all you need","author":"Vaswani","year":"2017","journal-title":"Adv. Neural Inf. Proces. Syst."},{"key":"ref40","first-page":"14367","volume":"2302","author":"Wang","year":"2023","journal-title":"BrainBERT: Self-supervised representation learning for intracranial recordings."},{"key":"ref41","author":"Waqar","year":"2019"},{"key":"ref42","doi-asserted-by":"publisher","first-page":"63","DOI":"10.1001\/jama.2008.929","article-title":"Bilateral deep brain stimulation vs best medical therapy for patients with advanced Parkinson disease: a randomized controlled trial","volume":"301","author":"Weaver","year":"2009","journal-title":"JAMA"}],"container-title":["Frontiers in Artificial Intelligence"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1502504\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,2,18]],"date-time":"2025-02-18T06:51:24Z","timestamp":1739861484000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1502504\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,2,18]]},"references-count":42,"alternative-id":["10.3389\/frai.2025.1502504"],"URL":"https:\/\/doi.org\/10.3389\/frai.2025.1502504","relation":{},"ISSN":["2624-8212"],"issn-type":[{"value":"2624-8212","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,2,18]]},"article-number":"1502504"}}