All models

SleepFocalNet

Focal modulation network that scores sleep stages for every epoch of a full night of single-channel EEG at once.

Neuroscience signals · 705 operations Structure only

Structure-only capture: TorchLens recorded this graph without running real numbers through the model, so shapes and data types on the diagram are hypotheses, not measurements.

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

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

Parameters
549.9K
Operations
705
Framework
PyTorch
Recurrent
No
Published
2025, Pattern Analysis and Applications
Cited by
4 (as of 28 October 2026)
Authors
Hasan Zan
Checked
Structure only: shapes and data types are hypotheses, not measurements.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20455
Graph hash
5667eb8be219788c67e64e5d0d593becfbf875d7abc94ae0c59acf6a79bf8f1f
Skeleton hash
caf17c51f9db1bf27781cffe6095396d6e78a56951a59d2593213a35c57c7b0a
Architecture hash
9de018c4f982db34a95d398971728f0336e56ec1bf81e6e8d69b44cdf02a5a96
Diagram SHA-256
f09e759dd52033c8e0d87974655c8834a4123a9b7c287e5f3b297e7def044052
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3

What it is

SleepFocalNet scores sleep stages from a full night of single-channel EEG, predicting the stage of every epoch simultaneously instead of classifying epochs one at a time. The paper calls this a many-to-many classification framework and builds it on a temporal focal modulation network. Its case for focal modulation is cost: the Focal Modulation Network (FMN) reduces the computational burden of transformers by replacing self-attention with focal modulation.

Where the original FMN for images used patch embedding, this model starts with a convolution block of six sub-blocks, each containing a convolution layer, a ReLU activation and a max pooling layer. Two focal modulation layers follow, each a stack of six basic focal modulation layers with a focal level of 5. The five focal levels use kernels of 15, 21, 27, 33 and 39. A classification block ends in a linear layer with 5 units that produces the probabilities for each sleep stage across all epochs.

The paper reports an accuracy of 0.888 and an F1-score of 0.815 on the Sleep Heart Health Study (SHHS) dataset. For SHHS the input was the C4-A1 EEG derivation sampled at 125 Hz. For the smaller SleepEDF-20 and SleepEDF-78 datasets, the model was initialized with weights pretrained on SHHS before fine-tuning.

Key idea. SleepFocalNet applies a temporal focal modulation network to full-night single-channel EEG and predicts the sleep stages of all epochs simultaneously.

  • SleepFocalNet
  • temporal focal modulation network
  • sleep stage scoring
  • sleep staging
  • sleep stage classification
  • single-channel EEG
  • full-night EEG
  • focal modulation
  • SHHS
  • many-to-many classification

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Zan_2025, title={Temporal focal modulation networks for sleep stage scoring}, volume={28}, ISSN={1433-755X}, url={http://dx.doi.org/10.1007/s10044-025-01475-0}, DOI={10.1007/s10044-025-01475-0}, number={2}, journal={Pattern Analysis and Applications}, publisher={Springer Science and Business Media LLC}, author={Zan, Hasan}, year={2025}, month=Apr }