PLoS Computational Biology (Jan 2024)

Somnotate: A probabilistic sleep stage classifier for studying vigilance state transitions.

  • Paul J N Brodersen,
  • Hannah Alfonsa,
  • Lukas B Krone,
  • Cristina Blanco-Duque,
  • Angus S Fisk,
  • Sarah J Flaherty,
  • Mathilde C C Guillaumin,
  • Yi-Ge Huang,
  • Martin C Kahn,
  • Laura E McKillop,
  • Linus Milinski,
  • Lewis Taylor,
  • Christopher W Thomas,
  • Tomoko Yamagata,
  • Russell G Foster,
  • Vladyslav V Vyazovskiy,
  • Colin J Akerman

DOI
https://doi.org/10.1371/journal.pcbi.1011793
Journal volume & issue
Vol. 20, no. 1
p. e1011793

Abstract

Read online

Electrophysiological recordings from freely behaving animals are a widespread and powerful mode of investigation in sleep research. These recordings generate large amounts of data that require sleep stage annotation (polysomnography), in which the data is parcellated according to three vigilance states: awake, rapid eye movement (REM) sleep, and non-REM (NREM) sleep. Manual and current computational annotation methods ignore intermediate states because the classification features become ambiguous, even though intermediate states contain important information regarding vigilance state dynamics. To address this problem, we have developed "Somnotate"-a probabilistic classifier based on a combination of linear discriminant analysis (LDA) with a hidden Markov model (HMM). First we demonstrate that Somnotate sets new standards in polysomnography, exhibiting annotation accuracies that exceed human experts on mouse electrophysiological data, remarkable robustness to errors in the training data, compatibility with different recording configurations, and an ability to maintain high accuracy during experimental interventions. However, the key feature of Somnotate is that it quantifies and reports the certainty of its annotations. We leverage this feature to reveal that many intermediate vigilance states cluster around state transitions, whereas others correspond to failed attempts to transition. This enables us to show for the first time that the success rates of different types of transition are differentially affected by experimental manipulations and can explain previously observed sleep patterns. Somnotate is open-source and has the potential to both facilitate the study of sleep stage transitions and offer new insights into the mechanisms underlying sleep-wake dynamics.