New algorithm can improve diagnosis and treatment of sleep disorders


Scientists have developed an artificial intelligence (AI) algorithm to improve the diagnosis, treatment, and understanding of sleep disorders.

Researchers from the University of Copenhagen’s Department of Computer Science partnered with the Danish Center for Sleep Medicine at Rigshospitalet to develop an algorithm based on 20,000 nights of sleep that can improve approaches to sleep disorders.

The study has been published in the journal Digital Medicine.

Difficulty sleeping, sleep apnoea, and narcolepsy are among a range of sleep disorders that affect many people around the world.

Mathias Perslev, a PhD at the Department of Computer Science and lead author of the study, said: “The algorithm is extraordinarily precise. We completed various tests in which its performance rivalled that of the best doctors in the field, worldwide.”

Faster and easier diagnosis

Today, most sleep disorder examinations usually start with admittance to a sleep clinic, where a person’s sleep is monitored overnight using various measuring instruments. A specialist in sleep disorders then reviews the seven to eight hours of measurements from the patient’s sleep.

The doctor manually divides these seven to eight hours of sleep into 30-second intervals, all of which must be categorised into different sleep phases, such as rapid eye movement (REM) sleep, light sleep, deep sleep, etc. The algorithm can perform this time-consuming task in just seconds.

Poul Jennum, Professor of Neurophysiology and Head of the Danish Center for Sleep Medicine, said: “This project has allowed us to prove that these measurements can be very safely made using machine learning – which has great significance. By saving many hours of work, many more patients can be assessed and diagnosed effectively.”

By collecting data from a variety of sources, the researchers behind the algorithm have been able to ensure optimal functionality. In total, 20,000 nights of sleep from the United States and a host of European countries have been collected and used to train the algorithm.

Mathias Perslev and Christian Igel, who led the project on the computer science side, explained: “We have collected sleep data from across continents, sleep clinics and patient groups. The fact that the algorithm works well under such diverse conditions is a breakthrough.

“Achieving this kind of generalization is one of the greatest challenges in medical data analysis.”

Supporting future understanding and treatment

The researchers hope that the algorithm will help to inform doctors and researchers around the world about sleep disorders in the future. The sleep analysis software is freely available at and can be used by anyone, anywhere.

“Just a few measurements taken by common clinical instruments are required for this algorithm. So, use of this software could be particularly relevant in developing countries where one may not have access to the latest equipment or an expert,” added Mathias.

The researchers are now working with Danish physicians to get the software and algorithm approved for clinical use.


Please enter your comment!
Please enter your name here