SleepXViT
Two-stage Vision Transformer that scores sleep stages from images of polysomnography recordings.
Neuroscience signals · 608 operations Structure only
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Neuroscience signals
- Parameters
- 97.6M
- Operations
- 608
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2025, npj Digital Medicine
- Cited by
- 27 (as of 28 October 2026)
- Authors
- Hyojin Lee, You Rim Choi, Hyun Kyung Lee and others
- Checked
- Structure only: shapes and data types are hypotheses, not measurements.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m20458
- Graph hash
- c84132e54745163098d900a1e3f8a01716de3c16ec078788f912a80c32cbcff3
- Skeleton hash
- b1f5c063f5c1d3845100662edd7083d6577caad888b0dd97085e549e44d01abd
- Architecture hash
- c327da41c0a4405235f4222261f13b3274ed8c29940d4aee5e304095cbf0316b
- Diagram SHA-256
- 9aad039981f473749d47af6daf3deb4359bc996a9cf581e00541bf90d0d174f5
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
What it is
SleepXViT scores sleep stages the way a human technician does, by looking at a picture of the recording that shows all the signals together. In sleep scoring each 30-second period of polysomnography (PSG), called an epoch, is assigned one of five stages: wake, REM sleep, N1, N2 or N3. The paper's case for images is that experts score by eye across EEG, eye, muscle, heart and breathing traces, so a model that reads the same picture gives explanations they can check.
The model is two Vision Transformers in sequence. The Intra-epoch ViT takes the 224 × 224 image of one epoch, splits it into 16 × 16 patches and classifies it, starting from weights pre-trained on ImageNet-21k and fine-tuned on ImageNet-1k. The image is laid out so that each patch holds part of one signal channel and never a mix of channels. The Inter-epoch ViT then takes the embeddings of 10 consecutive epochs, applies attention along the sequence and predicts a stage for every epoch in it.
At inference the paper slides this 10-epoch window forward one epoch at a time and aggregates the overlapping predictions. On KISS, a PSG image dataset from 7745 patients across four hospitals, the paper reports a Macro F1 score of 81.94%. Beside each prediction the system offers a confidence score, a heatmap of the image regions that mattered and relevance scores for the neighboring epochs.
Key idea. SleepXViT stages sleep from standardized PSG images with one Vision Transformer per epoch and a second across epochs, and explains its predictions with confidence scores and heatmaps.
- SleepXViT
- sleep staging
- sleep stage classification
- polysomnography
- PSG image
- explainable vision transformer
- Intra-epoch ViT
- Inter-epoch ViT
- visual sleep scoring
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{sleepxvit2025,
title = {Explainable vision transformer for automatic visual sleep staging on multimodal PSG signals},
author = {Hyojin Lee and You Rim Choi and Hyun Kyung Lee and Jaemin Jeong and Joopyo Hong and Hyun‐Woo Shin and Hyung‐Sin Kim},
year = {2025},
journal = {npj Digital Medicine},
doi = {10.1038/s41746-024-01378-0}
}