OSCR

MMFNet: A multi-branch multi-scale framework with adaptive sparse self-attention and cross-modal fusion for sleep stage assessment.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 51 lines · 1.6 KB · no license

  1. import os
  2. import numpy as np
  3. import re
  4. from scipy.io import savemat
  5. directory = 'C:/Users/Smart/Desktop/AttnSleep-main/prepare_datasets/edf_78'
  6. files = [f for f in os.listdir(directory) if re.match(r'SC4\d{3}([EFG]0)\.npz', f)]
  7. file_groups = {}
  8. for file in files:
  9. match = re.match(r'SC4(\d{3})([EFG]0)\.npz', file)
  10. if match:
  11. group_key = int(match.group(1)) // 10
  12. if group_key not in file_groups:
  13. file_groups[group_key] = []
  14. file_groups[group_key].append(file)
  15. for group_key, group_files in file_groups.items():
  16. if len(group_files) == 2:
  17. group_files.sort()
  18. data1 = np.load(os.path.join(directory, group_files[0]))
  19. data2 = np.load(os.path.join(directory, group_files[1]))
  20. tmp1 = data1['x']
  21. tmp1_label = data1['y']
  22. tmp2 = data2['x']
  23. tmp2_label = data2['y']
  24. data = np.transpose(np.concatenate((tmp1,tmp2),axis=0),axes=(0,2,1))
  25. data = data[:,1:5,:]
  26. label = np.concatenate((tmp1_label,tmp2_label),axis=0).reshape(-1, 1)
  27. print(f"merge {group_files[0]} and {group_files[1]} succedd")
  28. else:
  29. data1 = np.load(os.path.join(directory, group_files[0]))
  30. tmp1 = data1['x']
  31. tmp1_label = data1['y']
  32. data = np.transpose(tmp1,axes=(0,2,1))
  33. data = data[:,1:5,:]
  34. label = tmp1_label.reshape(-1, 1)
  35. output_filename = f'C:/Users/Smart/Desktop/AttnSleep-main/prepare_datasets/edf_78_mat/{group_files[0][:-7]}.mat'
  36. savemat(output_filename, {
  37. "data": data,
  38. "label": label
  39. })
  40. print("final")

convert_mat.py, no license · at the source

Overview

Authors: Yuan Li1, Ningning Wang1
ORCID iDs: Ningning Wang
  1. School of Physics and Electronic-Electrical Engineering, ABA Teachers College, Aba Tibetan and Qiang Autonomous Prefecture, Sichuan, China
Journal: PloS one, volume 21, issue 7, article e0353930
Dates: received 6 December 2025; accepted 30 June 2026; published online 17 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pone.0353930 · PMID 42467718 · PMCID PMC13378990 · OpenAlex W7169548650
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), human (organism), methods / tools (subfield)
Methods: Connectivity, Spectral & time-frequency, Machine learning
MeSH: Sleep Stages*, Algorithms, Electroencephalography, Electrooculography, Humans, Polysomnography, Signal Processing, Computer-Assisted (* major topic)
Topic: EEG and Brain-Computer Interfaces (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 32 references in the paper

Abstract

Accurate sleep stage classification serves as a crucial foundation for sleep health assessment and disease diagnosis. However, existing approaches still encounter several challenges, including limited feature representation, redundancy in extracted information, and difficulties in effectively integrating cross-modal physiological signals. To address these issues, we propose a novel framework entitled Multi-Branch Multi-Scale Fusion with Adaptive Sparse Self-Attention and Cross-Modal Integration (MFFNet). Specifically, considering the prominent time-frequency characteristics of sleep signals, multiple branches are designed to capture multi-scale information, including a time-granular feature extraction branch and a time-frequency extraction branch. Furthermore, a multi-head adaptive sparse self-attention mechanism is introduced to suppress redundant information while emphasizing discriminative features. In addition, we employ an adaptive cross-modal fusion strategy that dynamically integrates information from EEG and EOG, and further visualize the contribution of each modality to sleep stage classification. Experiments conducted on the Sleep-EDF-39 and Sleep-EDF-153 datasets demonstrate the effectiveness of the proposed approach. Using the Fpz-Cz EEG channel and EOG signals, MFFNet achieves accuracy rates of 84.26% and 81.86%, with F1 scores of 75.91% and 73.38%, respectively, highlighting its competitive performance in sleep stage assessment.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

OSF tmjbk

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: Python (3)
Size: 10 files, 3 scripts
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (2 files), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
3 files
At the source: osf.io/tmjbk/

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 3 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data Availability

All data used in this study are from publicly available datasets. The Sleep-EDF-39 and Sleep-EDF-153 datasets are available from the Sleep-EDF Database Expanded on PhysioNet at https://www.physionet.org/content/sleep-edfx/1.0.0/. The ISRUC-S1 dataset is available from the ISRUC Sleep Dataset repository at https://sleeptight.isr.uc.pt/. The source code supporting this study has been deposited in an Open Science Framework (OSF) repository and is publicly available at https://osf.io/tmjbk/. The corresponding DOI is https://doi.org/10.17605/OSF.IO/TMJBK.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 7 MeSH terms, 27 references.

Cite

This paper

Li, Y., & Wang, N. (2026). MMFNet: A multi-branch multi-scale framework with adaptive sparse self-attention and cross-modal fusion for sleep stage assessment. PloS one, 21(7), e0353930. https://doi.org/10.1371/journal.pone.0353930

BibTeX

@article{li2026mmfnet,
author = {Li, Yuan and Wang, Ningning},
title = {{MMFNet: A multi-branch multi-scale framework with adaptive sparse self-attention and cross-modal fusion for sleep stage assessment}},
journal = {PloS one},
year = {2026},
month = jul,
volume = {21},
number = {7},
pages = {e0353930},
publisher = {PLOS},
issn = {1932-6203},
doi = {10.1371/journal.pone.0353930},
url = {https://doi.org/10.1371/journal.pone.0353930},
pmid = {42467718},
pmcid = {PMC13378990}
}

RIS

TY - JOUR
AU - Li, Yuan
AU - Wang, Ningning
TI - MMFNet: A multi-branch multi-scale framework with adaptive sparse self-attention and cross-modal fusion for sleep stage assessment
T2 - PloS one
J2 - PLoS One
PY - 2026
DA - 2026/07/17
VL - 21
IS - 7
SP - e0353930
SN - 1932-6203
PB - PLOS
DO - 10.1371/journal.pone.0353930
UR - https://doi.org/10.1371/journal.pone.0353930
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pone.0353930",
"type": "article-journal",
"title": "MMFNet: A multi-branch multi-scale framework with adaptive sparse self-attention and cross-modal fusion for sleep stage assessment",
"container-title": "PloS one",
"author": [
{
"family": "Li",
"given": "Yuan"
},
{
"family": "Wang",
"given": "Ningning"
}
],
"container-title-short": "PLoS One",
"volume": "21",
"issue": "7",
"page": "e0353930",
"DOI": "10.1371/journal.pone.0353930",
"PMID": "42467718",
"PMCID": "PMC13378990",
"ISSN": "1932-6203",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pone.0353930",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
17
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.3389/fbinf.2026.1738132 [code]
SimpleKANSleepNet: a Kolmogorov-Arnold network based sleep stage classification method.
Journal: Frontiers in bioinformatics
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 8 references
[2] doi:10.1186/s12911-024-02522-2
Machine learning-empowered sleep staging classification using multi-modality signals.
Journal: BMC medical informatics and decision making
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 7 references
[3] doi:10.1177/20552076251398440 [code]
KAN-SleepNet: A deep learning model combining Kolmogorov-Arnold Networks and bidirectional LSTM for automated sleep staging using EEG signals.
Journal: Digital health
In common: NumPy, physionet.org/content/sleep-edfx, methods / tools, EEG, 7 references
[4] doi:10.3389/fninf.2023.1123376
Novel methods for elucidating modality importance in multimodal electrophysiology classifiers.
Journal: Frontiers in neuroinformatics
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 7 references
[5] doi:10.3389/fphys.2023.1171467
DynamicSleepNet: a multi-exit neural network with adaptive inference time for sleep stage classification.
Journal: Frontiers in physiology
In common: physionet.org/content/sleep-edfx, 7 references
[6] doi:10.3389/fnins.2022.973761 [code]
MMASleepNet: A multimodal attention network based on electrophysiological signals for automatic sleep staging.
Journal: Frontiers in neuroscience
In common: SciPy, NumPy, physionet.org/content/sleep-edfx, 6 references
[7] doi:10.3390/bioengineering12030286
An Effective and Interpretable Sleep Stage Classification Approach Using Multi-Domain Electroencephalogram and Electrooculogram Features.
Journal: Bioengineering (Basel, Switzerland)
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 6 references
[8] doi:10.3390/s23073446
Sleep Stage Classification in Children Using Self-Attention and Gaussian Noise Data Augmentation.
Journal: Sensors (Basel, Switzerland)
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 6 references
[9] doi:10.1038/s41598-024-60796-y
ZleepAnlystNet: a novel deep learning model for automatic sleep stage scoring based on single-channel raw EEG data using separating training.
Journal: Scientific reports
In common: physionet.org/content/sleep-edfx, EEG, 6 references
[10] doi:10.3390/brainsci13081201
Temporal Feature Extraction and Machine Learning for Classification of Sleep Stages Using Telemetry Polysomnography.
Journal: Brain sciences
In common: physionet.org/content/sleep-edfx, EEG, 6 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1371/journal.pone.0353930.svg)](https://openscicode.org/badge/doi/10.1371/journal.pone.0353930)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1371/journal.pone.0353930.svg
   :target: https://openscicode.org/badge/doi/10.1371/journal.pone.0353930
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pone.0353930"><img src="https://openscicode.org/badge/doi/10.1371/journal.pone.0353930.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.