Jun Wang, Sue Osting, Anna Goforth, Mathew V Jones, Rama Maganti
{"title":"REST-a deep learning tool for automated mouse sleep stage classification.","authors":"Jun Wang, Sue Osting, Anna Goforth, Mathew V Jones, Rama Maganti","doi":"10.1093/sleepadvances/zpag044","DOIUrl":null,"url":null,"abstract":"<p><strong>Study objectives: </strong>Sleep research in rodents often involves large-scale electroencephalography (EEG) recordings that are traditionally scored manually-a labor-intensive process prone to scorer bias and inconsistency. We developed the REST-Rodent EEG Sleep Transformer, a neural network trained for automated sleep stage classification based on EEG and electromyography (EMG).</p><p><strong>Materials and methods: </strong>EEG and EMG signals were segmented into 4-second epochs, transformed via short-time Fourier transform to generate representations with five time frames and 130 frequency bins per epoch. We used a two-stage model: the first stage analyzes individual epochs to extract meaningful features, while the second stage captures sleep patterns over time by modeling the relationships between consecutive epochs. The model was trained based on 116 days of artifact-free, pre-labeled recordings from 94 male Fmr1 knockout mice (C57BL/6 background). It was then tested on 38 separate 24-hour recordings from the same mice and on three other mouse strains (C57, DBA, and CD-1). REST was also tested against a convolutional neural network (CNN)-based model (Accusleep).</p><p><strong>Results: </strong>REST achieved a Cohen's kappa of 0.873 ± 0.005 and F1-scores for Wake (0.936 ± 0.003) and non-rapid eye movement sleep (0.926 ± 0.003), with strong performance for rapid eye movement sleep (0.913 ± 0.005). REST showed robust cross-strain compatibility and generalized effectively to external datasets.</p><p><strong>Conclusion: </strong>REST is a fast, accurate, and accessible tool for automated sleep stage classification in mice. Its Transformer architecture provides long-range temporal awareness, enabling consistent and reliable analysis of rodent sleep in large-scale datasets.</p>","PeriodicalId":74808,"journal":{"name":"Sleep advances : a journal of the Sleep Research Society","volume":"7 2","pages":"zpag044"},"PeriodicalIF":0.0000,"publicationDate":"2026-04-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13189165/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Sleep advances : a journal of the Sleep Research Society","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1093/sleepadvances/zpag044","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/1/1 0:00:00","PubModel":"eCollection","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Study objectives: Sleep research in rodents often involves large-scale electroencephalography (EEG) recordings that are traditionally scored manually-a labor-intensive process prone to scorer bias and inconsistency. We developed the REST-Rodent EEG Sleep Transformer, a neural network trained for automated sleep stage classification based on EEG and electromyography (EMG).
Materials and methods: EEG and EMG signals were segmented into 4-second epochs, transformed via short-time Fourier transform to generate representations with five time frames and 130 frequency bins per epoch. We used a two-stage model: the first stage analyzes individual epochs to extract meaningful features, while the second stage captures sleep patterns over time by modeling the relationships between consecutive epochs. The model was trained based on 116 days of artifact-free, pre-labeled recordings from 94 male Fmr1 knockout mice (C57BL/6 background). It was then tested on 38 separate 24-hour recordings from the same mice and on three other mouse strains (C57, DBA, and CD-1). REST was also tested against a convolutional neural network (CNN)-based model (Accusleep).
Results: REST achieved a Cohen's kappa of 0.873 ± 0.005 and F1-scores for Wake (0.936 ± 0.003) and non-rapid eye movement sleep (0.926 ± 0.003), with strong performance for rapid eye movement sleep (0.913 ± 0.005). REST showed robust cross-strain compatibility and generalized effectively to external datasets.
Conclusion: REST is a fast, accurate, and accessible tool for automated sleep stage classification in mice. Its Transformer architecture provides long-range temporal awareness, enabling consistent and reliable analysis of rodent sleep in large-scale datasets.