Abstract
Manual, second-by-second scoring of polysomnography (PSG) is the gold standard for diagnosing obstructive sleep apnea (OSA), yet it is time- and labor-intensive and prone to inter-scorer variability. Existing automated approaches analyze only ≤3 channels and skip second-level annotation, reporting instead the coarse Apnea-Hypopnea Index (AHI) and sacrificing clinical detail and transparency. We present VOSA, a Vision-Transformer (ViT)-based model that reproduces the technologist’s visual workflow: it ingests standardized PSG images containing all 21 biosignals, labels every second as normal, hypopnea, or apnea, computes AHI, and assigns four-level OSA severity while supplying attention heatmaps and calibrated confidence scores. Trained and evaluated on KISS, a PSG image dataset from 7,745 patients across four centers, VOSA achieved a per-second Macro F1 score of 82.6% and a severity Macro F1 score of 73.5%, placing 99.2% of patients in the correct or adjacent severity class. Testing on the public SHHS-2 dataset confirmed robust performance. Attention visualizations demonstrated VOSA’s alignment with AASM guidelines. Coupled with image-based sleep staging, VOSA marks the first attempt at fully automated generation of PSG reports and endotypic metrics, delivering an interpretable, scalable solution for precision sleep-medicine workflows.
Introduction
Diagnosing Obstructive Sleep Apnea (OSA) currently relies on Polysomnography (PSG), where patients undergo overnight monitoring of brain waves, heart rates, and respiratory patterns. The resulting data is a massive multimodal time-series that requires manual, second-by-second scoring by human experts—a process that typically takes 70 minutes per patient. This manual bottleneck leads to significant diagnostic delays. While deep learning has been proposed as a solution, previous models often function as "black boxes" or provide only coarse severity metrics (like AHI) without the granular detail required for clinical trust.
The VOSA Framework
To address these challenges, we developed VOSA (Vision-Transformer-based OSA detection). VOSA mimics the visual workflow of a sleep technologist by treating complex sensor data as a standardized image containing 21 biosignals.
Architecture and Methodology
VOSA utilizes a Vision Transformer (ViT) architecture, which is uniquely suited for PSG data. Unlike traditional Convolutional Neural Networks (CNNs) that focus on local spatial relationships, ViT uses attention mechanisms to learn global patterns. This allows the model to correlate distant signals—such as linking a drop in airflow at the bottom of a chart to a subsequent decrease in oxygen saturation elsewhere—regardless of their spatial position.
The training process involves two stages:
- Intra-window Analysis: The model identifies relationships between the 21 biosignals within a single 30-second window.
- Inter-window Context: The model analyzes sequences of windows to capture temporal dynamics, such as how a breathing pause leads to physiological recovery seconds later.
Experimental Results
The model was trained and evaluated using the KISS (Korea Image-based Sleep Study) dataset, comprising 10,253 recordings from 7,745 patients. It was further validated on the public SHHS-2 dataset to ensure cross-population robustness.
Performance Metrics
VOSA demonstrated high accuracy and clinical reliability:
- Per-Second Accuracy: Achieved a Macro F1 score of 82.6% for event classification.
- Severity Classification: Achieved a Macro F1 score of 73.5%, outperforming the previous state-of-the-art model (DRIVEN) by 18.3 percentage points.
- Clinical Reliability: 99.2% of patients were placed in the correct or adjacent severity class, making it a highly reliable tool for clinical triage.
Explainability and Clinical Utility
A key feature of VOSA is its transparency. The model generates attention heatmaps that highlight which specific signals and time segments influenced its decision. This allows clinicians to verify the model's reasoning against established AASM guidelines. Additionally, VOSA provides calibrated confidence scores, enabling technologists to focus their review on "uncertain" regions rather than the entire recording.
When integrated with automated sleep staging, VOSA can generate comprehensive clinical PSG reports with high correlation to human-annotated results (ICC > 0.90 for most metrics), facilitating the calculation of detailed endotypic metrics for personalized treatment.
Conclusion
VOSA represents a significant advancement in automated sleep diagnostics. By providing high-resolution, explainable, and accurate OSA detection, it offers a scalable solution to reduce the burden on sleep laboratories while maintaining the clinical detail necessary for precision medicine. Future work will focus on integrating arousal and body position detection to create a fully autonomous diagnostic agent.
Summary updated