Decoding Sleep Deprivation From MEG-based Spatio-Temporal Neural Recordings using Transformers
Title: Decoding Sleep Deprivation From MEG-based Spatio-Temporal Neural Recordings using Transformers
DNr: Berzelius-2023-124
Project Type: LiU Berzelius
Principal Investigator: Andreas Gerhardsson <>
Affiliation: Karolinska Institutet
Duration: 2023-05-04 – 2023-12-01
Classification: 30105


Sleep disorders are a prevalent concern in modern society, impacting cognitive performance and overall well-being. There is an arsenal of diagnostic tools available for assessing sleep disorders. Some of the more extensive tests require sleep labs as well as equipment that needs to be worn during sleep. An objective test for sleep disorders that can be quickly performed in an outpatient setting could have a significant impact on the accessibility of diagnosing these conditions. Aims: The primary aim was to explore if it is possible to predict sleep deprivation by applying the deep learning Transformer architecture to decode neuronal activity. Material and Methods: 33 healthy participants' attention towards emotional stimuli was observed. This was done prior to and after being sleep restricted for two nights. Neuronal activity was recorded using MEG. Computational analysis was done using the Vision Transformer architecture. Results: The tried Transformer models were not able to predict sleep deprivation though several other models used to compare with the Transformer models were. Conclusions: Our findings support the possibility of diagnosing sleep deprivation using MEG in combination with a deep learning model. However, the feasibility of using the Transformer architecture remains inconclusive based on this study. By expanding on the size of data collection and fine-tuning the models it could be possible to accurately diagnose sleep deprivation. By including different patient groups affected by insufficient sleep, the diagnostic capabilities could be expanded to discern the underlying cause of the sleep deprivation