Deep Learning Discriminates Seizures from Normal Brain Oscillations in the Electroencephalogram of a Rat Model of Post-traumatic Epilepsy.
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 80 lines · 3.8 KB · no license
- % Use updated filenames files to locate EEG records, perform multicategory
- % detection, and write structured array with detections for each 30 minute file
- % updated to handle missing files labeled 'null' as timeline placeholders
- clc
- clear all;
- % Cat: 1=noise, 2=SWDs (r), 3=ESs (g), 4=Spikelets
- % Cat: 1 = noise, 2=SWDs (r), 3=spikes (g))
- % Experiment = 'Other';
- Experiment = 'Mvac';
- % Experiment = 'Sean';
- % Experiment = 'Jeremy';
- [BasePath, RatNames, Chans] = GetRatNames(Experiment);
- Nrats = size(RatNames,2);
- Ncat=4;
- % Ncat=5;
- % Fs=500; CutLo=0.1; CutHi=100; Order=1; Notch=1;
- Fs=500; CutLo=1; CutHi=40; Order=1; Notch=1; %these are exactly the same as used during training
- fb = cwtfilterbank('SignalLength',5000,'VoicesPerOctave',12); %create filterbank in advance for faster repeated application
- allImages = zeros(224,224,3,180); %make this once to save a bit of time
- allImages = uint8(allImages);
- DeletOldDetectionFiles = 1; %use this rarely in case we want to change the training and redo
- if(DeletOldDetectionFiles>0)
- disp(['Are you sure you want DeletOldDetectionFiles set?']);
- pause
- end
- % for irat = 1:Nrats
- for irat =28:28
- RatName = char(RatNames(:,irat))
- DetectorPath=[BasePath, RatName, '\'];
- Channel = Chans(1,irat);
- % Channel = 3
- load([DetectorPath 'AllFileNames_EEG'],'FileNames');
- load([DetectorPath 'GNmodCat',num2str(Ncat)],'trainedGN');
- nEEGFiles = size(FileNames,2);
- if(nEEGFiles>0)
- for ifile=1:nEEGFiles %here is where we process each file for seizures
- EEGFileName = deblank(char(FileNames(1,ifile)));
- if(strcmp(EEGFileName,'null'));continue;end %just place
- % holder for missing file at this date/time so skip
- [isfile,isfolder,fbytes,fdate,fdatenum,fpath,fname,fext] = GetFileInfo(EEGFileName);
- DETFileFolder = [fpath(1:strfind(fpath,'\EEG')) 'DET\' RatName '\'];
- % classifications for each 30 min block are put in DET folder is same folder as EEG as a .mat file with EEG filename
- if ~exist(DETFileFolder,'dir');mkdir(DETFileFolder);end %if DET folder does not exist, create it
- cd (DETFileFolder);
- DETFileName=[fname '.mat'];
- if exist (DETFileName, 'file')
- if(DeletOldDetectionFiles)
- disp('Deleting existent file.')
- DETFileName
- delete(DETFileName)
- end
- end
- if exist(DETFileName, 'file')
- continue
- else
- % if ~exist(DETFileFolder,'dir');mkdir(DETFileFolder);end %if DET folder does not exist, create it
- disp(['Writing DET for ',DETFileFolder, DETFileName])
- tic
- [LongTrace,ReformData,ReformDataUnfiltered,nlines] = ReadFilterRasterizeLongTraceRaw(EEGFileName,Channel,Fs,CutLo,CutHi,Order,Notch);
- % [DETs] = ClassifyMultiCatArray(ReformDataUnfiltered,fb,trainedGN,allImages);
- [DETs] = ClassifyMultiCatArray(ReformData,fb,trainedGN,allImages); % We now analize ReformData, which is filtered exactly the same as training EEG
- elapsed=toc
- nDETs = size(DETs,2);
- save (DETFileName, 'DETs')
- percentdone=ifile/nEEGFiles*100;
- disp(['elepsed time = ',num2str(elapsed),' nDETs = ',num2str(nDETs),' Percent done = ',num2str(percentdone)])
- end
- end
- end
- end
- % end
Classify.m at commit 53acad6, no license · at the source
Overview
- Department of Psychology and Neuroscience, University of Colorado, Boulder, Colorado 80309
- Department of Neurosurgery, University of Utah School of Medicine, Salt Lake City, Utah 84108
Abstract
This study used machine learning to objectively identify seizures in the electroencephalogram of a model of post-traumatic epilepsy based on fluid percussion injury in male rats. We applied transfer learning to a neural-network trained and tested on three potentially distinct electroencephalographic phenotypes: (1) late-onset convulsive seizures associated with rare post-traumatic epilepsy, (2) early-onset convulsive seizures that often occurred after sham or injury treatment (independent of post-traumatic epilepsy), and (3) spike-wave discharges (SWDs), which occurred in both injured and sham-control rats. The neural network was able to detect seizure events within individual animals and across different cohorts and showed that early and late seizures have similar electroencephalographic phenotypes. Additionally, cross-over training and testing on SWDs from injured and sham-control rats distinguished a convulsive seizure phenotype from normal SWDs. Convolutional neural network modeling of the electroencephalogram can identify spectro-temporal phenotypes that reliably distinguish SWDs from convulsive seizures, indicating that (1) SWDs are normal, not to be falsely classified as nonconvulsive epileptic seizures; (2) the automated detection of convulsive seizures over months revealed rare post-traumatic epilepsy with low seizure frequency; (3) early and late (epileptic) seizures were indistinguishable within and across rats, thus suggesting similar underlying neuronal circuits and ictogenic pathways. This commonality, however, may also obscure important differences between seizure types; (4) convolutional neural network modeling may facilitate objective comparison of seizures within and between laboratories, supplementing subjective expert visual classification, and (5) the rarity of injury-induced epilepsy argues fluid percussion injury is poorly suited for effectively testing anti-epileptogenesis therapies.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
dbarth-tech/ML-seizures
53acad61302269a1df712e7ac52dab9b4375a482, 19 April 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
6 files
- Classify.m, MATLAB, 80 lines
- FiltBlock.m, MATLAB, 17 lines
- NotchBlock.m, MATLAB, 20 lines
- ReadFilterRasterizeLongT
raceRaw.m , MATLAB, 24 lines - Train.m, MATLAB, 118 lines
- README.md, Text, 9 lines
Software accessibility
All code for CNN modeling and seizure detection was written by the corresponding author, DSB, for use in the common MatLab programming environment. Analysis was performed in MATLAB (R2025a). These program files are available for download at GitHub https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 5 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data accessibility
These program files are provided along with exemplary EEG data files to evaluate software functionality. Each data file is provided with associated code used for reading it in the correct format.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 2 keywords, 13 MeSH terms, 39 references.
Cite
This paper
Tatum, S., Taylor, J. A., Waldon, K., Garcia, A. J., Witt, A., Smith, Z. Z., Ryger, S., Zayachkivsky, A., Dudek, F. E., & Barth, D. S. (2026). Deep Learning Discriminates Seizures from Normal Brain Oscillations in the Electroencephalogram of a Rat Model of Post-traumatic Epilepsy. eNeuro, 13(5), ENEURO.0032-26.2026. https://
BibTeX
@article{tatum2026deep,
author = {Tatum, Sean and Taylor, Jeremy A and Waldon, Katie and Garcia, Anthony J and Witt, Aaron and Smith, Zachariah Z and Ryger, Slavka and Zayachkivsky, Andrew and Dudek, F Edward and Barth, Daniel S},
title = {{Deep Learning Discriminates Seizures from Normal Brain Oscillations in the Electroencephalogram of a Rat Model of Post-traumatic Epilepsy}},
journal = {eNeuro},
year = {2026},
month = may,
volume = {13},
number = {5},
pages = {ENEURO.0032--26.2026},
publisher = {Society for Neuroscience},
issn = {2373-2822},
doi = {10.1523/
url = {https://
pmid = {42045047},
pmcid = {PMC13160667}
}
RIS
TY - JOUR
AU - Tatum, Sean
AU - Taylor, Jeremy A
AU - Waldon, Katie
AU - Garcia, Anthony J
AU - Witt, Aaron
AU - Smith, Zachariah Z
AU - Ryger, Slavka
AU - Zayachkivsky, Andrew
AU - Dudek, F Edward
AU - Barth, Daniel S
TI - Deep Learning Discriminates Seizures from Normal Brain Oscillations in the Electroencephalogram of a Rat Model of Post-traumatic Epilepsy
T2 - eNeuro
J2 - eNeuro
PY - 2026
DA - 2026/
VL - 13
IS - 5
SP - ENEURO.0032
EP - 26.2026
SN - 2373-2822
PB - Society for Neuroscience
DO - 10.1523/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1523/
"type": "article-journal",
"title": "Deep Learning Discriminates Seizures from Normal Brain Oscillations in the Electroencephalogram of a Rat Model of Post-traumatic Epilepsy",
"container-title": "eNeuro",
"author": [
{
"family": "Tatum",
"given": "Sean"
},
{
"family": "Taylor",
"given": "Jeremy A"
},
{
"family": "Waldon",
"given": "Katie"
},
{
"family": "Garcia",
"given": "Anthony J"
},
{
"family": "Witt",
"given": "Aaron"
},
{
"family": "Smith",
"given": "Zachariah Z"
},
{
"family": "Ryger",
"given": "Slavka"
},
{
"family": "Zayachkivsky",
"given": "Andrew"
},
{
"family": "Dudek",
"given": "F Edward"
},
{
"family": "Barth",
"given": "Daniel S"
}
],
"container-title-short":
"volume": "13",
"issue": "5",
"page": "ENEURO.0032-26.2026",
"DOI": "10.1523/
"PMID": "42045047",
"PMCID": "PMC13160667",
"ISSN": "2373-2822",
"publisher": "Society for Neuroscience",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
11
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-71458-0 [code]
- Early differential impact of MeCP2 mutations on functional networks in Rett syndrome patient-derived human cortical organoids.Journal: Nature communicationsIn common: Deep Learning Toolbox, Wavelet Toolbox, Image Processing Toolbox, 1 other tool
- [2] doi:10.1038/s41593-026-02258-4 [code]
- Laminar organization of cellular microcircuits modulating human interictal epileptiform discharges.Journal: Nature neuroscienceIn common: Deep Learning Toolbox, Image Processing Toolbox, Signal Processing Toolbox, epilepsy, systems, EEG
- [3] doi:10.3389/fpsyt.2026.1737357 [code]
- A computational pipeline for a neurotransmitter-centric
analysis of the effects of psychiatric medication on EEG spectral power. Journal: Frontiers in psychiatryIn common: Deep Learning Toolbox, Wavelet Toolbox, Signal Processing Toolbox, EEG - [4] doi:10.1038/s41598-026-47179-1 [code]
- Wavelet-enhanced autoencoder based image denoising with CNN fusion.Journal: Scientific reportsIn common: Deep Learning Toolbox, Wavelet Toolbox, Image Processing Toolbox
- [5] doi:10.7554/elife.100642 [code]
- Disrupted hippocampal theta-gamma coupling and spike-field coherence following experimental traumatic brain injury.Journal: eLifeIn common: Wavelet Toolbox, Image Processing Toolbox, Signal Processing Toolbox, rat, systems
- [6] doi:10.7554/elife.101859 [code]
- On-demand seizures facilitate rapid screening of therapeutics for epilepsy.Journal: eLifeIn common: Signal Processing Toolbox, epilepsy, EEG, 2 references
- [7] doi:10.1038/s41467-026-76581-6 [code]
- Thalamocortical bursts encode reward contingencies and drive associative learning.Journal: Nature communicationsIn common: Deep Learning Toolbox, Image Processing Toolbox, Signal Processing Toolbox, systems
- [8] doi:10.1371/journal.pbio.3003938 [code]
- Theta oscillations tag episodic memories for sleep-dependent consolidation.Journal: PLoS biologyIn common: Wavelet Toolbox, Image Processing Toolbox, Signal Processing Toolbox, EEG
- [9] doi:10.1162/imag.a.1229 [code]
- 40 Hz audiovisual stimulation improves sustained attention and related brain oscillations.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Wavelet Toolbox, Image Processing Toolbox, Signal Processing Toolbox, EEG
- [10] doi:10.1038/s41467-026-77318-1 [code]
- Offline generative network reconfiguration guides insight-like accelerated learning by assimilation into schema in rats.Journal: Nature communicationsIn common: Wavelet Toolbox, Signal Processing Toolbox, rat, systems
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 5 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:757760e4f6e24fa0…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
