Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise

In an article published in the journal PLOS Computational Biology, researchers from the University of Oxford, UK, ETH Zurich, Switzerland, and the National Institute of Science and Technology Policy, Japan, developed a device called Somnotate for automated sleep stage classification and analysis. They discussed the ability of their device to identify intermediate states and failed transitions between sleep stages and reported that their device outperforms existing methods and reveals new insights into sleep dynamics.

Study: Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise. Image credit: ibreakstock/Shutterstock
Study: Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise. Image credit: ibreakstock/Shutterstock


Sleep is an important biological process that affects many aspects of human health and behavior. However, studying sleep and its underlying mechanisms is challenging because it requires accurate and reliable methods to classify the different stages of sleep and wakefulness.

Sleep stage classification or polysomnography is the process of assigning one of three vigilance states, including awake, rapid eye movement (REM) sleep, or non-REM (NREM) sleep to each epoch of electrophysiological data recorded from freely behaving animals. This is typically performed by human experts relying on visual inspection of electroencephalogram (EEG) and electromyogram (EMG) signals and following established rules and guidelines.

However, manual annotation is time-consuming, subjective, and prone to errors, especially when the signals are ambiguous or reflect intermediate states. Therefore, automated methods for sleep stage classification have been introduced using machine learning techniques and extracted features from the EEG and EMG signals. However, most of these methods are deterministic, assigning a single state to each epoch without indicating how certain they are in their prediction. Moreover, they often ignore the contextual information provided by the surrounding epochs, which can help to resolve ambiguities and improve accuracy.

About the Research

In the present paper, the authors proposed Somnotate, a probabilistic sleep stage classifier that can quantify and report the certainty of its predictions and can systematically integrate contextual information. They combined two well-established machine learning techniques: linear discriminant analysis (LDA) and hidden Markov models (HMMs).

LDA is a dimensionality reduction method that transforms high-dimensional input data such as EEG and EMG power spectra into low-dimensional features that maximize the separation between the target classes, including the vigilance states. HMMs are a type of probabilistic classifier that models the sequential dependencies between the target classes and computes the state sequence given the input data and the transition probabilities between states.

The study applied the new method to a data set of six 24-hour recordings of anterior EEG, posterior EEG, and EMG in freely behaving mice, which were independently scored by four experienced sleep researchers. They compared the performance of the created classifier to other classifiers, such as LDA, naive Bayes, and decision trees, as well as manual annotations. Moreover, they tested the robustness of Somnotate to errors in the training data, changes in the features of the data, changes in the state transition probabilities, and different recording configurations.

Research Findings

The outcomes showed that the newly designed device achieved an accuracy of 97% on the test dataset, which was significantly higher than the other classifiers and the manual annotations. It also outperformed other state-of-the-art algorithms for automated sleep stage classification, such as IntelliSleepScorer and SPINDLE. Existing models IntelliSleepScorer and SPINDLE are based on decision tree ensembles and deep convolutional neural networks, respectively.

Somnotate was remarkably robust to errors in the training data, maintaining a high accuracy even when half of the training samples were mislabelled. It also operates across different types of experimental manipulations, such as sleep deprivation and optogenetic stimulation, without a noticeable drop in performance. Furthermore, it was compatible with different electrophysiological signals and could accurately infer the vigilance state using a single EEG, EMG, or local field potential (LFP) signal.

The key feature of this tool is that it quantifies and reports the certainty of its predictions, which enables the identification of epochs with ambiguous or intermediate states. The authors revealed that these epochs often occurred around state transitions and that some of them corresponded to failed attempts to switch between states. They also indicated that the probability of failed transitions was not random but depended on the type of transition and the animal’s recent sleep-wake history.

For example, they found that transitions from REM to NREM were more likely to fail than transitions from REM to awake and that transitions from NREM to awake or REM were more likely to fail after sleep deprivation. These findings suggest that the presented tool can reveal new aspects of sleep dynamics and the mechanisms underlying state transitions.


In summary, the novel tool is a powerful and versatile tool for sleep stage classification that facilitates and enhances sleep research in various ways and sets new standards in polysomnography. It combines optimal feature extraction by LDA with context-aware state annotation by HMMs and quantifies the certainty of its predictions. This automation not only saves time and resources but also ensures accurate and reliable annotation of large amounts of electrophysiological data.

Somnotate reportedly surpasses the accuracy of both human experts and other automated methods, demonstrating robustness against various sources of variation and noise. Moreover, it easily identifies intermediate states and failed transitions that contain important information about sleep dynamics and state transitions. As an open-source resource, this device is freely available for use. The researchers suggested that the recommended device is a valuable resource for sleep researchers and has the potential to offer new insights into the mechanisms and functions of sleep and wakefulness.

Journal reference:
Muhammad Osama

Written by

Muhammad Osama

Muhammad Osama is a full-time data analytics consultant and freelance technical writer based in Delhi, India. He specializes in transforming complex technical concepts into accessible content. He has a Bachelor of Technology in Mechanical Engineering with specialization in AI & Robotics from Galgotias University, India, and he has extensive experience in technical content writing, data science and analytics, and artificial intelligence.


Please use one of the following formats to cite this article in your essay, paper or report:

  • APA

    Osama, Muhammad. (2024, January 19). Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise. AZoAi. Retrieved on May 27, 2024 from

  • MLA

    Osama, Muhammad. "Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise". AZoAi. 27 May 2024. <>.

  • Chicago

    Osama, Muhammad. "Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise". AZoAi. (accessed May 27, 2024).

  • Harvard

    Osama, Muhammad. 2024. Somnotate: A Probabilistic Sleep Stage Classifier Revealing Dynamics Beyond Human Expertise. AZoAi, viewed 27 May 2024,


The opinions expressed here are the views of the writer and do not necessarily reflect the views and opinions of AZoAi.
Post a new comment

While we only use edited and approved content for Azthena answers, it may on occasions provide incorrect responses. Please confirm any data provided with the related suppliers or authors. We do not provide medical advice, if you search for medical information you must always consult a medical professional before acting on any information provided.

Your questions, but not your email details will be shared with OpenAI and retained for 30 days in accordance with their privacy principles.

Please do not ask questions that use sensitive or confidential information.

Read the full Terms & Conditions.

You might also like...
Machine Learning-based Predictive Modeling for Traffic Congestion