OSCR

SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding.

Code ↔ Paper

4 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 4 matches
  1. [1] § 2. Materials and Methods › 2.1. Graph Construction Block ↔ PLV&PSD.ipynb, lines 72–128 · score 0.59 · frequency resolution, window, Welch, filtered, power, bandpass
  2. [2] § 2. Materials and Methods › 2.2. Graph Evolution Block ↔ SFE-GAT.py, lines 26–43 · score 0.54 · Monte Carlo, edge probabilities, training, Block, Graph
  3. [3] § 2. Materials and Methods ↔ PLV&PSD.ipynb, lines 72–128 · score 0.53 · Power Spectral Density, PSD, band, PLV, EEG, node
  4. [4] § 2. Materials and Methods ↔ SFE-GAT.py, lines 46–102 · score 0.50 · SFE GAT, batch normalization, layer, modules, graph

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

Jupyter notebook · 163 lines · 4.8 KB · no license · 2 matches

  1. # %%
  2. import torch
  3. import torch.nn as nn
  4. import torch.optim as optim
  5. from torch.utils.data import DataLoader, TensorDataset, Subset
  6. import numpy as np
  7. import matplotlib.pyplot as plt
  8. import torch.nn.functional as F
  9. import scipy.signal as sig
  10. from scipy.stats import skew, kurtosis
  11. from scipy.integrate import simpson as simps
  12. from torch_geometric.data import Data
  13. from torch_geometric.loader import DataLoader
  14. # %%
  15. def load_data(subject='A01', flag='T', n_classes=4):
  16. load_data = np.load(f"./data_save/2a/{subject}{flag}.npz")
  17. data_np = load_data['data']
  18. label_np = load_data['label']
  19. if n_classes ==2:
  20. firstClass = np.unique(label_np)[0]
  21. secondClass = firstClass + 1
  22. mask = (label_np == firstClass) | (label_np == secondClass)
  23. data_np = data_np[mask]
  24. label_np = label_np[mask]
  25. label_np = np.where(label_np == firstClass, 0, 1)
  26. data = torch.from_numpy(data_np).float()
  27. label = torch.from_numpy(label_np).long()
  28. label = label - label.min().item()
  29. return data_np, data, label
  30. # %%
  31. '''plv'''
  32. def get_plv(data, label, norm=True, plot=False, save=False):
  33. plv = compute_plv(data)
  34. assert len(plv) == len(label)
  35. if norm==True:
  36. plv = z_score_norm(plv)
  37. print("Datas shape:", plv.shape)
  38. print("Labels shape:", label.shape)
  39. if plot==True:
  40. plt.figure(figsize=(8, 6))
  41. heat_map = plv[0]
  42. plt.imshow(heat_map, cmap='viridis', vmin=0, vmax=1)
  43. plt.colorbar(label='PLV Value')
  44. plt.title("Phase Locking Value (PLV) Matrix")
  45. ax = plt.gca()
  46. ax.set_xticks(range(0, heat_map.shape[1], 3))
  47. ax.set_yticks(range(0, heat_map.shape[0], 3))
  48. ax.set_xticklabels(range(0, heat_map.shape[1], 3), rotation=45)
  49. ax.set_yticklabels(range(0, heat_map.shape[0], 3))
  50. plt.xlabel("Electrode Index")
  51. plt.ylabel("Electrode Index")
  52. if save:
  53. plt.savefig('plv_heatmap.png')
  54. plt.show()
  55. return plv
  56. # %%
  57. '''utils'''
  58. def aggregate_eeg_data(data_np,band):
  59. assert data_np.ndim ==3
  60. data_np = data_np[..., np.newaxis]
  61. data_np = np.copy(data_np) * np.ones(len(band)-1)
  62. return data_np
  63. def bandpass(data: np.ndarray, edges: list[float], sample_rate: float, poles: int = 5):
  64. sos = sig.butter(poles, edges, 'bandpass', fs=sample_rate, output='sos')
  65. filtered_data = sig.sosfiltfilt(sos, data)
  66. return filtered_data
  67. def batch_bandpass(data_np: np.ndarray, band: list[float], fs: float, poles=5):
  68. assert len(band) == data_np.shape[3] + 1,
  69. sos_list = []
  70. for i in range(data_np.shape[3]):
  71. bp = [band[i], band[i+1]]
  72. sos = sig.butter(poles, bp, 'bandpass', fs=fs, output='sos')
  73. sos_list.append(sos)
  74. for i in range(data_np.shape[3]):
  75. filtered = sig.sosfiltfilt(sos_list[i], data_np[:, :, :, i], axis=2)
  76. data_np[:, :, :, i] = filtered
  77. return data_np
  78. def bandpower(data,low,high,fs):
  79. # Define window length (2s)
  80. win = 2* fs
  81. freqs, psd = sig.welch(data, fs, nperseg=win)
  82. # Find intersecting values in frequency vector
  83. idx_delta = np.logical_and(freqs >= low, freqs <= high)
  84. # Frequency resolution
  85. freq_res = freqs[1] - freqs[0]
  86. # Compute the absolute power by approximating the area under the curve
  87. power = simps(psd[idx_delta], dx=freq_res)
  88. return power
  89. def bandpowercalc(data_np,band,fs):
  90. x = np.zeros([data_np.shape[0],data_np.shape[1],data_np.shape[3]]) # (tralis, node, band)
  91. for i in range(data_np.shape[1]):
  92. for j in range(data_np.shape[0]):
  93. for k in range(0,data_np.shape[3]):
  94. data = data_np[j,i,:,k]
  95. low = band[k]
  96. high = band[k+1]
  97. x[j,i,k] = bandpower(data,low,high,fs)
  98. return x
  99. # %%
  100. def get_nodeFeature(data_np, fs=250):
  101. band = list(range(8, 41, 4))
  102. data_np = aggregate_eeg_data(data_np, band)
  103. data_np = batch_bandpass(data_np, band, fs=fs)
  104. x = bandpowercalc(data_np, band, fs)
  105. x = torch.tensor(x, dtype=torch.float32)
  106. return x
  107. def get_adj(plv, threshold=0.3):
  108. adj = (plv > threshold).float() * plv
  109. return adj
  110. def get_input_PyG(data_np, plv, label, threshold=0.3):
  111. fs = 250
  112. x = get_nodeFeature(data_np, fs)
  113. #x = torch.from_numpy(data_np).float()
  114. print("nodeShape:", x.shape)
  115. adj = get_adj(plv, threshold)
  116. data_list = []
  117. for i in range(adj.shape[0]):
  118. source_nodes, target_nodes = torch.where(adj[i, :, :] >= threshold)
  119. edge_index = torch.stack([source_nodes, target_nodes], dim=0)
  120. node_features = x[i,:,:]
  121. data = Data(
  122. x=node_features,
  123. edge_index=edge_index,
  124. y=label[i]
  125. )
  126. data_list.append(data)
  127. return data_list

PLV&PSD.ipynb at commit 88ed7f2, no license · at the source

Overview

Authors: Xin Gao1, Guohua Cao1,2, Guoqing Ma1
ORCID iDs: Xin Gao, Guohua Cao
  1. School of Mechatronic Engineering, Changchun University of Science and Technology, Changchun 130022, China
  2. Chongqing Research Institute, Changchun University of Science and Technology, Chongqing 401133, China
Journal: Sensors (Basel, Switzerland), volume 26, issue 5, article 1730
Dates: received 10 January 2026; accepted 8 March 2026; published online 9 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3390/s26051730 · PMID 41829691 · PMCID PMC12986890 · OpenAlex W7134257306
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), systems (subfield)
Methods: Spectral & time-frequency, Connectivity, Preprocessing, Machine learning
Keywords: motor imagery EEG, graph neural network, brain network dynamics, functional connectivity
MeSH: Motor Cortex*, Algorithms, Brain-Computer Interfaces, Electroencephalography, Graph Neural Networks, Humans (* major topic)
Topic: EEG and Brain-Computer Interfaces (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Department of Science and Technology of Jilin Province (YDZJ202301ZYTS423, YDZJ202301ZYTS263); Ministry of Science and Technology of the People's Republic of China (2020YFB17122); China Postdoctoral Science Foundation (2021M692457)
Citations: not cited yet (Europe PMC); 48 references in the paper

Abstract

Motor imagery EEG decoding often relies on static functional connectivity graphs that cannot capture the dynamic, stage-wise reorganization of brain networks during tasks. This paper aims to develop a graph neural network that explicitly simulates this neurodynamic process to improve decoding and provide computational insights. This paper proposes a Structure-Feature Evolution Graph Attention Network (SFE-GAT). Its inter-layer evolution mechanism dynamically co-adapts graph topology and node features, mimicking functional network reorganization. Initialized with phase-locking value connectivity and spectral features, the model uses a graph autoencoder with Monte Carlo sampling to iteratively refine edges and embeddings. On the BCI Competition IV-2a dataset, SFE-GAT achieved 77.70% (subject-dependent) and 66.59% (subject-independent) accuracy, outperforming baselines. Evolved graphs showed sparsification and strengthening of task-critical connections, indicating hierarchical processing. This paper advances EEG decoding through a dynamic graph architecture, providing a computational framework for studying the hierarchical organization of motor cortex activity and linking adaptive graph learning with neural dynamics.

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

Repository

Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.

GaoHSin/SFE-GAT

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 88ed7f28df0ec3206abaedc4e4abcddb819e1bc8, 12 January 2026
Languages: Jupyter (1), Python (1)
Size: 3 files, 2 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README, 1 notebook
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: PyTorch Geometric (2 files), PyTorch (2 files), Matplotlib (1 file), NumPy (1 file), SciPy (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
3 files

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;
  • 2 scripts, each with its path and the digest of its content;
  • 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • 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 Statement

The data that support the findings of this study are available upon reasonable request from the authors. The source code, trained models, and preprocessing scripts are publicly available at https://github.com/GaoHSin/SFE-GAT (12 January 2026) to facilitate reproducibility and independent evaluation.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 4 keywords, 6 MeSH terms, 3 funders, 47 references.

Cite

This paper

Gao, X., Cao, G., & Ma, G. (2026). SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding. Sensors (Basel, Switzerland), 26(5), 1730. https://doi.org/10.3390/s26051730

BibTeX

@article{gao2026sfe,
author = {Gao, Xin and Cao, Guohua and Ma, Guoqing},
title = {{SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding}},
journal = {Sensors (Basel, Switzerland)},
year = {2026},
month = mar,
volume = {26},
number = {5},
pages = {1730},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {1424-8220},
doi = {10.3390/s26051730},
url = {https://doi.org/10.3390/s26051730},
pmid = {41829691},
pmcid = {PMC12986890}
}

RIS

TY - JOUR
AU - Gao, Xin
AU - Cao, Guohua
AU - Ma, Guoqing
TI - SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding
T2 - Sensors (Basel, Switzerland)
J2 - Sensors (Basel)
PY - 2026
DA - 2026/03/09
VL - 26
IS - 5
SP - 1730
SN - 1424-8220
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/s26051730
UR - https://doi.org/10.3390/s26051730
LA - en
ER -

CSL-JSON

{
"id": "10.3390/s26051730",
"type": "article-journal",
"title": "SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding",
"container-title": "Sensors (Basel, Switzerland)",
"author": [
{
"family": "Gao",
"given": "Xin"
},
{
"family": "Cao",
"given": "Guohua"
},
{
"family": "Ma",
"given": "Guoqing"
}
],
"container-title-short": "Sensors (Basel)",
"volume": "26",
"issue": "5",
"page": "1730",
"DOI": "10.3390/s26051730",
"PMID": "41829691",
"PMCID": "PMC12986890",
"ISSN": "1424-8220",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://doi.org/10.3390/s26051730",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
9
]
]
}
}

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/fnhum.2026.1755549
Dynamic graph based attention spectral network for motor imagery-brain computer interface.
Journal: Frontiers in human neuroscience
In common: bbci.de/competition/iv, systems, EEG, 6 references
[2] doi:10.3390/biomimetics11060377
PG-MCTFormer: A Prior-Guided Multi-Scale Convolutional Transformer for Interpretable Motor Imagery EEG Classification.
Journal: Biomimetics (Basel, Switzerland)
In common: bbci.de/competition/iv, EEG, 6 references
[3] doi:10.3390/bios16080437 [code]
Deep Learning for Ear-EEG-Based Brain-Computer Interface: A Systematic Comparison and Design Insights.
Journal: Biosensors
In common: PyTorch, SciPy, NumPy, EEG, 6 references
[4] doi:10.1371/journal.pone.0354976 [code]
Improved motor imagery BCI performance via task-unaware compression in the BELT Bayesian Edge-Cloud architecture.
Journal: PloS one
In common: SciPy, Matplotlib, NumPy, bbci.de/competition/iv, EEG, 2 references
[5] 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: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG, 1 reference
[6] doi: [code]
Self-Rectifying Integrate-and-Fire Neuron and Collaborative Trim Training Framework for SNN-Based EEG Motor Imagery Classification
Journal: Brain sciences
In common: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG, 1 reference
[7] doi:10.1186/s40708-026-00321-1
EEG-DBNet: a dual-branch framework for temporal-spectral representation learning of motor imagery electroencephalography.
Journal: Brain informatics
In common: bbci.de/competition/iv, EEG, 3 references
[8] doi:10.1371/journal.pone.0347671 [code]
RMETNet: A cross-subject motor imagery EEG signal classification model based on TSLANet and riemannian geometry features.
Journal: PloS one
In common: PyTorch Geometric, PyTorch, SciPy, 2 other tools, EEG, 2 references
[9] doi:10.1038/s41598-026-47627-y [code]
QuantumNeuroXAI: a quantum-inspired deep learning framework with explainability for brain signal analysis and neurological disorder detection.
Journal: Scientific reports
In common: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG
[10] 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: PyTorch, SciPy, Matplotlib, 1 other tool, EEG, 3 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.

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.