PT - JOURNAL ARTICLE AU - Fox, Benjamin AU - Jiang, Joy AU - Wickramaratne, Sajila AU - Kovatch, Patricia AU - Suarez-Farinas, Mayte AU - Shah, Neomi A AU - Parekh, Ankit AU - Nadkarni, Girish N TI - A foundational transformer leveraging full night, multichannel sleep study data accurately classifies sleep stages AID - 10.1101/2024.08.02.24311417 DP - 2024 Jan 01 TA - medRxiv PG - 2024.08.02.24311417 4099 - http://medrxiv.org/content/early/2024/08/05/2024.08.02.24311417.short 4100 - http://medrxiv.org/content/early/2024/08/05/2024.08.02.24311417.full AB - Study Objectives To investigate whether a foundational transformer model using 8-hour, multi-channel data from polysomnograms can outperform existing artificial intelligence (AI) methods for sleep stage classification.Methods We utilized the Sleep Heart Health Study (SHHS) visits 1 and 2 for training and validation and the Multi-Ethnic Study of Atherosclerosis (MESA) for testing of our model. We trained a self-supervised foundational transformer (called PFTSleep) that encodes 8-hour long sleep studies at 125 Hz with 7 signals including brain, movement, cardiac, oxygen, and respiratory channels. These encodings are used as input for training of an additional model to classify sleep stages, without adjusting the weights of the foundational transformer. We compared our results to existing AI methods that did not utilize 8-hour data or the full set of signals but did report evaluation metrics for the SHHS dataset.Results We trained and validated a model with 8,444 sleep studies with 7 signals including brain, movement, cardiac, oxygen, and respiratory channels and tested on an additional 2,055 studies. In total, we trained and tested 587,944 hours of sleep study signal data. Area under the precision recall curve (AUPRC) scores were 0.82, 0.40, 0.53, 0.75, and 0.82 and area under the receiving operating characteristics curve (AUROC) scores were 0.99, 0.95, 0.96, 0.98, and 0.99 for wake, N1, N2, N3, and REM, respectively, on the SHHS validation set. For MESA, the AUPRC scores were 0.56, 0.16, 0.40, 0.45, and 0.65 and AUROC scores were 0.94, 0.77, 0.87, 0.91, and 0.96, respectively. Our model was compared to the longest context window state-of-the-art model and showed increases in macro evaluation scores, notably sensitivity (3.7% increase) and multi-class REM (3.39% increase) and wake (0.97% increase) F1 scores.Conclusions Utilizing full night, multi-channel PSG data encodings derived from a foundational transformer improve sleep stage classification over existing methods.Competing Interest StatementThe authors have declared no competing interest.Funding StatementResearch reported in this publication was funded in part by NIH grants R01HL168897, UL1TR004419, R01HL171813, K25HL151912, and R21HL165320.Author DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesThe details of the IRB/oversight body that provided approval or exemption for the research described are given below:This work used deidentified, retrospective PSG data collected from multicenter cohort studies and made available through the National Sleep Research Resource (NSRR) at https://sleepdata.org/. Data access was approved for use by the NSRR.I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.YesI understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).YesI have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.YesAll data produced in the present study are available upon reasonable request to the authors. https://sleepdata.org/datasets/shhs/ https://sleepdata.org/datasets/mesa/