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, not stored by OSCR: 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
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.3390/diagnostics16162609
Automated Multimodal Sleep Staging Using DWT-Based Wavelet Decomposition and Explainable Machine Learning with Signal Sculpting Topographies.
Journal: Diagnostics (Basel, Switzerland)
In common: physionet.org/content/sleep-edfx, methods / tools, EEG, 5 references
[2] doi:10.3390/brainsci16080793
Disentangling EEG Fingerprinting and Sleep Biomarkers Using Generalized Weighted Ordinal Patterns.
Journal: Brain sciences
In common: physionet.org/content/sleep-edfx, EEG, 2 references
[3] doi:10.1007/s00422-026-01049-1 [code]
A three-component dynamical index of consciousness-related neural organisation.
Journal: Biological cybernetics
In common: SciPy, NumPy, physionet.org/content/sleep-edfx, EEG
[4] doi:10.1038/s41598-026-48881-w
SleepPACNet: new convolutional neural network considering phase-amplitude coupling for automatic sleep stage classification using single-channel electroencephalogram.
Journal: Scientific reports
In common: EEG, 3 references
[5] doi:10.3390/s26134091
Hypnogram-Driven Automatic Sleep Staging and a Quality-Index Assessment Through a Two-Stage LSTM-DNN Ensemble Learning Approach Using Multi-Biosignal Features for Sleep Disorder Detection.
Journal: Sensors (Basel, Switzerland)
In common: methods / tools, EEG, 2 references
[6] doi:10.1371/journal.pone.0346294
Neural network architectures and normalization techniques for automated sleep stage classification using rodent EEG and EMG signals.
Journal: PloS one
In common: methods / tools, EEG, 2 references
[7] doi:10.1038/s41598-026-68186-2 [code]
NeuroStream: spectral-spatio-temporal deep learning for visual stimulus classification from EEG.
Journal: Scientific reports
In common: SciPy, NumPy, methods / tools, EEG, 1 reference
[8] doi:10.1371/journal.pone.0352191 [code]
Bayesian Uncertainty-aware Deep Learning with noisy labels: Tackling annotation ambiguity in EEG seizure detection.
Journal: PloS one
In common: SciPy, NumPy, methods / tools, EEG, 1 reference
[9] doi:10.1038/s41746-026-02778-0 [code]
Trust-gated synthetic EEG augmentation reduces performance drops when generalizing to new patients.
Journal: NPJ digital medicine
In common: SciPy, NumPy, EEG, 1 reference
[10] doi:10.1093/sleepadvances/zpag044 [code]
REST-a deep learning tool for automated mouse sleep stage classification.
Journal: Sleep advances : a journal of the Sleep Research Society
In common: SciPy, NumPy, EEG, 1 reference

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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

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