Journal of neural engineering

A post-training quantization framework for EEG-based sleep stage classification.

Yu Wang, Chang Li, Rencheng Song, Yuanguo Wang, Feng Wan, Xun Chen

HFUT, Tunxi Road, Hefei, Anhui, 230009, China. · Department of Biomedical Engineering, Hefei University of Technology, Hefei, Anhui Province 230027, China, Hefei, 230009, China.

Key points

From the paper's conclusion
  • To address this challenge, we propose a posttraining quantization framework for EEG-based sleep stage classification.

Abstract

OBJECTIVE: Sleep classification models play a crucial role in assessing sleep quality. Although the classification performance of these models has continuously improved in recent years, significant accuracy degradation is commonly observed when quantizing and deploying them on edge devices with limited memory and computational resources. APPROACH: To address this challenge, we propose a posttraining quantization framework for EEG-based sleep stage classification. Specifically, we first identify convolutional and linear layers within the model, then compute layerwise sensitivities based on each layer's input. We dynamically adjust the threshold for each layer based on its sensitivity, using this threshold to detect abnormal weights causing excessive quantization error in that layer. To ensure quantization accuracy, we preserve these abnormal weights at their original precision while compressing the remaining weights to 4 bits. After quantizing each layer, we employ dynamic low-rank compensation to correct quantization errors and further enhance accuracy, addressing information loss during quantization. MAIN RESULTS: Experiments on the Sleep-EDF-20, Sleep-EDF-78 and SHHS datasets demonstrate that our method achieves near-lossless compression: the accuracy of the vast majority of sleep classification models drops by less than 1%, while reducing model size by nearly 8 times. SIGNIFICANCE: This work provides the first general framework for post-training quantization of sleep classification models, offering a new approach for the practical deployment of these models on edge devices.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

A post-training quantization framework for EEG-based sleep stage classification — Science Skim